Skip to content

bpo-41520: Fix second codeop regression #21848

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

Merged
merged 4 commits into from
Aug 13, 2020
Merged

Conversation

terryjreedy
Copy link
Member

@terryjreedy terryjreedy commented Aug 12, 2020

Fix the regression introduced by the initial regression fix.

https://bugs.python.org/issue41520

Fix the repression introduced by the initial regression fix.
@terryjreedy terryjreedy added type-bug An unexpected behavior, bug, or error needs backport to 3.8 needs backport to 3.9 only security fixes labels Aug 12, 2020
@terryjreedy terryjreedy changed the title bpo-41520: Fix second codeop repression bpo-41520: Fix second codeop regression Aug 12, 2020
@terryjreedy
Copy link
Member Author

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.

@Carreau
Copy link
Contributor

Carreau commented Aug 12, 2020

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)
Copy link
Member

Choose a reason for hiding this comment

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

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).

Copy link
Member Author

Choose a reason for hiding this comment

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

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 <[email protected]>
@terryjreedy terryjreedy merged commit c818b15 into python:master Aug 13, 2020
@miss-islington
Copy link
Contributor

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @terryjreedy, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker c818b15fa59039de67022c29085d439fa5d3ef95 3.9

@miss-islington
Copy link
Contributor

Sorry @terryjreedy, I had trouble checking out the 3.8 backport branch.
Please backport using cherry_picker on command line.
cherry_picker c818b15fa59039de67022c29085d439fa5d3ef95 3.8

@miss-islington
Copy link
Contributor

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @terryjreedy, I could not cleanly backport this to 3.8 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker c818b15fa59039de67022c29085d439fa5d3ef95 3.8

@miss-islington
Copy link
Contributor

Sorry @terryjreedy, I had trouble checking out the 3.9 backport branch.
Please backport using cherry_picker on command line.
cherry_picker c818b15fa59039de67022c29085d439fa5d3ef95 3.9

terryjreedy added a commit to terryjreedy/cpython that referenced this pull request Aug 13, 2020
Fix the repression introduced by the initial regression fix.

(cherry picked from commit c818b15)
terryjreedy added a commit to terryjreedy/cpython that referenced this pull request Aug 13, 2020
* 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 <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Aug 13, 2020
@bedevere-bot
Copy link

GH-21860 is a backport of this pull request to the 3.9 branch.

@terryjreedy
Copy link
Member Author

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.

terryjreedy added a commit that referenced this pull request Aug 13, 2020
Fix the repression introduced by the initial regression fix.

(cherry picked from commit c818b15)
Co-authored-by: Terry Jan Reedy <[email protected]>
@bedevere-bot
Copy link

GH-21862 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 13, 2020
Fix the repression introduced by the initial regression fix.

(cherry picked from commit c818b15)
Co-authored-by: Terry Jan Reedy <[email protected]>
(cherry picked from commit f24430f)

Co-authored-by: Terry Jan Reedy <[email protected]>
miss-islington added a commit that referenced this pull request Aug 13, 2020
Fix the repression introduced by the initial regression fix.

(cherry picked from commit c818b15)
Co-authored-by: Terry Jan Reedy <[email protected]>
(cherry picked from commit f24430f)

Co-authored-by: Terry Jan Reedy <[email protected]>
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Aug 20, 2020
* bpo-41520: Fix second codeop repression

Fix the repression introduced by the initial regression fix.
xzy3 pushed a commit to xzy3/cpython that referenced this pull request Oct 18, 2020
* bpo-41520: Fix second codeop repression

Fix the repression introduced by the initial regression fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants