Skip to content

Commit

Permalink
Use Cython 3.0 and fix deprecated test
Browse files Browse the repository at this point in the history
  • Loading branch information
fantix committed Aug 26, 2024
1 parent c11671c commit a73522b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@ test = [
# pycodestyle is a dependency of flake8, but it must be frozen because
# their combination breaks too often
# (example breakage: https://gitlab.com/pycqa/flake8/issues/427)
'aiohttp>=3.8.1; python_version < "3.12"',
'aiohttp==3.9.0b0; python_version >= "3.12"',
'aiohttp>=3.10.5',
'flake8~=5.0',
'psutil',
'pycodestyle~=2.9.0',
'pyOpenSSL~=23.0.0',
'mypy>=0.800',
'Cython(>=0.29.36,<0.30.0)',
]
dev = [
'setuptools>=60',
'Cython~=3.0',
]
docs = [
'Sphinx~=4.1.2',
Expand All @@ -55,7 +57,7 @@ docs = [
requires = [
"setuptools>=60",
"wheel",
"Cython(>=0.29.36,<0.30.0)",
"Cython~=3.0",
]
build-backend = "setuptools.build_meta"

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from setuptools.command.sdist import sdist


CYTHON_DEPENDENCY = 'Cython(>=0.29.36)'
CYTHON_DEPENDENCY = 'Cython>=3.0'
MACHINE = platform.machine()
MODULES_CFLAGS = [os.getenv('UVLOOP_OPT_CFLAGS', '-O2')]
_ROOT = pathlib.Path(__file__).parent
Expand Down
6 changes: 2 additions & 4 deletions tests/test_tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2239,8 +2239,7 @@ def test_renegotiation(self):
sslctx.use_privatekey_file(self.ONLYKEY)
sslctx.use_certificate_chain_file(self.ONLYCERT)
client_sslctx = self._create_client_ssl_context()
if sys.version_info < (3, 8) and hasattr(ssl, 'OP_NO_TLSv1_3'):
client_sslctx.options |= ssl.OP_NO_TLSv1_3
client_sslctx.maximum_version = ssl.TLSVersion.TLSv1_2

def server(sock):
conn = openssl_ssl.Connection(sslctx, sock)
Expand Down Expand Up @@ -2598,8 +2597,7 @@ def test_flush_before_shutdown(self):
sslctx_openssl.use_privatekey_file(self.ONLYKEY)
sslctx_openssl.use_certificate_chain_file(self.ONLYCERT)
client_sslctx = self._create_client_ssl_context()
if sys.version_info < (3, 8) and hasattr(ssl, 'OP_NO_TLSv1_3'):
client_sslctx.options |= ssl.OP_NO_TLSv1_3
client_sslctx.maximum_version = ssl.TLSVersion.TLSv1_2

future = None

Expand Down

0 comments on commit a73522b

Please sign in to comment.