Skip to content

Python 3.13 and 3.14 support#991

Merged
ato merged 3 commits into
mainfrom
python3.14
Apr 10, 2026
Merged

Python 3.13 and 3.14 support#991
ato merged 3 commits into
mainfrom
python3.14

Conversation

@ato
Copy link
Copy Markdown
Collaborator

@ato ato commented Apr 7, 2026

Description

  • update werkzeug, gevent, greenlet to latest version for 3.14 support but conditionally pin when necessary to not break older Python
  • Flask 2.2.0 replaced JSONIFY_PRETTYPRINT_REGULAR with app.json.compact so support both
  • setuptools is no longer included by default since Python 3.12 so add it
  • cgi was removed in Python 3.13 so replace it with legacy-cgi
  • add python 3.13 and 3.14 to test matrix in both tox and the Github action

Motivation and Context

To allow pywb to run on Python 3.13 and 3.14.
Fixes #979

Types of changes

  • Replay fix (fixes a replay specific issue)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added or updated tests to cover my changes.
  • All new and existing tests passed.

ato added 2 commits April 7, 2026 10:39
- setuptools is no longer included by default since Python 3.12 so add it
- cgi was removed in Python 3.13 so replace it with legacy-cgi
- use a compatible version of gevent
- update werkzeug, gevent, greenlet to latest version for 3.14 support but conditionally pin when necessary to not break older Python
- Flask 2.2.0 replaced JSONIFY_PRETTYPRINT_REGULAR with app.json.compact so support both
@ldko ldko self-requested a review April 9, 2026 17:35
Copy link
Copy Markdown
Collaborator

@ldko ldko left a comment

Choose a reason for hiding this comment

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

The changes, including suggestions related to dropping 3.7 and 3.8 mentions, worked for me running pywb in 3.9-3.14.

Comment thread setup.py Outdated
Comment thread tox.ini Outdated
Comment thread setup.py Outdated
Comment on lines 150 to 151
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should take out these lines mentioning 3.7 and 3.8 unless there is a consensus to further fix things for 3.7 and 3.8 compatibility.

Comment thread requirements.txt Outdated
Comment thread requirements.txt Outdated
Comment thread requirements.txt Outdated
werkzeug==3.1.7; python_version>="3.9"
webencodings
legacy-cgi; python_version>="3.13"
gevent==22.10.2; python_version<"3.8"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This line is no longer relevant.

Co-authored-by: Lauren Ko <lauren.ko@unt.edu>
@ato
Copy link
Copy Markdown
Collaborator Author

ato commented Apr 10, 2026

Thanks for testing on 3.8. I agree with you on dropping 3.7 and 3.8 rather than fixing. They don't even seem very relevant for long support Linux:

Distribution Default Python End of Support
Debian 10 Python 3.7 2024
Debian 11 Python 3.9 2026
RHEL 8 Python 3.6 2029
RHEL 9 Python 3.9 2032
SLES 15 Python 3.6 2031
SLES 16 Python 3.13 2035
Ubuntu 20.04 Python 3.8 2025; 2031 for Ubuntu Pro
Ubuntu 22.04 Python 3.10 2027

@wumpus
Copy link
Copy Markdown

wumpus commented Apr 10, 2026

We should test all of the python versions we claim to support. I think they're aligned now. warcio and cdx-toolkit are also currently aligned.

@ldko
Copy link
Copy Markdown
Collaborator

ldko commented Apr 10, 2026

Not sure about the Cancelled test on python 3.9 that has led to a failing check. Tests passed locally for me though. Thanks for adding 3.13 and 3.14 support @ato

@ato
Copy link
Copy Markdown
Collaborator Author

ato commented Apr 10, 2026

Not sure about the Cancelled test on python 3.9 that has led to a failing check.

The last line logged before hitting the 15m timeout was tests/test_acl.py::TestACLApp::test_acl_after PASSED which seems an unlikely place to get stuck. Perhaps an issue with the test host. It passed when I clicked retry.

@ato ato merged commit 9de84be into main Apr 10, 2026
17 of 18 checks passed
@ato ato deleted the python3.14 branch April 10, 2026 22:52
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 this pull request may close these issues.

Can't install package in python 3.13+ enviornments

3 participants