Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ test = [
'mypy>=0.800',
]
dev = [
'packaging>=20',
'setuptools>=60',
'Cython~=3.0',
'Cython~=3.1',
]
docs = [
'Sphinx~=4.1.2',
Expand All @@ -56,6 +57,7 @@ docs = [

[build-system]
requires = [
"packaging>=20",
"setuptools>=60",
"wheel",
"Cython~=3.1",
Expand Down
8 changes: 4 additions & 4 deletions 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~=3.0'
CYTHON_DEPENDENCY = 'Cython~=3.1'
MACHINE = platform.machine()
MODULES_CFLAGS = [os.getenv('UVLOOP_OPT_CFLAGS', '-O2')]
_ROOT = pathlib.Path(__file__).parent
Expand Down Expand Up @@ -108,7 +108,7 @@ def finalize_options(self):
need_cythonize = True

if need_cythonize:
import pkg_resources
from packaging.requirements import Requirement

# Double check Cython presence in case setup_requires
# didn't go into effect (most likely because someone
Expand All @@ -121,8 +121,8 @@ def finalize_options(self):
'please install {} to compile uvloop from source'.format(
CYTHON_DEPENDENCY))

cython_dep = pkg_resources.Requirement.parse(CYTHON_DEPENDENCY)
if Cython.__version__ not in cython_dep:
cython_dep = Requirement(CYTHON_DEPENDENCY)
if not cython_dep.specifier.contains(Cython.__version__):
raise RuntimeError(
'uvloop requires {}, got Cython=={}'.format(
CYTHON_DEPENDENCY, Cython.__version__
Expand Down
5 changes: 5 additions & 0 deletions tests/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,11 @@ def close():
# send data
await self.loop.run_in_executor(None,
ssl_sock.send, b'hello')
# After gh-105836 run_in_executor may resolve without
# yielding. This is very noticeable when PYTHONASYNCIODEBUG
# is set. Hence, we yield explicitly so that the sent data
# can reach the SSL buffer before close/resume_reading.
await asyncio.sleep(0)
# schedule a proactive transport close which will trigger
# the flushing process to retrieve the remaining data
self.loop.call_soon(close)
Expand Down
Loading