bpo-41520: Fix second codeop regression#21848
Conversation
Fix the repression introduced by the initial regression fix.
|
The CI passed without adding warnings.catch_warnings(), but on my local machine there was an 'altered the execution environment' warning which some buildbots might turn into an error. |
|
currently compiling this locally and will test how that effect IPython. Thanks for the quick turnaround. |
| (".*invalid", DeprecationWarning), | ||
| ) as w: | ||
| compile_command(r"'\e' is 0") | ||
| self.assertEqual(len(w.warnings), 2) |
There was a problem hiding this comment.
Would it be possible to another test which only emits a single warning? For example, keep the existing "0 is 0" test, but add your new test as a new one (don't replace the existing one).
There was a problem hiding this comment.
check_warnings checks that each of the two warnings is called, so that 2 must be 1+1 and not 2+0, so the above is, in a sense, two independent tests. We are not testing builtin compile, but that compile_command only lets 1+1 of the 3+3 warnings pass to the caller.
Co-authored-by: Victor Stinner <vstinner@python.org>
|
Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9. |
|
Sorry, @terryjreedy, I could not cleanly backport this to |
|
Sorry @terryjreedy, I had trouble checking out the |
|
Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
|
Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9. |
|
Sorry, @terryjreedy, I could not cleanly backport this to |
|
Sorry @terryjreedy, I had trouble checking out the |
Fix the repression introduced by the initial regression fix. (cherry picked from commit c818b15)
* bpo-41520: Fix second codeop repression Fix the repression introduced by the initial regression fix.. (cherry picked from commit c818b15) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
GH-21860 is a backport of this pull request to the 3.9 branch. |
|
Not checking out branches is bad. 'warnings_helper' does not exist in 3.9-, so had to be turned back into 'support'. Not sure why this caused a merge conflict, rather than a test failure. I requested that the 3.9 backport be backported to 3.8. |
|
GH-21862 is a backport of this pull request to the 3.8 branch. |
* bpo-41520: Fix second codeop repression Fix the repression introduced by the initial regression fix.
* bpo-41520: Fix second codeop repression Fix the repression introduced by the initial regression fix.
Fix the regression introduced by the initial regression fix.
https://bugs.python.org/issue41520