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

Support python 3.13 #48585

Open
thislooksfun opened this issue Oct 12, 2024 · 4 comments
Open

Support python 3.13 #48585

thislooksfun opened this issue Oct 12, 2024 · 4 comments
Labels

Comments

@thislooksfun
Copy link

thislooksfun commented Oct 12, 2024

Python 3.13 is being aggressively installed by homebrew dependencies, so it's really hard for macOS users to avoid. Trying to run the tests using it fail with an error about _PyErr_WriteUnraisableMsg.

I did some digging and found that the error above is due to a reliance on zstandard==0.22.0. zstandard==0.23.0 fixes that build issue but then I ran into a cryptic traceback for KeyError: '__version__' that I couldn't figure out how to resolve.

@thislooksfun
Copy link
Author

@jgraham I saw you did work on updating to support 3.12 (#45929), would you be able to take a look at this?

@gsnedders
Copy link
Member

This is probably partly the fact that we quite possibly always just install into a _venv3, which means we don't actually re-install things when the ABI changes.

But more importantly I think this is needing to update cffi?

mukilan added a commit to mukilan/servo that referenced this issue Oct 26, 2024
wptrunner breaks macos builds because it doesn't work well with 3.13 due
to two issues:

1. The current version (10.3.0) of the 'pillow' dependency of wptrunner
   breaks with >=3.13 and needs to be upgraded.
2. Python 3.13 has removed the 'cgi' module which was deprecated in 3.11
   and has no direct replacement. There are two files in wptrunner that
   use the cgi module and one of them is the vendored 'html5lib'.

As a quick fix, pin the Python version on MacOS runner until
web-platform-tests/wpt#48585 is addressed.

Signed-off-by: Mukilan Thiyagarajan <[email protected]>
mukilan added a commit to mukilan/servo that referenced this issue Oct 26, 2024
wptrunner breaks macos builds because it doesn't work well with 3.13 due
to two issues:

1. The current version (10.3.0) of the 'pillow' dependency of wptrunner
   breaks with >=3.13 and needs to be upgraded.
2. Python 3.13 has removed the 'cgi' module which was deprecated in 3.11
   and has no direct replacement. There are two files in wptrunner that
   use the cgi module and one of them is the vendored 'html5lib'.

As a quick fix, pin the Python version on MacOS runner until
web-platform-tests/wpt#48585 is addressed.

Signed-off-by: Mukilan Thiyagarajan <[email protected]>
github-merge-queue bot pushed a commit to servo/servo that referenced this issue Oct 26, 2024
wptrunner breaks macos builds because it doesn't work well with 3.13 due
to two issues:

1. The current version (10.3.0) of the 'pillow' dependency of wptrunner
   breaks with >=3.13 and needs to be upgraded.
2. Python 3.13 has removed the 'cgi' module which was deprecated in 3.11
   and has no direct replacement. There are two files in wptrunner that
   use the cgi module and one of them is the vendored 'html5lib'.

As a quick fix, pin the Python version on MacOS runner until
web-platform-tests/wpt#48585 is addressed.

Signed-off-by: Mukilan Thiyagarajan <[email protected]>
MichaelMcDonnell added a commit to MichaelMcDonnell/wpt that referenced this issue Dec 3, 2024
This is a work in progress to add Python 3.13 support as requested
in issue web-platform-tests#48585. I'm trying to get help with it because it fails
inside the Python logging code, and I don't know how to fix that. I
suspect it might be a threading issue related to importlib.reload.

The 'cgi' module was removed in Python 3.13. The `legacy-cgi` module
is a drop-in replacement for projects not ready to upgrade to a better
approach. I've added that to the requirements. The newer version of
the `pillow` module was also required.

I also ran into an issue with the version of `zstandard`. Some
internal C functions have been removed in Python 3.13 which resulted
in cffi errors.

These changes required increasing the minimum Python version from 3.8
to 3.10.

Again, help is very welcome.

Signed-off-by: Michael Mc Donnell <[email protected]>
@MichaelMcDonnell
Copy link

I've started a pull request in #49503 to add Python 3.13 support. Help is welcome since there is still an issue where the tests fail inside the Python logging code and I don't know why.

@gsnedders
Copy link
Member

See also: #39359, about cgi being deprecated.

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

No branches or pull requests

4 participants
@MichaelMcDonnell @gsnedders @thislooksfun and others