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.11 #26

Merged
merged 7 commits into from
Nov 10, 2022
Merged

Support Python 3.11 #26

merged 7 commits into from
Nov 10, 2022

Conversation

mauritsvanrees
Copy link
Member

@mauritsvanrees mauritsvanrees commented Nov 8, 2022

This PR updates this repo to the latest meta config, plus some fixes.

See the Python 3.11 docs for a few things that have changed in Python 3.11, especially for exceptions. One of those gives problems for zope.exceptions, at least in the tests. That is PEP 657: Fine-grained error locations in tracebacks. See issue #25 that @icemac reported earlier this year. That is fixed with this PR.

I don't know if anything needs to change for two other new features in 3.11, I did not try them out:

  • PEP 654: Exception Groups and except*
  • PEP 678: Exceptions can be enriched with notes

I have also fixed a possible problem printing info about HTTPError in Python 3.11. In practice this worked fine, but it gave problems in a few Plone tests, though I am solving them in a different way in Plone PRs.

Fixes #25.

@mauritsvanrees mauritsvanrees requested a review from icemac November 8, 2022 14:14
Copy link
Member

@icemac icemac left a comment

Choose a reason for hiding this comment

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

LGTM besides some notes.

src/zope/exceptions/tests/test_exceptionformatter.py Outdated Show resolved Hide resolved
src/zope/exceptions/tests/test_exceptionformatter.py Outdated Show resolved Hide resolved
@icemac icemac merged commit e67ea56 into master Nov 10, 2022
@icemac icemac deleted the maurits-python311 branch November 10, 2022 07:27
@icemac
Copy link
Member

icemac commented Nov 10, 2022

Thank you for this PR. 😃

@icemac
Copy link
Member

icemac commented Nov 10, 2022

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.

Tests fail with Python 3.11
2 participants