-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Typo/trivial mistake in warnings.py (may be related to 2.x to 3.x conversion) #79359
Comments
|
This may be a consequence of bpo-26568. |
It's not a typo: it's that my change now requires the last argument of formatwarning() to be a keyword argument called 'line'. The error comes from numpy. But I'm fine to now require that the last formatwarning() argument is called 'line' and pass its value as an positional argument, not as a keyword argument. In that case, I would like to see an unit test to check that replacing warnings.formatwarning() with a new function and the last parameter of this function is not called 'line' still works. |
@tashrifbillah I will be happy to add a test on a follow up PR attributing to the original PR as per #10343 (comment) Thanks |
Thanks Tashrif Billah and Karthikeyan Singaravelan for the fix! Sadly, Python 3.6 now only accept security fixes, and so this bug cannot be fixed in the 3.6 branch anymore. The workaround is the rename the last parameter of your customer formatmsg function to 'line' ;-) |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: