Update to latest poetry-plugin-export to fix urllib3 multiple versions issue and unpin urllib3 (#10169)

We can use modern urllib3 now! They
[fixed](https://github.com/python-poetry/poetry-plugin-export/pull/286)
the poetry
[issue](https://github.com/python-poetry/poetry-plugin-export/issues/183)
and shipped it!

Since this PR updates the requirements file, it pulls in the new
`josepy` release, so I've silenced those warnings here. If I should do
that in a separate PR lmk.
This commit is contained in:
ohemorange
2025-02-05 17:14:25 -08:00
committed by GitHub
parent 87e5dcbc83
commit aafe7ba2f9
7 changed files with 56 additions and 42 deletions
+5 -1
View File
@@ -14,6 +14,7 @@ from typing import Optional
from typing import Set
from typing import Tuple
from typing import Union
import warnings
from cryptography import x509
@@ -226,7 +227,10 @@ class ClientV2:
"""
csr = OpenSSL.crypto.load_certificate_request(
OpenSSL.crypto.FILETYPE_PEM, orderr.csr_pem)
wrapped_csr = messages.CertificateRequest(csr=jose.ComparableX509(csr))
with warnings.catch_warnings():
warnings.filterwarnings('ignore',
message='The next major version of josepy will remove josepy.util.ComparableX509')
wrapped_csr = messages.CertificateRequest(csr=jose.ComparableX509(csr))
res = self._post(orderr.body.finalize, wrapped_csr)
orderr = orderr.update(body=messages.Order.from_json(res.json()))
return orderr
+15 -4
View File
@@ -12,6 +12,7 @@ from typing import Optional
from typing import Tuple
from typing import Type
from typing import TypeVar
import warnings
import josepy as jose
@@ -582,7 +583,11 @@ class CertificateRequest(jose.JSONObjectWithFields):
`OpenSSL.crypto.X509Req` wrapped in `.ComparableX509`
"""
csr: jose.ComparableX509 = jose.field('csr', decoder=jose.decode_csr, encoder=jose.encode_csr)
with warnings.catch_warnings():
warnings.filterwarnings('ignore',
message='The next major version of josepy will remove josepy.util.ComparableX509')
csr: jose.ComparableX509 = jose.field(
'csr', decoder=jose.decode_csr, encoder=jose.encode_csr)
class CertificateResource(ResourceWithURI):
@@ -594,7 +599,10 @@ class CertificateResource(ResourceWithURI):
:ivar tuple authzrs: `tuple` of `AuthorizationResource`.
"""
cert_chain_uri: str = jose.field('cert_chain_uri')
with warnings.catch_warnings():
warnings.filterwarnings('ignore',
message='The next major version of josepy will remove josepy.util.ComparableX509')
cert_chain_uri: str = jose.field('cert_chain_uri')
authzrs: Tuple[AuthorizationResource, ...] = jose.field('authzrs')
@@ -605,8 +613,11 @@ class Revocation(jose.JSONObjectWithFields):
`jose.ComparableX509`
"""
certificate: jose.ComparableX509 = jose.field(
'certificate', decoder=jose.decode_cert, encoder=jose.encode_cert)
with warnings.catch_warnings():
warnings.filterwarnings('ignore',
message='The next major version of josepy will remove josepy.util.ComparableX509')
certificate: jose.ComparableX509 = jose.field(
'certificate', decoder=jose.decode_cert, encoder=jose.encode_cert)
reason: int = jose.field('reason')
+3 -2
View File
@@ -1,4 +1,5 @@
"""Module configuring Certbot in a snap environment"""
from __future__ import annotations
import logging
import socket
from typing import Iterable
@@ -134,12 +135,12 @@ class _SnapdAdapter(HTTPAdapter):
# help out those packagers while ensuring this code works reliably, we offer custom versions of
# both functions for now. when certbot does declare a dependency on requests>=2.32.2 in its
# setup.py files, get_connection can be deleted
def get_connection(self, url: str,
def get_connection(self, url: str | bytes,
proxies: Optional[Iterable[str]] = None) -> _SnapdConnectionPool:
return _SnapdConnectionPool()
def get_connection_with_tls_context(self, request: PreparedRequest,
verify: bool,
verify: bool | str | None,
proxies: Optional[Iterable[str]] = None,
cert: Optional[Union[str, Tuple[str,str]]] = None
) -> _SnapdConnectionPool:
+2 -4
View File
@@ -50,10 +50,8 @@ dev_extras = [
# poetry 1.2.0+ is required for it to pin pip, setuptools, and wheel. See
# https://github.com/python-poetry/poetry/issues/1584.
'poetry>=1.2.0',
# poetry-plugin-export>=1.1.0 is required to use the constraints.txt export
# format. See
# https://github.com/python-poetry/poetry-plugin-export/blob/efcfd34859e72f6a79a80398f197ce6eb2bbd7cd/CHANGELOG.md#added.
'poetry-plugin-export>=1.1.0',
# allows us to use newer urllib3 https://github.com/python-poetry/poetry-plugin-export/issues/183
'poetry-plugin-export>=1.9.0',
'twine',
]
+1
View File
@@ -39,3 +39,4 @@ filterwarnings =
ignore:.*You should use pyca/cryptography's X.509 APIs:DeprecationWarning
ignore:Passing pyOpenSSL PKey objects is deprecated:DeprecationWarning
ignore:Passing pyOpenSSL X509 objects is deprecated:DeprecationWarning
ignore:The next major version of josepy will remove:DeprecationWarning
-3
View File
@@ -8,9 +8,6 @@ license = "Apache License 2.0"
[tool.poetry.dependencies]
python = "^3.9"
# workaround for: https://github.com/python-poetry/poetry-plugin-export/issues/183
urllib3 = ">=1.25.4,<1.27"
# Local dependencies
# Any local packages that have dependencies on other local packages must be
# listed below before the package it depends on. For instance, certbot depends
+30 -28
View File
@@ -9,18 +9,18 @@ alabaster==0.7.16 ; python_version >= "3.9" and python_version < "4.0"
apacheconfig==0.3.2 ; python_version >= "3.9" and python_version < "4.0"
astroid==3.3.8 ; python_version >= "3.9" and python_version < "4.0"
asttokens==3.0.0 ; python_version >= "3.9" and python_version < "4.0"
attrs==24.3.0 ; python_version >= "3.9" and python_version < "4.0"
attrs==25.1.0 ; python_version >= "3.9" and python_version < "4.0"
azure-core==1.32.0 ; python_version >= "3.9" and python_version < "4.0"
azure-devops==7.1.0b4 ; python_version >= "3.9" and python_version < "4.0"
babel==2.16.0 ; python_version >= "3.9" and python_version < "4.0"
backports-tarfile==1.2.0 ; python_version >= "3.9" and python_version < "3.12"
bcrypt==4.2.1 ; python_version >= "3.9" and python_version < "4.0"
beautifulsoup4==4.12.3 ; python_version >= "3.9" and python_version < "4.0"
boto3==1.35.99 ; python_version >= "3.9" and python_version < "4.0"
botocore==1.35.99 ; python_version >= "3.9" and python_version < "4.0"
boto3==1.36.9 ; python_version >= "3.9" and python_version < "4.0"
botocore==1.36.9 ; python_version >= "3.9" and python_version < "4.0"
build==1.2.2.post1 ; python_version >= "3.9" and python_version < "4.0"
cachecontrol==0.14.2 ; python_version >= "3.9" and python_version < "4.0"
cachetools==5.5.0 ; python_version >= "3.9" and python_version < "4.0"
cachetools==5.5.1 ; python_version >= "3.9" and python_version < "4.0"
certifi==2024.12.14 ; python_version >= "3.9" and python_version < "4.0"
cffi==1.17.1 ; python_version >= "3.9" and python_version < "4.0"
chardet==5.2.0 ; python_version >= "3.9" and python_version < "4.0"
@@ -35,7 +35,7 @@ crashtest==0.4.1 ; python_version >= "3.9" and python_version < "4.0"
cryptography==43.0.3 ; python_version >= "3.9" and python_version < "4.0"
cython==0.29.37 ; python_version >= "3.9" and python_version < "4.0"
decorator==5.1.1 ; python_version >= "3.9" and python_version < "4.0"
deprecated==1.2.15 ; python_version >= "3.9" and python_version < "4.0"
deprecated==1.2.18 ; python_version >= "3.9" and python_version < "4.0"
dill==0.3.9 ; python_version >= "3.9" and python_version < "4.0"
distlib==0.3.9 ; python_version >= "3.9" and python_version < "4.0"
distro==1.9.0 ; python_version >= "3.9" and python_version < "4.0"
@@ -45,19 +45,20 @@ docutils==0.21.2 ; python_version >= "3.9" and python_version < "4.0"
dulwich==0.22.7 ; python_version >= "3.9" and python_version < "4.0"
exceptiongroup==1.2.2 ; python_version >= "3.9" and python_version < "3.11"
execnet==2.1.1 ; python_version >= "3.9" and python_version < "4.0"
executing==2.1.0 ; python_version >= "3.9" and python_version < "4.0"
executing==2.2.0 ; python_version >= "3.9" and python_version < "4.0"
fabric==3.2.2 ; python_version >= "3.9" and python_version < "4.0"
fastjsonschema==2.21.1 ; python_version >= "3.9" and python_version < "4.0"
filelock==3.16.1 ; python_version >= "3.9" and python_version < "4.0"
google-api-core==2.24.0 ; python_version >= "3.9" and python_version < "4.0"
google-api-python-client==2.159.0 ; python_version >= "3.9" and python_version < "4.0"
filelock==3.17.0 ; python_version >= "3.9" and python_version < "4.0"
google-api-core==2.24.1 ; python_version >= "3.9" and python_version < "4.0"
google-api-python-client==2.160.0 ; python_version >= "3.9" and python_version < "4.0"
google-auth-httplib2==0.2.0 ; python_version >= "3.9" and python_version < "4.0"
google-auth==2.37.0 ; python_version >= "3.9" and python_version < "4.0"
google-auth==2.38.0 ; python_version >= "3.9" and python_version < "4.0"
googleapis-common-protos==1.66.0 ; python_version >= "3.9" and python_version < "4.0"
httplib2==0.22.0 ; python_version >= "3.9" and python_version < "4.0"
id==1.5.0 ; python_version >= "3.9" and python_version < "4.0"
idna==3.10 ; python_version >= "3.9" and python_version < "4.0"
imagesize==1.4.1 ; python_version >= "3.9" and python_version < "4.0"
importlib-metadata==8.5.0 ; python_version >= "3.9" and python_version < "3.12"
importlib-metadata==8.6.1 ; python_version >= "3.9" and python_version < "3.12"
iniconfig==2.0.0 ; python_version >= "3.9" and python_version < "4.0"
installer==0.7.0 ; python_version >= "3.9" and python_version < "4.0"
invoke==2.2.0 ; python_version >= "3.9" and python_version < "4.0"
@@ -72,7 +73,7 @@ jedi==0.19.2 ; python_version >= "3.9" and python_version < "4.0"
jeepney==0.8.0 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "linux"
jinja2==3.1.5 ; python_version >= "3.9" and python_version < "4.0"
jmespath==1.0.1 ; python_version >= "3.9" and python_version < "4.0"
josepy==1.14.0 ; python_version >= "3.9" and python_version < "4.0"
josepy==1.15.0 ; python_version >= "3.9" and python_version < "4.0"
jsonlines==4.0.0 ; python_version >= "3.9" and python_version < "4.0"
jsonpickle==4.0.1 ; python_version >= "3.9" and python_version < "4.0"
keyring==25.6.0 ; python_version >= "3.9" and python_version < "4.0"
@@ -93,7 +94,7 @@ paramiko==3.5.0 ; python_version >= "3.9" and python_version < "4.0"
parsedatetime==2.6 ; python_version >= "3.9" and python_version < "4.0"
parso==0.8.4 ; python_version >= "3.9" and python_version < "4.0"
pexpect==4.9.0 ; python_version >= "3.9" and python_version < "4.0" and sys_platform != "win32"
pip==24.3.1 ; python_version >= "3.9" and python_version < "4.0"
pip==25.0 ; python_version >= "3.9" and python_version < "4.0"
pkginfo==1.12.0 ; python_version >= "3.9" and python_version < "4.0"
platformdirs==4.3.6 ; python_version >= "3.9" and python_version < "4.0"
pluggy==1.5.0 ; python_version >= "3.9" and python_version < "4.0"
@@ -101,8 +102,8 @@ ply==3.11 ; python_version >= "3.9" and python_version < "4.0"
poetry-core==2.0.1 ; python_version >= "3.9" and python_version < "4.0"
poetry-plugin-export==1.9.0 ; python_version >= "3.9" and python_version < "4.0"
poetry==2.0.1 ; python_version >= "3.9" and python_version < "4.0"
prompt-toolkit==3.0.48 ; python_version >= "3.9" and python_version < "4.0"
proto-plus==1.25.0 ; python_version >= "3.9" and python_version < "4.0"
prompt-toolkit==3.0.50 ; python_version >= "3.9" and python_version < "4.0"
proto-plus==1.26.0 ; python_version >= "3.9" and python_version < "4.0"
protobuf==5.29.3 ; python_version >= "3.9" and python_version < "4.0"
ptyprocess==0.7.0 ; python_version >= "3.9" and python_version < "4.0" and sys_platform != "win32"
pure-eval==0.2.3 ; python_version >= "3.9" and python_version < "4.0"
@@ -115,7 +116,7 @@ pynacl==1.5.0 ; python_version >= "3.9" and python_version < "4.0"
pyopenssl==25.0.0 ; python_version >= "3.9" and python_version < "4.0"
pyotp==2.9.0 ; python_version >= "3.9" and python_version < "4.0"
pyparsing==3.2.1 ; python_version >= "3.9" and python_version < "4.0"
pyproject-api==1.8.0 ; python_version >= "3.9" and python_version < "4.0"
pyproject-api==1.9.0 ; python_version >= "3.9" and python_version < "4.0"
pyproject-hooks==1.2.0 ; python_version >= "3.9" and python_version < "4.0"
pyrfc3339==2.0.1 ; python_version >= "3.9" and python_version < "4.0"
pytest-cov==6.0.0 ; python_version >= "3.9" and python_version < "4.0"
@@ -136,8 +137,8 @@ requests-toolbelt==1.0.0 ; python_version >= "3.9" and python_version < "4.0"
requests==2.32.3 ; python_version >= "3.9" and python_version < "4.0"
rfc3986==2.0.0 ; python_version >= "3.9" and python_version < "4.0"
rich==13.9.4 ; python_version >= "3.9" and python_version < "4.0"
rsa==4.9 ; python_version >= "3.9" and python_version < "4"
s3transfer==0.10.4 ; python_version >= "3.9" and python_version < "4.0"
rsa==4.9 ; python_version >= "3.9" and python_version < "4.0"
s3transfer==0.11.2 ; python_version >= "3.9" and python_version < "4.0"
secretstorage==3.3.3 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "linux"
semantic-version==2.10.0 ; python_version >= "3.9" and python_version < "4.0"
setuptools-rust==1.10.2 ; python_version >= "3.9" and python_version < "4.0"
@@ -157,25 +158,26 @@ sphinxcontrib-qthelp==2.0.0 ; python_version >= "3.9" and python_version < "4.0"
sphinxcontrib-serializinghtml==2.0.0 ; python_version >= "3.9" and python_version < "4.0"
stack-data==0.6.3 ; python_version >= "3.9" and python_version < "4.0"
tldextract==5.1.3 ; python_version >= "3.9" and python_version < "4.0"
tomli==2.2.1 ; python_version >= "3.9" and python_full_version <= "3.11.0a6"
tomli==2.2.1 ; python_version >= "3.9" and python_version < "3.11"
tomlkit==0.13.2 ; python_version >= "3.9" and python_version < "4.0"
tox==4.23.2 ; python_version >= "3.9" and python_version < "4.0"
tox==4.24.1 ; python_version >= "3.9" and python_version < "4.0"
traitlets==5.14.3 ; python_version >= "3.9" and python_version < "4.0"
trove-classifiers==2025.1.10.15 ; python_version >= "3.9" and python_version < "4.0"
twine==6.0.1 ; python_version >= "3.9" and python_version < "4.0"
types-cffi==1.16.0.20241221 ; python_version >= "3.9" and python_version < "4.0"
trove-classifiers==2025.1.15.22 ; python_version >= "3.9" and python_version < "4.0"
twine==6.1.0 ; python_version >= "3.9" and python_version < "4.0"
types-httplib2==0.22.0.20241221 ; python_version >= "3.9" and python_version < "4.0"
types-pyrfc3339==2.0.1.20241107 ; python_version >= "3.9" and python_version < "4.0"
types-python-dateutil==2.9.0.20241206 ; python_version >= "3.9" and python_version < "4.0"
types-pytz==2024.2.0.20241221 ; python_version >= "3.9" and python_version < "4.0"
types-pywin32==308.0.0.20241221 ; python_version >= "3.9" and python_version < "4.0"
types-requests==2.31.0.6 ; python_version >= "3.9" and python_version < "4.0"
types-pywin32==308.0.0.20250128 ; python_version >= "3.9" and python_version < "4.0"
types-requests==2.31.0.6 ; python_version >= "3.9" and python_version < "3.10"
types-requests==2.32.0.20241016 ; python_version >= "3.10" and python_version < "4.0"
types-setuptools==75.8.0.20250110 ; python_version >= "3.9" and python_version < "4.0"
types-urllib3==1.26.25.14 ; python_version >= "3.9" and python_version < "4.0"
types-urllib3==1.26.25.14 ; python_version >= "3.9" and python_version < "3.10"
typing-extensions==4.12.2 ; python_version >= "3.9" and python_version < "4.0"
uritemplate==4.1.1 ; python_version >= "3.9" and python_version < "4.0"
urllib3==1.26.20 ; python_version >= "3.9" and python_version < "4.0"
virtualenv==20.28.1 ; python_version >= "3.9" and python_version < "4.0"
urllib3==1.26.20 ; python_version >= "3.9" and python_version < "3.10"
urllib3==2.3.0 ; python_version >= "3.10" and python_version < "4.0"
virtualenv==20.29.1 ; python_version >= "3.9" and python_version < "4.0"
wcwidth==0.2.13 ; python_version >= "3.9" and python_version < "4.0"
wheel==0.45.1 ; python_version >= "3.9" and python_version < "4.0"
wrapt==1.17.2 ; python_version >= "3.9" and python_version < "4.0"