From a1d9d497106baa28b2d2c7ca5c018f8e50ae8ec6 Mon Sep 17 00:00:00 2001 From: Mahmoud Hashemi Date: Sat, 19 Oct 2019 14:41:52 -0700 Subject: [PATCH] Fix travis py26 and pypy (#226) * travis fixes: try pinning 2.6 against trusty * xfail for pypy bug: https://bitbucket.org/pypy/pypy/issues/3049/systemerror-in-rsocket__setblocking-travis --- .travis.yml | 11 +++++------ tests/test_socketutils.py | 4 +++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 517970b..58451c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,24 +7,23 @@ cache: pip python: # Standard release https://docs.travis-ci.com/user/languages # /python#choosing-python-versions-to-test-against - - "2.6" # EOLed 5 years ago. https://www.python.org/dev/peps/pep-0361/#release-lifespan - "2.7" - "3.4" - "3.5" - "3.6" - + # PyPy2.7: https://doc.pypy.org/en/latest # /index-of-release-notes.html#cpython-2-7-compatible-versions - - pypy # Python 2.7.13 on PyPy 5.8.0 - #- pypy-6.0.0 # Python 2.7.13 on PyPy 6.0.0 # Travis needs to upgrade! + - pypy # PyPy3.5: https://doc.pypy.org/en/latest # /index-of-release-notes.html#cpython-3-3-compatible-versions - - pypy3 # Python 3.5.3 on PyPy PyPy 5.8.0-beta0 - #- pypy3-6.0.0 # Python 3.5.3 on PyPy 6.0.0 # Travis needs to upgrade! + - pypy3 matrix: include: + - python: 2.6 + dist: trusty - python: 3.7 dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069) - python: nightly # Python 3.8.0a0 diff --git a/tests/test_socketutils.py b/tests/test_socketutils.py index 0c21a4d..90d988d 100644 --- a/tests/test_socketutils.py +++ b/tests/test_socketutils.py @@ -105,7 +105,9 @@ def test_buffers(): return - +IS_PYPY_2 = ('__pypy__' in sys.builtin_module_names + and sys.version_info[0] == 2) +@pytest.mark.xfail(IS_PYPY_2, reason="pypy2 bug, fixed in 7.2. unmark when this test stops failing on travis (when they upgrade from 7.1)") def test_client_disconnecting(): def get_bs_pair(): x, y = socket.socketpair()