Skip to content

GH-93112: Fix missing ResourceDenied import in test_urllib2net #93113

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 1 commit into from
May 24, 2022
Merged

GH-93112: Fix missing ResourceDenied import in test_urllib2net #93113

merged 1 commit into from
May 24, 2022

Conversation

The-Compiler
Copy link
Contributor

The code was moved out of test.support in
311110a (GH-20812), thus making
ResourceDenied undefined.

Closes #93112.

The code was moved out of test.support in
311110a (GH-20812), thus making
ResourceDenied undefined.
@ghost
Copy link

ghost commented May 23, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

@The-Compiler
Copy link
Contributor Author

The-Compiler commented May 23, 2022

I believe this won't need a news entry - but it should probably be backported to 3.11 and 3.10?

@vstinner
Copy link
Member

I confirm the bug without the fix:

$ pyflakes Lib/test/test_urllib2net.py 
Lib/test/test_urllib2net.py:60:23 undefined name 'ResourceDenied'

@vstinner vstinner added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels May 23, 2022
@vstinner
Copy link
Member

it should probably be backported to 3.11 and 3.10?

yes, bugfixes are backported to stable branches: https://devguide.python.org/#status-of-python-branches

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM.

An alternative would be to replace ResourceDenied with support.ResourceDenied, but I'm fine with this fix.

@The-Compiler
Copy link
Contributor Author

Right. Both are already used in the file, so I didn't know what to prefer. Happy to adjust if you prefer using support.ResourceDenied though!

@vstinner vstinner merged commit 37c9a35 into python:main May 24, 2022
@miss-islington
Copy link
Contributor

Thanks @The-Compiler for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-93168 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label May 24, 2022
@bedevere-bot
Copy link

GH-93169 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 24, 2022
…ythonGH-93113)

The code was moved out of test.support in
311110a (pythonGH-20812), thus making
ResourceDenied undefined.
(cherry picked from commit 37c9a35)

Co-authored-by: Florian Bruhin <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 24, 2022
…ythonGH-93113)

The code was moved out of test.support in
311110a (pythonGH-20812), thus making
ResourceDenied undefined.
(cherry picked from commit 37c9a35)

Co-authored-by: Florian Bruhin <[email protected]>
miss-islington added a commit that referenced this pull request May 24, 2022
)

The code was moved out of test.support in
311110a (GH-20812), thus making
ResourceDenied undefined.
(cherry picked from commit 37c9a35)

Co-authored-by: Florian Bruhin <[email protected]>
miss-islington added a commit that referenced this pull request May 24, 2022
)

The code was moved out of test.support in
311110a (GH-20812), thus making
ResourceDenied undefined.
(cherry picked from commit 37c9a35)

Co-authored-by: Florian Bruhin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ResourceDenied raised in TransientResource but not imported in test_urllib2net
5 participants