diff options
author | Michael Manganiello <adamantike@users.noreply.github.com> | 2019-11-03 07:39:56 +0100 |
---|---|---|
committer | Asif Saif Uddin <auvipy@gmail.com> | 2019-11-03 12:39:56 +0600 |
commit | a03530ccf8253f3e53ac03309d235a5288ef793a (patch) | |
tree | 8c8e5355aecc4fee426d815acb41d07e27e384ee | |
parent | 42494438120219c2d9c7a9c6990c8d0a3e6c91a2 (diff) | |
download | kombu-3.0.tar.gz |
[v3.0] Add newer Python 3 versions to build matrix (#1111)3.0
* [v3.0] Add newer Python 3 versions to build matrix
For the `3.0` branch, add newer Python versions to the build matrix, up
to Python 3.7.
This is motivated by #1100, which backported a fix for the `3.0` branch
to work with Python 3.7.
* Remove support for EOL Python versions
* Update AppVeyor configuration
* Avoid using the removepyc.sh file, which is not compatible with Windows/AppVeyor
* Specify PyPy versions for Travis
* Remove unwanted pyenv file
* Set PYTHONUNBUFFERED in Travis
* Refactor getfilesystemencoding patch
* Try casting ascii to str
* Add test to check if ascii codec is registered
* List encoding aliases when ascii codec is not registered
* Revert changes to encoding tests
* Add Python 3.8 to Travis matrix
* Try to use pypy2.7-7.2
* Try pypy2.7-7.2.0 instead
* Revert to pypy2.7-7.1.1
-rw-r--r-- | .travis.yml | 43 | ||||
-rw-r--r-- | appveyor.yml | 58 | ||||
-rw-r--r-- | kombu/compat.py | 4 | ||||
-rw-r--r-- | requirements/py26.txt | 2 | ||||
-rw-r--r-- | setup.py | 10 | ||||
-rw-r--r-- | tox.ini | 51 |
6 files changed, 70 insertions, 98 deletions
diff --git a/.travis.yml b/.travis.yml index 46e5309c..b3c4d5b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,26 @@ language: python -python: - - 2.6 - - 2.7 - - 3.3 - - 3.4 - - pypy -before_install: - - | - deactivate - if python --version |& grep PyPy; then - sudo apt-add-repository --yes ppa:pypy/ppa - sudo apt-get update - sudo apt-get install pypy - source ~/virtualenv/pypy/bin/activate - fi - python --version - uname -a - lsb_release -a - sudo pip install tox -script: tox -v -e $TRAVIS_PYTHON_VERSION -- -v +sudo: false +cache: pip + +matrix: + include: + - python: 2.7 + env: TOXENV=py27 + - python: 3.5 + env: TOXENV=py35 + - python: 3.6 + env: TOXENV=py36 + - python: 3.7 + env: TOXENV=py37 + - python: 3.8 + env: TOXENV=py38 + - python: pypy2.7-7.1.1 + env: TOXENV=pypy + - python: pypy3.5-7.0 + env: TOXENV=pypy3 + +install: + - pip --disable-pip-version-check install -U tox | cat +script: tox -v -- -v after_success: - .tox/$TRAVIS_PYTHON_VERSION/bin/coveralls diff --git a/appveyor.yml b/appveyor.yml index 07c259a0..c8aeee80 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,21 +12,47 @@ environment: # a later point release. # See: http://www.appveyor.com/docs/installed-software#python - - PYTHON: "C:\\Python27" + - TOXENV: "py27" + TOX_APPVEYOR_X64: 0 PYTHON_VERSION: "2.7.x" PYTHON_ARCH: "32" - - PYTHON: "C:\\Python34" - PYTHON_VERSION: "3.4.x" + - TOXENV: "py35" + TOX_APPVEYOR_X64: 0 + PYTHON_VERSION: "3.5.x" PYTHON_ARCH: "32" - - PYTHON: "C:\\Python27-x64" + - TOXENV: "py36" + TOX_APPVEYOR_X64: 0 + PYTHON_VERSION: "3.6.x" + PYTHON_ARCH: "32" + + - TOXENV: "py37" + TOX_APPVEYOR_X64: 0 + PYTHON_VERSION: "3.7.x" + PYTHON_ARCH: "32" + + - TOXENV: "py27" + TOX_APPVEYOR_X64: 1 PYTHON_VERSION: "2.7.x" PYTHON_ARCH: "64" WINDOWS_SDK_VERSION: "v7.0" - - PYTHON: "C:\\Python34-x64" - PYTHON_VERSION: "3.4.x" + - TOXENV: "py35" + TOX_APPVEYOR_X64: 1 + PYTHON_VERSION: "3.5.x" + PYTHON_ARCH: "64" + WINDOWS_SDK_VERSION: "v7.1" + + - TOXENV: "py36" + TOX_APPVEYOR_X64: 1 + PYTHON_VERSION: "3.6.x" + PYTHON_ARCH: "64" + WINDOWS_SDK_VERSION: "v7.1" + + - TOXENV: "py37" + TOX_APPVEYOR_X64: 1 + PYTHON_VERSION: "3.7.x" PYTHON_ARCH: "64" WINDOWS_SDK_VERSION: "v7.1" @@ -34,21 +60,13 @@ environment: init: - "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%" -install: - - "powershell extra\\appveyor\\install.ps1" - - "%PYTHON%/Scripts/pip.exe install -U setuptools" - - "%PYTHON%/Scripts/pip.exe install -r requirements/dev.txt" - build: off -test_script: - - "%WITH_COMPILER% %PYTHON%/python setup.py test" - -after_test: - - "%WITH_COMPILER% %PYTHON%/python setup.py bdist_wheel" +install: + - "py -3.7 -m pip install -U pip setuptools wheel tox tox-appveyor" -artifacts: - - path: dist\* +test_script: + - "%WITH_COMPILER% py -3.7 -m tox" -#on_success: -# - TODO: upload the content of dist/*.whl to a public wheelhouse +cache: + - '%LOCALAPPDATA%\pip\Cache' diff --git a/kombu/compat.py b/kombu/compat.py index 7347e9bc..8025b264 100644 --- a/kombu/compat.py +++ b/kombu/compat.py @@ -25,7 +25,7 @@ def _iterconsume(connection, consumer, no_ack=False, limit=None): consumer.consume(no_ack=no_ack) for iteration in count(0): # for infinity if limit and iteration >= limit: - raise StopIteration + return yield connection.drain_events() @@ -167,7 +167,7 @@ class Consumer(messaging.Consumer): item = self.fetch() if (not infinite and item is None) or \ (limit and items_since_start >= limit): - raise StopIteration + return yield item diff --git a/requirements/py26.txt b/requirements/py26.txt deleted file mode 100644 index 1807d7cb..00000000 --- a/requirements/py26.txt +++ /dev/null @@ -1,2 +0,0 @@ -importlib -ordereddict @@ -116,8 +116,6 @@ def reqs(*f): ) if r] install_requires = reqs('default.txt') -if py_version[0:2] == (2, 6): - install_requires.extend(reqs('py26.txt')) # -*- Tests Requires -*- @@ -144,8 +142,6 @@ extras_require = extra['extras_require'] = { 'qpid': extras('qpid.txt'), } -extras_require[':python_version=="2.6"'] = reqs('py26.txt') - setup( name='kombu', version=meta['VERSION'], @@ -166,10 +162,10 @@ setup( 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', @@ -1,64 +1,21 @@ [tox] envlist = - 2.6, - 2.7, - 3.3, - 3.4, - pypy + py{27,35,36,37,38} + pypy{,3} [testenv] sitepackages = False -commands = nosetests - -[testenv:3.4] -basepython = python3.4 deps = -r{toxinidir}/requirements/default.txt -r{toxinidir}/requirements/test3.txt -r{toxinidir}/requirements/test-ci3.txt -commands = {toxinidir}/extra/release/removepyc.sh {toxinidir} - nosetests -vds kombu.tests \ - --with-coverage --cover-inclusive --cover-erase [] +commands = nosetests -vds kombu.tests --with-coverage --cover-inclusive --cover-erase [] -[testenv:3.3] -basepython = python3.3 -deps = -r{toxinidir}/requirements/default.txt - -r{toxinidir}/requirements/test3.txt - -r{toxinidir}/requirements/test-ci3.txt -commands = {toxinidir}/extra/release/removepyc.sh {toxinidir} - nosetests -vds kombu.tests \ - --with-coverage --cover-inclusive --cover-erase [] - -[testenv:2.7] -basepython = python2.7 +[testenv:py27] deps = -r{toxinidir}/requirements/default.txt -r{toxinidir}/requirements/test.txt -r{toxinidir}/requirements/test-ci.txt -commands = {toxinidir}/extra/release/removepyc.sh {toxinidir} - nosetests --with-coverage --cover-inclusive --cover-erase [] - -[testenv:2.6] -basepython = python2.6 -deps = -r{toxinidir}/requirements/default.txt - -r{toxinidir}/requirements/py26.txt - -r{toxinidir}/requirements/test.txt - -r{toxinidir}/requirements/test-ci.txt -commands = {toxinidir}/extra/release/removepyc.sh {toxinidir} - nosetests --with-coverage --cover-inclusive --cover-erase [] [testenv:pypy] -basepython = pypy -deps = -r{toxinidir}/requirements/default.txt - -r{toxinidir}/requirements/test.txt - -r{toxinidir}/requirements/test-ci.txt -commands = {toxinidir}/extra/release/removepyc.sh {toxinidir} - nosetests --with-coverage --cover-inclusive --cover-erase [] - -[testenv:jython] -basepython = jython -recreate = True -where = .tox deps = -r{toxinidir}/requirements/default.txt -r{toxinidir}/requirements/test.txt -r{toxinidir}/requirements/test-ci.txt -commands = {toxinidir}/extra/release/removepyc.sh {toxinidir} - nosetests --with-coverage --cover-inclusive --cover-erase [] |