From b36634260758abbc7b543dce21ebe9b5449f3eb5 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 23 Sep 2025 14:50:00 +0200 Subject: [PATCH 1/3] Update poetry-core to v2 --- poetry.lock | 6 +++--- pyproject.toml | 43 ++++++++++++++++++++----------------------- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/poetry.lock b/poetry.lock index 7509cd1c..aa750fbb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand. [[package]] name = "alabaster" @@ -1752,5 +1752,5 @@ docs = ["sphinx", "sphinx-rtd-theme"] [metadata] lock-version = "2.1" -python-versions = ">=3.9.2,<4.0" -content-hash = "db6aadf35a6005727aaabc412a32c8b46eaeca55c68ad10345f28af163de98e3" +python-versions = ">=3.9.2" +content-hash = "b571aa3a047347c94424a7523eadd8c718ad9e9d9325c1c3ed24f56a62896f4c" diff --git a/pyproject.toml b/pyproject.toml index ed939642..bfee4ea7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,34 +1,40 @@ # PEP-517 build [build-system] -requires = ["poetry_core>=1.0.8"] +requires = ["poetry_core>=2.2.0"] build-backend = "poetry.core.masonry.api" -# Poetry tooling configuration - -[tool.poetry] +[project] name = "josepy" version = "2.2.0.dev0" +license = "Apache-2.0" +license-files = ["LICENSE.txt"] description = "JOSE protocol implementation in Python" -license = "Apache License 2.0" +readme = "README.rst" +authors = [{ name = "Certbot Project", email = "certbot-dev@eff.org" }] +# python 3.9.2 is used as a lower bound here because newer versions of +# cryptography dropped support for python 3.9.0 and 3.9.1. see +# https://github.com/pyca/cryptography/pull/12045. when we drop support for +# python 3.9 altogether, this line can be changed to the simpler 'python = "^3.10"'. +requires-python = ">=3.9.2" +dynamic = ["classifiers", "dependencies"] + +[project.urls] +Homepage = "https://github.com/certbot/josepy" + +# Poetry tooling configuration +[tool.poetry] classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", + # Version specific classifiers are added automatically based on requires-python. + # Except for 3.9 since the lower bound is 3.9.2 currently. "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.14", "Topic :: Internet :: WWW/HTTP", "Topic :: Security", ] -homepage = "https://github.com/certbot/josepy" -authors = ["Certbot Project "] -readme = "README.rst" include = [ "CHANGELOG.rst", "CONTRIBUTING.md", @@ -39,11 +45,6 @@ include = [ # This should be kept in sync with the value of target-version in our # configuration for black below. # -# python 3.9.2 is used as a lower bound here because newer versions of -# cryptography dropped support for python 3.9.0 and 3.9.1. see -# https://github.com/pyca/cryptography/pull/12045. when we drop support for -# python 3.9 altogether, this line can be changed to the simpler 'python = "^3.10"'. -python = ">=3.9.2,<4.0" # load_pem_private/public_key (>=0.6) # rsa_recover_prime_factors (>=0.8) # add sign() and verify() to asymetric keys (RSA >=1.4, ECDSA >=1.5) @@ -78,10 +79,6 @@ jws = "josepy.jws:CLI.run" # Black tooling configuration [tool.black] line-length = 100 -# This should be kept in sync with the version of Python specified in poetry's -# dependencies above. -# TODO add 'py314' once black supports it, see #232 for details -target-version = ['py39', 'py310', 'py311', 'py312', 'py313'] # Mypy tooling configuration From 24abf14158815e38a1608975789ff21298245c0c Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sat, 4 Oct 2025 01:11:10 +0200 Subject: [PATCH 2/3] Add back python requirement in tool.poetry.dependencies --- poetry.lock | 4 ++-- pyproject.toml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index aa750fbb..fea368a9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1752,5 +1752,5 @@ docs = ["sphinx", "sphinx-rtd-theme"] [metadata] lock-version = "2.1" -python-versions = ">=3.9.2" -content-hash = "b571aa3a047347c94424a7523eadd8c718ad9e9d9325c1c3ed24f56a62896f4c" +python-versions = ">=3.9.2,<4.0" +content-hash = "47c9c3f4fe9fb0380642073d66aaef5035a793078c481c03d23fcdb4b8e7e728" diff --git a/pyproject.toml b/pyproject.toml index bfee4ea7..26b615f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ authors = [{ name = "Certbot Project", email = "certbot-dev@eff.org" }] # cryptography dropped support for python 3.9.0 and 3.9.1. see # https://github.com/pyca/cryptography/pull/12045. when we drop support for # python 3.9 altogether, this line can be changed to the simpler 'python = "^3.10"'. +# Update 'tool.poetry.dependencies' as well when changing it! requires-python = ">=3.9.2" dynamic = ["classifiers", "dependencies"] @@ -45,6 +46,8 @@ include = [ # This should be kept in sync with the value of target-version in our # configuration for black below. # +# Update project.requires-python as well when changing it! +python = ">=3.9.2,<4.0" # load_pem_private/public_key (>=0.6) # rsa_recover_prime_factors (>=0.8) # add sign() and verify() to asymetric keys (RSA >=1.4, ECDSA >=1.5) From 33f2ec4c3aa04592378a6f86e6dc5eaa3d80ec2c Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sat, 4 Oct 2025 01:27:05 +0200 Subject: [PATCH 3/3] Code review Co-authored-by: ohemorange --- pyproject.toml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 26b615f2..1708b352 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ authors = [{ name = "Certbot Project", email = "certbot-dev@eff.org" }] # cryptography dropped support for python 3.9.0 and 3.9.1. see # https://github.com/pyca/cryptography/pull/12045. when we drop support for # python 3.9 altogether, this line can be changed to the simpler 'python = "^3.10"'. -# Update 'tool.poetry.dependencies' as well when changing it! +# This should be kept in sync with the value of tool.poetry.dependencies.python below. requires-python = ">=3.9.2" dynamic = ["classifiers", "dependencies"] @@ -43,10 +43,7 @@ include = [ ] [tool.poetry.dependencies] -# This should be kept in sync with the value of target-version in our -# configuration for black below. -# -# Update project.requires-python as well when changing it! +# This should be kept in sync with the value of project.requires-python above. python = ">=3.9.2,<4.0" # load_pem_private/public_key (>=0.6) # rsa_recover_prime_factors (>=0.8)