Skip to content
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

[v0.2] Deprecation warnings are ignored by default #27

Closed
coroa opened this issue Jul 25, 2019 · 6 comments
Closed

[v0.2] Deprecation warnings are ignored by default #27

coroa opened this issue Jul 25, 2019 · 6 comments

Comments

@coroa
Copy link
Member

coroa commented Jul 25, 2019

Uh annoying, they worked wonders in Python 2.7. The default has been changed to ignore them in 3.2 unless you add -Wd to your python interpreter or change the filter as you've shown. Hmm .. if I understand the manual correctly it's not intended for libraries to set captureWarnings or change the filter. I suppose we should warn in the manual about that and change the examples accordingly.

Do you think logging.captureWarnings(True) or warnings.simplefilter('always', DeprecationWarning) should be used? I'm tending towards the former.

Originally posted by @coroa in #23

@coroa coroa added the v0.1 label Jul 25, 2019
@euronion
Copy link
Collaborator

There seems to be quite a long story behind it, see e.g. https://lwn.net/Articles/740804/ .

I am in favour of activating them by default either with the 'always' or 'module' option.
Users of atlite are usually deep in their scripts and we are not talking about encapsulated script behaviour, but relevant API changes.

@coroa
Copy link
Member Author

coroa commented Jul 29, 2019

As described in #29 (comment), we should advocate the use of warnings.simplefilter('default', DeprecationWarning) to avoid overwhelming users.

@euronion
Copy link
Collaborator

Sounds good to me.

It is probably sufficient to just include it in the docs and examples, similar to what is already done with logging basic configuration.

@coroa coroa mentioned this issue Jul 30, 2019
14 tasks
@coroa coroa changed the title [v0.1] Deprecation warnings are ignored by default [v0.2] Deprecation warnings are ignored by default Aug 13, 2019
@euronion
Copy link
Collaborator

I included sections on this in the documentaion as an example.

Do you think this suffices?
https://atlite.readthedocs.io/en/latest/examples/logfiles_and_messages.html

@coroa
Copy link
Member Author

coroa commented Aug 15, 2019 via email

@euronion
Copy link
Collaborator

Great. Closing the issue.

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

2 participants