-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add support for Python 3.13 #49970
base: master
Are you sure you want to change the base?
Add support for Python 3.13 #49970
Conversation
This code has been dropped from Python 3.13, but we depend on FieldStorage as part of the request API. The easiest option here is to directly import the code that we are already using (the last version on the 3.12 branch, but with the deprecation warning removed), along with a copy of the PSF License which covers the cgi module code.
…ck API This is required since the logging module started using the lock as a context manager, and calling the acquire and release methods.
Remove code only needed for Python < 3.4 and ensure that we always use the spawn form of multiprocessing to avoid problems with fork and locks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should also vendor the cgi tests, for the sake of any changes we make to it?
pillow==10.4.0; python_version < '3.13' | ||
pillow==11.1.0; python_version >= '3.13' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to just make this python_version < '3.9'
, which means 3.8 (which I think we're closing to dropping support for?) is the only outlier?
@@ -77,7 +77,7 @@ def __init__(self, queue, level=logging.NOTSET): | |||
|
|||
def createLock(self): | |||
# The queue provides its own locking | |||
self.lock = None | |||
self.lock = NullLock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What motivates this change? This doesn't look like it should be related to Python 3.13 changes?
Notably this involves vendoring a copy of the removed cgi module from stdlib.