Skip to content

Commit a1fd22a

Browse files
authored
Merge branch 'requests:master' into master
2 parents fc37566 + 6ac6133 commit a1fd22a

31 files changed

+426
-85
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish Tags on PyPi when GitHub creates a release
2+
on:
3+
push:
4+
tags:
5+
- 'v**'
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Set up Python 3.9
12+
uses: actions/setup-python@v2
13+
with:
14+
python-version: 3.9
15+
- name: Install upload dependencies
16+
run: |
17+
python -m pip install --upgrade pip setuptools wheel twine
18+
- name: Build and publish
19+
env:
20+
TWINE_USERNAME: __token__
21+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
22+
run: |
23+
python setup.py sdist bdist_wheel
24+
twine upload dist/*

.github/workflows/run-tests.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Run Tests
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
7+
jobs:
8+
tests:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
include:
14+
- python-version: "2.7"
15+
tox-env: py27
16+
- python-version: "3.6"
17+
tox-env: py36
18+
- python-version: "3.7"
19+
tox-env: py37,docs,readme,black
20+
- python-version: "3.8"
21+
tox-env: py38
22+
- python-version: "3.9"
23+
tox-env: py39
24+
- python-version: "3.10"
25+
tox-env: py310
26+
- python-version: "pypy3"
27+
tox-env: pypy3
28+
steps:
29+
- uses: actions/checkout@v2
30+
- name: Set up Python ${{ matrix.python-version }}
31+
uses: actions/setup-python@v2
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
- name: Install test dependencies
35+
run: |
36+
python -m pip install --upgrade pip setuptools
37+
python -m pip install tox
38+
- name: Install coveralls dependencies
39+
if: ${{ matrix.python-version != '2.7' }}
40+
run: |
41+
python -m pip install coveralls coverage-lcov toml
42+
- name: Execute tests with tox
43+
env:
44+
TOXENV: ${{ matrix.tox-env }}
45+
run: |
46+
tox
47+
- name: Coverage format into lcov
48+
if: ${{ matrix.python-version != '2.7' }}
49+
run: |
50+
coverage-lcov --output_file_path lcov.info
51+
- name: Coveralls Parallel
52+
uses: coverallsapp/[email protected]
53+
if: ${{ matrix.python-version != '2.7' }}
54+
with:
55+
github-token: ${{ secrets.github_token }}
56+
flag-name: run-${{ matrix.python-version }}
57+
path-to-lcov: lcov.info
58+
parallel: true
59+
finish:
60+
needs: tests
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Coveralls Finished
64+
uses: coverallsapp/github-action@master
65+
with:
66+
github-token: ${{ secrets.github_token }}
67+
path-to-lcov: lcov.info
68+
parallel-finished: true

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ dist/
1717
.tox/
1818

1919
.workon
20-
.*/
2120

2221
t.py
2322

.readthedocs.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
2+
version: 2
3+
build:
4+
os: ubuntu-20.04
5+
tools:
6+
python: "3.7"
7+
sphinx:
8+
builder: html
9+
configuration: docs/conf.py
10+
# fail_on_warning: true
11+
# the requirements.txt override some RTD defaults.
12+
# ideally it has to be updated from time to time
13+
# with latest libraries versions.
14+
python:
15+
install:
16+
- requirements: docs/requirements.txt
17+
- method: setuptools
18+
path: .

.travis.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

AUTHORS.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ Patches and Suggestions
2222
- Vinay Raikar <[email protected]>
2323
- kracekumar <[email protected]>
2424
- David Baumgold <[email protected]>
25+
- Sylvain Marie <[email protected]>
26+
- Craig Anderson <[email protected]>
27+
- Hugo van Kemenade <https://github.com/hugovk>

HISTORY.rst

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
11
History
22
-------
33

4-
UNRELEASED
5-
++++++++++
4+
v1.4.0 (TBD)
5+
++++++++++++++++++++++++
6+
- ``OAuth2Session`` now correctly uses the ``self.verify`` value if ``verify``
7+
is not overridden in ``fetch_token`` and ``refresh_token``. Fixes `#404
8+
<https://github.com/requests/requests-oauthlib/issues/404>`_.
9+
- ``OAuth2Session`` constructor now uses its ``client.scope`` when a ``client``
10+
is provided and ``scope`` is not overridden. Fixes `#408
11+
<https://github.com/requests/requests-oauthlib/issues/408>`_
12+
- Add support for Python 3.8-3.10
13+
14+
15+
v1.3.1 (21 January 2022)
16+
++++++++++++++++++++++++
617

718
- Add initial support for OAuth Mutual TLS (draft-ietf-oauth-mtls)
819
- Removed outdated LinkedIn Compliance Fixes
20+
- Add eBay compliance fix
21+
- Add Spotify OAuth 2 Tutorial
22+
- Add support for python 3.8, 3.9
23+
- Fixed LinkedIn Compliance Fixes
24+
- Fixed ReadTheDocs Documentation and sphinx errors
25+
- Moved pipeline to GitHub Actions
926

1027
v1.3.0 (6 November 2019)
1128
++++++++++++++++++++++++

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ To install requests and requests_oauthlib you can use pip:
4646

4747
.. code-block:: bash
4848
49-
$ pip install requests requests_oauthlib
49+
$ pip install requests requests-oauthlib
5050
51-
.. |build-status| image:: https://travis-ci.org/requests/requests-oauthlib.svg?branch=master
52-
:target: https://travis-ci.org/requests/requests-oauthlib
51+
.. |build-status| image:: https://github.com/requests/requests-oauthlib/actions/workflows/run-tests.yml/badge.svg
52+
:target: https://github.com/requests/requests-oauthlib/actions
5353
.. |coverage-status| image:: https://img.shields.io/coveralls/requests/requests-oauthlib.svg
5454
:target: https://coveralls.io/r/requests/requests-oauthlib
5555
.. |docs| image:: https://readthedocs.org/projects/requests-oauthlib/badge/

docs/conf.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
master_doc = "index"
4242

4343
# General information about the project.
44-
project = u"Requests-OAuthlib"
45-
copyright = u"2014, Kenneth Reitz"
44+
project = "Requests-OAuthlib"
45+
copyright = "2014, Kenneth Reitz"
4646

4747
# The version info for the project you're documenting, acts as replacement for
4848
# |version| and |release|, also used in various other places throughout the
@@ -95,7 +95,7 @@
9595

9696
# The theme to use for HTML and HTML Help pages. See the documentation for
9797
# a list of builtin themes.
98-
html_theme = "default"
98+
html_theme = "sphinx_rtd_theme"
9999

100100
# Theme options are theme-specific and customize the look and feel of a theme
101101
# further. For a list of options available for each theme, see the
@@ -124,7 +124,7 @@
124124
# Add any paths that contain custom static files (such as style sheets) here,
125125
# relative to this directory. They are copied after the builtin static files,
126126
# so a file named "default.css" will overwrite the builtin "default.css".
127-
html_static_path = ["_static"]
127+
# html_static_path = ["_static"]
128128

129129
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
130130
# using the given strftime format.
@@ -188,8 +188,8 @@
188188
(
189189
"index",
190190
"Requests-OAuthlib.tex",
191-
u"Requests-OAuthlib Documentation",
192-
u"Requests-OAuthlib Contributors",
191+
"Requests-OAuthlib Documentation",
192+
"Requests-OAuthlib Contributors",
193193
"manual",
194194
)
195195
]
@@ -223,8 +223,8 @@
223223
(
224224
"index",
225225
"requests-oauthlib",
226-
u"Requests-OAuthlib Documentation",
227-
[u"Requests-OAuthlib Contributors"],
226+
"Requests-OAuthlib Documentation",
227+
["Requests-OAuthlib Contributors"],
228228
1,
229229
)
230230
]
@@ -242,8 +242,8 @@
242242
(
243243
"index",
244244
"Requests-OAuthlib",
245-
u"Requests-OAuthlib Documentation",
246-
u"Requests-OAuthlib Contributors",
245+
"Requests-OAuthlib Documentation",
246+
"Requests-OAuthlib Contributors",
247247
"Requests-OAuthlib",
248248
"One line description of project.",
249249
"Miscellaneous",

docs/contributing.rst

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
============
2+
Contributing
3+
============
4+
5+
Test simple changes
6+
===================
7+
8+
Requests-OAuthlib is using `tox`_ as main test tool.
9+
It helps creating the required virtualenv for your python version.
10+
For example, if you have installed Python3.7:
11+
12+
.. sourcecode:: bash
13+
14+
$ tox -e py37
15+
16+
17+
Validate documentation changes
18+
==============================
19+
20+
Tox contains also a build method to generate documentation locally.
21+
22+
.. sourcecode:: bash
23+
24+
$ tox -e docs,readme
25+
26+
Then open the HTML page in `_build/html/index.html`
27+
28+
29+
Verify all pythons versions
30+
===========================
31+
32+
Requests-OAuthlib supports multiple versions of Python.
33+
You can test all Python versions conveniently using `tox`_.
34+
35+
.. sourcecode:: bash
36+
37+
$ tox
38+
39+
In order to run successfully, you will need all versions of Python installed. We recommend using `pyenv`_ to install those Python versions.
40+
41+
.. sourcecode:: bash
42+
43+
$ pyenv install 2.7.18
44+
$ pyenv install 3.4.10
45+
$ pyenv install 3.5.10
46+
$ pyenv install 3.6.14
47+
$ pyenv install 3.7.11
48+
$ pyenv install pypy2.7-7.1.1
49+
$ pyenv install pypy3.6-7.1.1
50+
51+
52+
Publishing a release (for maintainer role)
53+
==========================================
54+
55+
Maintainer tasks should always be kept to minimum. Once a release is ready, the suggested approach can be followed:
56+
57+
#. Create new branch release-X.Y.Z
58+
#. Update the HISTORY.rst file
59+
#. Update the `request_oauthlib/__init__.py`
60+
#. Raise a pull request to give a chance for all contributors to comment before publishing
61+
#. Create a TAG vX.Y.Z. By doing this, the pipeline will automatically trigger `twine` and will publish the release to PyPi.
62+
63+
Once verified, complete by doing the following:
64+
65+
#. Create a GitHub release vX.Y.Z in the Releases tab.
66+
#. Activate the vX.Y.Z version in the documentation (`ReadTheDocs`_)
67+
#. Merge the PR into master branch.
68+
69+
That's all.
70+
71+
.. _`tox`: https://tox.readthedocs.io/en/latest/install.html
72+
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/installation/
73+
.. _`pyenv`: https://github.com/pyenv/pyenv
74+
.. _`ReadTheDocs`: https://readthedocs.org/projects/requests-oauthlib/versions/

0 commit comments

Comments
 (0)