Hello community, here is the log from the commit of package python-treq for openSUSE:Leap:15.2 checked in at 2020-04-12 15:37:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/python-treq (Old) and /work/SRC/openSUSE:Leap:15.2/.python-treq.new.3248 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-treq" Sun Apr 12 15:37:57 2020 rev:2 rq:788563 version:20.3.0 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/python-treq/python-treq.changes 2020-01-15 15:53:54.499613894 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.python-treq.new.3248/python-treq.changes 2020-04-12 15:37:59.953994321 +0200 @@ -1,0 +2,16 @@ +Wed Mar 25 15:05:08 UTC 2020 - [email protected] + +- version update to 20.3.0 + - Python 3.7 support. (`#228 <https://github.com/twisted/treq/issues/228>`__) + - `treq.testing.RequestTraversalAgent` now passes its memory reactor to the `twisted.web.server.Site` it creates, preventing the ``Site`` from polluting the global reactor. (`#225 <https://github.com/twisted/treq/issues/225>`__) + - `treq.testing` no longer generates deprecation warnings about ``twisted.test.proto_helpers.MemoryReactor``. (`#253 <https://github.com/twisted/treq/issues/253>`__) + - The ``download_file.py`` example has been updated to do a streaming download with *unbuffered=True*. (`#233 <https://github.com/twisted/treq/issues/233>`__) + - The *agent* parameter to `treq.request()` has been documented. (`#235 <https://github.com/twisted/treq/issues/235>`__) + - The type of the *headers* element of a response tuple passed to `treq.testing.RequestSequence` is now correctly documented as `str`. (`#237 <https://github.com/twisted/treq/issues/237>`__) + - Drop support for Python 3.4. (`#240 <https://github.com/twisted/treq/issues/240>`__) + - `#247 <https://github.com/twisted/treq/issues/247>`__, `#248 <https://github.com/twisted/treq/issues/248>`__, `#249 <https://github.com/twisted/treq/issues/249>`__ +- deleted patches + - python37.patch (upstreamed) + - urlparsing.patch (upstreamed) + +------------------------------------------------------------------- Old: ---- python37.patch treq-18.6.0.tar.gz urlparsing.patch New: ---- treq-20.3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-treq.spec ++++++ --- /var/tmp/diff_new_pack.FGngJn/_old 2020-04-12 15:38:00.521994751 +0200 +++ /var/tmp/diff_new_pack.FGngJn/_new 2020-04-12 15:38:00.521994751 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-treq # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,15 +18,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-treq -Version: 18.6.0 +Version: 20.3.0 Release: 0 Summary: HTTP library inspired by python-requests License: MIT Group: Development/Languages/Python URL: https://github.com/twisted/treq Source: https://files.pythonhosted.org/packages/source/t/treq/treq-%{version}.tar.gz -Patch0: python37.patch -Patch1: urlparsing.patch BuildRequires: %{python_module Twisted >= 16.4.0} BuildRequires: %{python_module attrs} BuildRequires: %{python_module httpbin} @@ -38,7 +36,7 @@ BuildRequires: %{python_module six} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-Twisted >= 16.4.0 +Requires: python-Twisted >= 18.7.0 Requires: python-attrs Requires: python-incremental Requires: python-requests >= 2.1.0 ++++++ treq-18.6.0.tar.gz -> treq-20.3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/CHANGELOG.rst new/treq-20.3.0/CHANGELOG.rst --- old/treq-18.6.0/CHANGELOG.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/treq-20.3.0/CHANGELOG.rst 2020-03-16 04:39:03.000000000 +0100 @@ -0,0 +1,44 @@ +========= +Changelog +========= + +.. currentmodule:: treq + +.. default-role:: any + +.. towncrier release notes start + +20.3.0 (2020-03-15) +=================== + +Features +-------- + +- Python 3.7 support. (`#228 <https://github.com/twisted/treq/issues/228>`__) + + +Bugfixes +-------- + +- `treq.testing.RequestTraversalAgent` now passes its memory reactor to the `twisted.web.server.Site` it creates, preventing the ``Site`` from polluting the global reactor. (`#225 <https://github.com/twisted/treq/issues/225>`__) +- `treq.testing` no longer generates deprecation warnings about ``twisted.test.proto_helpers.MemoryReactor``. (`#253 <https://github.com/twisted/treq/issues/253>`__) + + +Improved Documentation +---------------------- + +- The ``download_file.py`` example has been updated to do a streaming download with *unbuffered=True*. (`#233 <https://github.com/twisted/treq/issues/233>`__) +- The *agent* parameter to `treq.request()` has been documented. (`#235 <https://github.com/twisted/treq/issues/235>`__) +- The type of the *headers* element of a response tuple passed to `treq.testing.RequestSequence` is now correctly documented as `str`. (`#237 <https://github.com/twisted/treq/issues/237>`__) + + +Deprecations and Removals +------------------------- + +- Drop support for Python 3.4. (`#240 <https://github.com/twisted/treq/issues/240>`__) + + +Misc +---- + +- `#247 <https://github.com/twisted/treq/issues/247>`__, `#248 <https://github.com/twisted/treq/issues/248>`__, `#249 <https://github.com/twisted/treq/issues/249>`__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/CONTRIBUTING.rst new/treq-20.3.0/CONTRIBUTING.rst --- old/treq-18.6.0/CONTRIBUTING.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/treq-20.3.0/CONTRIBUTING.rst 2020-03-15 22:23:23.000000000 +0100 @@ -0,0 +1,39 @@ +Developing +========== + +Install dependencies: + +:: + + pip install treq[dev] + +Run Tests (unit & integration): + +:: + + trial treq + +Lint: + +:: + + pep8 treq + pyflakes treq + +Build docs:: + + tox -e docs + +Release notes +------------- + +We use `towncrier`_ to manage our release notes. +Basically, every pull request that has a user visible effect should add a short file to the `changelog.d/ <./changelog.d>`_ directory describing the change, +with a name like <ISSUE NUMBER>.<TYPE>.rst. +See `changelog.d/README.rst <changelog.d/README.rst>`_ for details. +This way we can keep a good list of changes as we go, +which makes the release manager happy, +which means we get more frequent releases, +which means your change gets into users’ hands faster. + +.. _towncrier: https://pypi.org/project/towncrier/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/MANIFEST.in new/treq-20.3.0/MANIFEST.in --- old/treq-18.6.0/MANIFEST.in 2017-03-12 04:58:39.000000000 +0100 +++ new/treq-20.3.0/MANIFEST.in 2020-03-15 22:23:23.000000000 +0100 @@ -1,7 +1,17 @@ -include README.rst LICENSE tox.ini tox2travis.py .coveragerc +include pyproject.toml +include *.rst +include LICENSE +include .coveragerc recursive-include docs * prune docs/_build +prune docs/html + +exclude tox.ini +exclude tox2travis.py exclude .travis.yml exclude .readthedocs.yml -global-exclude .DS_Store *.pyc +# This directory will be empty at release time. +prune changelog.d + +global-exclude .DS_Store *.pyc *.pyo __pycache__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/PKG-INFO new/treq-20.3.0/PKG-INFO --- old/treq-18.6.0/PKG-INFO 2018-06-29 07:27:47.000000000 +0200 +++ new/treq-20.3.0/PKG-INFO 2020-03-16 04:39:35.000000000 +0100 @@ -1,24 +1,24 @@ Metadata-Version: 2.1 Name: treq -Version: 18.6.0 -Summary: A requests-like API built on top of twisted.web's Agent +Version: 20.3.0 +Summary: High-level Twisted HTTP Client API Home-page: https://github.com/twisted/treq Author: David Reid Author-email: [email protected] -Maintainer: Amber Brown -Maintainer-email: [email protected] +Maintainer: Tom Most +Maintainer-email: [email protected] License: MIT/X -Description: treq - ==== +Description: treq: High-level Twisted HTTP Client API + ======================================== |pypi|_ |build|_ |coverage|_ ``treq`` is an HTTP library inspired by - `requests <http://www.python-requests.org>`_ but written on top of - `Twisted <http://www.twistedmatrix.com>`_'s - `Agents <http://twistedmatrix.com/documents/current/api/twisted.web.client.Agent.html>`_. + `requests <https://requests.readthedocs.io/>`_ but written on top of + `Twisted <https://www.twistedmatrix.com>`_'s + `Agents <https://twistedmatrix.com/documents/current/api/twisted.web.client.Agent.html>`_. It provides a simple, higher level API for making HTTP requests when using Twisted. @@ -37,49 +37,36 @@ >>> reactor.run() 200 - For more info `read the docs <http://treq.readthedocs.org>`_. + For more info `read the docs <https://treq.readthedocs.org>`_. - Contribute - ========== + Contributing + ------------ - ``treq`` is hosted on `GitHub <http://github.com/twisted/treq>`_. + ``treq`` development is hosted on `GitHub <https://github.com/twisted/treq>`_. - Feel free to fork and send contributions over. + We welcome contributions: feel to fork and send contributions over. + See `CONTRIBUTING.rst <https://github.com/twisted/treq/blob/master/CONTRIBUTING.rst>`_ for more info. - Developing - ========== + Code of Conduct + --------------- - Install dependencies: + Refer to the `Twisted code of conduct <https://github.com/twisted/twisted/blob/trunk/code_of_conduct.md>`_. - :: + Copyright and License + --------------------- - pip install treq[dev] + ``treq`` is made available under the MIT license. + See `LICENSE <./LICENSE>`_ for legal details and copyright notices. - Run Tests (unit & integration): - - :: - - trial treq - - Lint: - - :: - - pep8 treq - pyflakes treq - - Build docs:: - - tox -e docs .. |build| image:: https://api.travis-ci.org/twisted/treq.svg?branch=master .. _build: https://travis-ci.org/twisted/treq - .. |coverage| image:: https://codecov.io/github/twisted/treq/coverage.svg?branch=master - .. _coverage: https://codecov.io/github/twisted/treq + .. |coverage| image:: https://coveralls.io/repos/github/twisted/treq/badge.svg + .. _coverage: https://coveralls.io/github/twisted/treq .. |pypi| image:: https://img.shields.io/pypi/v/treq.svg - .. _pypi: https://pypi.python.org/pypi/treq + .. _pypi: https://pypi.org/project/treq/ Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable @@ -89,8 +76,9 @@ Classifier: Framework :: Twisted Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Provides-Extra: dev diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/README.rst new/treq-20.3.0/README.rst --- old/treq-18.6.0/README.rst 2017-03-12 04:58:39.000000000 +0100 +++ new/treq-20.3.0/README.rst 2020-03-15 22:23:23.000000000 +0100 @@ -1,14 +1,14 @@ -treq -==== +treq: High-level Twisted HTTP Client API +======================================== |pypi|_ |build|_ |coverage|_ ``treq`` is an HTTP library inspired by -`requests <http://www.python-requests.org>`_ but written on top of -`Twisted <http://www.twistedmatrix.com>`_'s -`Agents <http://twistedmatrix.com/documents/current/api/twisted.web.client.Agent.html>`_. +`requests <https://requests.readthedocs.io/>`_ but written on top of +`Twisted <https://www.twistedmatrix.com>`_'s +`Agents <https://twistedmatrix.com/documents/current/api/twisted.web.client.Agent.html>`_. It provides a simple, higher level API for making HTTP requests when using Twisted. @@ -27,46 +27,33 @@ >>> reactor.run() 200 -For more info `read the docs <http://treq.readthedocs.org>`_. +For more info `read the docs <https://treq.readthedocs.org>`_. -Contribute -========== +Contributing +------------ -``treq`` is hosted on `GitHub <http://github.com/twisted/treq>`_. +``treq`` development is hosted on `GitHub <https://github.com/twisted/treq>`_. -Feel free to fork and send contributions over. +We welcome contributions: feel to fork and send contributions over. +See `CONTRIBUTING.rst <https://github.com/twisted/treq/blob/master/CONTRIBUTING.rst>`_ for more info. -Developing -========== +Code of Conduct +--------------- -Install dependencies: +Refer to the `Twisted code of conduct <https://github.com/twisted/twisted/blob/trunk/code_of_conduct.md>`_. -:: +Copyright and License +--------------------- - pip install treq[dev] +``treq`` is made available under the MIT license. +See `LICENSE <./LICENSE>`_ for legal details and copyright notices. -Run Tests (unit & integration): - -:: - - trial treq - -Lint: - -:: - - pep8 treq - pyflakes treq - -Build docs:: - - tox -e docs .. |build| image:: https://api.travis-ci.org/twisted/treq.svg?branch=master .. _build: https://travis-ci.org/twisted/treq -.. |coverage| image:: https://codecov.io/github/twisted/treq/coverage.svg?branch=master -.. _coverage: https://codecov.io/github/twisted/treq +.. |coverage| image:: https://coveralls.io/repos/github/twisted/treq/badge.svg +.. _coverage: https://coveralls.io/github/twisted/treq .. |pypi| image:: https://img.shields.io/pypi/v/treq.svg -.. _pypi: https://pypi.python.org/pypi/treq +.. _pypi: https://pypi.org/project/treq/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/docs/api.rst new/treq-20.3.0/docs/api.rst --- old/treq-18.6.0/docs/api.rst 2018-06-29 07:17:05.000000000 +0200 +++ new/treq-20.3.0/docs/api.rst 2020-03-14 20:33:17.000000000 +0100 @@ -61,7 +61,7 @@ :ivar version: See :attr:`IResponse.version <twisted.web.iweb.IResponse.version>` :ivar code: See :attr:`IResponse.code <twisted.web.iweb.IResponse.code>` - :ivar phrase: See :attr:`IResponse.phrase <twisted.web.iweb.IResponse.pharse>` + :ivar phrase: See :attr:`IResponse.phrase <twisted.web.iweb.IResponse.phrase>` :ivar headers: See :attr:`IResponse.headers <twisted.web.iweb.IResponse.headers>` :ivar length: See :attr:`IResponse.length <twisted.web.iweb.IResponse.length>` :ivar request: See :attr:`IResponse.request <twisted.web.iweb.IResponse.request>` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/docs/changelog.rst new/treq-20.3.0/docs/changelog.rst --- old/treq-18.6.0/docs/changelog.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/treq-20.3.0/docs/changelog.rst 2020-03-15 22:23:23.000000000 +0100 @@ -0,0 +1 @@ +.. include:: ../CHANGELOG.rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/docs/conf.py new/treq-20.3.0/docs/conf.py --- old/treq-18.6.0/docs/conf.py 2017-03-12 04:58:39.000000000 +0100 +++ new/treq-20.3.0/docs/conf.py 2020-03-15 22:23:23.000000000 +0100 @@ -41,7 +41,7 @@ # General information about the project. project = u'treq' -copyright = u'2014, David Reid' +copyright = u'2014–2020 David Reid' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/docs/examples/basic_auth.py new/treq-20.3.0/docs/examples/basic_auth.py --- old/treq-18.6.0/docs/examples/basic_auth.py 2017-03-12 04:58:39.000000000 +0100 +++ new/treq-20.3.0/docs/examples/basic_auth.py 2020-03-15 22:23:23.000000000 +0100 @@ -6,7 +6,7 @@ def main(reactor, *args): d = treq.get( - 'http://httpbin.org/basic-auth/treq/treq', + 'https://httpbin.org/basic-auth/treq/treq', auth=('treq', 'treq') ) d.addCallback(print_response) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/docs/examples/basic_get.py new/treq-20.3.0/docs/examples/basic_get.py --- old/treq-18.6.0/docs/examples/basic_get.py 2017-03-12 04:58:39.000000000 +0100 +++ new/treq-20.3.0/docs/examples/basic_get.py 2020-03-15 22:23:23.000000000 +0100 @@ -5,7 +5,7 @@ def main(reactor, *args): - d = treq.get('http://httpbin.org/get') + d = treq.get('https://httpbin.org/get') d.addCallback(print_response) return d diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/docs/examples/basic_post.py new/treq-20.3.0/docs/examples/basic_post.py --- old/treq-18.6.0/docs/examples/basic_post.py 2017-03-12 04:58:39.000000000 +0100 +++ new/treq-20.3.0/docs/examples/basic_post.py 2020-03-15 22:23:23.000000000 +0100 @@ -7,7 +7,7 @@ def main(reactor, *args): - d = treq.post('http://httpbin.org/post', + d = treq.post('https://httpbin.org/post', json.dumps({"msg": "Hello!"}).encode('ascii'), headers={b'Content-Type': [b'application/json']}) d.addCallback(print_response) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/docs/examples/disable_redirects.py new/treq-20.3.0/docs/examples/disable_redirects.py --- old/treq-18.6.0/docs/examples/disable_redirects.py 2017-03-12 04:58:39.000000000 +0100 +++ new/treq-20.3.0/docs/examples/disable_redirects.py 2020-03-15 22:23:23.000000000 +0100 @@ -5,7 +5,7 @@ def main(reactor, *args): - d = treq.get('http://httpbin.org/redirect/1', allow_redirects=False) + d = treq.get('https://httpbin.org/redirect/1', allow_redirects=False) d.addCallback(print_response) return d diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/docs/examples/download_file.py new/treq-20.3.0/docs/examples/download_file.py --- old/treq-18.6.0/docs/examples/download_file.py 2017-03-12 04:58:39.000000000 +0100 +++ new/treq-20.3.0/docs/examples/download_file.py 2020-03-15 22:23:23.000000000 +0100 @@ -5,9 +5,9 @@ def download_file(reactor, url, destination_filename): destination = open(destination_filename, 'wb') - d = treq.get(url) + d = treq.get(url, unbuffered=True) d.addCallback(treq.collect, destination.write) d.addBoth(lambda _: destination.close()) return d -react(download_file, ['http://httpbin.org/get', 'download.txt']) +react(download_file, ['https://httpbin.org/get', 'download.txt']) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/docs/examples/query_params.py new/treq-20.3.0/docs/examples/query_params.py --- old/treq-18.6.0/docs/examples/query_params.py 2017-03-12 04:58:39.000000000 +0100 +++ new/treq-20.3.0/docs/examples/query_params.py 2020-03-15 22:23:23.000000000 +0100 @@ -7,31 +7,31 @@ @inlineCallbacks def main(reactor): print('List of tuples') - resp = yield treq.get('http://httpbin.org/get', + resp = yield treq.get('https://httpbin.org/get', params=[('foo', 'bar'), ('baz', 'bax')]) content = yield resp.text() print(content) print('Single value dictionary') - resp = yield treq.get('http://httpbin.org/get', + resp = yield treq.get('https://httpbin.org/get', params={'foo': 'bar', 'baz': 'bax'}) content = yield resp.text() print(content) print('Multi value dictionary') - resp = yield treq.get('http://httpbin.org/get', + resp = yield treq.get('https://httpbin.org/get', params={'foo': ['bar', 'baz', 'bax']}) content = yield resp.text() print(content) print('Mixed value dictionary') - resp = yield treq.get('http://httpbin.org/get', + resp = yield treq.get('https://httpbin.org/get', params={'foo': ['bar', 'baz'], 'bax': 'quux'}) content = yield resp.text() print(content) print('Preserved query parameters') - resp = yield treq.get('http://httpbin.org/get?foo=bar', + resp = yield treq.get('https://httpbin.org/get?foo=bar', params={'baz': 'bax'}) content = yield resp.text() print(content) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/docs/examples/redirects.py new/treq-20.3.0/docs/examples/redirects.py --- old/treq-18.6.0/docs/examples/redirects.py 2017-03-12 04:58:39.000000000 +0100 +++ new/treq-20.3.0/docs/examples/redirects.py 2020-03-15 22:23:23.000000000 +0100 @@ -5,7 +5,7 @@ def main(reactor, *args): - d = treq.get('http://httpbin.org/redirect/1') + d = treq.get('https://httpbin.org/redirect/1') d.addCallback(print_response) return d diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/docs/examples/response_history.py new/treq-20.3.0/docs/examples/response_history.py --- old/treq-18.6.0/docs/examples/response_history.py 2017-03-12 04:58:39.000000000 +0100 +++ new/treq-20.3.0/docs/examples/response_history.py 2020-03-15 22:23:23.000000000 +0100 @@ -5,7 +5,7 @@ def main(reactor, *args): - d = treq.get('http://httpbin.org/redirect/1') + d = treq.get('https://httpbin.org/redirect/1') def cb(response): print('Response history:') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/docs/examples/using_cookies.py new/treq-20.3.0/docs/examples/using_cookies.py --- old/treq-18.6.0/docs/examples/using_cookies.py 2017-03-12 04:58:39.000000000 +0100 +++ new/treq-20.3.0/docs/examples/using_cookies.py 2020-03-15 22:23:23.000000000 +0100 @@ -5,14 +5,14 @@ def main(reactor, *args): - d = treq.get('http://httpbin.org/cookies/set?hello=world') + d = treq.get('https://httpbin.org/cookies/set?hello=world') def _get_jar(resp): jar = resp.cookies() print('The server set our hello cookie to: {}'.format(jar['hello'])) - return treq.get('http://httpbin.org/cookies', cookies=jar) + return treq.get('https://httpbin.org/cookies', cookies=jar) d.addCallback(_get_jar) d.addCallback(print_response) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/docs/howto.rst new/treq-20.3.0/docs/howto.rst --- old/treq-18.6.0/docs/howto.rst 2018-06-29 07:17:05.000000000 +0200 +++ new/treq-20.3.0/docs/howto.rst 2020-03-15 22:23:23.000000000 +0100 @@ -50,7 +50,7 @@ .. literalinclude:: examples/basic_auth.py :linenos: - :lines: 7-13 + :lines: 7-15 Full example: :download:`basic_auth.py <examples/basic_auth.py>` @@ -63,7 +63,7 @@ .. literalinclude:: examples/redirects.py :linenos: - :lines: 7-13 + :lines: 7-12 Full example: :download:`redirects.py <examples/redirects.py>` @@ -72,7 +72,7 @@ .. literalinclude:: examples/disable_redirects.py :linenos: - :lines: 7-13 + :lines: 7-12 Full example: :download:`disable_redirects.py <examples/disable_redirects.py>` @@ -94,7 +94,7 @@ retrieved using the :py:meth:`~treq.response._Response.cookies()` method. The object returned by :py:meth:`~treq.response._Response.cookies()` supports the same key/value -access as `requests cookies <http://requests.readthedocs.org/en/latest/user/quickstart/#cookies>`_. +access as `requests cookies <https://requests.readthedocs.io/en/latest/user/quickstart/#cookies>`_. .. literalinclude:: examples/using_cookies.py :linenos: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/docs/index.rst new/treq-20.3.0/docs/index.rst --- old/treq-18.6.0/docs/index.rst 2017-05-16 08:34:37.000000000 +0200 +++ new/treq-20.3.0/docs/index.rst 2020-03-16 04:28:31.000000000 +0100 @@ -1,26 +1,29 @@ treq: High-level Twisted HTTP Client API ======================================== -`treq <https://pypi.python.org/pypi/treq>`_ depends on a recent Twisted and functions on Python 2.7 and Python 3.3+ (including PyPy). +Release v\ |release| (:doc:`What's new? <changelog>`). + +`treq <https://pypi.org/project/treq>`_ depends on a recent Twisted and functions on Python 2.7 and Python 3.3+ (including PyPy). Why? ---- -`requests`_ by `Kenneth Reitz`_ is a wonderful library. +`requests`_ by Kenneth Reitz is a wonderful library. I want the same ease of use when writing Twisted applications. treq is not of course a perfect clone of `requests`_. I have tried to stay true to the do-what-I-mean spirit of the `requests`_ API and also kept the API familiar to users of `Twisted`_ and :class:`twisted.web.client.Agent` on which treq is based. -.. _requests: http://python-requests.org/ -.. _Kenneth Reitz: https://www.gittip.com/kennethreitz/ -.. _Twisted: http://twistedmatrix.com/ +.. _requests: https://requests.readthedocs.io/en/master/ +.. _Twisted: https://twistedmatrix.com/ Quick Start ----------- -Installation:: +Installation + +.. code-block:: console - pip install treq + $ pip install treq GET +++ @@ -82,9 +85,9 @@ +----------------------------------+----------+----------+ | Connection Timeouts | yes | yes | +----------------------------------+----------+----------+ -| .netrc support | yes | no | +| HTTP(S) Proxy Suport | yes | no | +----------------------------------+----------+----------+ -| Python 2.6 | yes | no | +| .netrc support | yes | no | +----------------------------------+----------+----------+ | Python 2.7 | yes | yes | +----------------------------------+----------+----------+ @@ -100,6 +103,7 @@ howto testing api + changelog Indices and tables ================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/docs/testing.rst new/treq-20.3.0/docs/testing.rst --- old/treq-18.6.0/docs/testing.rst 2017-12-28 23:43:57.000000000 +0100 +++ new/treq-20.3.0/docs/testing.rst 2020-03-14 20:33:17.000000000 +0100 @@ -6,7 +6,7 @@ Writing tests for HTTP clients ------------------------------ -The :class:`~treq.testing.StubTreq` class implements the :mod:`treq` module interface (:func:`treq.get()`, :func:`treq.post()`, etc.) but runs all I/O via a :class:`~twisted.test.proto_helpers.MemoryReactor`. +The :class:`~treq.testing.StubTreq` class implements the :mod:`treq` module interface (:func:`treq.get()`, :func:`treq.post()`, etc.) but runs all I/O via a :class:`~twisted.internet.testing.MemoryReactor`. It wraps a :class:`twisted.web.resource.IResource` provider which handles each request. You can wrap a pre-existing `IResource` provider, or write your own. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/pyproject.toml new/treq-20.3.0/pyproject.toml --- old/treq-18.6.0/pyproject.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/treq-20.3.0/pyproject.toml 2020-03-15 22:23:23.000000000 +0100 @@ -0,0 +1,7 @@ +[tool.towncrier] +package = "treq" +package_dir = "src" +filename = "CHANGELOG.rst" +directory = "changelog.d" +title_format = "{version} ({project_date})" +issue_format = "`#{issue} <https://github.com/twisted/treq/issues/{issue}>`__" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/setup.py new/treq-20.3.0/setup.py --- old/treq-18.6.0/setup.py 2018-06-29 07:17:05.000000000 +0200 +++ new/treq-20.3.0/setup.py 2020-03-16 04:02:45.000000000 +0100 @@ -8,8 +8,9 @@ "Framework :: Twisted", "Programming Language :: Python", "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] @@ -29,7 +30,8 @@ "incremental", "requests >= 2.1.0", "six", - "Twisted[tls] >= 16.4.0", + "Twisted[tls] >= 16.4.0 ; python_version < '3.7'", + "Twisted[tls] >= 18.7.0 ; python_version >= '3.7'", "attrs", ], extras_require={ @@ -44,11 +46,11 @@ package_data={"treq": ["_version"]}, author="David Reid", author_email="[email protected]", - maintainer="Amber Brown", - maintainer_email="[email protected]", + maintainer="Tom Most", + maintainer_email="[email protected]", classifiers=classifiers, - description="A requests-like API built on top of twisted.web's Agent", + description="High-level Twisted HTTP Client API", license="MIT/X", url="https://github.com/twisted/treq", - long_description=readme + long_description=readme, ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/src/treq/_version.py new/treq-20.3.0/src/treq/_version.py --- old/treq-18.6.0/src/treq/_version.py 2018-06-29 07:23:18.000000000 +0200 +++ new/treq-20.3.0/src/treq/_version.py 2020-03-16 04:38:40.000000000 +0100 @@ -7,5 +7,5 @@ from incremental import Version -__version__ = Version('treq', 18, 6, 0) +__version__ = Version('treq', 20, 3, 0) __all__ = ["__version__"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/src/treq/api.py new/treq-20.3.0/src/treq/api.py --- old/treq-18.6.0/src/treq/api.py 2017-05-16 08:34:37.000000000 +0200 +++ new/treq-20.3.0/src/treq/api.py 2020-03-15 20:13:27.000000000 +0100 @@ -107,6 +107,12 @@ :param bool unbuffered: Pass ``True`` to to disable response buffering. By default treq buffers the entire response body in memory. + :param agent: Provide your own custom agent. Use this to override things + like ``connectTimeout`` or ``BrowserLikePolicyForHTTPS``. By + default, treq will create its own Agent with reasonable + defaults. + :type agent: twisted.web.iweb.IAgent + :rtype: Deferred that fires with an IResponse provider. """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/src/treq/client.py new/treq-20.3.0/src/treq/client.py --- old/treq-18.6.0/src/treq/client.py 2018-06-29 07:17:05.000000000 +0200 +++ new/treq-20.3.0/src/treq/client.py 2020-03-14 20:33:17.000000000 +0100 @@ -341,7 +341,8 @@ if not _PY3: from StringIO import StringIO registerAdapter(_from_file, StringIO, IBodyProducer) - registerAdapter(_from_file, file, IBodyProducer) + # Suppress lint failure on Python 3. + registerAdapter(_from_file, file, IBodyProducer) # noqa: F821 else: import io # file()/open() equiv on Py3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/src/treq/test/local_httpbin/test/test_child.py new/treq-20.3.0/src/treq/test/local_httpbin/test/test_child.py --- old/treq-18.6.0/src/treq/test/local_httpbin/test/test_child.py 2017-12-28 23:43:57.000000000 +0100 +++ new/treq-20.3.0/src/treq/test/local_httpbin/test/test_child.py 2020-03-14 20:33:17.000000000 +0100 @@ -10,7 +10,11 @@ import io from twisted.trial.unittest import SynchronousTestCase -from twisted.test.proto_helpers import MemoryReactor + +try: + from twisted.internet.testing import MemoryReactor +except ImportError: + from twisted.test.proto_helpers import MemoryReactor from twisted.internet import defer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/src/treq/test/local_httpbin/test/test_parent.py new/treq-20.3.0/src/treq/test/local_httpbin/test/test_parent.py --- old/treq-18.6.0/src/treq/test/local_httpbin/test/test_parent.py 2017-12-28 23:43:57.000000000 +0100 +++ new/treq-20.3.0/src/treq/test/local_httpbin/test/test_parent.py 2020-03-14 20:33:17.000000000 +0100 @@ -19,7 +19,11 @@ from twisted.internet.error import ProcessTerminated, ConnectionDone -from twisted.test.proto_helpers import MemoryReactor, StringTransport +try: + from twisted.internet.testing import MemoryReactor, StringTransport +except ImportError: + from twisted.test.proto_helpers import MemoryReactor, StringTransport + from twisted.trial.unittest import SynchronousTestCase from zope.interface import implementer, verify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/src/treq/test/test_multipart.py new/treq-20.3.0/src/treq/test/test_multipart.py --- old/treq-18.6.0/src/treq/test/test_multipart.py 2017-05-16 08:34:37.000000000 +0200 +++ new/treq-20.3.0/src/treq/test/test_multipart.py 2020-03-14 20:33:17.000000000 +0100 @@ -3,6 +3,7 @@ # See LICENSE for details. import cgi +import sys from io import BytesIO @@ -594,9 +595,19 @@ ) ) - form = cgi.parse_multipart(BytesIO(output), {"boundary": b"heyDavid"}) - self.assertEqual(set([b'just a string\r\n', b'another string']), - set(form['cfield'])) + form = cgi.parse_multipart(BytesIO(output), { + "boundary": b"heyDavid", + "CONTENT-LENGTH": str(len(output)), + }) + + # Since Python 3.7, the value for a non-file field is now a list + # of strings, not bytes. + if sys.version_info >= (3, 7): + self.assertEqual(set(['just a string\r\n', 'another string']), + set(form['cfield'])) + else: + self.assertEqual(set([b'just a string\r\n', b'another string']), + set(form['cfield'])) self.assertEqual(set([b'my lovely bytes2']), set(form['efield'])) self.assertEqual(set([b'my lovely bytes219']), set(form['xfield'])) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/src/treq/test/test_testing.py new/treq-20.3.0/src/treq/test/test_testing.py --- old/treq-18.6.0/src/treq/test/test_testing.py 2017-12-28 23:43:57.000000000 +0100 +++ new/treq-20.3.0/src/treq/test/test_testing.py 2020-03-15 22:11:02.000000000 +0100 @@ -138,9 +138,9 @@ so even after a successful request. """ stub = StubTreq(_StaticTestResource()) - self.failureResultOf(stub.get(""), SchemeNotSupported) + self.failureResultOf(stub.get("x-unknown-1:"), SchemeNotSupported) self.successResultOf(stub.get("http://url.com")) - self.failureResultOf(stub.get(""), SchemeNotSupported) + self.failureResultOf(stub.get("x-unknown-2:"), SchemeNotSupported) def test_files_are_rejected(self): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/src/treq/testing.py new/treq-20.3.0/src/treq/testing.py --- old/treq-18.6.0/src/treq/testing.py 2018-06-29 07:17:05.000000000 +0200 +++ new/treq-20.3.0/src/treq/testing.py 2020-03-14 20:33:17.000000000 +0100 @@ -10,7 +10,11 @@ from contextlib import contextmanager from functools import wraps -from twisted.test.proto_helpers import MemoryReactor +try: + from twisted.internet.testing import MemoryReactorClock +except ImportError: + from twisted.test.proto_helpers import MemoryReactorClock + from twisted.test import iosim from twisted.internet.address import IPv4Address @@ -43,7 +47,7 @@ An endpoint factory used by :class:`RequestTraversalAgent`. :ivar reactor: The agent's reactor. - :type reactor: :class:`MemoryReactor` + :type reactor: :class:`MemoryReactorClock` """ reactor = attr.ib() @@ -84,7 +88,7 @@ :param rootResource: The Twisted `IResource` at the root of the resource tree. """ - self._memoryReactor = MemoryReactor() + self._memoryReactor = MemoryReactorClock() self._realAgent = Agent.usingEndpointFactory( reactor=self._memoryReactor, endpointFactory=_EndpointFactory(self._memoryReactor)) @@ -130,7 +134,8 @@ # Create the protocol and fake transport for the client and server, # using the factory that was passed to the MemoryReactor for the # client, and a Site around our rootResource for the server. - serverProtocol = Site(self._rootResource).buildProtocol(None) + serverFactory = Site(self._rootResource, reactor=self._memoryReactor) + serverProtocol = serverFactory.buildProtocol(clientAddress) serverTransport = iosim.FakeTransport( serverProtocol, isServer=True, hostAddress=serverAddress, peerAddress=clientAddress) @@ -401,7 +406,7 @@ - ``code`` is an integer representing the HTTP status code to return. - ``headers`` is a dictionary mapping :class:`bytes` to :class:`bytes` or - :class:`list` of :class:`bytes`. + :class:`str`. Note that the value is *not* a list. - ``body`` is a :class:`bytes`. :ivar list sequence: A sequence of (request tuple, response tuple) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/src/treq.egg-info/PKG-INFO new/treq-20.3.0/src/treq.egg-info/PKG-INFO --- old/treq-18.6.0/src/treq.egg-info/PKG-INFO 2018-06-29 07:27:47.000000000 +0200 +++ new/treq-20.3.0/src/treq.egg-info/PKG-INFO 2020-03-16 04:39:35.000000000 +0100 @@ -1,24 +1,24 @@ Metadata-Version: 2.1 Name: treq -Version: 18.6.0 -Summary: A requests-like API built on top of twisted.web's Agent +Version: 20.3.0 +Summary: High-level Twisted HTTP Client API Home-page: https://github.com/twisted/treq Author: David Reid Author-email: [email protected] -Maintainer: Amber Brown -Maintainer-email: [email protected] +Maintainer: Tom Most +Maintainer-email: [email protected] License: MIT/X -Description: treq - ==== +Description: treq: High-level Twisted HTTP Client API + ======================================== |pypi|_ |build|_ |coverage|_ ``treq`` is an HTTP library inspired by - `requests <http://www.python-requests.org>`_ but written on top of - `Twisted <http://www.twistedmatrix.com>`_'s - `Agents <http://twistedmatrix.com/documents/current/api/twisted.web.client.Agent.html>`_. + `requests <https://requests.readthedocs.io/>`_ but written on top of + `Twisted <https://www.twistedmatrix.com>`_'s + `Agents <https://twistedmatrix.com/documents/current/api/twisted.web.client.Agent.html>`_. It provides a simple, higher level API for making HTTP requests when using Twisted. @@ -37,49 +37,36 @@ >>> reactor.run() 200 - For more info `read the docs <http://treq.readthedocs.org>`_. + For more info `read the docs <https://treq.readthedocs.org>`_. - Contribute - ========== + Contributing + ------------ - ``treq`` is hosted on `GitHub <http://github.com/twisted/treq>`_. + ``treq`` development is hosted on `GitHub <https://github.com/twisted/treq>`_. - Feel free to fork and send contributions over. + We welcome contributions: feel to fork and send contributions over. + See `CONTRIBUTING.rst <https://github.com/twisted/treq/blob/master/CONTRIBUTING.rst>`_ for more info. - Developing - ========== + Code of Conduct + --------------- - Install dependencies: + Refer to the `Twisted code of conduct <https://github.com/twisted/twisted/blob/trunk/code_of_conduct.md>`_. - :: + Copyright and License + --------------------- - pip install treq[dev] + ``treq`` is made available under the MIT license. + See `LICENSE <./LICENSE>`_ for legal details and copyright notices. - Run Tests (unit & integration): - - :: - - trial treq - - Lint: - - :: - - pep8 treq - pyflakes treq - - Build docs:: - - tox -e docs .. |build| image:: https://api.travis-ci.org/twisted/treq.svg?branch=master .. _build: https://travis-ci.org/twisted/treq - .. |coverage| image:: https://codecov.io/github/twisted/treq/coverage.svg?branch=master - .. _coverage: https://codecov.io/github/twisted/treq + .. |coverage| image:: https://coveralls.io/repos/github/twisted/treq/badge.svg + .. _coverage: https://coveralls.io/github/twisted/treq .. |pypi| image:: https://img.shields.io/pypi/v/treq.svg - .. _pypi: https://pypi.python.org/pypi/treq + .. _pypi: https://pypi.org/project/treq/ Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable @@ -89,8 +76,9 @@ Classifier: Framework :: Twisted Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Provides-Extra: dev diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/src/treq.egg-info/SOURCES.txt new/treq-20.3.0/src/treq.egg-info/SOURCES.txt --- old/treq-18.6.0/src/treq.egg-info/SOURCES.txt 2018-06-29 07:27:47.000000000 +0200 +++ new/treq-20.3.0/src/treq.egg-info/SOURCES.txt 2020-03-16 04:39:35.000000000 +0100 @@ -1,13 +1,15 @@ .coveragerc +CHANGELOG.rst +CONTRIBUTING.rst LICENSE MANIFEST.in README.rst +pyproject.toml setup.cfg setup.py -tox.ini -tox2travis.py docs/Makefile docs/api.rst +docs/changelog.rst docs/conf.py docs/howto.rst docs/index.rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/src/treq.egg-info/requires.txt new/treq-20.3.0/src/treq.egg-info/requires.txt --- old/treq-18.6.0/src/treq.egg-info/requires.txt 2018-06-29 07:27:47.000000000 +0200 +++ new/treq-20.3.0/src/treq.egg-info/requires.txt 2020-03-16 04:39:35.000000000 +0100 @@ -1,9 +1,14 @@ incremental requests>=2.1.0 six -Twisted[tls]>=16.4.0 attrs +[:python_version < "3.7"] +Twisted[tls]>=16.4.0 + +[:python_version >= "3.7"] +Twisted[tls]>=18.7.0 + [dev] mock pep8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/tox.ini new/treq-20.3.0/tox.ini --- old/treq-18.6.0/tox.ini 2018-06-29 07:17:05.000000000 +0200 +++ new/treq-20.3.0/tox.ini 1970-01-01 01:00:00.000000000 +0100 @@ -1,50 +0,0 @@ -[tox] -envlist = - {pypy,py27,py34,py35,py36}-twisted_{lowest,latest}, - {pypy,py27,py34,py35,py36}-twisted_trunk-pyopenssl_trunk, - pypi-readme, check-manifest, flake8, docs - -[testenv] -extras = dev -deps = - coverage - mock - - twisted_lowest: Twisted==16.4.0 - twisted_latest: Twisted - twisted_trunk: https://github.com/twisted/twisted/archive/trunk.zip - - pyopenssl_trunk: https://github.com/pyca/pyopenssl/archive/master.zip - - docs: Sphinx>=1.4.8 -setenv = - # Avoid unnecessary network access when creating virtualenvs for speed. - VIRTUALENV_NO_DOWNLOAD=1 - PIP_DISABLE_PIP_VERSION_CHECK=1 -passenv = TERM # ensure colors -commands = - pip list - coverage run {envbindir}/trial {posargs:treq} - coverage report -m - -[testenv:flake8] -skip_install = True -deps = flake8 -commands = flake8 src/treq/ - -[testenv:pypi-readme] -deps = - readme_renderer -commands = - python setup.py check -r -s - -[testenv:check-manifest] -deps = - check-manifest -commands = - check-manifest - -[testenv:docs] -changedir = docs -commands = - sphinx-build -b html . html diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-18.6.0/tox2travis.py new/treq-20.3.0/tox2travis.py --- old/treq-18.6.0/tox2travis.py 2018-06-29 07:17:05.000000000 +0200 +++ new/treq-20.3.0/tox2travis.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,101 +0,0 @@ -#!/usr/bin/env python - -""" -Generate a Travis CI configuration based on Tox's configured environments. -Usage: - - tox -l | ./tox2travis.py > .travis.yml -""" - -from __future__ import absolute_import, print_function - -import re -import sys - - -travis_template = """\ -# AUTO-GENERATED BY tox2travis.py -- DO NOT EDIT THIS FILE BY HAND! - -sudo: false -language: python - -cache: pip - -matrix: - include: - {includes} - - # Don't fail on trunk versions. - allow_failures: - - env: TOXENV=pypy-twisted_trunk-pyopenssl_trunk - - env: TOXENV=py27-twisted_trunk-pyopenssl_trunk - - env: TOXENV=py34-twisted_trunk-pyopenssl_trunk - - env: TOXENV=py35-twisted_trunk-pyopenssl_trunk - - env: TOXENV=py36-twisted_trunk-pyopenssl_trunk - -before_install: - - | - if [[ "${{TOXENV::5}}" == "pypy-" ]]; then - PYENV_ROOT="$HOME/.pyenv" - git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT" - PATH="$PYENV_ROOT/bin:$PATH" - eval "$(pyenv init -)" - pyenv install pypy-5.4.1 - pyenv global pypy-5.4.1 - fi - - pip install --upgrade pip - - pip install --upgrade setuptools - -install: - - pip install tox codecov - -script: - - tox - -after_success: - - codecov - -after_failure: - - | - if [[ -f "_trial_temp/httpbin-server-error.log" ]] - then - echo "httpbin-server-error.log:" - cat "_trial_temp/httpbin-server-error.log" - fi - -notifications: - email: false - -branches: - only: - - master - -# AUTO-GENERATED BY tox2travis.py -- DO NOT EDIT THIS FILE BY HAND!""" - - -if __name__ == "__main__": - line = sys.stdin.readline() - tox_envs = [] - while line: - tox_envs.append(line.strip()) - line = sys.stdin.readline() - - includes = [] - for tox_env in tox_envs: - # Parse the Python version from the tox environment name - python_match = re.match(r'^py(?:(\d{2})|py)-', tox_env) - if python_match is not None: - version = python_match.group(1) - if version is not None: - python = "'{0}.{1}'".format(version[0], version[1]) - else: - python = 'pypy' - else: - python = "'2.7'" # Default to Python 2.7 if a version isn't found - - includes.extend([ - '- python: {0}'.format(python), - ' env: TOXENV={0}'.format(tox_env) - ]) - - print(travis_template.format(includes='\n '.join(includes)))
