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

Upgrade to Python 3.12 #3982

Open
jwhitlock opened this issue Oct 9, 2023 · 1 comment · Fixed by #5180
Open

Upgrade to Python 3.12 #3982

jwhitlock opened this issue Oct 9, 2023 · 1 comment · Fixed by #5180

Comments

@jwhitlock
Copy link
Member

jwhitlock commented Oct 9, 2023

Python 3.12.0 was released October 2, 2023. We'll want to upgrade to Python 3.11 first (issue #2731) (done), then ensure our dependencies work with 3.12.

New features

Type annotations

Deprecations

  • The deprecated wstr and wstr_length members of the C implementation of unicode objects were removed, per PEP 623.
  • In the unittest module, a number of long deprecated methods and classes were removed. (They had been deprecated since Python 3.1 or 3.2).
  • The deprecated smtpd and distutils modules have been removed (see PEP 594 and PEP 632. The setuptools package continues to provide the distutils module.
  • A number of other old, broken and deprecated functions, classes and methods have been removed.
  • Invalid backslash escape sequences in strings now warn with SyntaxWarning instead of DeprecationWarning, making them more visible. (They will become syntax errors in the future.)
  • The internal representation of integers has changed in preparation for performance enhancements. (This should not affect most users as it is an internal detail, but it may cause problems for Cython-generated code.)

For more details on the changes to Python 3.12, see What's new in Python 3.12.

@jwhitlock
Copy link
Member Author

When 3.12 was deployed to production on December 4th, 2024 with 2024.11.21, we saw the time to process an email increase from about 1-2 seconds to 3 - 3.5 seconds. This resulted in a backlog of emails during peak times (U.S.A business hours), and a delay of up to an hour to forward an email. We reverted to Python 3.11 with 2024.11.21.1. We'll add more metrics so that we can test email processing time on the staging instance and determine why 3.12 was such as significant slowdown.

@jwhitlock jwhitlock reopened this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant