Skip to content

Commit

Permalink
Build against greenlet 0.4.17
Browse files Browse the repository at this point in the history
Fixes #1674
  • Loading branch information
jamadden committed Sep 22, 2020
1 parent ca216c7 commit 255299f
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 4 deletions.
36 changes: 36 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,42 @@

.. towncrier release notes start
20.6.3.dev0 (2020-09-22)
========================


Features
--------

- The embedded libev is now asked to detect the availability of
``clock_gettime`` and use the realtime and/or monotonic clocks, if
they are available.

On Linux, this can reduce the number of system calls libev makes.
Originally provided by Josh Snyder.
See :issue:`issue1648`.


Bugfixes
--------

- The ``DummyThread`` objects created automatically by certain
operations when the standard library threading module is
monkey-patched now match the naming convention the standard library
uses ("Dummy-12345"). Previously (since gevent 1.2a2) they used
"DummyThread-12345".
See :issue:`1659`.
- Fix compatibility with dnspython 2.

.. caution:: This currently means that it can be imported. But it
cannot yet be used. gevent has a pinned dependency on
dnspython < 2 for now.
See :issue:`1661`.


----


20.6.2 (2020-06-16)
===================

Expand Down
13 changes: 12 additions & 1 deletion deps/greenlet/greenlet.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,20 @@
extern "C" {
#endif

#define GREENLET_VERSION "0.4.16"
#define GREENLET_VERSION "0.4.17"

#if PY_VERSION_HEX >= 0x030700A3
# define GREENLET_USE_EXC_INFO
#endif

#ifndef GREENLET_USE_CONTEXT_VARS
#ifdef Py_CONTEXT_H
#define GREENLET_USE_CONTEXT_VARS 1
#else
#define GREENLET_USE_CONTEXT_VARS 0
#endif
#endif

typedef struct _greenlet {
PyObject_HEAD
char* stack_start;
Expand All @@ -38,6 +46,9 @@ typedef struct _greenlet {
PyObject* exc_traceback;
#endif
PyObject* dict;
#if GREENLET_USE_CONTEXT_VARS
PyObject* context;
#endif
} PyGreenlet;

#define PyGreenlet_Check(op) PyObject_TypeCheck(op, &PyGreenlet_Type)
Expand Down
4 changes: 4 additions & 0 deletions docs/changes/issue1674.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
On CPython, depend on greenlet >= 0.4.17. This version is binary
incompatible with earlier releases on CPython 3.7 and later. Note that
gevent does not rely on its new support for context variables since
gevent provides the same API to older versions of Python.
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ requires = [
# See version requirements in setup.py
"cffi >= 1.12.3 ; platform_python_implementation == 'CPython'",
# Python 3.7 requires at least 0.4.14, which is ABI incompatible with earlier
# releases. Python 3.9 and 3.10 require 0.4.16
"greenlet >= 0.4.16 ; platform_python_implementation == 'CPython'",
# releases. Python 3.9 and 3.10 require 0.4.16;
# 0.4.17 is ABI incompatible with earlier releases.
"greenlet >= 0.4.17 ; platform_python_implementation == 'CPython'",
]

[tool.towncrier]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
# since we compile cython code that extends the greenlet object.
# Binary compatibility would break if the greenlet struct changes.
# (Which it did in 0.4.14 for Python 3.7)
'greenlet >= 0.4.16; platform_python_implementation=="CPython"',
'greenlet >= 0.4.17; platform_python_implementation=="CPython"',
]

# Note that we don't add cffi to install_requires, it's
Expand Down

0 comments on commit 255299f

Please sign in to comment.