From db8ae7602b962f2554f7ecd587c174c30531ad79 Mon Sep 17 00:00:00 2001 From: Jacob Bom Date: Thu, 22 Jun 2017 15:49:46 +0200 Subject: [PATCH 1/6] Cache pip for travis and appveyor Updating wheels package since caching was introduced in v7 and I'm not sure what version is default on travis. --- .travis.yml | 11 +++++++++++ appveyor.yml | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 10f9f98de..1b167a096 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,17 +7,28 @@ python: - "3.6" - "pypy" - "pypy3" + branches: only: - master + +cache: + directories: + - $HOME/.cache/pip +before_cache: + - rm -f $HOME/.cache/pip/log/debug.log + install: - pip install coveralls + - pip install -U wheels - pip install -r requirements.txt - pip install -r requirements-dev.txt - if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then pip install ujson; fi + script: - nosetests -v --with-flaky --no-flaky-report --with-coverage --cover-package=telegram/ tests - if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then pre-commit run --all-files; fi - python ./setup.py bdist_dumb + after_success: coveralls diff --git a/appveyor.yml b/appveyor.yml index f0d71990e..ed07e60d7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,12 +15,14 @@ environment: install: # We need wheel installed to build wheels - "git submodule update --init --recursive" - - "%PYTHON%\\python.exe -m pip install wheel" + - "%PYTHON%\\python.exe -m pip install -U wheel" - "%PYTHON%\\python.exe -m pip install -r requirements.txt" - "%PYTHON%\\python.exe -m pip install -r requirements-dev.txt" build: off +cache: C:\Users\appveyor\pip\wheels + test_script: - "%python%\\Scripts\\nosetests -v --with-flaky --no-flaky-report tests" From 4b16d0937b9d733ade75d37fbaeb4042080be1af Mon Sep 17 00:00:00 2001 From: Jacob Bom Date: Thu, 22 Jun 2017 16:28:13 +0200 Subject: [PATCH 2/6] Wheel not wheels --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1b167a096..5d2577661 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ before_cache: install: - pip install coveralls - - pip install -U wheels + - pip install -U wheel - pip install -r requirements.txt - pip install -r requirements-dev.txt - if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then pip install ujson; fi From 51759307d75a09730bc9cc7b0375e93b2fec7be8 Mon Sep 17 00:00:00 2001 From: Jacob Bom Date: Thu, 22 Jun 2017 18:09:29 +0200 Subject: [PATCH 3/6] Try updating to trusty Currently about 1min of build time is spent updating libssl... maybe it's newer on trusty? --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5d2577661..5de7165c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,9 @@ python: - "pypy" - "pypy3" +dist: trusty +sudo: false + branches: only: - master @@ -31,4 +34,4 @@ script: - python ./setup.py bdist_dumb after_success: - coveralls + coveralls \ No newline at end of file From 3dabc3146a9ad18ec2a36eb2d65ff8cb0cff2dae Mon Sep 17 00:00:00 2001 From: Jacob Bom Date: Thu, 22 Jun 2017 19:29:34 +0200 Subject: [PATCH 4/6] Update pypy so it hopefully is found in trusty python archive See also #655 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5de7165c3..1aba1083d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,8 @@ python: - "3.4" - "3.5" - "3.6" - - "pypy" - - "pypy3" + - "pypy-5.8.0" + - "pypy3.5-5.8.0" dist: trusty sudo: false From 9264264a02aedc26a34d1391c007af1212d49a42 Mon Sep 17 00:00:00 2001 From: Jacob Bom Date: Thu, 22 Jun 2017 19:31:52 +0200 Subject: [PATCH 5/6] Does this version work? See travis-ci/travis-ci#6727 for more info too --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1aba1083d..da145e7bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ python: - "3.4" - "3.5" - "3.6" - - "pypy-5.8.0" + - "pypy-5.7.1" - "pypy3.5-5.8.0" dist: trusty From 5b9bb904c238dd3163745f641eb5d4c2eb84e695 Mon Sep 17 00:00:00 2001 From: Jacob Bom Date: Thu, 22 Jun 2017 20:17:47 +0200 Subject: [PATCH 6/6] Skip "official" tests on pypy inspect.signature() seems to return a string instead of an actual signature on pypy --- tests/test_official.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_official.py b/tests/test_official.py index 486f0d065..84079cfe2 100644 --- a/tests/test_official.py +++ b/tests/test_official.py @@ -2,6 +2,7 @@ import sys import inspect import warnings from collections import namedtuple +import platform import certifi import logging @@ -110,9 +111,9 @@ def check_object(h4): def test_official(): - if not sys.version_info >= (3, 5): - warnings.warn('Not running tests, since follow_wrapped is not supported on this platform' - '(python version >= 3.5 required)') + if not sys.version_info >= (3, 5) or platform.python_implementation() != 'CPython': + warnings.warn('Not running "official" tests, since follow_wrapped is not supported' + 'on this platform (cpython version >= 3.5 required)') return http = urllib3.PoolManager(