Hello community, here is the log from the commit of package python-cheroot for openSUSE:Factory checked in at 2019-09-17 13:35:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-cheroot (Old) and /work/SRC/openSUSE:Factory/.python-cheroot.new.7948 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cheroot" Tue Sep 17 13:35:41 2019 rev:7 rq:730490 version:6.5.8 Changes: -------- --- /work/SRC/openSUSE:Factory/python-cheroot/python-cheroot.changes 2019-09-07 11:31:47.154446547 +0200 +++ /work/SRC/openSUSE:Factory/.python-cheroot.new.7948/python-cheroot.changes 2019-09-17 13:35:42.445859138 +0200 @@ -1,0 +2,13 @@ +Fri Sep 13 04:50:22 UTC 2019 - Thomas Bechtold <tbecht...@suse.com> + +- update to 6.5.8: + - Fix socket.SO_PEERCRED constant fallback value under PowerPC. + - Fix race condition when toggling stats counting in the middle + of request processing. + - Improve post Python 3.9 compatibility checks. + - Fix support of abstract namespace sockets + - Fix HTTP parser to return 400 on invalid major-only HTTP version + in Request-Line. +- Drop cheroot_fix_so_peercred_ppc.patch . Applied upstream. + +------------------------------------------------------------------- Old: ---- cheroot-6.5.5.tar.gz cheroot_fix_so_peercred_ppc.patch New: ---- cheroot-6.5.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-cheroot.spec ++++++ --- /var/tmp/diff_new_pack.dESQWF/_old 2019-09-17 13:35:42.877859069 +0200 +++ /var/tmp/diff_new_pack.dESQWF/_new 2019-09-17 13:35:42.877859069 +0200 @@ -19,14 +19,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define pypi_name cheroot Name: python-%{pypi_name} -Version: 6.5.5 +Version: 6.5.8 Release: 0 Summary: Pure-python HTTP server License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/cherrypy/%{pypi_name} Source: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz -Patch1: cheroot_fix_so_peercred_ppc.patch BuildRequires: %{python_module more-itertools >= 2.6} BuildRequires: %{python_module pyOpenSSL} BuildRequires: %{python_module pytest >= 2.8} ++++++ cheroot-6.5.5.tar.gz -> cheroot-6.5.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/.appveyor.yml new/cheroot-6.5.8/.appveyor.yml --- old/cheroot-6.5.5/.appveyor.yml 2018-12-20 18:15:21.000000000 +0100 +++ new/cheroot-6.5.8/.appveyor.yml 2019-09-05 11:21:53.000000000 +0200 @@ -30,7 +30,7 @@ version: '{build}' -after_test: +on_finish: - ps: | $wc = New-Object 'System.Net.WebClient' $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\junit-test-results.xml)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/.github/ISSUE_TEMPLATE.md new/cheroot-6.5.8/.github/ISSUE_TEMPLATE.md --- old/cheroot-6.5.5/.github/ISSUE_TEMPLATE.md 2019-02-04 21:44:20.000000000 +0100 +++ new/cheroot-6.5.8/.github/ISSUE_TEMPLATE.md 2019-09-05 11:21:53.000000000 +0200 @@ -1,12 +1,12 @@ <!-- -**** DELETE THIS BLOCK **** +**** DELETE THIS BLOCK **** Thanks for filing an issue! Please keep keep issues limited to bug reports, feature requests, and other general issues. For support questions, please feel free to reach out on stackoverflow: https://stackoverflow.com/questions/tagged/cheroot+or+cherrypy -**** /DELETE THIS BLOCK **** +**** /DELETE THIS BLOCK **** --> ❓ **I'm submitting a ...** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/.github/workflows/python-linters.yml new/cheroot-6.5.8/.github/workflows/python-linters.yml --- old/cheroot-6.5.5/.github/workflows/python-linters.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/cheroot-6.5.8/.github/workflows/python-linters.yml 2019-09-05 11:21:53.000000000 +0200 @@ -0,0 +1,45 @@ +name: Code quality + +on: + push: + pull_request: + schedule: + # Run every Friday at 18:02 UTC + # https://crontab.guru/#2_18_*_*_5 + - cron: 2 18 * * 5 + +jobs: + linters: + runs-on: ${{ matrix.os }} + strategy: + # max-parallel: 5 + matrix: + python-version: + - 3.7 + os: + - ubuntu-18.04 + env: + - TOXENV: pre-commit + - TOXENV: setup-check + # - TOXENV: pre-commit-failing + steps: + - uses: actions/checkout@master + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + version: ${{ matrix.python-version }} + - name: Install tox + run: | + python -m pip install --upgrade tox + - name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}' + run: | + python -m tox --parallel auto --notest + env: ${{ matrix.env }} + - name: Initialize pre-commit envs if needed + run: | + test -d .tox/pre-commit && .tox/pre-commit/bin/python -m pre_commit install-hooks || : + test -d .tox/pre-commit-failing && .tox/pre-commit-failing/bin/python -m pre_commit install-hooks || : + - name: Test with tox + run: | + python -m tox --parallel 0 + env: ${{ matrix.env }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/.github/workflows/python-tests.yml new/cheroot-6.5.8/.github/workflows/python-tests.yml --- old/cheroot-6.5.5/.github/workflows/python-tests.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/cheroot-6.5.8/.github/workflows/python-tests.yml 2019-09-05 11:21:53.000000000 +0200 @@ -0,0 +1,60 @@ +name: Test suite + +on: + push: + pull_request: + schedule: + - cron: 1 0 * * * # Run daily at 0:01 UTC + +jobs: + tests: + runs-on: ${{ matrix.os }} + strategy: + # max-parallel: 5 + matrix: + python-version: + - 3.7 + - 3.6 + - 3.5 + - 2.7 + os: + - ubuntu-18.04 + - ubuntu-16.04 + - macOS-10.14 + - windows-2019 + - windows-2016 + env: + - TOXENV: python + + steps: + - uses: actions/checkout@master + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + version: ${{ matrix.python-version }} + - name: Install tox + run: | + python -m pip install --upgrade tox + - name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}' + run: | + python -m tox --parallel auto --notest + env: ${{ matrix.env }} + - name: Log stdlib OpenSSL version + run: >- + python -c + "import ssl; print('\nOPENSSL_VERSION: ' + + ssl.OPENSSL_VERSION + '\nOPENSSL_VERSION_INFO: ' + + repr(ssl.OPENSSL_VERSION_INFO) + + '\nOPENSSL_VERSION_NUMBER: ' + + repr(ssl.OPENSSL_VERSION_NUMBER))" + env: ${{ matrix.env }} + - name: Log PyOpenSSL version + run: >- + python -m tox --run-command + "{envpython} -m OpenSSL.debug" + || : + env: ${{ matrix.env }} + - name: Test with tox + run: | + python -m tox --parallel 0 + env: ${{ matrix.env }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/.pre-commit-config.yaml new/cheroot-6.5.8/.pre-commit-config.yaml --- old/cheroot-6.5.5/.pre-commit-config.yaml 2019-02-04 21:44:20.000000000 +0100 +++ new/cheroot-6.5.8/.pre-commit-config.yaml 2019-09-05 11:21:53.000000000 +0200 @@ -4,47 +4,51 @@ hooks: - id: add-trailing-comma -- repo: git://github.com/pre-commit/pre-commit-hooks - sha: v1.1.1 - hooks: - - id: trailing-whitespace - - id: flake8 - args: - # W503 ignored for https://github.com/PyCQA/pycodestyle/issues/498 - - --ignore=W503 - exclude: cheroot/test/test_(http|config_server).py - - id: check-merge-conflict - - id: double-quote-string-fixer - - id: end-of-file-fixer - - id: name-tests-test - include: cheroot/test/ - args: - - --django - exclude: tests/dist-check.py - - id: debug-statements - - id: check-added-large-files - - id: check-ast - - id: check-byte-order-marker - - id: check-case-conflict - # disabled due to pre-commit/pre-commit-hooks#159 - #- id: check-docstring-first - - id: check-json - - id: check-symlinks - - id: check-yaml - - id: detect-private-key - - id: requirements-txt-fixer +- repo: git://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: trailing-whitespace + - id: flake8 + args: + # W503 ignored for https://github.com/PyCQA/pycodestyle/issues/498 + - --ignore=W503 + exclude: cheroot/test/test_(http|config_server).py + additional_dependencies: + - flake8-2020==1.0.0 + - id: check-merge-conflict + - id: double-quote-string-fixer + - id: end-of-file-fixer + - id: name-tests-test + include: cheroot/test/ + args: + - --django + exclude: tests/dist-check.py + - id: debug-statements + - id: check-added-large-files + - id: check-ast + - id: check-byte-order-marker + - id: check-case-conflict + # disabled due to pre-commit/pre-commit-hooks#159 + #- id: check-docstring-first + - id: check-json + - id: check-symlinks + - id: check-yaml + args: + - --unsafe + - id: detect-private-key + - id: requirements-txt-fixer -- repo: git://github.com/chewse/pre-commit-mirrors-pydocstyle - sha: v2.1.1 - hooks: - - id: pydocstyle +- repo: git://github.com/chewse/pre-commit-mirrors-pydocstyle + rev: v2.1.1 + hooks: + - id: pydocstyle -- repo: git://github.com/Lucas-C/pre-commit-hooks - sha: v1.1.1 - hooks: - - id: remove-tabs +- repo: git://github.com/Lucas-C/pre-commit-hooks + rev: v1.1.6 + hooks: + - id: remove-tabs -- repo: git://github.com/Lucas-C/pre-commit-hooks-lxml - sha: v1.0.2 - hooks: - - id: forbid-html-img-without-alt-text +- repo: git://github.com/Lucas-C/pre-commit-hooks-lxml + rev: v1.1.0 + hooks: + - id: forbid-html-img-without-alt-text diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/.readthedocs.yml new/cheroot-6.5.8/.readthedocs.yml --- old/cheroot-6.5.5/.readthedocs.yml 2018-04-16 17:56:22.000000000 +0200 +++ new/cheroot-6.5.8/.readthedocs.yml 2019-09-05 11:21:53.000000000 +0200 @@ -1,7 +1,41 @@ +# .readthedocs.yml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html +# for details + +# Required +version: 2 + +# Build documentation in the docs/ directory with Sphinx +sphinx: + builder: html + configuration: docs/conf.py + fail_on_warning: false # true + +# Build documentation with MkDocs +#mkdocs: +# configuration: mkdocs.yml +# fail_on_warning: true + +# Optionally build your docs in additional formats +# such as PDF and ePub +formats: [] + +submodules: + include: all # [] + exclude: [] + recursive: true + build: image: latest + +# Optionally set the version of Python and requirements required +# to build docs python: - version: 3.6 - extra_requirements: - - docs - pip_install: true + version: 3.7 + install: + - method: pip + path: . + extra_requirements: + - docs + system_packages: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/.travis.yml new/cheroot-6.5.8/.travis.yml --- old/cheroot-6.5.5/.travis.yml 2019-04-30 08:11:06.000000000 +0200 +++ new/cheroot-6.5.8/.travis.yml 2019-09-05 11:21:53.000000000 +0200 @@ -8,8 +8,7 @@ - 3.4 - 3.5 - 3.6 -- &pypy2 pypy2.7-6.0 -- &pypy3 pypy3.5-6.0 +- &pypy3 pypy3 _base_envs: - &stage_lint @@ -27,9 +26,9 @@ - &pyenv_base <<: *stage_test language: generic - python: *pypy2 + python: &pypy2 pypy env: - - &env_pypy2 PYTHON_VERSION=pypy2.7-5.10.0 + - &env_pypy2 PYTHON_VERSION=pypy2.7-7.1.0 - &env_pyenv PYENV_ROOT="$HOME/.pyenv" - &env_path PATH="$PYENV_ROOT/bin:$PATH" before_install: @@ -86,6 +85,10 @@ allow_failures: - env: TOXENV=pre-commit-failing include: + - python: *pypy2 + env: + PYTEST_ADDOPTS: >- + '-p no:warnings' - <<: *lint_python_base name: pre-commit.com tool linters env: TOXENV=pre-commit @@ -143,9 +146,9 @@ - <<: *osx_python_base <<: *manual_run_or_cron osx_image: xcode9.4 - python: pypy3.5-5.10.1 + python: pypy3.6-7.1.0 env: - - PYTHON_VERSION=pypy3.5-5.10.1 + - PYTHON_VERSION=pypy3.6-7.1.0 - *env_pyenv - *env_path # pypy2.7-5.10.0 fails under OS X because it's unsupported diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/CHANGES.rst new/cheroot-6.5.8/CHANGES.rst --- old/cheroot-6.5.5/CHANGES.rst 2019-04-30 08:08:34.000000000 +0200 +++ new/cheroot-6.5.8/CHANGES.rst 2019-09-05 11:21:53.000000000 +0200 @@ -1,7 +1,32 @@ +v6.5.8 +====== + +- :issue:`222` via :commit:`621f4ee`: Fix + :py:const:`socket.SO_PEERCRED` constant fallback value + under PowerPC. + +v6.5.7 +====== + +- :issue:`198` via :commit:`9f7affe`: Fix race condition when + toggling stats counting in the middle of request processing. + +- Improve post Python 3.9 compatibility checks. + +- Fix support of `abstract namespace sockets + <https://utcc.utoronto.ca/~cks + /space/blog/linux/SocketAbstractNamespace>`_. + +v6.5.6 +====== + +- :issue:`218` via :pr:`219`: Fix HTTP parser to return 400 on + invalid major-only HTTP version in Request-Line. + v6.5.5 ====== -- :issue:`99` via :pr:`186': Sockets now collect statistics (bytes +- :issue:`99` via :pr:`186`: Sockets now collect statistics (bytes read and written) on Python 3 same as Python 2. - :cp-issue:`1618` via :pr:`180`: Ignore OpenSSL's 1.1+ Error 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/PKG-INFO new/cheroot-6.5.8/PKG-INFO --- old/cheroot-6.5.5/PKG-INFO 2019-04-30 08:17:41.000000000 +0200 +++ new/cheroot-6.5.8/PKG-INFO 2019-09-05 11:22:21.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: cheroot -Version: 6.5.5 +Version: 6.5.8 Summary: Highly-optimized, pure-python HTTP server Home-page: https://cheroot.cherrypy.org Author: CherryPy Team @@ -93,6 +93,7 @@ Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: Implementation Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: Jython @@ -102,5 +103,5 @@ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Server Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.* -Provides-Extra: docs Provides-Extra: testing +Provides-Extra: docs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot/_compat.py new/cheroot-6.5.8/cheroot/_compat.py --- old/cheroot-6.5.5/cheroot/_compat.py 2019-02-04 21:44:20.000000000 +0100 +++ new/cheroot-6.5.8/cheroot/_compat.py 2019-09-05 11:21:53.000000000 +0200 @@ -24,8 +24,11 @@ IS_LINUX = SYS_PLATFORM == 'Linux' IS_MACOS = SYS_PLATFORM == 'Darwin' +PLATFORM_ARCH = platform.machine() +IS_PPC = PLATFORM_ARCH.startswith('ppc') -if six.PY3: + +if not six.PY2: def ntob(n, encoding='ISO-8859-1'): """Return the native string as bytes in the given encoding.""" assert_native(n) @@ -85,7 +88,7 @@ raise TypeError('n must be a native str (got %s)' % type(n).__name__) -if six.PY3: +if not six.PY2: """Python 3 has memoryview builtin.""" # Python 2.7 has it backported, but socket.write() does # str(memoryview(b'0' * 100)) -> <memory at 0x7fb6913a5588> @@ -99,7 +102,7 @@ def extract_bytes(mv): """Retrieve bytes out of memoryview/buffer or bytes.""" if isinstance(mv, memoryview): - return mv.tobytes() if six.PY3 else bytes(mv) + return bytes(mv) if six.PY2 else mv.tobytes() if isinstance(mv, bytes): return mv diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot/makefile.py new/cheroot-6.5.8/cheroot/makefile.py --- old/cheroot-6.5.5/cheroot/makefile.py 2019-04-29 21:41:46.000000000 +0200 +++ new/cheroot-6.5.8/cheroot/makefile.py 2019-09-05 11:21:53.000000000 +0200 @@ -396,7 +396,7 @@ return ''.join(buffers) -if six.PY3: +if not six.PY2: class StreamReader(io.BufferedReader): """Socket stream reader.""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot/server.py new/cheroot-6.5.8/cheroot/server.py --- old/cheroot-6.5.5/cheroot/server.py 2019-04-30 08:08:34.000000000 +0200 +++ new/cheroot-6.5.8/cheroot/server.py 2019-09-05 11:21:53.000000000 +0200 @@ -86,6 +86,7 @@ from . import errors, __version__ from ._compat import bton, ntou +from ._compat import IS_PPC from .workers import threadpool from .makefile import MakeFile, StreamWriter @@ -142,7 +143,7 @@ which case the getsockopt() will hopefully fail. The arch specific value could be derived from platform.processor() """ - socket.SO_PEERCRED = 17 + socket.SO_PEERCRED = 21 if IS_PPC else 17 LF = b'\n' @@ -788,6 +789,11 @@ ) return False rp = req_protocol[5:].split(b'.', 1) + if len(rp) != 2: + self.simple_response( + '400 Bad Request', 'Malformed Request-Line: bad version', + ) + return False rp = tuple(map(int, rp)) # Minor.Major must be threat as integers if rp > (1, 1): self.simple_response( @@ -1226,7 +1232,7 @@ Args: server (HTTPServer): web server object receiving this request - socket (socket._socketobject): the raw socket object (usually + sock (socket._socketobject): the raw socket object (usually TCP) for this connection makefile (file): a fileobject class for reading from the socket """ @@ -1731,7 +1737,7 @@ if os.getenv('LISTEN_PID', None): # systemd socket activation self.socket = socket.fromfd(3, socket.AF_INET, socket.SOCK_STREAM) - elif isinstance(self.bind_addr, six.string_types): + elif isinstance(self.bind_addr, (six.text_type, six.binary_type)): # AF_UNIX socket try: self.bind_unix_socket(self.bind_addr) @@ -1861,6 +1867,27 @@ """ File does not exist, which is the primary goal anyway. """ + except TypeError as typ_err: + err_msg = str(typ_err) + if ( + 'remove() argument 1 must be encoded ' + 'string without null bytes, not unicode' + not in err_msg + and 'embedded NUL character' not in err_msg # py34 + and 'argument must be a ' + 'string without NUL characters' not in err_msg # pypy2 + ): + raise + except ValueError as val_err: + err_msg = str(val_err) + if ( + 'unlink: embedded null ' + 'character in path' not in err_msg + and 'embedded null byte' not in err_msg + and 'argument must be a ' + 'string without NUL characters' not in err_msg # pypy3 + ): + raise sock = self.prepare_socket( bind_addr=bind_addr, @@ -1926,7 +1953,10 @@ * https://gavv.github.io/blog/ephemeral-port-reuse/ """ sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - if nodelay and not isinstance(bind_addr, str): + if nodelay and not isinstance( + bind_addr, + (six.text_type, six.binary_type), + ): sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) if ssl_adapter is not None: @@ -1974,6 +2004,10 @@ In case of bytes with a leading null-byte it's an abstract socket. """ return bind_addr[:2] + + if isinstance(bind_addr, six.binary_type): + bind_addr = bton(bind_addr) + return bind_addr def tick(self): @@ -2007,7 +2041,7 @@ msg, ] - sock_to_make = s if six.PY3 else s._sock + sock_to_make = s if not six.PY2 else s._sock wfile = mf(sock_to_make, 'wb', io.DEFAULT_BUFFER_SIZE) try: wfile.write(''.join(buf).encode('ISO-8859-1')) @@ -2024,7 +2058,10 @@ conn = self.ConnectionClass(self, s, mf) - if not isinstance(self.bind_addr, six.string_types): + if not isinstance( + self.bind_addr, + (six.text_type, six.binary_type), + ): # optional values # Until we do DNS lookups, omit REMOTE_HOST if addr is None: # sometimes this can happen @@ -2093,7 +2130,10 @@ sock = getattr(self, 'socket', None) if sock: - if not isinstance(self.bind_addr, six.string_types): + if not isinstance( + self.bind_addr, + (six.text_type, six.binary_type), + ): # Touch our own socket to make accept() return immediately. try: host, port = sock.getsockname()[:2] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot/ssl/builtin.py new/cheroot-6.5.8/cheroot/ssl/builtin.py --- old/cheroot-6.5.5/cheroot/ssl/builtin.py 2019-04-29 21:41:46.000000000 +0200 +++ new/cheroot-6.5.8/cheroot/ssl/builtin.py 2019-09-05 11:21:53.000000000 +0200 @@ -30,12 +30,12 @@ from .._compat import IS_ABOVE_OPENSSL10 from ..makefile import StreamReader, StreamWriter -if six.PY3: - generic_socket_error = OSError -else: +if six.PY2: import socket generic_socket_error = socket.error del socket +else: + generic_socket_error = OSError def _assert_ssl_exc_contains(exc, *msgs): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot/test/conftest.py new/cheroot-6.5.8/cheroot/test/conftest.py --- old/cheroot-6.5.5/cheroot/test/conftest.py 2019-02-04 21:44:20.000000000 +0100 +++ new/cheroot-6.5.8/cheroot/test/conftest.py 2019-09-05 11:21:53.000000000 +0200 @@ -19,14 +19,14 @@ from ..testing import get_server_client -@pytest.fixture # noqa: F811 -def wsgi_server_client(wsgi_server): +@pytest.fixture +def wsgi_server_client(wsgi_server): # noqa: F811 """Create a test client out of given WSGI server.""" return get_server_client(wsgi_server) -@pytest.fixture # noqa: F811 -def native_server_client(native_server): +@pytest.fixture +def native_server_client(native_server): # noqa: F811 """Create a test client out of given HTTP server.""" return get_server_client(native_server) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot/test/test__compat.py new/cheroot-6.5.8/cheroot/test/test__compat.py --- old/cheroot-6.5.5/cheroot/test/test__compat.py 2019-02-04 21:44:20.000000000 +0100 +++ new/cheroot-6.5.8/cheroot/test/test__compat.py 2019-09-05 11:21:53.000000000 +0200 @@ -32,7 +32,7 @@ ) def test_compat_functions_negative_nonnative(func): """Check that compat functions fail loudly for incorrect input.""" - non_native_test_str = b'bar' if six.PY3 else u'bar' + non_native_test_str = u'bar' if six.PY2 else b'bar' with pytest.raises(TypeError): func(non_native_test_str, encoding='utf-8') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot/test/test_conn.py new/cheroot-6.5.8/cheroot/test/test_conn.py --- old/cheroot-6.5.5/cheroot/test/test_conn.py 2019-02-04 21:44:20.000000000 +0100 +++ new/cheroot-6.5.8/cheroot/test/test_conn.py 2019-09-05 11:21:53.000000000 +0200 @@ -82,9 +82,9 @@ WSGI 1.0 is a mess around unicode. Create endpoints that match the PATH_INFO that it produces. """ - if six.PY3: - return string.encode('utf-8').decode('latin-1') - return string + if six.PY2: + return string + return string.encode('utf-8').decode('latin-1') handlers = { '/hello': hello, @@ -541,7 +541,7 @@ # ``conn.sock``. Until that bug get's fixed we will # monkey patch the ``reponse`` instance. # https://bugs.python.org/issue23377 - if six.PY3: + if not six.PY2: response.fp = conn.sock.makefile('rb', 0) response.begin() body = response.read(13) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot/test/test_core.py new/cheroot-6.5.8/cheroot/test/test_core.py --- old/cheroot-6.5.5/cheroot/test/test_core.py 2019-02-04 21:44:20.000000000 +0100 +++ new/cheroot-6.5.8/cheroot/test/test_core.py 2019-09-05 11:21:53.000000000 +0200 @@ -52,9 +52,9 @@ WSGI 1.0 is a mess around unicode. Create endpoints that match the PATH_INFO that it produces. """ - if six.PY3: - return string.encode('utf-8').decode('latin-1') - return string + if six.PY2: + return string + return string.encode('utf-8').decode('latin-1') handlers = { '/hello': hello, @@ -160,7 +160,7 @@ response = _get_http_response(c, method='GET') response.begin() assert response.status == HTTP_OK - assert response.fp.read(12) == b'Hello world!' + assert response.read(12) == b'Hello world!' c.close() @@ -175,7 +175,7 @@ response = _get_http_response(c, method='GET') response.begin() assert response.status == HTTP_BAD_REQUEST - assert response.fp.read(21) == b'Malformed Request-URI' + assert response.read(21) == b'Malformed Request-URI' c.close() @@ -241,7 +241,7 @@ c = test_client.get_connection() c.request('POST', '/no_body') response = c.getresponse() - actual_resp_body = response.fp.read() + actual_resp_body = response.read() actual_status = response.status assert actual_status == HTTP_OK assert actual_resp_body == b'Hello world!' @@ -256,7 +256,7 @@ c = test_client.get_connection() c.request('POST', '/body_required') response = c.getresponse() - response.fp.read() + response.read() actual_status = response.status assert actual_status == HTTP_LENGTH_REQUIRED @@ -274,6 +274,10 @@ HTTP_BAD_REQUEST, b'Malformed Request-Line: bad protocol', ), ( + b'GET / HTTP/1', # invalid version + HTTP_BAD_REQUEST, b'Malformed Request-Line: bad version', + ), + ( b'GET / HTTP/2.15', # invalid ver HTTP_VERSION_NOT_SUPPORTED, b'Cannot fulfill request', ), @@ -290,7 +294,7 @@ response = _get_http_response(c, method='GET') response.begin() assert response.status == status_code - assert response.fp.read(len(expected_body)) == expected_body + assert response.read(len(expected_body)) == expected_body c.close() @@ -304,7 +308,7 @@ response = c.getresponse() actual_status = response.status assert actual_status == HTTP_BAD_REQUEST - actual_resp_body = response.fp.read(21) + actual_resp_body = response.read(21) assert actual_resp_body == b'Malformed method name' @@ -320,7 +324,7 @@ response = c.getresponse() actual_status = response.status assert actual_status == HTTP_BAD_REQUEST - actual_resp_body = response.fp.read(20) + actual_resp_body = response.read(20) assert actual_resp_body == b'Illegal header line.' @@ -353,7 +357,7 @@ response.begin() actual_status = response.status assert actual_status == HTTP_BAD_REQUEST - actual_resp_body = response.fp.read(22) + actual_resp_body = response.read(22) assert actual_resp_body == b'Malformed Request-Line' c.close() except socket.error as ex: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot/test/test_server.py new/cheroot-6.5.8/cheroot/test/test_server.py --- old/cheroot-6.5.5/cheroot/test/test_server.py 2019-02-04 21:44:20.000000000 +0100 +++ new/cheroot-6.5.8/cheroot/test/test_server.py 2019-09-05 11:21:53.000000000 +0200 @@ -9,13 +9,15 @@ import socket import tempfile import threading +import uuid import pytest import requests import requests_unixsocket +import six from .._compat import bton, ntob -from .._compat import IS_MACOS +from .._compat import IS_LINUX, IS_MACOS, SYS_PLATFORM from ..server import IS_UID_GID_RESOLVABLE, Gateway, HTTPServer from ..testing import ( ANY_INTERFACE_IPV4, @@ -37,9 +39,12 @@ ) -@pytest.fixture -def unix_sock_file(): +@pytest.fixture(params=('abstract', 'file')) +def unix_sock_file(request): """Check that bound UNIX socket address is stored in server.""" + if request.param == 'abstract': + yield request.getfixturevalue('unix_abstract_sock') + return tmp_sock_fh, tmp_sock_fname = tempfile.mkstemp() yield tmp_sock_fname @@ -48,6 +53,20 @@ os.unlink(tmp_sock_fname) +@pytest.fixture +def unix_abstract_sock(): + """Return an abstract UNIX socket address.""" + if not IS_LINUX: + pytest.skip( + '{os} does not support an abstract ' + 'socket namespace'.format(os=SYS_PLATFORM), + ) + return b''.join(( + b'\x00cheroot-test-socket', + ntob(str(uuid.uuid4())), + )).decode() + + def test_prepare_makes_server_ready(): """Check that prepare() makes the server ready, and stop() clears it.""" httpserver = HTTPServer( @@ -114,11 +133,9 @@ assert httpserver.bind_addr == unix_sock_file -@pytest.mark.skip(reason="Abstract sockets don't work currently") @unix_only_sock_test -def test_bind_addr_unix_abstract(http_server): - """Check that bound UNIX socket address is stored in server.""" - unix_abstract_sock = b'\x00cheroot/test/socket/here.sock' +def test_bind_addr_unix_abstract(http_server, unix_abstract_sock): + """Check that bound UNIX abstract sockaddr is stored in server.""" httpserver = http_server.send(unix_abstract_sock) assert httpserver.bind_addr == unix_abstract_sock @@ -163,9 +180,13 @@ def test_peercreds_unix_sock(peercreds_enabled_server_and_client): """Check that peercred lookup works when enabled.""" httpserver, testclient = peercreds_enabled_server_and_client + bind_addr = httpserver.bind_addr + + if isinstance(bind_addr, six.binary_type): + bind_addr = bind_addr.decode() unix_base_uri = 'http+unix://{}'.format( - httpserver.bind_addr.replace('/', '%2F'), + bind_addr.replace('\0', '%00').replace('/', '%2F'), ) expected_peercreds = os.getpid(), os.getuid(), os.getgid() @@ -192,8 +213,13 @@ httpserver, testclient = peercreds_enabled_server_and_client httpserver.peercreds_resolve_enabled = True + bind_addr = httpserver.bind_addr + + if isinstance(bind_addr, six.binary_type): + bind_addr = bind_addr.decode() + unix_base_uri = 'http+unix://{}'.format( - httpserver.bind_addr.replace('/', '%2F'), + bind_addr.replace('\0', '%00').replace('/', '%2F'), ) import grp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot/test/test_ssl.py new/cheroot-6.5.8/cheroot/test/test_ssl.py --- old/cheroot-6.5.5/cheroot/test/test_ssl.py 2019-04-29 21:42:46.000000000 +0200 +++ new/cheroot-6.5.8/cheroot/test/test_ssl.py 2019-09-05 11:21:53.000000000 +0200 @@ -6,6 +6,7 @@ __metaclass__ = type import functools +import os import ssl import sys import threading @@ -31,12 +32,14 @@ ) +IS_GITHUB_ACTIONS_WORKFLOW = bool(os.getenv('GITHUB_WORKFLOW')) IS_LIBRESSL_BACKEND = ssl.OPENSSL_VERSION.startswith('LibreSSL') IS_PYOPENSSL_SSL_VERSION_1_0 = ( OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION). startswith(b'OpenSSL 1.0.') ) PY27 = sys.version_info[:2] == (2, 7) +PY34 = sys.version_info[:2] == (3, 4) _stdlib_to_openssl_verify = { @@ -48,13 +51,13 @@ fails_under_py3 = pytest.mark.xfail( - six.PY3, - reason='Fails under Python 3', + not six.PY2, + reason='Fails under Python 3+', ) fails_under_py3_in_pypy = pytest.mark.xfail( - six.PY3 and IS_PYPY, + not six.PY2 and IS_PYPY, reason='Fails under PyPy3', ) @@ -304,7 +307,7 @@ and tls_verify_mode == ssl.CERT_REQUIRED and tls_client_identity == 'localhost' and is_trusted_cert - ): + ) or PY34: pytest.xfail( 'OpenSSL 1.0 has problems with verifying client certs', ) @@ -312,18 +315,56 @@ assert resp.text == 'Hello world!' return - with pytest.raises(requests.exceptions.SSLError) as ssl_err: + expected_ssl_errors = ( + requests.exceptions.SSLError, + OpenSSL.SSL.Error, + ) if PY34 else ( + requests.exceptions.SSLError, + ) + if IS_WINDOWS or IS_GITHUB_ACTIONS_WORKFLOW: + expected_ssl_errors += requests.exceptions.ConnectionError, + with pytest.raises(expected_ssl_errors) as ssl_err: make_https_request() - err_text = ssl_err.value.args[0].reason.args[0].args[0] + if PY34 and isinstance(ssl_err, OpenSSL.SSL.Error): + pytest.xfail( + 'OpenSSL behaves wierdly under Python 3.4 ' + 'because of an outdated urllib3', + ) + + try: + err_text = ssl_err.value.args[0].reason.args[0].args[0] + except AttributeError: + if PY34: + pytest.xfail('OpenSSL behaves wierdly under Python 3.4') + elif not six.PY2 and IS_WINDOWS: + err_text = str(ssl_err.value) + else: + raise - expected_substring = ( + expected_substrings = ( 'sslv3 alert bad certificate' if IS_LIBRESSL_BACKEND - else 'tlsv1 alert unknown ca' + else 'tlsv1 alert unknown ca', ) - if IS_PYPY and six.PY3 and IS_MACOS and adapter_type == 'pyopenssl': - expected_substring = 'tlsv1 alert unknown ca' - assert expected_substring in err_text + if not six.PY2: + if IS_MACOS and IS_PYPY and adapter_type == 'pyopenssl': + expected_substrings = ('tlsv1 alert unknown ca', ) + if ( + IS_WINDOWS + and tls_verify_mode in ( + ssl.CERT_REQUIRED, + ssl.CERT_OPTIONAL, + ) + and not is_trusted_cert + and tls_client_identity == 'localhost' + ): + expected_substrings += ( + 'bad handshake: ' + "SysCallError(10054, 'WSAECONNRESET')", + "('Connection aborted.', " + 'OSError("(10054, \'WSAECONNRESET\')"))', + ) + assert any(e in err_text for e in expected_substrings) @pytest.mark.parametrize( @@ -400,7 +441,7 @@ expect_fallback_response_over_plain_http = ( (adapter_type == 'pyopenssl' - and (IS_ABOVE_OPENSSL10 or six.PY3)) + and (IS_ABOVE_OPENSSL10 or not six.PY2)) or PY27 ) if expect_fallback_response_over_plain_http: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot/test/webtest.py new/cheroot-6.5.8/cheroot/test/webtest.py --- old/cheroot-6.5.5/cheroot/test/webtest.py 2019-02-04 21:44:20.000000000 +0100 +++ new/cheroot-6.5.8/cheroot/test/webtest.py 2019-09-05 11:21:53.000000000 +0200 @@ -455,25 +455,27 @@ def shb(response): """Return status, headers, body the way we like from a response.""" - if six.PY3: - h = response.getheaders() - else: - h = [] - key, value = None, None - for line in response.msg.headers: - if line: - if line[0] in ' \t': - value += line.strip() - else: - if key and value: - h.append((key, value)) - key, value = line.split(':', 1) - key = key.strip() - value = value.strip() - if key and value: - h.append((key, value)) + resp_status_line = '%s %s' % (response.status, response.reason) - return '%s %s' % (response.status, response.reason), h, response.read() + if not six.PY2: + return resp_status_line, response.getheaders(), response.read() + + h = [] + key, value = None, None + for line in response.msg.headers: + if line: + if line[0] in ' \t': + value += line.strip() + else: + if key and value: + h.append((key, value)) + key, value = line.split(':', 1) + key = key.strip() + value = value.strip() + if key and value: + h.append((key, value)) + + return resp_status_line, h, response.read() def openURL( @@ -507,7 +509,7 @@ conn._http_vsn_str = protocol conn._http_vsn = int(''.join([x for x in protocol if x.isdigit()])) - if six.PY3 and isinstance(url, bytes): + if not six.PY2 and isinstance(url, bytes): url = url.decode() conn.putrequest( method.upper(), url, skip_host=True, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot/testing.py new/cheroot-6.5.8/cheroot/testing.py --- old/cheroot-6.5.5/cheroot/testing.py 2019-02-04 21:44:20.000000000 +0100 +++ new/cheroot-6.5.8/cheroot/testing.py 2019-09-05 11:21:53.000000000 +0200 @@ -50,6 +50,8 @@ else: break + httpserver.shutdown_timeout = 0 # Speed-up tests teardown + threading.Thread(target=httpserver.safe_start).start() # spawn it while not httpserver.ready: # wait until fully initialized and bound time.sleep(0.1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot/workers/threadpool.py new/cheroot-6.5.8/cheroot/workers/threadpool.py --- old/cheroot-6.5.5/cheroot/workers/threadpool.py 2019-04-30 08:08:34.000000000 +0200 +++ new/cheroot-6.5.8/cheroot/workers/threadpool.py 2019-09-05 11:21:53.000000000 +0200 @@ -108,13 +108,14 @@ return self.conn = conn - if self.server.stats['Enabled']: + is_stats_enabled = self.server.stats['Enabled'] + if is_stats_enabled: self.start_time = time.time() try: conn.communicate() finally: conn.close() - if self.server.stats['Enabled']: + if is_stats_enabled: self.requests_seen += self.conn.requests_seen self.bytes_read += self.conn.rfile.bytes_read self.bytes_written += self.conn.wfile.bytes_written @@ -209,7 +210,7 @@ # Grow/shrink the pool if necessary. # Remove any dead threads from our list for t in self._threads: - if not t.isAlive(): + if not t.is_alive(): self._threads.remove(t) amount -= 1 @@ -242,7 +243,7 @@ endtime = time.time() + timeout while self._threads: worker = self._threads.pop() - if worker is not current and worker.isAlive(): + if worker is not current and worker.is_alive(): try: if timeout is None or timeout < 0: worker.join() @@ -250,7 +251,7 @@ remaining_time = endtime - time.time() if remaining_time > 0: worker.join(remaining_time) - if worker.isAlive(): + if worker.is_alive(): # We exhausted the timeout. # Forcibly shut down the socket. c = worker.conn diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot/wsgi.py new/cheroot-6.5.8/cheroot/wsgi.py --- old/cheroot-6.5.5/cheroot/wsgi.py 2019-02-04 21:44:20.000000000 +0100 +++ new/cheroot-6.5.8/cheroot/wsgi.py 2019-09-05 11:21:53.000000000 +0200 @@ -359,7 +359,7 @@ def _decode_value(item): k, v = item skip_keys = 'REQUEST_URI', 'wsgi.input' - if six.PY3 or not isinstance(v, bytes) or k in skip_keys: + if not six.PY2 or not isinstance(v, bytes) or k in skip_keys: return k, v return k, v.decode('ISO-8859-1') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot.egg-info/PKG-INFO new/cheroot-6.5.8/cheroot.egg-info/PKG-INFO --- old/cheroot-6.5.5/cheroot.egg-info/PKG-INFO 2019-04-30 08:17:40.000000000 +0200 +++ new/cheroot-6.5.8/cheroot.egg-info/PKG-INFO 2019-09-05 11:22:21.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: cheroot -Version: 6.5.5 +Version: 6.5.8 Summary: Highly-optimized, pure-python HTTP server Home-page: https://cheroot.cherrypy.org Author: CherryPy Team @@ -93,6 +93,7 @@ Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: Implementation Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: Jython @@ -102,5 +103,5 @@ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Server Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.* -Provides-Extra: docs Provides-Extra: testing +Provides-Extra: docs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot.egg-info/SOURCES.txt new/cheroot-6.5.8/cheroot.egg-info/SOURCES.txt --- old/cheroot-6.5.5/cheroot.egg-info/SOURCES.txt 2019-04-30 08:17:41.000000000 +0200 +++ new/cheroot-6.5.8/cheroot.egg-info/SOURCES.txt 2019-09-05 11:22:21.000000000 +0200 @@ -24,6 +24,8 @@ .github/stale.yml .github/ISSUE_TEMPLATE/Bug_report.md .github/ISSUE_TEMPLATE/Feature_request.md +.github/workflows/python-linters.yml +.github/workflows/python-tests.yml cheroot/__init__.py cheroot/__main__.py cheroot/_compat.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/cheroot.egg-info/requires.txt new/cheroot-6.5.8/cheroot.egg-info/requires.txt --- old/cheroot-6.5.5/cheroot.egg-info/requires.txt 2019-04-30 08:17:40.000000000 +0200 +++ new/cheroot-6.5.8/cheroot.egg-info/requires.txt 2019-09-05 11:22:21.000000000 +0200 @@ -17,11 +17,16 @@ pytest-sugar>=0.9.1 pytest-testmon>=0.9.7 pytest-watch==4.2.0 -pytest-xdist==1.28.0 +pytest-xdist>=1.28.0 coverage==4.5.3 codecov==2.0.15 -pytest-cov==2.6.1 +pytest-cov==2.7.1 trustme>=0.4.0 pyopenssl requests-unixsocket + +[testing:python_version != "3.4"] urllib3>=1.25 + +[testing:python_version == "3.4"] +urllib3<1.25 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/pytest.ini new/cheroot-6.5.8/pytest.ini --- old/cheroot-6.5.5/pytest.ini 2019-04-30 08:11:06.000000000 +0200 +++ new/cheroot-6.5.8/pytest.ini 2019-09-05 11:21:53.000000000 +0200 @@ -1,6 +1,9 @@ [pytest] norecursedirs = dist docs build .tox .eggs -addopts = -v -rxXs --testmon --doctest-modules --ignore cheroot/ssl/pyopenssl.py --junitxml=junit-test-results.xml --cov=cheroot --cov-report term-missing:skip-covered --cov-report xml +addopts = --durations=10 -v -rxXs -l -n auto --testmon --doctest-modules --ignore cheroot/ssl/pyopenssl.py --junitxml=junit-test-results.xml --cov=cheroot --cov-report term-missing:skip-covered --cov-report xml +filterwarnings = + error doctest_optionflags = ALLOW_UNICODE ELLIPSIS +junit_duration_report = call junit_suite_name = cheroot_test_suite testpaths = cheroot/test/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/setup.cfg new/cheroot-6.5.8/setup.cfg --- old/cheroot-6.5.5/setup.cfg 2019-04-30 08:17:41.000000000 +0200 +++ new/cheroot-6.5.8/setup.cfg 2019-09-05 11:22:21.000000000 +0200 @@ -34,6 +34,7 @@ Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 Programming Language :: Python :: Implementation Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: Jython @@ -78,19 +79,20 @@ pytest-sugar>=0.9.1 pytest-testmon>=0.9.7 pytest-watch==4.2.0 - pytest-xdist==1.28.0 + pytest-xdist>=1.28.0 coverage==4.5.3 codecov==2.0.15 - pytest-cov==2.6.1 + pytest-cov==2.7.1 trustme>=0.4.0 pyopenssl requests-unixsocket - urllib3>=1.25 + urllib3>=1.25; python_version != "3.4" + urllib3<1.25; python_version == "3.4" # pyup: < 1.25 [options.entry_points] console_scripts = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cheroot-6.5.5/tox.ini new/cheroot-6.5.8/tox.ini --- old/cheroot-6.5.5/tox.ini 2019-04-30 08:11:06.000000000 +0200 +++ new/cheroot-6.5.8/tox.ini 2019-09-05 11:21:53.000000000 +0200 @@ -1,9 +1,13 @@ [tox] envlist = python -minversion = 3.5.3 +minversion = 3.13.2 +requires = + pip >= 9 + tox-run-command >= 0.4 [testenv] deps = + pip >= 9 setuptools>=31.0.1 whitelist_externals = rm @@ -27,17 +31,29 @@ CIRCLECI CIRCLE_* PYTHONDONTWRITEBYTECODE + PYTEST_* setenv = PYTHONDONTWRITEBYTECODE=x WEBTEST_INTERACTIVE=false [testenv:build-docs] +basepython = python3.7 +description = Build The Docs +changedir = docs + #-a -n -W \ +commands = + python -m sphinx \ + -b html --color \ + -d "{toxworkdir}/docs_doctree" \ + . "{toxworkdir}/docs_out" + + # Print out the output docs dir and a way to serve html: + python -c \ + 'import pathlib; '\ + 'docs_dir = pathlib.Path(r"{toxworkdir}") / "docs_out"; index_file = docs_dir / "index.html"; print(f"\nDocumentation available under `file://\{index_file\}`\n\nTo serve docs, use `python3 -m http.server --directory \{docs_dir\} 0`\n")' extras = docs testing -changedir = docs -commands = - python -m sphinx . {toxinidir}/build/html [testenv:watch] commands = ptw --runner=pytest @@ -55,10 +71,12 @@ [testenv:setup-check] deps = + setuptools-scm twine extras = docs usedevelop = False commands = python -m setup checkdocs check --metadata --restructuredtext --strict --verbose - twine check .tox/dist/* + python -m twine check .tox/dist/* + python -m setuptools_scm ls