Commit b2fd35f1 authored by Jason Madden's avatar Jason Madden

Update to PyPy3 5.8.0

Fixes #1001.
parent a794c112
......@@ -43,6 +43,9 @@
been tested. This merely removes the supporting Trove classifier and
remaining test code. See :issue:`997`.
- Linux CI now tests on PyPy3 3.5-5.8.0, updated from PyPy3 3.5-5.7.1.
See :issue:`1001`.
1.2.2 (2017-06-05)
==================
......
......@@ -181,7 +181,7 @@ test-pypy: $(PYPY)
PYTHON=$(PYPY) PIP=pip PATH=$(BUILD_RUNTIMES)/versions/pypy571/bin:$(PATH) make develop toxtest
test-pypy3: $(PYPY3)
PYTHON=$(PYPY3) PIP=pip PATH=$(BUILD_RUNTIMES)/versions/pypy3.5_571/bin:$(PATH) make develop toxtest
PYTHON=$(PYPY3) PIP=pip PATH=$(BUILD_RUNTIMES)/versions/pypy3.5_580/bin:$(PATH) make develop toxtest
test-py27-cffi: $(PY27)
GEVENT_CORE_CFFI_ONLY=1 PYTHON=python2.7.13 PATH=$(BUILD_RUNTIMES)/versions/python2.7.13/bin:$(PATH) make develop toxtest
......
......@@ -106,7 +106,7 @@ for var in "$@"; do
install pypy2-5.7.1 pypy571
;;
pypy3)
install pypy3.5-5.7.1-beta pypy3.5_571
install pypy3.5-5.8.0 pypy3.5_580
;;
esac
done
......@@ -722,12 +722,12 @@ class GeneralModuleTests(unittest.TestCase):
s.sendto('\u2620', sockname)
self.assertIn(str(cm.exception),
["a bytes-like object is required, not 'str'", # cpython
"'str' does not support the buffer interface"]) # pypy
"a bytes-like object is required, not str"]) # pypy
with self.assertRaises(TypeError) as cm:
s.sendto(5j, sockname)
self.assertIn(str(cm.exception),
["a bytes-like object is required, not 'complex'",
"'complex' does not support the buffer interface"])
"a bytes-like object is required, not complex"])
with self.assertRaises(TypeError) as cm:
s.sendto(b'foo', None)
self.assertIn('NoneType', str(cm.exception))
......@@ -736,12 +736,12 @@ class GeneralModuleTests(unittest.TestCase):
s.sendto('\u2620', 0, sockname)
self.assertIn(str(cm.exception),
["a bytes-like object is required, not 'str'",
"'str' does not support the buffer interface"])
"a bytes-like object is required, not str"])
with self.assertRaises(TypeError) as cm:
s.sendto(5j, 0, sockname)
self.assertIn(str(cm.exception),
["a bytes-like object is required, not 'complex'",
"'complex' does not support the buffer interface"])
"a bytes-like object is required, not complex"])
with self.assertRaises(TypeError) as cm:
s.sendto(b'foo', 0, None)
self.assertIn('NoneType', str(cm.exception))
......
......@@ -13,7 +13,6 @@ LEAKTEST = os.getenv('GEVENTTEST_LEAKCHECK')
COVERAGE = os.getenv("COVERAGE_PROCESS_START")
PYPY = hasattr(sys, 'pypy_version_info')
PY3 = sys.version_info[0] >= 3
PY26 = sys.version_info[0] == 2 and sys.version_info[1] == 6
PY27 = sys.version_info[0] == 2 and sys.version_info[1] == 7
PY35 = sys.version_info[0] >= 3 and sys.version_info[1] >= 5
PYGTE279 = (
......@@ -140,6 +139,10 @@ if PYPY:
## BUGS:
## UNKNOWN:
# AssertionError: '>>> ' != ''
# test__backdoor.py:52
'FLAKY test__backdoor.py',
]
if PY3 and TRAVIS:
......@@ -151,25 +154,6 @@ if PYPY:
]
if PY26:
FAILING_TESTS += [
# http://bugs.python.org/issue9446, fixed in 2.7/3
# https://github.com/python/cpython/commit/a104f91ff4c4560bec7c336afecb094e73a5ab7e
'FLAKY test_urllib2.py',
]
if TRAVIS:
# Started seeing this with a fresh build of 2.6.9
# on 2016-02-11. Can't reproduce locally.
# test__all__.test_ssl: items 'name', 'value' from
# stdlib module not found in gevent module.
# Which makes no sense. 2.6 isn't supported by python.org
# anymore, though, and we're starting to get warnings about
# pip.
FAILING_TESTS += [
'test__all__.py',
]
if PY3:
# No idea / TODO
FAILING_TESTS += [
......
......@@ -37,5 +37,5 @@ else:
with module_file:
module_source = module_file.read()
module_source = disable_tests_in_source(module_source, test_name)
module_code = compile(module_source, test_filename, 'exec')
module_code = compile(module_source, os.path.abspath(test_filename), 'exec')
exec(module_code, globals())
......@@ -6,9 +6,11 @@ import contextlib
import functools
import sys
import os
import platform
import re
TRAVIS = os.environ.get("TRAVIS") == "true"
OSX = bool(platform.mac_ver()[0])
# By default, test cases are expected to switch and emit warnings if there was none
# If a test is found in this list, it's expected not to switch.
......@@ -345,14 +347,6 @@ if hasattr(sys, 'pypy_version_info'):
# _execut_child)
]
import cffi # pylint:disable=import-error,useless-suppression
if cffi.__version_info__ < (1, 2, 0):
disabled_tests += [
'test_signal.InterProcessSignalTests.test_main',
# Fails to get the signal to the correct handler due to
# https://bitbucket.org/cffi/cffi/issue/152/handling-errors-from-signal-handlers-in
]
# Generic Python 3
if sys.version_info[0] == 3:
......@@ -443,32 +437,47 @@ if hasattr(sys, 'pypy_version_info') and sys.version_info[:2] >= (3, 3):
disabled_tests += [
# This raises 'RuntimeError: reentrant call' when exiting the
# process tries to close the stdout stream; no other platform does this.
# See in both 3.3 and 3.5
# Seen in both 3.3 and 3.5 (5.7 and 5.8)
'test_signal.SiginterruptTest.test_siginterrupt_off',
]
if hasattr(sys, 'pypy_version_info') and sys.pypy_version_info[:4] == (5, 7, 1, 'beta'): # pylint:disable=no-member
if hasattr(sys, 'pypy_version_info') and sys.pypy_version_info[:4] in ( # pylint:disable=no-member
(5, 8, 0, 'beta'),
):
# 3.5 is beta. Hard to say what are real bugs in us vs real bugs in pypy.
# For that reason, we pin these patches exactly to the version in use.
# TODO: Upgrade to v5.8.
disabled_tests += [
# This fails to close all the FDs, at least on CI. On OS X, many of the
# POSIXProcessTestCase fd tests have issues.
'test_subprocess.POSIXProcessTestCase.test_close_fds_when_max_fd_is_lowered',
# see extensive comments in this method. we don't actually disable it,
# we patched it.
# test_urllib2_localnet.TestUrlopen.test_https_with_cafile
# This has the wrong constants in 5.8 (but worked in 5.7), at least on
# OS X. It finds "zlib compression" but expects "ZLIB".
'test_ssl.ThreadedTests.test_compression',
]
if TRAVIS:
if OSX:
disabled_tests += [
# This seems to be a buffering issue? Something isn't getting flushed
# I can't reproduce locally though in Ubuntu 16 in a VM or a laptop with OS X.
# These all fail with "invalid_literal for int() with base 10: b''"
'test_subprocess.POSIXProcessTestCase.test_close_fds',
'test_subprocess.POSIXProcessTestCase.test_close_fds_after_preexec',
'test_subprocess.POSIXProcessTestCase.test_pass_fds',
'test_subprocess.POSIXProcessTestCase.test_pass_fds_inheritable',
'test_subprocess.POSIXProcessTestCase.test_pipe_cloexec',
]
disabled_tests += [
# This seems to be a buffering issue? Something isn't
# getting flushed. (The output is wrong). Under PyPy3 5.7,
# I couldn't reproduce locally in Ubuntu 16 in a VM
# or a laptop with OS X. Under 5.8.0, I can reproduce it, but only
# when run by the testrunner, not when run manually on the command line,
# so something is changing in stdout buffering in those situations.
'test_threading.ThreadJoinOnShutdown.test_2_join_in_forked_process',
'test_threading.ThreadJoinOnShutdown.test_1_join_in_forked_process',
]
wrapped_tests.update({
......
......@@ -470,8 +470,7 @@ class ThreadJoinOnShutdown(unittest.TestCase):
"""
self._run_and_join(script)
@greentest.skipOnPyPy3OnCI("Sometimes has buffering issues")
# probably our bug? Need to flush something
def test_3_join_in_forked_from_thread(self):
# Like the test above, but fork() was called from a worker thread
# In the forked process, the main Thread object must be marked as stopped.
......@@ -501,6 +500,10 @@ class ThreadJoinOnShutdown(unittest.TestCase):
w = threading.Thread(target=worker)
w.start()
# In PyPy3 5.8.0, if we don't wait on this top-level "thread"
# we never see "end of thread". It's not clear why, since that's being
# done in a child of this process.
w.join()
"""
self._run_and_join(script)
......
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