Skip to content

fully deprecate (i.e. remove) some RFed years ago methods #477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yarikoptic opened this issue Aug 9, 2016 · 4 comments
Closed

fully deprecate (i.e. remove) some RFed years ago methods #477

yarikoptic opened this issue Aug 9, 2016 · 4 comments

Comments

@yarikoptic
Copy link
Member

I see that to_filespec was deprecated in 2010 (36d8c21, i.e. upstream/1.0.0.dev~16) so may be it is time to prune those which were marked deprecated in 1.x series completely in 2.x or at least in some 3.x at least whenever that one comes?
Now it seems a good portion of .to_ methods is deprecated, complicating "guess writing" of code via completions ;)

I think I saw somewhere (thought it was numpy but their decorator seems to be not as sophisticated), some decorator so you could mark your version when you are going to deprecate the method, so if originally you did

@deprecate('2.0.0')
def to_be_removed():

then whenever you release 2.0.0 (adjust __version__ to be 2.0.0), it would simply cause an error demanding physical removal, and thus reminding about necessity... or I just dreamed it up?

@matthew-brett
Copy link
Member

That decorator does sound like a good idea. I can't remember seeing that written though. I had a quick look in numpy, scipy, matplotlib.

It is probably a good idea to elevate the deprecationwarning to make sure they are visible, I believe they will be suppressed by default at the moment.

How would this decorator work when the version number goes to the version where the function will be removed? The tests will fail, but there's a risk of changing the version number expecting the tests to still pass, and then releasing with a broken package.

@yarikoptic
Copy link
Member Author

Fwiw Myself I always run tests during pkg build whenever version is already changed.

On August 9, 2016 12:48:29 PM EDT, Matthew Brett [email protected] wrote:

That decorator does sound like a good idea. I can't remember seeing
that written though. I had a quick look in numpy, scipy, matplotlib.

It is probably a good idea to elevate the deprecationwarning to make
sure they are visible, I believe they will be suppressed by default at
the moment.

How would this decorator work when the version number goes to the
version where the function will be removed? The tests will fail, but
there's a risk of changing the version number expecting the tests to
still pass, and then releasing with a broken package.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#477 (comment)

@matthew-brett
Copy link
Member

How about #479 ?

@effigies
Copy link
Member

effigies commented Sep 7, 2017

Closing, since this seems to have been handled by #479. @yarikoptic please reopen if something remains to be addressed.

@effigies effigies closed this as completed Sep 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants