diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..7f1c4968 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,35 @@ +language: python +# command to install dependencies +install: "make" +# command to run tests +script: + - | + make test-readme + - make ci +cache: pip +jobs: + include: + - stage: test + script: + - make test-readme + - make ci + python: '2.7' + - stage: test + script: + - make test-readme + - make ci + python: '3.5' + - stage: test + script: + - make test-readme + - make ci + python: '3.6' + - stage: test + script: + - make test-readme + - make ci + python: '3.7' + dist: xenial + - stage: coverage + python: '3.6' + script: codecov diff --git a/HISTORY.md b/HISTORY.md index 1d0bd073..0b1f9f5e 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -8,6 +8,18 @@ dev - \[Short description of non-trivial change.\] +2.22.0 (2019-05-15) +------------------- + +**Dependencies** + +- Requests now supports urllib3 v1.25.2. + (note: 1.25.0 and 1.25.1 are incompatible) + +**Deprecations** + +- Requests has officially stopped support for Python 3.4. + 2.21.0 (2018-12-10) ------------------- diff --git a/Pipfile b/Pipfile index c3aa67d0..a4d7af04 100644 --- a/Pipfile +++ b/Pipfile @@ -9,7 +9,7 @@ codecov = "*" pytest-httpbin = "==1.0.0" pytest-mock = "*" pytest-cov = "*" -pytest-xdist = "*" +pytest-xdist = "<=1.25" alabaster = "*" readme-renderer = "*" sphinx = "<=1.5.5" diff --git a/README.md b/README.md index 7acf63f4..a550411d 100644 --- a/README.md +++ b/README.md @@ -78,16 +78,17 @@ Fantastic documentation is available at How to Contribute ----------------- -1. Check for open issues or open a fresh issue to start a discussion +1. Become more familiar with the project by reading our [Contributor's Guide](http://docs.python-requests.org/en/latest/dev/contributing/) and our [development philosophy](http://docs.python-requests.org/en/latest/dev/philosophy/). +2. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. There is a [Contributor Friendly](https://github.com/requests/requests/issues?direction=desc&labels=Contributor+Friendly&page=1&sort=updated&state=open) tag for issues that should be ideal for people who are not very familiar with the codebase yet. -2. Fork [the repository](https://github.com/requests/requests) on +3. Fork [the repository](https://github.com/requests/requests) on GitHub to start making your changes to the **master** branch (or branch off of it). -3. Write a test which shows that the bug was fixed or that the feature +4. Write a test which shows that the bug was fixed or that the feature works as expected. -4. Send a pull request and bug the maintainer until it gets merged and +5. Send a [pull request](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork) and bug the maintainer until it gets merged and published. :) Make sure to add yourself to [AUTHORS](https://github.com/requests/requests/blob/master/AUTHORS.rst). diff --git a/docs/_templates/sidebarintro.html b/docs/_templates/sidebarintro.html index b43eeade..125f565e 100644 --- a/docs/_templates/sidebarintro.html +++ b/docs/_templates/sidebarintro.html @@ -8,6 +8,27 @@

+ + + +

Requests is an elegant and simple HTTP library for Python, built for diff --git a/docs/_templates/sidebarlogo.html b/docs/_templates/sidebarlogo.html index cd793d33..a5865ba7 100644 --- a/docs/_templates/sidebarlogo.html +++ b/docs/_templates/sidebarlogo.html @@ -7,7 +7,27 @@

- + + + +

Requests is an elegant and simple HTTP library for Python, built for diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index 9bad3909..f1b7460d 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -976,11 +976,12 @@ response at a time. However, these calls will still block. If you are concerned about the use of blocking IO, there are lots of projects out there that combine Requests with one of Python's asynchronicity frameworks. -Some excellent examples are `requests-threads`_, `grequests`_, and `requests-futures`_. +Some excellent examples are `requests-threads`_, `grequests`_, `requests-futures`_, and `requests-async`_. .. _`requests-threads`: https://github.com/requests/requests-threads .. _`grequests`: https://github.com/kennethreitz/grequests .. _`requests-futures`: https://github.com/ross/requests-futures +.. _`requests-async`: https://github.com/encode/requests-async Header Ordering --------------- diff --git a/requests3/__init__.py b/requests3/__init__.py index 7d70542a..76b3bdad 100644 --- a/requests3/__init__.py +++ b/requests3/__init__.py @@ -53,10 +53,10 @@ def check_compatibility(urllib3_version: str, chardet_version: str) -> None: # Check urllib3 for compatibility. major, minor, patch = urllib3_version # noqa: F811 major, minor, patch = int(major), int(minor), int(patch) - # urllib3 >= 1.21.1, <= 1.24 + # urllib3 >= 1.21.1, <= 1.25 assert major == 1 assert minor >= 21 - assert minor <= 24 + assert minor <= 25 # Check chardet for compatibility. major, minor, patch = chardet_version.split(".")[:3] diff --git a/requests3/http_auth.py b/requests3/http_auth.py index 8db2368f..ccfc38fa 100644 --- a/requests3/http_auth.py +++ b/requests3/http_auth.py @@ -39,7 +39,7 @@ def _basic_auth_str(username, password): "Non-string passwords will no longer be supported in Requests " "3.0.0. Please convert the object you've passed in ({!r}) to " "a string or bytes object in the near future to avoid " - "problems.".format(password), + "problems.".format(type(password)), category=DeprecationWarning, )