Skip to content

Commit 26016a5

Browse files
authored
[chore]: Fix Alembic path_separator warning (#3353)
Fixes this deprecation warning: ``` src/tests/_internal/server/test_migrations.py::test_sqlite_migrations src/tests/_internal/server/test_migrations.py::test_sqlite_migrations src/tests/_internal/server/test_migrations.py::test_sqlite_migrations src/tests/_internal/server/test_migrations.py::test_postgres_migrations src/tests/_internal/server/test_migrations.py::test_postgres_migrations src/tests/_internal/server/test_migrations.py::test_postgres_migrations /home/runner/work/dstack/dstack/.venv/lib/python3.10/site-packages/alembic/config.py:598: DeprecationWarning: No path_separator found in configuration; falling back to legacy splitting on spaces, commas, and colons for prepend_sys_path. Consider adding path_separator=os to Alembic config. ``` Context: https://alembic.sqlalchemy.org/en/latest/changelog.html#change-1.16.0-usecase Does not affect Alembic behavior for dstack.
1 parent a5d3202 commit 26016a5

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/dstack/_internal/server/alembic.ini

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,14 @@ prepend_sys_path = .
3838
# version location specification; This defaults
3939
# to alembic/versions. When using multiple version
4040
# directories, initial revisions must be specified with --version-path.
41-
# The path separator used here should be the separator specified by "version_path_separator" below.
41+
# The path separator used here should be the separator specified by "path_separator" below.
4242
# version_locations = %(here)s/bar:%(here)s/bat:alembic/versions
4343

44-
# version path separator; As mentioned above, this is the character used to split
45-
# version_locations. The default within new alembic.ini files is "os", which uses os.pathsep.
46-
# If this key is omitted entirely, it falls back to the legacy behavior of splitting on spaces and/or commas.
47-
# Valid values for version_path_separator are:
44+
# path_separator; This indicates what character is used to split lists of file
45+
# paths, including version_locations and prepend_sys_path.
4846
#
49-
# version_path_separator = :
50-
# version_path_separator = ;
51-
# version_path_separator = space
52-
version_path_separator = os # Use os.pathsep. Default configuration used for new projects.
47+
# Use os.pathsep. Default configuration used for new projects.
48+
path_separator = os
5349

5450
# set to 'true' to search source files recursively
5551
# in each "version_locations" directory

0 commit comments

Comments
 (0)