Skip to content

Improvements to deprecated#196

Closed
pberkes wants to merge 9 commits into
masterfrom
feature/improve-deprecated
Closed

Improvements to deprecated#196
pberkes wants to merge 9 commits into
masterfrom
feature/improve-deprecated

Conversation

@pberkes
Copy link
Copy Markdown

@pberkes pberkes commented Jun 11, 2014

  • Raises a DeprecationWarning
  • Function to clear up the global cache

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.44%) when pulling 3afc043 on feature/improve-deprecated into 83eb368 on master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.08%) when pulling e190014 on feature/improve-deprecated into 83eb368 on master.

@pberkes
Copy link
Copy Markdown
Author

pberkes commented Jun 12, 2014

Ready for review.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP 8 violation (long line)

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.1%) when pulling 5e7192a on feature/improve-deprecated into a1f8b32 on master.

@mdickinson
Copy link
Copy Markdown
Member

This is a more drastic change, but how about we simply issue the DeprecationWarning and remove the logged warning and all the caching machinery?

@pberkes
Copy link
Copy Markdown
Author

pberkes commented Jul 1, 2014

@mdickinson I'm not sure if the logs are a wanted feature or not. Myself, I won't miss them

@mdickinson
Copy link
Copy Markdown
Member

Looking at this again, we should definitely remove the caching machinery: as a library, Traits should simply emit the warning and/or log message unconditionally. If an application using Traits only wants to see the first occurrence of a particular warning or log message, then that application should configure warnings or logging appropriately.

That leaves the question of whether we should be issuing logs or warnings or both for deprecated machinery: I think we should just issue the warnings. That's the standard Python way to warn about deprecations.

@mdickinson
Copy link
Copy Markdown
Member

See #220 for an alternative proposal.

@mdickinson
Copy link
Copy Markdown
Member

Closing this in favour of #220, which has now been merged.

@mdickinson mdickinson closed this Dec 18, 2014
@mdickinson mdickinson deleted the feature/improve-deprecated branch January 3, 2020 14:18
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

Successfully merging this pull request may close these issues.

3 participants