Commit d0aa959f authored by Jason Madden's avatar Jason Madden Committed by GitHub

Merge pull request #1262 from gevent/issue1260

Update to greenlet 0.4.14. Fixes #1260.
parents 84ef1f92 55ce556a
......@@ -7,7 +7,10 @@
1.3.6 (unreleased)
==================
- Nothing changed yet.
- gevent now depends on greenlet 0.4.14 or above. gevent binary wheels
for 1.3.5 and below must have greenlet 0.4.13 installed on Python
3.7 or they will crash. Reported by Alexey Stepanov in :issue:`1260`
and pkittenis in :issue:`1261`.
1.3.5 (2018-07-16)
......
......@@ -7,8 +7,8 @@ wheel
# at the same time.
Cython >= 0.28.1
# Python 3.7b1 requires this.
greenlet>=0.4.13 ; platform_python_implementation == "CPython"
# Python 3.7 requires at least 0.4.14, which is ABI incompatible with earlier
greenlet>=0.4.14 ; platform_python_implementation == "CPython"
pylint>=1.8.0 ; python_version < "3.4"
pylint >= 2.0.0.dev2 ; python_version >= "3.4"
# pylint 2 needs astroid 2; unfortunately, it uses `typed_ast`
......
......@@ -11,7 +11,11 @@
extern "C" {
#endif
#define GREENLET_VERSION "0.4.13"
#define GREENLET_VERSION "0.4.14"
#if PY_VERSION_HEX >= 0x030700A3
# define GREENLET_USE_EXC_INFO
#endif
typedef struct _greenlet {
PyObject_HEAD
......@@ -25,9 +29,14 @@ typedef struct _greenlet {
struct _frame* top_frame;
int recursion_depth;
PyObject* weakreflist;
#ifdef GREENLET_USE_EXC_INFO
_PyErr_StackItem* exc_info;
_PyErr_StackItem exc_state;
#else
PyObject* exc_type;
PyObject* exc_value;
PyObject* exc_traceback;
#endif
PyObject* dict;
} PyGreenlet;
......
......@@ -193,7 +193,8 @@ greenlet_requires = [
# We need to watch our greenlet version fairly carefully,
# since we compile cython code that extends the greenlet object.
# Binary compatibility would break if the greenlet struct changes.
'greenlet >= 0.4.13; platform_python_implementation=="CPython"',
# (Which it did in 0.4.14 for Python 3.7)
'greenlet >= 0.4.14; platform_python_implementation=="CPython"',
]
# Note that we don't add cffi to install_requires, it's
......
......@@ -15,7 +15,8 @@ del sys.argv[1]
print('Running with patch_all(%s): %s' % (','.join('%s=%r' % x for x in kwargs.items()), test_filename))
from gevent import monkey; monkey.patch_all(**kwargs)
from greentest.sysinfo import RUNNING_ON_APPVEYOR
from greentest.sysinfo import PY37
from greentest.patched_tests_setup import disable_tests_in_source
try:
from test import support
......@@ -23,6 +24,16 @@ except ImportError:
from test import test_support as support
support.is_resource_enabled = lambda *args: True
del support.use_resources
if RUNNING_ON_APPVEYOR and PY37:
# 3.7 added a stricter mode for thread cleanup.
# It appears to be unstable on Windows (at least appveyor)
# and test_socket.py constantly fails with an extra thread
# on some random test. We disable it entirely.
import contextlib
@contextlib.contextmanager
def wait_threads_exit(timeout=None): # pylint:disable=unused-argument
yield
support.wait_threads_exit = wait_threads_exit
__file__ = os.path.join(os.getcwd(), test_filename)
......
......@@ -986,18 +986,7 @@ if PY37:
if APPVEYOR:
disabled_tests += [
# Raises "AssertionError: wait_threads() failed to cleanup
# 1 threads after 60.0 seconds (count: 3, old count: 2)". reason is
# unknown.
'test_socket.BasicTCPTest.testRecvFrom',
# Ditto.
'test_socket.BasicTCPTest.testRecv',
'test_socket.BasicTCPTest2.testDetach',
'test_socket.BasicTCPTest2.testFromFd',
'test_socket.BasicTCPTest2.testOverFlowRecvFrom',
'test_socket.BasicTCPTest2.testDup',
'test_socket.BasicTCPTest2.testSendAll',
'test_socket.NetworkConnectionAttributesTest.testTimeoutDefault',
]
# if 'signalfd' in os.environ.get('GEVENT_BACKEND', ''):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment