Skip to content

Commit aafe7ba

Browse files
authored
Update to latest poetry-plugin-export to fix urllib3 multiple versions issue and unpin urllib3 (#10169)
We can use modern urllib3 now! They [fixed](python-poetry/poetry-plugin-export#286) the poetry [issue](python-poetry/poetry-plugin-export#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.
1 parent 87e5dcb commit aafe7ba

File tree

7 files changed

+56
-42
lines changed

7 files changed

+56
-42
lines changed

acme/acme/client.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from typing import Set
1515
from typing import Tuple
1616
from typing import Union
17+
import warnings
1718

1819
from cryptography import x509
1920

@@ -226,7 +227,10 @@ def begin_finalization(self, orderr: messages.OrderResource
226227
"""
227228
csr = OpenSSL.crypto.load_certificate_request(
228229
OpenSSL.crypto.FILETYPE_PEM, orderr.csr_pem)
229-
wrapped_csr = messages.CertificateRequest(csr=jose.ComparableX509(csr))
230+
with warnings.catch_warnings():
231+
warnings.filterwarnings('ignore',
232+
message='The next major version of josepy will remove josepy.util.ComparableX509')
233+
wrapped_csr = messages.CertificateRequest(csr=jose.ComparableX509(csr))
230234
res = self._post(orderr.body.finalize, wrapped_csr)
231235
orderr = orderr.update(body=messages.Order.from_json(res.json()))
232236
return orderr

acme/acme/messages.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from typing import Tuple
1313
from typing import Type
1414
from typing import TypeVar
15+
import warnings
1516

1617
import josepy as jose
1718

@@ -582,7 +583,11 @@ class CertificateRequest(jose.JSONObjectWithFields):
582583
`OpenSSL.crypto.X509Req` wrapped in `.ComparableX509`
583584
584585
"""
585-
csr: jose.ComparableX509 = jose.field('csr', decoder=jose.decode_csr, encoder=jose.encode_csr)
586+
with warnings.catch_warnings():
587+
warnings.filterwarnings('ignore',
588+
message='The next major version of josepy will remove josepy.util.ComparableX509')
589+
csr: jose.ComparableX509 = jose.field(
590+
'csr', decoder=jose.decode_csr, encoder=jose.encode_csr)
586591

587592

588593
class CertificateResource(ResourceWithURI):
@@ -594,7 +599,10 @@ class CertificateResource(ResourceWithURI):
594599
:ivar tuple authzrs: `tuple` of `AuthorizationResource`.
595600
596601
"""
597-
cert_chain_uri: str = jose.field('cert_chain_uri')
602+
with warnings.catch_warnings():
603+
warnings.filterwarnings('ignore',
604+
message='The next major version of josepy will remove josepy.util.ComparableX509')
605+
cert_chain_uri: str = jose.field('cert_chain_uri')
598606
authzrs: Tuple[AuthorizationResource, ...] = jose.field('authzrs')
599607

600608

@@ -605,8 +613,11 @@ class Revocation(jose.JSONObjectWithFields):
605613
`jose.ComparableX509`
606614
607615
"""
608-
certificate: jose.ComparableX509 = jose.field(
609-
'certificate', decoder=jose.decode_cert, encoder=jose.encode_cert)
616+
with warnings.catch_warnings():
617+
warnings.filterwarnings('ignore',
618+
message='The next major version of josepy will remove josepy.util.ComparableX509')
619+
certificate: jose.ComparableX509 = jose.field(
620+
'certificate', decoder=jose.decode_cert, encoder=jose.encode_cert)
610621
reason: int = jose.field('reason')
611622

612623

certbot/certbot/_internal/snap_config.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module configuring Certbot in a snap environment"""
2+
from __future__ import annotations
23
import logging
34
import socket
45
from typing import Iterable
@@ -134,12 +135,12 @@ class _SnapdAdapter(HTTPAdapter):
134135
# help out those packagers while ensuring this code works reliably, we offer custom versions of
135136
# both functions for now. when certbot does declare a dependency on requests>=2.32.2 in its
136137
# setup.py files, get_connection can be deleted
137-
def get_connection(self, url: str,
138+
def get_connection(self, url: str | bytes,
138139
proxies: Optional[Iterable[str]] = None) -> _SnapdConnectionPool:
139140
return _SnapdConnectionPool()
140141

141142
def get_connection_with_tls_context(self, request: PreparedRequest,
142-
verify: bool,
143+
verify: bool | str | None,
143144
proxies: Optional[Iterable[str]] = None,
144145
cert: Optional[Union[str, Tuple[str,str]]] = None
145146
) -> _SnapdConnectionPool:

certbot/setup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,8 @@ def read_file(filename, encoding='utf8'):
5050
# poetry 1.2.0+ is required for it to pin pip, setuptools, and wheel. See
5151
# https://github.com/python-poetry/poetry/issues/1584.
5252
'poetry>=1.2.0',
53-
# poetry-plugin-export>=1.1.0 is required to use the constraints.txt export
54-
# format. See
55-
# https://github.com/python-poetry/poetry-plugin-export/blob/efcfd34859e72f6a79a80398f197ce6eb2bbd7cd/CHANGELOG.md#added.
56-
'poetry-plugin-export>=1.1.0',
53+
# allows us to use newer urllib3 https://github.com/python-poetry/poetry-plugin-export/issues/183
54+
'poetry-plugin-export>=1.9.0',
5755
'twine',
5856
]
5957

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ filterwarnings =
3939
ignore:.*You should use pyca/cryptography's X.509 APIs:DeprecationWarning
4040
ignore:Passing pyOpenSSL PKey objects is deprecated:DeprecationWarning
4141
ignore:Passing pyOpenSSL X509 objects is deprecated:DeprecationWarning
42+
ignore:The next major version of josepy will remove:DeprecationWarning

tools/pinning/current/pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ license = "Apache License 2.0"
88
[tool.poetry.dependencies]
99
python = "^3.9"
1010

11-
# workaround for: https://github.com/python-poetry/poetry-plugin-export/issues/183
12-
urllib3 = ">=1.25.4,<1.27"
13-
1411
# Local dependencies
1512
# Any local packages that have dependencies on other local packages must be
1613
# listed below before the package it depends on. For instance, certbot depends

tools/requirements.txt

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ alabaster==0.7.16 ; python_version >= "3.9" and python_version < "4.0"
99
apacheconfig==0.3.2 ; python_version >= "3.9" and python_version < "4.0"
1010
astroid==3.3.8 ; python_version >= "3.9" and python_version < "4.0"
1111
asttokens==3.0.0 ; python_version >= "3.9" and python_version < "4.0"
12-
attrs==24.3.0 ; python_version >= "3.9" and python_version < "4.0"
12+
attrs==25.1.0 ; python_version >= "3.9" and python_version < "4.0"
1313
azure-core==1.32.0 ; python_version >= "3.9" and python_version < "4.0"
1414
azure-devops==7.1.0b4 ; python_version >= "3.9" and python_version < "4.0"
1515
babel==2.16.0 ; python_version >= "3.9" and python_version < "4.0"
1616
backports-tarfile==1.2.0 ; python_version >= "3.9" and python_version < "3.12"
1717
bcrypt==4.2.1 ; python_version >= "3.9" and python_version < "4.0"
1818
beautifulsoup4==4.12.3 ; python_version >= "3.9" and python_version < "4.0"
19-
boto3==1.35.99 ; python_version >= "3.9" and python_version < "4.0"
20-
botocore==1.35.99 ; python_version >= "3.9" and python_version < "4.0"
19+
boto3==1.36.9 ; python_version >= "3.9" and python_version < "4.0"
20+
botocore==1.36.9 ; python_version >= "3.9" and python_version < "4.0"
2121
build==1.2.2.post1 ; python_version >= "3.9" and python_version < "4.0"
2222
cachecontrol==0.14.2 ; python_version >= "3.9" and python_version < "4.0"
23-
cachetools==5.5.0 ; python_version >= "3.9" and python_version < "4.0"
23+
cachetools==5.5.1 ; python_version >= "3.9" and python_version < "4.0"
2424
certifi==2024.12.14 ; python_version >= "3.9" and python_version < "4.0"
2525
cffi==1.17.1 ; python_version >= "3.9" and python_version < "4.0"
2626
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"
3535
cryptography==43.0.3 ; python_version >= "3.9" and python_version < "4.0"
3636
cython==0.29.37 ; python_version >= "3.9" and python_version < "4.0"
3737
decorator==5.1.1 ; python_version >= "3.9" and python_version < "4.0"
38-
deprecated==1.2.15 ; python_version >= "3.9" and python_version < "4.0"
38+
deprecated==1.2.18 ; python_version >= "3.9" and python_version < "4.0"
3939
dill==0.3.9 ; python_version >= "3.9" and python_version < "4.0"
4040
distlib==0.3.9 ; python_version >= "3.9" and python_version < "4.0"
4141
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"
4545
dulwich==0.22.7 ; python_version >= "3.9" and python_version < "4.0"
4646
exceptiongroup==1.2.2 ; python_version >= "3.9" and python_version < "3.11"
4747
execnet==2.1.1 ; python_version >= "3.9" and python_version < "4.0"
48-
executing==2.1.0 ; python_version >= "3.9" and python_version < "4.0"
48+
executing==2.2.0 ; python_version >= "3.9" and python_version < "4.0"
4949
fabric==3.2.2 ; python_version >= "3.9" and python_version < "4.0"
5050
fastjsonschema==2.21.1 ; python_version >= "3.9" and python_version < "4.0"
51-
filelock==3.16.1 ; python_version >= "3.9" and python_version < "4.0"
52-
google-api-core==2.24.0 ; python_version >= "3.9" and python_version < "4.0"
53-
google-api-python-client==2.159.0 ; python_version >= "3.9" and python_version < "4.0"
51+
filelock==3.17.0 ; python_version >= "3.9" and python_version < "4.0"
52+
google-api-core==2.24.1 ; python_version >= "3.9" and python_version < "4.0"
53+
google-api-python-client==2.160.0 ; python_version >= "3.9" and python_version < "4.0"
5454
google-auth-httplib2==0.2.0 ; python_version >= "3.9" and python_version < "4.0"
55-
google-auth==2.37.0 ; python_version >= "3.9" and python_version < "4.0"
55+
google-auth==2.38.0 ; python_version >= "3.9" and python_version < "4.0"
5656
googleapis-common-protos==1.66.0 ; python_version >= "3.9" and python_version < "4.0"
5757
httplib2==0.22.0 ; python_version >= "3.9" and python_version < "4.0"
58+
id==1.5.0 ; python_version >= "3.9" and python_version < "4.0"
5859
idna==3.10 ; python_version >= "3.9" and python_version < "4.0"
5960
imagesize==1.4.1 ; python_version >= "3.9" and python_version < "4.0"
60-
importlib-metadata==8.5.0 ; python_version >= "3.9" and python_version < "3.12"
61+
importlib-metadata==8.6.1 ; python_version >= "3.9" and python_version < "3.12"
6162
iniconfig==2.0.0 ; python_version >= "3.9" and python_version < "4.0"
6263
installer==0.7.0 ; python_version >= "3.9" and python_version < "4.0"
6364
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"
7273
jeepney==0.8.0 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "linux"
7374
jinja2==3.1.5 ; python_version >= "3.9" and python_version < "4.0"
7475
jmespath==1.0.1 ; python_version >= "3.9" and python_version < "4.0"
75-
josepy==1.14.0 ; python_version >= "3.9" and python_version < "4.0"
76+
josepy==1.15.0 ; python_version >= "3.9" and python_version < "4.0"
7677
jsonlines==4.0.0 ; python_version >= "3.9" and python_version < "4.0"
7778
jsonpickle==4.0.1 ; python_version >= "3.9" and python_version < "4.0"
7879
keyring==25.6.0 ; python_version >= "3.9" and python_version < "4.0"
@@ -93,16 +94,16 @@ paramiko==3.5.0 ; python_version >= "3.9" and python_version < "4.0"
9394
parsedatetime==2.6 ; python_version >= "3.9" and python_version < "4.0"
9495
parso==0.8.4 ; python_version >= "3.9" and python_version < "4.0"
9596
pexpect==4.9.0 ; python_version >= "3.9" and python_version < "4.0" and sys_platform != "win32"
96-
pip==24.3.1 ; python_version >= "3.9" and python_version < "4.0"
97+
pip==25.0 ; python_version >= "3.9" and python_version < "4.0"
9798
pkginfo==1.12.0 ; python_version >= "3.9" and python_version < "4.0"
9899
platformdirs==4.3.6 ; python_version >= "3.9" and python_version < "4.0"
99100
pluggy==1.5.0 ; python_version >= "3.9" and python_version < "4.0"
100101
ply==3.11 ; python_version >= "3.9" and python_version < "4.0"
101102
poetry-core==2.0.1 ; python_version >= "3.9" and python_version < "4.0"
102103
poetry-plugin-export==1.9.0 ; python_version >= "3.9" and python_version < "4.0"
103104
poetry==2.0.1 ; python_version >= "3.9" and python_version < "4.0"
104-
prompt-toolkit==3.0.48 ; python_version >= "3.9" and python_version < "4.0"
105-
proto-plus==1.25.0 ; python_version >= "3.9" and python_version < "4.0"
105+
prompt-toolkit==3.0.50 ; python_version >= "3.9" and python_version < "4.0"
106+
proto-plus==1.26.0 ; python_version >= "3.9" and python_version < "4.0"
106107
protobuf==5.29.3 ; python_version >= "3.9" and python_version < "4.0"
107108
ptyprocess==0.7.0 ; python_version >= "3.9" and python_version < "4.0" and sys_platform != "win32"
108109
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"
115116
pyopenssl==25.0.0 ; python_version >= "3.9" and python_version < "4.0"
116117
pyotp==2.9.0 ; python_version >= "3.9" and python_version < "4.0"
117118
pyparsing==3.2.1 ; python_version >= "3.9" and python_version < "4.0"
118-
pyproject-api==1.8.0 ; python_version >= "3.9" and python_version < "4.0"
119+
pyproject-api==1.9.0 ; python_version >= "3.9" and python_version < "4.0"
119120
pyproject-hooks==1.2.0 ; python_version >= "3.9" and python_version < "4.0"
120121
pyrfc3339==2.0.1 ; python_version >= "3.9" and python_version < "4.0"
121122
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"
136137
requests==2.32.3 ; python_version >= "3.9" and python_version < "4.0"
137138
rfc3986==2.0.0 ; python_version >= "3.9" and python_version < "4.0"
138139
rich==13.9.4 ; python_version >= "3.9" and python_version < "4.0"
139-
rsa==4.9 ; python_version >= "3.9" and python_version < "4"
140-
s3transfer==0.10.4 ; python_version >= "3.9" and python_version < "4.0"
140+
rsa==4.9 ; python_version >= "3.9" and python_version < "4.0"
141+
s3transfer==0.11.2 ; python_version >= "3.9" and python_version < "4.0"
141142
secretstorage==3.3.3 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "linux"
142143
semantic-version==2.10.0 ; python_version >= "3.9" and python_version < "4.0"
143144
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"
157158
sphinxcontrib-serializinghtml==2.0.0 ; python_version >= "3.9" and python_version < "4.0"
158159
stack-data==0.6.3 ; python_version >= "3.9" and python_version < "4.0"
159160
tldextract==5.1.3 ; python_version >= "3.9" and python_version < "4.0"
160-
tomli==2.2.1 ; python_version >= "3.9" and python_full_version <= "3.11.0a6"
161+
tomli==2.2.1 ; python_version >= "3.9" and python_version < "3.11"
161162
tomlkit==0.13.2 ; python_version >= "3.9" and python_version < "4.0"
162-
tox==4.23.2 ; python_version >= "3.9" and python_version < "4.0"
163+
tox==4.24.1 ; python_version >= "3.9" and python_version < "4.0"
163164
traitlets==5.14.3 ; python_version >= "3.9" and python_version < "4.0"
164-
trove-classifiers==2025.1.10.15 ; python_version >= "3.9" and python_version < "4.0"
165-
twine==6.0.1 ; python_version >= "3.9" and python_version < "4.0"
166-
types-cffi==1.16.0.20241221 ; python_version >= "3.9" and python_version < "4.0"
165+
trove-classifiers==2025.1.15.22 ; python_version >= "3.9" and python_version < "4.0"
166+
twine==6.1.0 ; python_version >= "3.9" and python_version < "4.0"
167167
types-httplib2==0.22.0.20241221 ; python_version >= "3.9" and python_version < "4.0"
168168
types-pyrfc3339==2.0.1.20241107 ; python_version >= "3.9" and python_version < "4.0"
169169
types-python-dateutil==2.9.0.20241206 ; python_version >= "3.9" and python_version < "4.0"
170170
types-pytz==2024.2.0.20241221 ; python_version >= "3.9" and python_version < "4.0"
171-
types-pywin32==308.0.0.20241221 ; python_version >= "3.9" and python_version < "4.0"
172-
types-requests==2.31.0.6 ; python_version >= "3.9" and python_version < "4.0"
171+
types-pywin32==308.0.0.20250128 ; python_version >= "3.9" and python_version < "4.0"
172+
types-requests==2.31.0.6 ; python_version >= "3.9" and python_version < "3.10"
173+
types-requests==2.32.0.20241016 ; python_version >= "3.10" and python_version < "4.0"
173174
types-setuptools==75.8.0.20250110 ; python_version >= "3.9" and python_version < "4.0"
174-
types-urllib3==1.26.25.14 ; python_version >= "3.9" and python_version < "4.0"
175+
types-urllib3==1.26.25.14 ; python_version >= "3.9" and python_version < "3.10"
175176
typing-extensions==4.12.2 ; python_version >= "3.9" and python_version < "4.0"
176177
uritemplate==4.1.1 ; python_version >= "3.9" and python_version < "4.0"
177-
urllib3==1.26.20 ; python_version >= "3.9" and python_version < "4.0"
178-
virtualenv==20.28.1 ; python_version >= "3.9" and python_version < "4.0"
178+
urllib3==1.26.20 ; python_version >= "3.9" and python_version < "3.10"
179+
urllib3==2.3.0 ; python_version >= "3.10" and python_version < "4.0"
180+
virtualenv==20.29.1 ; python_version >= "3.9" and python_version < "4.0"
179181
wcwidth==0.2.13 ; python_version >= "3.9" and python_version < "4.0"
180182
wheel==0.45.1 ; python_version >= "3.9" and python_version < "4.0"
181183
wrapt==1.17.2 ; python_version >= "3.9" and python_version < "4.0"

0 commit comments

Comments
 (0)