Skip to content

Commit d9f2c46

Browse files
authored
Bump version for 24.1.0 release (#1297)
* Bump version for 24.1.0 release * ruff updates
1 parent cea1f2e commit d9f2c46

File tree

8 files changed

+23
-20
lines changed

8 files changed

+23
-20
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Changelog
44
Versions are year-based with a strict backward-compatibility policy.
55
The third digit is only for regressions.
66

7-
24.1.0 (UNRELEASED)
7+
24.1.0 (2024-03-09)
88
-------------------
99

1010
Backward-incompatible changes:

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ addopts = "-r s --strict-markers"
4444
testpaths = ["tests"]
4545

4646
[tool.ruff]
47-
select = ['E', 'F', 'I', 'W', 'UP', 'RUF']
47+
lint.select = ['E', 'F', 'I', 'W', 'UP', 'RUF']
4848
line-length = 79
4949

50-
[tool.ruff.isort]
50+
[tool.ruff.lint.isort]
5151
known-first-party = ["OpenSSL", "tests"]

src/OpenSSL/SSL.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,8 +1379,8 @@ def set_client_ca_list(self, certificate_authorities):
13791379
for ca_name in certificate_authorities:
13801380
if not isinstance(ca_name, X509Name):
13811381
raise TypeError(
1382-
"client CAs must be X509Name objects, not {} "
1383-
"objects".format(type(ca_name).__name__)
1382+
f"client CAs must be X509Name objects, not "
1383+
f"{type(ca_name).__name__} objects"
13841384
)
13851385
copy = _lib.X509_NAME_dup(ca_name._name)
13861386
_openssl_assert(copy != _ffi.NULL)

src/OpenSSL/crypto.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,9 +620,8 @@ def __setattr__(self, name: str, value: Any) -> None:
620620
# isinstance.
621621
if type(name) is not str: # noqa: E721
622622
raise TypeError(
623-
"attribute name must be string, not '{:.200}'".format(
624-
type(value).__name__
625-
)
623+
f"attribute name must be string, not "
624+
f"'{type(value).__name__:.200}'"
626625
)
627626

628627
nid = _lib.OBJ_txt2nid(_byte_string(name))

src/OpenSSL/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"__version__",
1818
]
1919

20-
__version__ = "24.0.0"
20+
__version__ = "24.1.0"
2121

2222
__title__ = "pyOpenSSL"
2323
__uri__ = "https://pyopenssl.org/"

tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ def pytest_report_header(config):
1111

1212
import OpenSSL.SSL
1313

14-
return "OpenSSL: {openssl}\ncryptography: {cryptography}".format(
15-
openssl=OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION),
16-
cryptography=cryptography.__version__,
14+
return (
15+
f"OpenSSL: {OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION)}\n"
16+
f"cryptography: {cryptography.__version__}"
1717
)
1818

1919

tests/test_crypto.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3791,15 +3791,17 @@ def test_sign_verify_with_text(self):
37913791
with pytest.warns(DeprecationWarning) as w:
37923792
warnings.simplefilter("always")
37933793
sig = sign(priv_key, content, digest)
3794-
assert "{} for data is no longer accepted, use bytes".format(
3795-
WARNING_TYPE_EXPECTED
3794+
assert (
3795+
f"{WARNING_TYPE_EXPECTED} for data is no longer accepted, "
3796+
f"use bytes"
37963797
) == str(w[-1].message)
37973798

37983799
with pytest.warns(DeprecationWarning) as w:
37993800
warnings.simplefilter("always")
38003801
verify(cert, sig, content, digest)
3801-
assert "{} for data is no longer accepted, use bytes".format(
3802-
WARNING_TYPE_EXPECTED
3802+
assert (
3803+
f"{WARNING_TYPE_EXPECTED} for data is no longer accepted, "
3804+
f"use bytes"
38033805
) == str(w[-1].message)
38043806

38053807
def test_sign_verify_ecdsa(self):

tests/test_ssl.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3122,8 +3122,9 @@ def test_text(self):
31223122
server, client = loopback()
31233123
with pytest.warns(DeprecationWarning) as w:
31243124
count = server.send(b"xy".decode("ascii"))
3125-
assert "{} for buf is no longer accepted, use bytes".format(
3126-
WARNING_TYPE_EXPECTED
3125+
assert (
3126+
f"{WARNING_TYPE_EXPECTED} for buf is no longer accepted, "
3127+
f"use bytes"
31273128
) == str(w[-1].message)
31283129
assert count == 2
31293130
assert client.recv(2) == b"xy"
@@ -3329,8 +3330,9 @@ def test_text(self):
33293330
server, client = loopback()
33303331
with pytest.warns(DeprecationWarning) as w:
33313332
server.sendall(b"x".decode("ascii"))
3332-
assert "{} for buf is no longer accepted, use bytes".format(
3333-
WARNING_TYPE_EXPECTED
3333+
assert (
3334+
f"{WARNING_TYPE_EXPECTED} for buf is no longer accepted, "
3335+
f"use bytes"
33343336
) == str(w[-1].message)
33353337
assert client.recv(1) == b"x"
33363338

0 commit comments

Comments
 (0)