Skip to content

Conversation

@cdce8p
Copy link
Contributor

@cdce8p cdce8p commented May 28, 2025

With PEP 649 annotation handling in Python 3.14 will change. The Python docs provide a good guide on how to access all annotations in 3.14 and beyond. I've updated the code in json_util.py to use the new functions.

Furthermore argparse.FileType will be deprecated. It's recommend to use the regular open contextmanager instead.

Lastly, I've added 3.14 to the CI test matrix and the corresponding classifier.

--
If accepted, it would be awesome if a new version could be released soon as this would unblock further testing with Python 3.14 in downstream projects.

@zoracon zoracon requested review from a team and wgreenberg and removed request for a team May 29, 2025 21:26
wgreenberg
wgreenberg previously approved these changes Jun 13, 2025
Copy link
Contributor

@wgreenberg wgreenberg left a comment

Choose a reason for hiding this comment

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

apologies for the late review, but this is great, thanks! tragically there's now a conflict in the changelog. once that's resolved and this gets a second review, this is good to go!

@wgreenberg wgreenberg requested review from a team and ohemorange and removed request for a team June 13, 2025 19:38
@cdce8p cdce8p requested a review from a team as a code owner June 13, 2025 19:40
@cdce8p
Copy link
Contributor Author

cdce8p commented Jun 13, 2025

apologies for the late review, but this is great, thanks! tragically there's now a conflict in the changelog. once that's resolved and this gets a second review, this is good to go!

Thanks for the review @wgreenberg! Just merged main to resolve the conflict. Should be good now. As mentioned in the description, a new release afterwards would be much appreciated 🙏🏻 It would help move testing Python 3.14 along.

wgreenberg
wgreenberg previously approved these changes Jun 13, 2025
pyproject.toml Outdated
# This should be kept in sync with the version of Python specified in poetry's
# dependencies above.
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
target-version = ['py39', 'py310', 'py311', 'py312', 'py313'] # TODO add 'py314'
Copy link
Contributor

Choose a reason for hiding this comment

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

TODOs should have an associated issue tracking the plan to complete them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure that's really necessary here. I only added the comment since the current black version doesn't support py314. The line will also become redundant once the build-system is updated to poetry v2 which supports project.requires-python.

Copy link
Contributor

Choose a reason for hiding this comment

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

Those are the sorts of details that would be great in an issue so that we remember to update this code when they become available.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Opened #232 and updated the comment here.

@cdce8p
Copy link
Contributor Author

cdce8p commented Jun 16, 2025

Thanks for the review @ohemorange. I left comments on each of your suggestions. Overall I'd suggest to leave the PR as is. However my main focus is to add support for Python 3.14 and not to insist on my coding style. If, after reading my comments, you still prefer that I change it, please to tell and I'm happy to update the PR.

Copy link
Contributor

@ohemorange ohemorange left a comment

Choose a reason for hiding this comment

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

However my main focus is to add support for Python 3.14 and not to insist on my coding style.

It is important to have a readable, maintainable codebase. Coding style is in fact a part of reviewing PRs.

pyproject.toml Outdated
# This should be kept in sync with the version of Python specified in poetry's
# dependencies above.
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
target-version = ['py39', 'py310', 'py311', 'py312', 'py313'] # TODO add 'py314'
Copy link
Contributor

Choose a reason for hiding this comment

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

Those are the sorts of details that would be great in an issue so that we remember to update this code when they become available.

@cdce8p cdce8p mentioned this pull request Jun 18, 2025
Copy link
Contributor Author

@cdce8p cdce8p left a comment

Choose a reason for hiding this comment

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

However my main focus is to add support for Python 3.14 and not to insist on my coding style.

It is important to have a readable, maintainable codebase. Coding style is in fact a part of reviewing PRs.

Absolutely! The point I wanted to preference here is that the patch doesn't need to conform to my style, it needs to fit in with the project.

I've just pushed a commit with the changes you requested.

pyproject.toml Outdated
# This should be kept in sync with the version of Python specified in poetry's
# dependencies above.
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
target-version = ['py39', 'py310', 'py311', 'py312', 'py313'] # TODO add 'py314'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Opened #232 and updated the comment here.

@cdce8p cdce8p requested a review from ohemorange June 18, 2025 23:33
Copy link
Contributor

@ohemorange ohemorange left a comment

Choose a reason for hiding this comment

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

Thank you! lgtm!

@ohemorange ohemorange merged commit 8ddcaae into certbot:main Jun 23, 2025
8 checks passed
@cdce8p
Copy link
Contributor Author

cdce8p commented Jun 23, 2025

Thanks everyone! Would it be possible to do a new release soon? Would be great to have a Python 3.14 compatible release ready for testing.

@cdce8p cdce8p deleted the python-3.14 branch June 26, 2025 07:12
@ohemorange
Copy link
Contributor

We plan to do a new release soon!

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.

3 participants