Skip to content
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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

The-Compiler
Copy link
Contributor

@The-Compiler The-Compiler commented May 23, 2022

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 (pythonGH-20812), thus making
ResourceDenied undefined.
@cpython-cla-bot
Copy link

@cpython-cla-bot cpython-cla-bot bot commented May 23, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

@The-Compiler
Copy link
Contributor Author

@The-Compiler 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

@vstinner vstinner commented May 23, 2022

I confirm the bug without the fix:

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

@vstinner
Copy link
Member

@vstinner vstinner commented May 23, 2022

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

LGTM.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants