]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
use pathlib for file operations across the board
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 19 May 2025 17:06:56 +0000 (13:06 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 20 May 2025 13:49:56 +0000 (09:49 -0400)
commit1638df2e0168951eb550ea172ad6f6be2e234005
treeeae51ff1271aa1456b4fa2ec2701a121616204c3
parentd6f0c2bf741a717073b0695d2165b2aa53aa5757
use pathlib for file operations across the board

The command, config and script modules now rely on ``pathlib.Path`` for
internal path manipulations, instead of ``os.path()`` operations.   Public
API functions that accept string directories and filenames continue to do
so but also accept ``os.PathLike`` objects.  Public API functions and
accessors that return paths as strings continue to do so.   Private API
functions and accessors, i.e. all those that are prefixed with an
underscore, may now return a Path object rather than a string to indicate
file paths.

Change-Id: I7c79cdecd7e866c7086422079aa92077816acec3
16 files changed:
.github/workflows/run-on-pr.yaml
.github/workflows/run-test.yaml
alembic/command.py
alembic/config.py
alembic/operations/ops.py
alembic/script/base.py
alembic/script/write_hooks.py
alembic/util/__init__.py
alembic/util/compat.py
alembic/util/pyfiles.py
docs/build/unreleased/pathlib.rst [new file with mode: 0644]
tests/test_command.py
tests/test_post_write.py
tests/test_script_consumption.py
tests/test_script_production.py
tox.ini