Skip to content

Commit

Permalink
Basic tests for 3.12 pass locally.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Jul 9, 2023
1 parent 748ceda commit 10c8456
Show file tree
Hide file tree
Showing 14 changed files with 876 additions and 864 deletions.
3 changes: 3 additions & 0 deletions docs/changes/old_py.removal
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ Related changes include:
- Honor ``sys.unraisablehook`` when a callback function produces an
exception, and handling the exception in the hub *also* produces an
exception. In older versions, these would be simply printed.
- ``setup.py`` no longer includes the ``setup_requires`` keyword.
Installation with a tool that understands ``pyproject.toml`` is
recommended.
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ requires = [
# 1.1.3 is needed for CPython 3.11.
# 2.0 is not ABI compatible with earlier releases, but with luck it won't
# have to break the ABI again.
"greenlet >= 2.0.0 ; platform_python_implementation == 'CPython'",
# 3.0 is ABI compatible with earlier releases, so we can switch back and
# forth between 2 and 3 without recompiling. 3.0 is required for
# Python 3.12
"greenlet >= 3.0a1 ; platform_python_implementation == 'CPython'",
]

[tool.towncrier]
Expand Down
20 changes: 4 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@
# 1.1.3 is needed for 3.11, and supports everything 1.1.0 did.
# 2.0.0 supports everything 1.1.3 did, but breaks the ABI in a way that hopefully
# won't break again.
'greenlet >= 2.0.0 ; platform_python_implementation=="CPython"',
# 3.0 is ABI compatible and adds support for Python 3.12 (but right
# now it's alpha because of Cython, so we only require it on 3.12)
'greenlet >= 2.0.0 ; platform_python_implementation=="CPython" and python_version < "3.12"',
'greenlet >= 3.0a1 ; platform_python_implementation=="CPython" and python_version >= "3.12"',
]

# Note that we don't add cffi to install_requires, it's
Expand All @@ -235,19 +238,6 @@
'zope.interface',
]

# We use headers from greenlet, so it needs to be installed before we
# can compile. If it isn't already installed before we start
# installing, and we say 'pip install gevent', a 'setup_requires'
# doesn't save us: pip happily downloads greenlet and drops it in a
# .eggs/ directory in the build directory, but that directory doesn't
# have includes! So we fail to build a wheel, pip goes ahead and
# installs greenlet, and builds gevent again, which works.

# Since we ship the greenlet header for buildout support (which fails
# to install the headers at all, AFAICS, we don't need to bother with
# the buggy setup_requires.)

setup_requires = CFFI_REQUIRES + []

if PYPY:
# These use greenlet/greenlet.h, which doesn't exist on PyPy
Expand Down Expand Up @@ -397,7 +387,6 @@ def run_setup(ext_modules):
'clean': GeventClean,
},
install_requires=install_requires,
setup_requires=setup_requires,
extras_require={
# Each extra intended for end users must be documented in install.rst
'dnspython': EXTRA_DNSPYTHON,
Expand All @@ -422,7 +411,6 @@ def run_setup(ext_modules):
# anyway (coveralls -> cryptopgraphy -> openssl).
# coverage 5 needs coveralls 1.11
'coverage >= 5.0 ; sys_platform != "win32"',
'coveralls>=1.7.0 ; sys_platform != "win32"',

# leak checks. previously we had a hand-rolled version.
'objgraph',
Expand Down

0 comments on commit 10c8456

Please sign in to comment.