Skip to content

Commit a015b44

Browse files
authored
Replace pyenv with uv in documentation and tooling (#910)
* Removed black & lint since we use ruff * Add uv to use multiple python versions * Excluded folders when using make
1 parent eb185bb commit a015b44

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

Makefile

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,44 +34,37 @@ clean-build:
3434
@rm -fr dist/
3535
@rm -fr *.egg-info
3636

37-
format fmt black:
38-
black .
39-
40-
lint ruff:
41-
ruff check .
42-
4337
test:
44-
tox
38+
uvx --with tox-uv tox
4539

4640
bottle:
4741
#---------------------------
4842
# Library refinitiv/bottle-oauthlib
4943
# Contacts: Jonathan.Huot
5044
cd bottle-oauthlib 2>/dev/null || git clone https://github.com/refinitiv/bottle-oauthlib.git
51-
cd bottle-oauthlib && sed -i.old 's,deps =,deps= --editable=file://{toxinidir}/../,' tox.ini && sed -i.old '/oauthlib/d' requirements.txt && tox
45+
cd bottle-oauthlib && sed -i.old 's,deps =,deps= --editable=file://{toxinidir}/../,' tox.ini && sed -i.old '/oauthlib/d' requirements.txt && uvx --with tox-uv tox
5246

5347
django:
5448
#---------------------------
5549
# Library: evonove/django-oauth-toolkit
5650
# Contacts: evonove,masci
57-
# (note: has tox.ini already)
5851
cd django-oauth-toolkit 2>/dev/null || git clone https://github.com/evonove/django-oauth-toolkit.git
59-
cd django-oauth-toolkit && sed -i.old 's,deps =,deps= --editable=file://{toxinidir}/../,' tox.ini && tox
52+
cd django-oauth-toolkit && sed -i.old 's,deps =,deps= --editable=file://{toxinidir}/../,' tox.ini && uvx --with tox-uv tox
6053

6154
requests:
6255
#---------------------------
6356
# Library requests/requests-oauthlib
6457
# Contacts: ib-lundgren,lukasa
6558
cd requests-oauthlib 2>/dev/null || git clone https://github.com/requests/requests-oauthlib.git
66-
cd requests-oauthlib && sed -i.old 's,deps=,deps = --editable=file://{toxinidir}/../[signedtoken],' tox.ini && sed -i.old '/oauthlib/d' requirements.txt && tox
59+
cd requests-oauthlib && sed -i.old 's,oauthlib.*,--editable=file://{toxinidir}/../../[signedtoken],' requirements.txt && uvx --with tox-uv tox
6760

6861
dance:
6962
#---------------------------
7063
# Library singingwolfboy/flask-dance
7164
# Contacts: singingwolfboy
7265
cd flask-dance 2>/dev/null || git clone https://github.com/singingwolfboy/flask-dance.git
73-
cd flask-dance && sed -i.old 's,deps=,deps = --editable=file://{toxinidir}/../,' tox.ini && sed -i.old '/oauthlib/d' requirements.txt && tox
66+
cd flask-dance && sed -i.old 's;"oauthlib.*";"oauthlib @ file://'`pwd`'/../";' pyproject.toml && uv venv && uv pip install -e '.[test]' && ./.venv/bin/coverage run -m pytest
7467

7568
.DEFAULT_GOAL := all
7669
.PHONY: clean test bottle dance django flask requests
77-
all: lint test bottle dance django flask requests
70+
all: test bottle dance django flask requests

docs/contributing.rst

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -159,24 +159,22 @@ all versions conveniently at once can be done using `Tox`_.
159159

160160
$ tox
161161

162-
Tox requires you to have `virtualenv`_ installed as well as respective python
163-
version. We recommend using `pyenv`_ to install those Python versions.
162+
Tox requires you to have respective python versions. We recommend using `uv`_ to install those Python versions.
164163

165-
We recommend using the latest patch version for each Python version we support and the latest PyPy versions.
166-
The versions beloew may not be up to date.
167164

168165
.. sourcecode:: bash
169166

170-
$ pyenv install -l # check which versions you want to use
171-
$ pyenv install 3.8.18
172-
$ pyenv install 3.11.7
173-
$ pyenv install pypy3.10-7.3.13
167+
$ uv tool install tox --with tox-uv
168+
$ uv python list # check which versions you want to use
169+
$ uv python install 3.8 3.9 3.10 3.11 3.12 3.13
170+
$ uv python install pypy3
171+
$ uvx --with tox-uv tox # that run all tests with all python versions
172+
174173

175174
.. _`Tox`: https://tox.readthedocs.io/en/latest/install.html
176-
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/installation/
177-
.. _`pyenv`: https://github.com/pyenv/pyenv
175+
.. _`uv`: https://docs.astral.sh/uv/#python-versions
178176

179-
Test upstream applications
177+
Test downstream applications
180178
-----------------------------------
181179

182180
Remember, OAuthLib is used by several 3rd party projects. If you think you
@@ -186,6 +184,14 @@ submit a breaking change, confirm that other projects builds are not affected.
186184

187185
$ make
188186

187+
Note be sure you are using ``uv`` as explained before with all python versions, including those from downstream libraries, to have all test cases running.
188+
189+
As of 2025, additional downstreams python versions are as below:
190+
191+
.. sourcecode:: bash
192+
193+
$ uv python install pypy3.10
194+
189195

190196
If you add code, add tests!
191197
--------------------------------------

ruff.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
# When switching from ruff.toml to pyproject.toml, use the section names that
77
# start with [tool.ruff
8+
exclude = ["flask-dance", "requests-oauthlib", "bottle-oauthlib", "django-oauth-toolkit"]
89

910
# [tool.ruff]
1011
lint.select = [

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy