alembic 1.16.3__py3-none-any.whl → 1.16.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- alembic/__init__.py +1 -1
- alembic/config.py +16 -1
- alembic/script/base.py +2 -4
- alembic/testing/__init__.py +1 -0
- {alembic-1.16.3.dist-info → alembic-1.16.4.dist-info}/METADATA +1 -1
- {alembic-1.16.3.dist-info → alembic-1.16.4.dist-info}/RECORD +10 -10
- {alembic-1.16.3.dist-info → alembic-1.16.4.dist-info}/WHEEL +0 -0
- {alembic-1.16.3.dist-info → alembic-1.16.4.dist-info}/entry_points.txt +0 -0
- {alembic-1.16.3.dist-info → alembic-1.16.4.dist-info}/licenses/LICENSE +0 -0
- {alembic-1.16.3.dist-info → alembic-1.16.4.dist-info}/top_level.txt +0 -0
alembic/__init__.py
CHANGED
alembic/config.py
CHANGED
@@ -455,6 +455,19 @@ class Config:
|
|
455
455
|
else:
|
456
456
|
return self._get_toml_config_value(name, default=default)
|
457
457
|
|
458
|
+
def get_alembic_boolean_option(self, name: str) -> bool:
|
459
|
+
if self.file_config.has_option(self.config_ini_section, name):
|
460
|
+
return (
|
461
|
+
self.file_config.get(self.config_ini_section, name) == "true"
|
462
|
+
)
|
463
|
+
else:
|
464
|
+
value = self.toml_alembic_config.get(name, False)
|
465
|
+
if not isinstance(value, bool):
|
466
|
+
raise util.CommandError(
|
467
|
+
f"boolean value expected for TOML parameter {name!r}"
|
468
|
+
)
|
469
|
+
return value
|
470
|
+
|
458
471
|
def _get_toml_config_value(
|
459
472
|
self, name: str, default: Optional[Any] = None
|
460
473
|
) -> Union[None, str, list[str], dict[str, str], list[dict[str, str]]]:
|
@@ -483,7 +496,9 @@ class Config:
|
|
483
496
|
{k: v % (self.toml_args) for k, v in value.items()},
|
484
497
|
)
|
485
498
|
else:
|
486
|
-
raise util.CommandError(
|
499
|
+
raise util.CommandError(
|
500
|
+
f"unsupported TOML value type for key: {name!r}"
|
501
|
+
)
|
487
502
|
return value
|
488
503
|
|
489
504
|
@util.memoized_property
|
alembic/script/base.py
CHANGED
@@ -186,16 +186,14 @@ class ScriptDirectory:
|
|
186
186
|
if prepend_sys_path:
|
187
187
|
sys.path[:0] = prepend_sys_path
|
188
188
|
|
189
|
-
rvl = (
|
190
|
-
config.get_alembic_option("recursive_version_locations") == "true"
|
191
|
-
)
|
189
|
+
rvl = config.get_alembic_boolean_option("recursive_version_locations")
|
192
190
|
return ScriptDirectory(
|
193
191
|
util.coerce_resource_to_filename(script_location),
|
194
192
|
file_template=config.get_alembic_option(
|
195
193
|
"file_template", _default_file_template
|
196
194
|
),
|
197
195
|
truncate_slug_length=truncate_slug_length,
|
198
|
-
sourceless=config.
|
196
|
+
sourceless=config.get_alembic_boolean_option("sourceless"),
|
199
197
|
output_encoding=config.get_alembic_option(
|
200
198
|
"output_encoding", "utf-8"
|
201
199
|
),
|
alembic/testing/__init__.py
CHANGED
@@ -9,6 +9,7 @@ from sqlalchemy.testing import uses_deprecated
|
|
9
9
|
from sqlalchemy.testing.config import combinations
|
10
10
|
from sqlalchemy.testing.config import fixture
|
11
11
|
from sqlalchemy.testing.config import requirements as requires
|
12
|
+
from sqlalchemy.testing.config import Variation
|
12
13
|
from sqlalchemy.testing.config import variation
|
13
14
|
|
14
15
|
from .assertions import assert_raises
|
@@ -1,7 +1,7 @@
|
|
1
|
-
alembic/__init__.py,sha256=
|
1
|
+
alembic/__init__.py,sha256=LBJqQA9P3cs5iDeqKVCK3DsoFQfdhd1cvtctowCUd0g,63
|
2
2
|
alembic/__main__.py,sha256=373m7-TBh72JqrSMYviGrxCHZo-cnweM8AGF8A22PmY,78
|
3
3
|
alembic/command.py,sha256=pZPQUGSxCjFu7qy0HMe02HJmByM0LOqoiK2AXKfRO3A,24855
|
4
|
-
alembic/config.py,sha256=
|
4
|
+
alembic/config.py,sha256=SbOhoGuXlh_vVpK3SD8LFUG_BNH5HDLv6Q9949HCiXA,34124
|
5
5
|
alembic/context.py,sha256=hK1AJOQXJ29Bhn276GYcosxeG7pC5aZRT5E8c4bMJ4Q,195
|
6
6
|
alembic/context.pyi,sha256=fdeFNTRc0bUgi7n2eZWVFh6NG-TzIv_0gAcapbfHnKY,31773
|
7
7
|
alembic/environment.py,sha256=MM5lPayGT04H3aeng1H7GQ8HEAs3VGX5yy6mDLCPLT4,43
|
@@ -33,7 +33,7 @@ alembic/runtime/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
33
|
alembic/runtime/environment.py,sha256=L6bDW1dvw8L4zwxlTG8KnT0xcCgLXxUfdRpzqlJoFjo,41479
|
34
34
|
alembic/runtime/migration.py,sha256=lu9_z_qyWmNzSM52_FgdXP_G52PTmTTeOeMBQAkQTFg,49997
|
35
35
|
alembic/script/__init__.py,sha256=lSj06O391Iy5avWAiq8SPs6N8RBgxkSPjP8wpXcNDGg,100
|
36
|
-
alembic/script/base.py,sha256=
|
36
|
+
alembic/script/base.py,sha256=4jINClsNNwQIvnf4Kwp9JPAMrANLXdLItylXmcMqAkI,36896
|
37
37
|
alembic/script/revision.py,sha256=BQcJoMCIXtSJRLCvdasgLOtCx9O7A8wsSym1FsqLW4s,62307
|
38
38
|
alembic/script/write_hooks.py,sha256=uQWAtguSCrxU_k9d87NX19y6EzyjJRRQ5HS9cyPnK9o,5092
|
39
39
|
alembic/templates/async/README,sha256=ISVtAOvqvKk_5ThM5ioJE-lMkvf9IbknFUFVU_vPma4,58
|
@@ -58,7 +58,7 @@ alembic/templates/pyproject_async/alembic.ini.mako,sha256=bQnEoydnLOUgg9vNbTOys4
|
|
58
58
|
alembic/templates/pyproject_async/env.py,sha256=zbOCf3Y7w2lg92hxSwmG1MM_7y56i_oRH4AKp0pQBYo,2389
|
59
59
|
alembic/templates/pyproject_async/pyproject.toml.mako,sha256=Gf16ZR9OMG9zDlFO5PVQlfiL1DTKwSA--sTNzK7Lba0,2852
|
60
60
|
alembic/templates/pyproject_async/script.py.mako,sha256=04kgeBtNMa4cCnG8CfQcKt6P6rnloIfj8wy0u_DBydM,704
|
61
|
-
alembic/testing/__init__.py,sha256=
|
61
|
+
alembic/testing/__init__.py,sha256=PTMhi_2PZ1T_3atQS2CIr0V4YRZzx_doKI-DxKdQS44,1297
|
62
62
|
alembic/testing/assertions.py,sha256=qcqf3tRAUe-A12NzuK_yxlksuX9OZKRC5E8pKIdBnPg,5302
|
63
63
|
alembic/testing/env.py,sha256=pka7fjwOC8hYL6X0XE4oPkJpy_1WX01bL7iP7gpO_4I,11551
|
64
64
|
alembic/testing/fixtures.py,sha256=fOzsRF8SW6CWpAH0sZpUHcgsJjun9EHnp4k2S3Lq5eU,9920
|
@@ -85,9 +85,9 @@ alembic/util/langhelpers.py,sha256=LpOcovnhMnP45kTt8zNJ4BHpyQrlF40OL6yDXjqKtsE,1
|
|
85
85
|
alembic/util/messaging.py,sha256=3bEBoDy4EAXETXAvArlYjeMITXDTgPTu6ZoE3ytnzSw,3294
|
86
86
|
alembic/util/pyfiles.py,sha256=kOBjZEytRkBKsQl0LAj2sbKJMQazjwQ_5UeMKSIvVFo,4730
|
87
87
|
alembic/util/sqla_compat.py,sha256=9OYPTf-GCultAIuv1PoiaqYXAApZQxUOqjrOaeJDAik,14790
|
88
|
-
alembic-1.16.
|
89
|
-
alembic-1.16.
|
90
|
-
alembic-1.16.
|
91
|
-
alembic-1.16.
|
92
|
-
alembic-1.16.
|
93
|
-
alembic-1.16.
|
88
|
+
alembic-1.16.4.dist-info/licenses/LICENSE,sha256=NeqcNBmyYfrxvkSMT0fZJVKBv2s2tf_qVQUiJ9S6VN4,1059
|
89
|
+
alembic-1.16.4.dist-info/METADATA,sha256=FOov3ImluFXi-Y-Zod8XhsXQ9xlB-lbP1V6WKMjhJ6c,7265
|
90
|
+
alembic-1.16.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
91
|
+
alembic-1.16.4.dist-info/entry_points.txt,sha256=aykM30soxwGN0pB7etLc1q0cHJbL9dy46RnK9VX4LLw,48
|
92
|
+
alembic-1.16.4.dist-info/top_level.txt,sha256=FwKWd5VsPFC8iQjpu1u9Cn-JnK3-V1RhUCmWqz1cl-s,8
|
93
|
+
alembic-1.16.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|