-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Output type of warnings.catch_warnings with record=True #3463
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
Comments
srittau
pushed a commit
that referenced
this issue
Nov 14, 2019
patrakov
added a commit
to patrakov/certbot
that referenced
this issue
Feb 25, 2020
…record There is no valid use case for it, and attempts to use it to find the correct zone resulted only in bugs when _acme-challenge is a separate zone. However, external plugins still use it, that's why deprecation and not complete removal. Implementation notes: 1. Tests cannot use assertWarns() because of Python 2.7. However, the call to warnings.catch_warnings(record=True) hits a bug in mypy: python/typeshed#3463 2. CI tests old plugins against new certbot. That's why both new and deprecated calls to add/del_txt_record() are accepted as correct in BaseLexiconAuthenticatorTest.
patrakov
added a commit
to patrakov/certbot
that referenced
this issue
Feb 25, 2020
…record There is no valid use case for it, and attempts to use it to find the correct zone resulted only in bugs when _acme-challenge is a separate zone. However, external plugins still use it, that's why deprecation and not complete removal. Implementation notes: 1. Tests cannot use `assertWarns()` because of Python 2.7. However, the call to `warnings.catch_warnings(record=True)` hits a bug in mypy: python/typeshed#3463 That's why `assert w is not None`. 2. CI tests old plugins against new certbot. That's why both new and deprecated calls to add/del_txt_record() are accepted as correct in BaseLexiconAuthenticatorTest.
patrakov
added a commit
to patrakov/certbot
that referenced
this issue
Feb 25, 2020
…record There is no valid use case for it, and attempts to use it to find the correct zone resulted only in bugs when _acme-challenge is a separate zone. However, external plugins still use it, that's why deprecation and not complete removal. Implementation notes: 1. Tests cannot use `assertWarns()` because of Python 2.7. However, the call to `warnings.catch_warnings(record=True)` hits a bug in mypy: python/typeshed#3463 That's why `assert w is not None`. 2. CI tests old plugins against new certbot. That's why both new and deprecated calls to add/del_txt_record() are accepted as correct in BaseLexiconAuthenticatorTest.
patrakov
added a commit
to patrakov/certbot
that referenced
this issue
Feb 25, 2020
…record There is no valid use case for it, and attempts to use it to find the correct zone resulted only in bugs when _acme-challenge is a separate zone. However, external plugins still use it, that's why deprecation and not complete removal. Implementation notes: 1. Tests cannot use `assertWarns()` because of Python 2.7. However, the call to `warnings.catch_warnings(record=True)` hits a bug in mypy: python/typeshed#3463 That's why `assert w is not None`. 2. CI tests old plugins against new certbot. That's why both new and deprecated calls to add/del_txt_record() are accepted as correct in BaseLexiconAuthenticatorTest.
patrakov
added a commit
to patrakov/certbot
that referenced
this issue
Feb 25, 2020
…record There is no valid use case for it, and attempts to use it to find the correct zone resulted only in bugs when _acme-challenge is a separate zone. However, external plugins still use it, that's why deprecation and not complete removal. Implementation notes: 1. Tests cannot use `assertWarns()` because of Python 2.7. However, the call to `warnings.catch_warnings(record=True)` hits a bug in mypy: python/typeshed#3463 That's why `assert w is not None`. 2. CI tests old plugins against new certbot. That's why both new and deprecated calls to add/del_txt_record() are accepted as correct in BaseLexiconAuthenticatorTest.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Although warnings.catch_warnings with
record=True
returnsa list, mypy is not aware of that:
File
foo.py
:Command
mypy foo.py
gives:Using recent mypy from master (
0.750+dev.e97377c454a1d5c019e9c56871d5f229db6b47b2
).I've attached PR fixing this #3464.
The text was updated successfully, but these errors were encountered: