From 10d141406ad687059606cb787befea060189e078 Mon Sep 17 00:00:00 2001 From: Bo Bayles Date: Tue, 12 Mar 2024 16:14:01 -0500 Subject: [PATCH 1/5] Switch from flake8 and black to ruff, upgrade dependencies --- pyproject.toml | 8 +++- requirements/base.txt | 2 +- requirements/development.txt | 76 +++++++++++++++++------------------- setup.py | 2 +- update_ada.py | 1 + 5 files changed, 45 insertions(+), 44 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1a29c1a..24610b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,6 @@ target-version = ['py38'] skip-string-normalization = true [tool.ruff] -select = ["E", "F"] line-length = 88 target-version = "py38" exclude = [ @@ -16,6 +15,13 @@ exclude = [ ".ruff_cache", ] +[tool.ruff.format] +quote-style = "single" + +[tool.ruff.lint] +select = ["E", "F"] +ignore = ["E501"] + [tool.cibuildwheel] build = [ "cp38-*", diff --git a/requirements/base.txt b/requirements/base.txt index 7306ed5..1d43d46 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,5 @@ # What we want -cffi==1.15.1 +cffi==1.16.0 # What we need pycparser==2.21 diff --git a/requirements/development.txt b/requirements/development.txt index 9a3fbe5..92ce9e3 100644 --- a/requirements/development.txt +++ b/requirements/development.txt @@ -1,55 +1,49 @@ # What we want -build==0.10.0 -black==23.3.0 -cffi==1.15.1 -coverage==7.2.5 -ruff==0.0.267 -setuptools==67.7.2 -Sphinx==7.0.0 -twine==4.0.2 -wheel==0.40.0 +build==1.1.1 +coverage==7.4.3 +ruff==0.3.2 +setuptools==69.1.1 +Sphinx==7.2.6 +twine==5.0.0 +wheel==0.43.0 # What we need -alabaster==0.7.13 -Babel==2.12.1 -bleach==6.0.0 -certifi==2023.5.7 -charset-normalizer==3.1.0 -click==8.1.3 -docutils==0.19 -idna==3.4 +alabaster==0.7.16 +Babel==2.14.0 +certifi==2024.2.2 +cffi==1.16.0 +charset-normalizer==3.3.2 +docutils==0.20.1 +idna==3.6 imagesize==1.4.1 -importlib-metadata==6.6.0 -jaraco.classes==3.2.3 -Jinja2==3.1.2 -keyring==23.13.1 -markdown-it-py==2.2.0 -MarkupSafe==2.1.2 +importlib_metadata==7.0.2 +jaraco.classes==3.3.1 +Jinja2==3.1.3 +keyring==24.3.1 +markdown-it-py==3.0.0 +MarkupSafe==2.1.5 mdurl==0.1.2 -more-itertools==9.1.0 -mypy-extensions==1.0.0 -packaging==23.1 -pathspec==0.11.1 -pkginfo==1.9.6 -platformdirs==3.5.1 +more-itertools==10.2.0 +nh3==0.2.15 +packaging==24.0 +pkginfo==1.10.0 pycparser==2.21 +Pygments==2.17.2 pyproject_hooks==1.0.0 -Pygments==2.15.1 -readme-renderer==37.3 -requests==2.30.0 +readme_renderer==43.0 +requests==2.31.0 requests-toolbelt==1.0.0 rfc3986==2.0.0 -rich==13.3.5 +rich==13.7.1 six==1.16.0 snowballstemmer==2.2.0 -sphinxcontrib-applehelp==1.0.4 -sphinxcontrib-devhelp==1.0.2 -sphinxcontrib-htmlhelp==2.0.1 +sphinxcontrib-applehelp==1.0.8 +sphinxcontrib-devhelp==1.0.6 +sphinxcontrib-htmlhelp==2.0.5 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.3 -sphinxcontrib-serializinghtml==1.1.5 -urllib3==2.0.2 -webencodings==0.5.1 -zipp==3.15.0 +sphinxcontrib-qthelp==1.0.7 +sphinxcontrib-serializinghtml==1.1.10 +urllib3==2.2.1 +zipp==3.17.0 -r base.txt diff --git a/setup.py b/setup.py index 0ce1920..f4484da 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,6 @@ setup( cffi_modules=[ - "./ada_url/ada_build.py:ffi_builder", + './ada_url/ada_build.py:ffi_builder', ], ) diff --git a/update_ada.py b/update_ada.py index 87eaaab..0dcf537 100644 --- a/update_ada.py +++ b/update_ada.py @@ -4,6 +4,7 @@ Run this script to pull in the latest version of `ada-url/ada` single header package. """ + from io import BytesIO from os.path import dirname, join from zipfile import ZipFile From 6dde241353831f16f19c81c9567e0512d7a5145e Mon Sep 17 00:00:00 2001 From: Bo Bayles Date: Tue, 12 Mar 2024 16:16:35 -0500 Subject: [PATCH 2/5] Update Makefile --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index fb57d15..8ec0f09 100644 --- a/Makefile +++ b/Makefile @@ -4,12 +4,11 @@ requirements: .PHONY: check check: - black --check . - ruff . + ruff check . .PHONY: format format: - black . + ruff format . .PHONY: coverage coverage: From 2b3eec2765d34eead7678371a1ac1a00bfd3a935 Mon Sep 17 00:00:00 2001 From: Bo Bayles Date: Tue, 12 Mar 2024 16:18:38 -0500 Subject: [PATCH 3/5] Downgrade Sphinx for older Pythons --- requirements/development.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/development.txt b/requirements/development.txt index 92ce9e3..10b1712 100644 --- a/requirements/development.txt +++ b/requirements/development.txt @@ -3,7 +3,7 @@ build==1.1.1 coverage==7.4.3 ruff==0.3.2 setuptools==69.1.1 -Sphinx==7.2.6 +Sphinx==7.1.2 twine==5.0.0 wheel==0.43.0 From 22841bc10bb4667b6eaa97becfe6b384f485cd70 Mon Sep 17 00:00:00 2001 From: Bo Bayles Date: Tue, 12 Mar 2024 16:19:42 -0500 Subject: [PATCH 4/5] Downgrade alabaster for older Pythons --- requirements/development.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/development.txt b/requirements/development.txt index 10b1712..6baaadd 100644 --- a/requirements/development.txt +++ b/requirements/development.txt @@ -8,7 +8,7 @@ twine==5.0.0 wheel==0.43.0 # What we need -alabaster==0.7.16 +alabaster==0.7.13 Babel==2.14.0 certifi==2024.2.2 cffi==1.16.0 From 175c8d290e4511280678d9a4cdb213fa238eba3b Mon Sep 17 00:00:00 2001 From: Bo Bayles Date: Tue, 12 Mar 2024 16:22:26 -0500 Subject: [PATCH 5/5] Downgrade more Sphinx things for Python 3.8 --- requirements/development.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements/development.txt b/requirements/development.txt index 6baaadd..4891e7d 100644 --- a/requirements/development.txt +++ b/requirements/development.txt @@ -37,12 +37,12 @@ rfc3986==2.0.0 rich==13.7.1 six==1.16.0 snowballstemmer==2.2.0 -sphinxcontrib-applehelp==1.0.8 -sphinxcontrib-devhelp==1.0.6 -sphinxcontrib-htmlhelp==2.0.5 +sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.7 -sphinxcontrib-serializinghtml==1.1.10 +sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-serializinghtml==1.1.5 urllib3==2.2.1 zipp==3.17.0