From c462fb0a3a5b09b5a60102b7c9a94897d8af2524 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Wed, 30 Sep 2026 18:50:01 -0500 Subject: [PATCH 1/5] Use `prek` for pre-commit updates; freeze pre-commit hooks --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 4f9b5ff..18e5273 100644 --- a/tox.ini +++ b/tox.ini @@ -135,11 +135,11 @@ commands = description = Update pre-commit hooks base = update_base deps = - pre-commit + prek upadup commands = - pre-commit autoupdate - upadup + prek autoupdate --freeze --cooldown-days 20 + upadup --freeze [testenv:update-requirements] description = Update requirements files From 08eddccf1f1c9c40b646acd517d8fd5b35bc7eaa Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Wed, 30 Sep 2026 18:50:47 -0500 Subject: [PATCH 2/5] Run `tox -m update` Also, run `prek run -a` and include the changes. --- .pre-commit-config.yaml | 28 ++++++++-------- CHANGELOG.rst | 2 +- README.rst | 2 +- assets/performance/__init__.py | 2 +- assets/performance/__main__.py | 2 +- assets/performance/clean.py | 2 +- assets/performance/collect.py | 2 +- assets/performance/compile.py | 2 +- assets/performance/generate.py | 2 +- assets/performance/plot.py | 2 +- assets/performance/run.py | 2 +- assets/performance/site_customizer/README.rst | 2 +- .../site_customizer/sitecustomize.py | 2 +- assets/test-performance.ps1 | 2 +- assets/test-performance.sh | 2 +- assets/validate-readme-banner-url.py | 2 +- demo.py | 2 +- docs/_templates/about-no-logo.html.jinja | 2 +- docs/_templates/about.html.jinja | 2 +- docs/bytecode.rst | 2 +- docs/changelog.rst | 2 +- docs/colophon.rst | 2 +- docs/flake8/index.rst | 2 +- docs/index.rst | 2 +- docs/isort/index.rst | 2 +- docs/load/assets/automatic.ps1 | 2 +- docs/load/assets/automatic.sh | 2 +- docs/load/index.rst | 2 +- docs/ruff/assets/F401/example.py | 1 - docs/ruff/index.rst | 2 +- requirements/README.rst | 2 +- .../docs-integrations/requirements.txt | 11 ++++--- requirements/docs/requirements.txt | 22 ++++++------- requirements/mypy/requirements.txt | 11 ++++--- .../regenerate-test-projects/requirements.txt | 14 ++++---- requirements/test/requirements-coverage.txt | 4 +-- requirements/test/requirements.txt | 14 ++++---- src/sqliteimport/__init__.py | 2 +- src/sqliteimport/__main__.py | 2 +- src/sqliteimport/accessor.py | 32 +++++++------------ src/sqliteimport/bundler.py | 2 +- src/sqliteimport/cli.py | 26 ++++++--------- src/sqliteimport/compat.py | 2 +- src/sqliteimport/compiler.py | 2 +- src/sqliteimport/errors.py | 2 +- src/sqliteimport/importer.py | 2 +- src/sqliteimport/injector-template.py | 2 +- src/sqliteimport/injector.py | 14 +++----- src/sqliteimport/util.py | 2 +- tests/conftest.py | 2 +- tests/regenerate-test-projects.py | 2 +- tests/test_cli.py | 2 +- tests/test_importing.py | 2 +- tests/test_load.py | 2 +- tests/test_tracebacks.py | 2 +- 55 files changed, 122 insertions(+), 143 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5cf7b8e..83c5514 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - id: "check-useless-excludes" - repo: "https://github.com/pre-commit/pre-commit-hooks" - rev: "v6.0.0" + rev: "3e8a8703264a2f4a69428a0aa4dcb512790b2c8c" # frozen: v6.0.0 hooks: - id: "check-added-large-files" - id: "check-merge-conflict" @@ -25,60 +25,60 @@ repos: - id: "trailing-whitespace" - repo: "https://github.com/asottile/pyupgrade" - rev: "v3.21.2" + rev: "75992aaa40730136014f34227e0135f63fc951b4" # frozen: v3.21.2 hooks: - id: "pyupgrade" name: "Enforce Python 3.10+ idioms" args: ["--py310-plus"] - repo: "https://github.com/sirosen/slyp" - rev: "0.8.2" + rev: "072ea633cef088f143be7c16499d1564485dfc0c" # frozen: 0.9.0 hooks: - id: "slyp" - repo: "https://github.com/psf/black-pre-commit-mirror" - rev: "25.12.0" + rev: "4160603246a6b365d4a2af661c6d71b0a0f50478" # frozen: 26.5.1 hooks: - id: "black" - repo: "https://github.com/pycqa/isort" - rev: "7.0.0" + rev: "131f4adcd5582bfc53928ab0d740eceb8b506b6c" # frozen: 9.0.1 hooks: - id: "isort" - repo: "https://github.com/pycqa/flake8" - rev: "7.3.0" + rev: "c48217e1fc006c2dddd14df54e83b67da15de5cd" # frozen: 7.3.0 hooks: - id: "flake8" additional_dependencies: - "flake8-toml-config==1.0.0" - - "flake8-bugbear==25.11.29" + - "flake8-bugbear==26.9.30" - repo: "https://github.com/editorconfig-checker/editorconfig-checker" - rev: "v3.6.0" + rev: "e98e4ec6d3bb64b4b62ec4f0ce6cacdfba12f9a0" # frozen: v4.0.1 hooks: - id: "editorconfig-checker" - repo: "https://github.com/python-jsonschema/check-jsonschema" - rev: "0.36.0" + rev: "12e63946db2c5cfcc9030fac21c3883ba88c6ed8" # frozen: 0.38.0 hooks: - id: "check-dependabot" - id: "check-readthedocs" - repo: "https://github.com/rhysd/actionlint" - rev: "v1.7.9" + rev: "914e7df21a07ef503a81201c76d2b11c789d3fca" # frozen: v1.7.12 hooks: - id: "actionlint" additional_dependencies: - - "github.com/wasilibs/go-shellcheck/cmd/shellcheck@v0.11.1" + - "github.com/wasilibs/go-shellcheck/cmd/shellcheck@4e7020840c303923eb1ab846fc446d77be892570" - repo: "https://github.com/kurtmckee/pre-commit-hooks" - rev: "v1.0.0" + rev: "44b638c826f1acd2ba2c5995db3156be60c5efea" # frozen: v1.0.0 hooks: - id: "verify-consistent-pyproject-toml-python-requirements" - repo: "https://github.com/shellcheck-py/shellcheck-py" - rev: "v0.11.0.1" + rev: "a6564f5d57444e123433a5c9af733e3975c77229" # frozen: v0.11.0.1-1 hooks: - id: "shellcheck" args: [ @@ -86,6 +86,6 @@ repos: ] - repo: "https://github.com/zizmorcore/zizmor-pre-commit" - rev: "v1.18.0" + rev: "fa412071e4f5d44d44f9e365f4676f9df92456a2" # frozen: v1.30.1 hooks: - id: "zizmor" diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 996517e..ce99f0c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,6 @@ .. This file is a part of sqliteimport - Copyright 2024-2025 Kurt McKee + Copyright 2024-2026 Kurt McKee SPDX-License-Identifier: MIT .. diff --git a/README.rst b/README.rst index 7a26bb5..276179e 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,6 @@ .. This file is a part of sqliteimport - Copyright 2024-2025 Kurt McKee + Copyright 2024-2026 Kurt McKee SPDX-License-Identifier: MIT diff --git a/assets/performance/__init__.py b/assets/performance/__init__.py index 430f9ee..601c38b 100644 --- a/assets/performance/__init__.py +++ b/assets/performance/__init__.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import enum diff --git a/assets/performance/__main__.py b/assets/performance/__main__.py index 3f5c52b..37c8c41 100644 --- a/assets/performance/__main__.py +++ b/assets/performance/__main__.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import pathlib diff --git a/assets/performance/clean.py b/assets/performance/clean.py index 6736c26..f1130fa 100644 --- a/assets/performance/clean.py +++ b/assets/performance/clean.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import shutil diff --git a/assets/performance/collect.py b/assets/performance/collect.py index dee8489..0c3b2db 100644 --- a/assets/performance/collect.py +++ b/assets/performance/collect.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import itertools diff --git a/assets/performance/compile.py b/assets/performance/compile.py index 85411bb..08eef80 100644 --- a/assets/performance/compile.py +++ b/assets/performance/compile.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import subprocess diff --git a/assets/performance/generate.py b/assets/performance/generate.py index 2987b3d..9552108 100644 --- a/assets/performance/generate.py +++ b/assets/performance/generate.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import pathlib diff --git a/assets/performance/plot.py b/assets/performance/plot.py index eb19f17..a7478db 100644 --- a/assets/performance/plot.py +++ b/assets/performance/plot.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import dataclasses diff --git a/assets/performance/run.py b/assets/performance/run.py index 0df7a8f..071f1ff 100644 --- a/assets/performance/run.py +++ b/assets/performance/run.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import os diff --git a/assets/performance/site_customizer/README.rst b/assets/performance/site_customizer/README.rst index 5ba74d3..2467c74 100644 --- a/assets/performance/site_customizer/README.rst +++ b/assets/performance/site_customizer/README.rst @@ -1,6 +1,6 @@ .. This file is a part of sqliteimport - Copyright 2024-2025 Kurt McKee + Copyright 2024-2026 Kurt McKee SPDX-License-Identifier: MIT The performance testing script relies on this directory diff --git a/assets/performance/site_customizer/sitecustomize.py b/assets/performance/site_customizer/sitecustomize.py index c15d523..09d653b 100644 --- a/assets/performance/site_customizer/sitecustomize.py +++ b/assets/performance/site_customizer/sitecustomize.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import sys diff --git a/assets/test-performance.ps1 b/assets/test-performance.ps1 index 3c5febf..1a3f53f 100644 --- a/assets/test-performance.ps1 +++ b/assets/test-performance.ps1 @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT python assets/performance clean diff --git a/assets/test-performance.sh b/assets/test-performance.sh index ffbbd35..7552020 100644 --- a/assets/test-performance.sh +++ b/assets/test-performance.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT set -eu diff --git a/assets/validate-readme-banner-url.py b/assets/validate-readme-banner-url.py index 6f2f299..78e8861 100644 --- a/assets/validate-readme-banner-url.py +++ b/assets/validate-readme-banner-url.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT """ diff --git a/demo.py b/demo.py index 1e34970..68190b8 100644 --- a/demo.py +++ b/demo.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import pathlib diff --git a/docs/_templates/about-no-logo.html.jinja b/docs/_templates/about-no-logo.html.jinja index 818a533..535a0d9 100644 --- a/docs/_templates/about-no-logo.html.jinja +++ b/docs/_templates/about-no-logo.html.jinja @@ -1,6 +1,6 @@ {# This file is a part of sqliteimport -Copyright 2024-2025 Kurt McKee +Copyright 2024-2026 Kurt McKee SPDX-License-Identifier: MIT #} diff --git a/docs/_templates/about.html.jinja b/docs/_templates/about.html.jinja index d683643..0753d24 100644 --- a/docs/_templates/about.html.jinja +++ b/docs/_templates/about.html.jinja @@ -1,6 +1,6 @@ {# This file is a part of sqliteimport -Copyright 2024-2025 Kurt McKee +Copyright 2024-2026 Kurt McKee SPDX-License-Identifier: MIT #} diff --git a/docs/bytecode.rst b/docs/bytecode.rst index 057f470..2a54f3c 100644 --- a/docs/bytecode.rst +++ b/docs/bytecode.rst @@ -1,6 +1,6 @@ .. This file is a part of sqliteimport - Copyright 2024-2025 Kurt McKee + Copyright 2024-2026 Kurt McKee SPDX-License-Identifier: MIT diff --git a/docs/changelog.rst b/docs/changelog.rst index 19c4d25..8cc1b0c 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,6 @@ .. This file is a part of sqliteimport - Copyright 2024-2025 Kurt McKee + Copyright 2024-2026 Kurt McKee SPDX-License-Identifier: MIT .. include:: ../CHANGELOG.rst diff --git a/docs/colophon.rst b/docs/colophon.rst index 59aa461..becca1b 100644 --- a/docs/colophon.rst +++ b/docs/colophon.rst @@ -1,6 +1,6 @@ .. This file is a part of sqliteimport - Copyright 2024-2025 Kurt McKee + Copyright 2024-2026 Kurt McKee SPDX-License-Identifier: MIT diff --git a/docs/flake8/index.rst b/docs/flake8/index.rst index 7a17e58..1a0e810 100644 --- a/docs/flake8/index.rst +++ b/docs/flake8/index.rst @@ -1,6 +1,6 @@ .. This file is a part of sqliteimport - Copyright 2024-2025 Kurt McKee + Copyright 2024-2026 Kurt McKee SPDX-License-Identifier: MIT diff --git a/docs/index.rst b/docs/index.rst index a1d41fe..9bbdd9a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,6 +1,6 @@ .. This file is a part of sqliteimport - Copyright 2024-2025 Kurt McKee + Copyright 2024-2026 Kurt McKee SPDX-License-Identifier: MIT diff --git a/docs/isort/index.rst b/docs/isort/index.rst index 5faa750..1969f73 100644 --- a/docs/isort/index.rst +++ b/docs/isort/index.rst @@ -1,6 +1,6 @@ .. This file is a part of sqliteimport - Copyright 2024-2025 Kurt McKee + Copyright 2024-2026 Kurt McKee SPDX-License-Identifier: MIT diff --git a/docs/load/assets/automatic.ps1 b/docs/load/assets/automatic.ps1 index 1149c8d..d5d7d77 100644 --- a/docs/load/assets/automatic.ps1 +++ b/docs/load/assets/automatic.ps1 @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT # Install sqliteimport in a virtual environment. diff --git a/docs/load/assets/automatic.sh b/docs/load/assets/automatic.sh index 949e820..0992306 100644 --- a/docs/load/assets/automatic.sh +++ b/docs/load/assets/automatic.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT # Install sqliteimport in a virtual environment. diff --git a/docs/load/index.rst b/docs/load/index.rst index fb9db2a..262bd32 100644 --- a/docs/load/index.rst +++ b/docs/load/index.rst @@ -1,6 +1,6 @@ .. This file is a part of sqliteimport - Copyright 2024-2025 Kurt McKee + Copyright 2024-2026 Kurt McKee SPDX-License-Identifier: MIT diff --git a/docs/ruff/assets/F401/example.py b/docs/ruff/assets/F401/example.py index 9861f8d..d95e1aa 100644 --- a/docs/ruff/assets/F401/example.py +++ b/docs/ruff/assets/F401/example.py @@ -6,7 +6,6 @@ import boto3 import requests - # Hidden from rendering in the docs. # # This list does not include 'sqliteimport', above, diff --git a/docs/ruff/index.rst b/docs/ruff/index.rst index de8a1a4..2b8490b 100644 --- a/docs/ruff/index.rst +++ b/docs/ruff/index.rst @@ -1,6 +1,6 @@ .. This file is a part of sqliteimport - Copyright 2024-2025 Kurt McKee + Copyright 2024-2026 Kurt McKee SPDX-License-Identifier: MIT diff --git a/requirements/README.rst b/requirements/README.rst index 6c5abe8..e6fc215 100644 --- a/requirements/README.rst +++ b/requirements/README.rst @@ -1,6 +1,6 @@ .. This file is a part of sqliteimport - Copyright 2024-2025 Kurt McKee + Copyright 2024-2026 Kurt McKee SPDX-License-Identifier: MIT ``requirements/`` diff --git a/requirements/docs-integrations/requirements.txt b/requirements/docs-integrations/requirements.txt index 806a235..2e1a7a4 100644 --- a/requirements/docs-integrations/requirements.txt +++ b/requirements/docs-integrations/requirements.txt @@ -1,6 +1,7 @@ -flake8==7.3.0 ; python_version >= "3.10" -isort==7.0.0 ; python_version >= "3.10" +flake8==7.4.1 ; python_version >= "3.10" +isort==9.0.2 ; python_version >= "3.10" mccabe==0.7.0 ; python_version >= "3.10" -pycodestyle==2.14.0 ; python_version >= "3.10" -pyflakes==3.4.0 ; python_version >= "3.10" -ruff==0.14.9 ; python_version >= "3.10" +mypy-extensions==1.1.0 ; python_version >= "3.10" +pycodestyle==2.15.0 ; python_version >= "3.10" +pyflakes==4.0.1 ; python_version >= "3.10" +ruff==0.16.9 ; python_version >= "3.10" diff --git a/requirements/docs/requirements.txt b/requirements/docs/requirements.txt index a865b1a..bbc0585 100644 --- a/requirements/docs/requirements.txt +++ b/requirements/docs/requirements.txt @@ -1,17 +1,17 @@ alabaster==1.0.0 ; python_version >= "3.10" -babel==2.17.0 ; python_version >= "3.10" -certifi==2025.11.12 ; python_version >= "3.10" -charset-normalizer==3.4.4 ; python_version >= "3.10" +babel==2.18.0 ; python_version >= "3.10" +certifi==2026.7.22 ; python_version >= "3.10" +charset-normalizer==3.5.2 ; python_version >= "3.10" colorama==0.4.6 ; python_version >= "3.10" and sys_platform == "win32" docutils==0.21.2 ; python_version >= "3.10" -idna==3.11 ; python_version >= "3.10" -imagesize==1.4.1 ; python_version >= "3.10" +idna==3.20 ; python_version >= "3.10" +imagesize==2.0.1 ; python_version >= "3.10" jinja2==3.1.6 ; python_version >= "3.10" markupsafe==3.0.3 ; python_version >= "3.10" -packaging==25.0 ; python_version >= "3.10" -pygments==2.19.2 ; python_version >= "3.10" -requests==2.32.5 ; python_version >= "3.10" -snowballstemmer==3.0.1 ; python_version >= "3.10" +packaging==26.3 ; python_version >= "3.10" +pygments==2.21.0 ; python_version >= "3.10" +requests==2.34.2 ; python_version >= "3.10" +snowballstemmer==3.1.1 ; python_version >= "3.10" sphinx==8.1.3 ; python_version >= "3.10" sphinxcontrib-applehelp==2.0.0 ; python_version >= "3.10" sphinxcontrib-devhelp==2.0.0 ; python_version >= "3.10" @@ -19,5 +19,5 @@ sphinxcontrib-htmlhelp==2.1.0 ; python_version >= "3.10" sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.10" sphinxcontrib-qthelp==2.0.0 ; python_version >= "3.10" sphinxcontrib-serializinghtml==2.0.0 ; python_version >= "3.10" -tomli==2.3.0 ; python_version == "3.10" -urllib3==2.6.2 ; python_version >= "3.10" +tomli==2.4.1 ; python_version == "3.10" +urllib3==2.8.0 ; python_version >= "3.10" diff --git a/requirements/mypy/requirements.txt b/requirements/mypy/requirements.txt index 0232245..de87d40 100644 --- a/requirements/mypy/requirements.txt +++ b/requirements/mypy/requirements.txt @@ -1,6 +1,7 @@ -librt==0.7.4 ; python_version >= "3.10" and platform_python_implementation != "PyPy" +ast-serialize==0.11.2 ; python_version >= "3.10" +librt==0.16.0 ; python_version >= "3.10" and platform_python_implementation != "PyPy" mypy-extensions==1.1.0 ; python_version >= "3.10" -mypy==1.19.1 ; python_version >= "3.10" -pathspec==0.12.1 ; python_version >= "3.10" -tomli==2.3.0 ; python_version == "3.10" -typing-extensions==4.15.0 ; python_version >= "3.10" +mypy==2.3.1 ; python_version >= "3.10" +pathspec==1.1.1 ; python_version >= "3.10" +tomli==2.4.1 ; python_version == "3.10" +typing-extensions==4.16.0 ; python_version >= "3.10" diff --git a/requirements/regenerate-test-projects/requirements.txt b/requirements/regenerate-test-projects/requirements.txt index ebb3297..21255b6 100644 --- a/requirements/regenerate-test-projects/requirements.txt +++ b/requirements/regenerate-test-projects/requirements.txt @@ -1,8 +1,8 @@ -build==1.3.0 ; python_version >= "3.10" +build==1.6.1 ; python_version >= "3.10" colorama==0.4.6 ; python_version >= "3.10" and os_name == "nt" -importlib-metadata==8.7.0 ; python_version >= "3.10" and python_full_version < "3.10.2" -packaging==25.0 ; python_version >= "3.10" -pip==25.3 ; python_version >= "3.10" -pyproject-hooks==1.2.0 ; python_version >= "3.10" -tomli==2.3.0 ; python_version == "3.10" -zipp==3.23.0 ; python_version >= "3.10" and python_full_version < "3.10.2" +importlib-metadata==9.0.1 ; python_version >= "3.10" and python_full_version < "3.10.2" +packaging==26.3 ; python_version >= "3.10" +pip==26.2.1 ; python_version >= "3.10" +pyproject-hooks==1.3.3 ; python_version >= "3.10" +tomli==2.4.1 ; python_version == "3.10" +zipp==4.1.0 ; python_version >= "3.10" and python_full_version < "3.10.2" diff --git a/requirements/test/requirements-coverage.txt b/requirements/test/requirements-coverage.txt index 971ae53..f2bdfc2 100644 --- a/requirements/test/requirements-coverage.txt +++ b/requirements/test/requirements-coverage.txt @@ -1,2 +1,2 @@ -coverage==7.13.0 ; python_version >= "3.10" -tomli==2.3.0 ; python_version >= "3.10" and python_full_version <= "3.11.0a6" +coverage==7.16.2 ; python_version >= "3.10" +tomli==2.4.1 ; python_version >= "3.10" and python_full_version <= "3.11.0a6" diff --git a/requirements/test/requirements.txt b/requirements/test/requirements.txt index 8c8cc48..226863f 100644 --- a/requirements/test/requirements.txt +++ b/requirements/test/requirements.txt @@ -1,11 +1,11 @@ colorama==0.4.6 ; python_version >= "3.10" and sys_platform == "win32" -coverage==7.13.0 ; python_version >= "3.10" +coverage==7.16.2 ; python_version >= "3.10" exceptiongroup==1.3.1 ; python_version == "3.10" iniconfig==2.3.0 ; python_version >= "3.10" -packaging==25.0 ; python_version >= "3.10" +packaging==26.3 ; python_version >= "3.10" pluggy==1.6.0 ; python_version >= "3.10" -pygments==2.19.2 ; python_version >= "3.10" -pytest-randomly==4.0.1 ; python_version >= "3.10" -pytest==9.0.2 ; python_version >= "3.10" -tomli==2.3.0 ; python_version >= "3.10" and python_full_version <= "3.11.0a6" -typing-extensions==4.15.0 ; python_version == "3.10" +pygments==2.21.0 ; python_version >= "3.10" +pytest-randomly==5.0.0 ; python_version >= "3.10" +pytest==9.1.1 ; python_version >= "3.10" +tomli==2.4.1 ; python_version == "3.10" +typing-extensions==4.16.0 ; python_version == "3.10" diff --git a/src/sqliteimport/__init__.py b/src/sqliteimport/__init__.py index 7bd5a91..c6c5e6c 100644 --- a/src/sqliteimport/__init__.py +++ b/src/sqliteimport/__init__.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import sys diff --git a/src/sqliteimport/__main__.py b/src/sqliteimport/__main__.py index d8c7572..be4e2ae 100644 --- a/src/sqliteimport/__main__.py +++ b/src/sqliteimport/__main__.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT from . import cli diff --git a/src/sqliteimport/accessor.py b/src/sqliteimport/accessor.py index 66557fc..93b66fe 100644 --- a/src/sqliteimport/accessor.py +++ b/src/sqliteimport/accessor.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT from __future__ import annotations @@ -41,8 +41,7 @@ def get_tables(self) -> list[str]: def initialize_database(self) -> None: """Create database tables and insert basic information about the database.""" - self.connection.executescript( - """ + self.connection.executescript(""" CREATE TABLE sqliteimport ( field TEXT, value TEXT @@ -67,8 +66,7 @@ def initialize_database(self) -> None: magic_number INTEGER, python_identifier TEXT ); - """ - ) + """) @staticmethod def get_database_path(database: sqlite3.Connection) -> str: @@ -84,16 +82,14 @@ def get_database_path(database: sqlite3.Connection) -> str: def get_magic_numbers(self) -> dict[int, str]: """Get the magic numbers of the already-compiled bytecodes in the database.""" - magic_numbers = self.connection.execute( - """ + magic_numbers = self.connection.execute(""" SELECT magic_number, python_identifier FROM magic_numbers ; - """ - ).fetchall() + """).fetchall() return {row[0]: row[1] for row in magic_numbers} def add_directory(self, directory: pathlib.Path) -> None: @@ -154,8 +150,7 @@ def create_bytecode_table(self, magic_number: int) -> None: """Create a compiled bytecode table.""" table_name = self.get_bytecode_table_name(magic_number) - self.connection.executescript( - f""" + self.connection.executescript(f""" CREATE TABLE {table_name} ( fullname TEXT, @@ -165,8 +160,7 @@ def create_bytecode_table(self, magic_number: int) -> None: ); CREATE INDEX {table_name}_fullname_index ON {table_name} (fullname); - """ - ) + """) def add_bytecode( self, magic_number: int, fullname: str, path: str, is_package: bool, code: bytes @@ -361,8 +355,7 @@ def list_directory(self, path_like: str) -> list[str]: def iter_source_code(self) -> typing.Generator[tuple[str, str, bool, bytes]]: cursor = self.connection.cursor() - iterable = cursor.execute( - """ + iterable = cursor.execute(""" SELECT fullname, path, @@ -371,8 +364,7 @@ def iter_source_code(self) -> typing.Generator[tuple[str, str, bool, bytes]]: FROM code WHERE path LIKE '%.py' ; - """ - ) + """) row: tuple[str, str, bool, bytes] for row in iterable: fullname, path, is_package, contents = row @@ -382,15 +374,13 @@ def iter_package_metadata(self) -> typing.Generator[bytes]: """Find and return all METADATA files in `.dist-info/` directories.""" cursor = self.connection.cursor() - iterable = cursor.execute( - """ + iterable = cursor.execute(""" SELECT contents FROM code WHERE path LIKE '%.dist-info/METADATA' ; - """ - ) + """) row: tuple[bytes] for row in iterable: contents = row[0] diff --git a/src/sqliteimport/bundler.py b/src/sqliteimport/bundler.py index f7410fa..da65f20 100644 --- a/src/sqliteimport/bundler.py +++ b/src/sqliteimport/bundler.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import pathlib diff --git a/src/sqliteimport/cli.py b/src/sqliteimport/cli.py index f53d90d..610c551 100644 --- a/src/sqliteimport/cli.py +++ b/src/sqliteimport/cli.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import itertools @@ -175,21 +175,18 @@ def describe(database: pathlib.Path) -> None: type=click.Path( exists=True, dir_okay=False, file_okay=True, path_type=pathlib.Path ), - help=( - """ + help=(""" The Python code file to inject sqliteimport and the `--database` of packages into. The target file WILL NOT be overwritten by default; it can only be overwritten if it is specified again as the `--output-file`. - """ - ), + """), ) @click.option( "--marker", default=DEFAULT_MARKER, - help=( - f""" + help=(f""" The marker to search for in the `--target-file`. The marker must exist in the `--target-file`, @@ -200,29 +197,24 @@ def describe(database: pathlib.Path) -> None: \b # {DEFAULT_MARKER} \b - """ - ), + """), ) @click.option( "--output-file", type=click.Path(dir_okay=False, file_okay=True, path_type=pathlib.Path), - help=( - """ + help=(""" The output file to write, containing the code of the `--target-file` combined with the sqliteimport source code and database of dependencies. - """ - ), + """), ) @click.option( "--overwrite", is_flag=True, - help=( - """ + help=(""" If set, the `--output-file` will be overwritten if it exists. By default, the `--output-file` will never be overwritten. - """ - ), + """), ) def inject( database: pathlib.Path, diff --git a/src/sqliteimport/compat.py b/src/sqliteimport/compat.py index 33238fe..8cfdf12 100644 --- a/src/sqliteimport/compat.py +++ b/src/sqliteimport/compat.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import functools diff --git a/src/sqliteimport/compiler.py b/src/sqliteimport/compiler.py index 49f0ba8..4739d03 100644 --- a/src/sqliteimport/compiler.py +++ b/src/sqliteimport/compiler.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT from .accessor import Accessor diff --git a/src/sqliteimport/errors.py b/src/sqliteimport/errors.py index 76e75c5..6cddb83 100644 --- a/src/sqliteimport/errors.py +++ b/src/sqliteimport/errors.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import typing diff --git a/src/sqliteimport/importer.py b/src/sqliteimport/importer.py index 8010fad..90d8261 100644 --- a/src/sqliteimport/importer.py +++ b/src/sqliteimport/importer.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT from __future__ import annotations diff --git a/src/sqliteimport/injector-template.py b/src/sqliteimport/injector-template.py index 377d3fa..148c0f8 100644 --- a/src/sqliteimport/injector-template.py +++ b/src/sqliteimport/injector-template.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import importlib.machinery diff --git a/src/sqliteimport/injector.py b/src/sqliteimport/injector.py index 305cd66..520b46f 100644 --- a/src/sqliteimport/injector.py +++ b/src/sqliteimport/injector.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import importlib.resources @@ -8,14 +8,12 @@ def generate_prologue(database_path: pathlib.Path) -> str: - header = textwrap.dedent( - """\ + header = textwrap.dedent("""\ # The code in this block was generated by sqliteimport. # https://github.com/kurtmckee/sqliteimport # Copyright Kurt McKee # SPDX-License-Identifier: MIT - """ - ).rstrip() + """).rstrip() lines: list[str] = [header] # Add code variables. @@ -39,8 +37,7 @@ def generate_prologue(database_path: pathlib.Path) -> str: continue lines.append(line) - wrapper = textwrap.dedent( - """ + wrapper = textwrap.dedent(""" # BEGIN GENERATED CODE BLOCK. DO NOT EDIT! def __sqliteimport_setup(database: bytes) -> None: {function_block} @@ -49,8 +46,7 @@ def __sqliteimport_setup(database: bytes) -> None: del __sqliteimport_database del __sqliteimport_setup # END GENERATED CODE BLOCK. - """ - ) + """) function_block = textwrap.indent("\n".join(lines), " ") database = database_path.read_bytes() return wrapper.format(function_block=function_block, database=database) diff --git a/src/sqliteimport/util.py b/src/sqliteimport/util.py index f8b2db9..a8674a4 100644 --- a/src/sqliteimport/util.py +++ b/src/sqliteimport/util.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import importlib.util diff --git a/tests/conftest.py b/tests/conftest.py index 8a372a1..54b4357 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import contextlib diff --git a/tests/regenerate-test-projects.py b/tests/regenerate-test-projects.py index f62a20d..5e6ede5 100644 --- a/tests/regenerate-test-projects.py +++ b/tests/regenerate-test-projects.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import json diff --git a/tests/test_cli.py b/tests/test_cli.py index fd4e436..bb386f2 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import pytest diff --git a/tests/test_importing.py b/tests/test_importing.py index 625ac79..615b05f 100644 --- a/tests/test_importing.py +++ b/tests/test_importing.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import importlib.machinery diff --git a/tests/test_load.py b/tests/test_load.py index 424eb90..6a10fda 100644 --- a/tests/test_load.py +++ b/tests/test_load.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import sqlite3 diff --git a/tests/test_tracebacks.py b/tests/test_tracebacks.py index 19615ec..90a2bf2 100644 --- a/tests/test_tracebacks.py +++ b/tests/test_tracebacks.py @@ -1,5 +1,5 @@ # This file is a part of sqliteimport -# Copyright 2024-2025 Kurt McKee +# Copyright 2024-2026 Kurt McKee # SPDX-License-Identifier: MIT import importlib From e906e61045ef2439e9677862103ac055673e62a6 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Wed, 30 Sep 2026 18:55:30 -0500 Subject: [PATCH 3/5] Update the Read the Docs configuration --- .readthedocs.yaml | 4 ++-- tox.ini | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index bc438b3..dbb18e0 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,9 +1,9 @@ version: 2 build: - os: 'ubuntu-24.04' + os: 'ubuntu-26.04' tools: - python: '3.13' + python: '3.14' sphinx: configuration: 'docs/conf.py' diff --git a/tox.ini b/tox.ini index 18e5273..369d897 100644 --- a/tox.ini +++ b/tox.ini @@ -73,7 +73,7 @@ commands = mypy {posargs} [testenv:docs] description = Test documentation builds -base_python = py3.13 +base_python = py3.14 skip_install = true deps = -r requirements/docs/requirements.txt commands = From 5b4ec86f615c7418acf3a20510941f915b1799e8 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Wed, 30 Sep 2026 18:55:57 -0500 Subject: [PATCH 4/5] Update the Sphinx config to avoid an automatic config rewrite --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 7c7bb3c..744e15d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -5,7 +5,7 @@ # --------------------- # The suffix of source filenames. -source_suffix = ".rst" +source_suffix = {".rst": "restructuredtext"} # The main toctree document. master_doc = "index" From fd8c3b3d88e9bae2707d41ac089d08488fc01321 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Wed, 30 Sep 2026 19:03:13 -0500 Subject: [PATCH 5/5] Resolve new test suite failures --- docs/ruff/assets/F401/example.py | 4 ++-- src/sqliteimport/importer.py | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/ruff/assets/F401/example.py b/docs/ruff/assets/F401/example.py index d95e1aa..fcf05ad 100644 --- a/docs/ruff/assets/F401/example.py +++ b/docs/ruff/assets/F401/example.py @@ -12,8 +12,8 @@ # to ensure that the `noqa` comment, NOT `__all__`, # is actually disabling the F401 error. __all__ = [ - "os", - "sys", "boto3", + "os", "requests", + "sys", ] diff --git a/src/sqliteimport/importer.py b/src/sqliteimport/importer.py index 90d8261..c1f0441 100644 --- a/src/sqliteimport/importer.py +++ b/src/sqliteimport/importer.py @@ -128,13 +128,12 @@ def iterdir(self) -> typing.Iterator[SqliteTraversable]: for path in self._accessor.list_directory(self._path): yield SqliteTraversable(path, self._accessor) - def joinpath(self, *descendants: str) -> SqliteTraversable: - return SqliteTraversable( - f"{self._path}/{'/'.join(descendants)}", self._accessor - ) + def joinpath(self, *descendants: str | os.PathLike[str]) -> SqliteTraversable: + path = f"{self._path}/{'/'.join(str(d) for d in descendants)}" + return SqliteTraversable(path, self._accessor) - def __truediv__(self, other: str) -> SqliteTraversable: - return self.joinpath(other) + def __truediv__(self, child: str | os.PathLike[str]) -> SqliteTraversable: + return self.joinpath(child) def is_dir(self) -> bool: return False