diff options
author | CaselIT <cfederico87@gmail.com> | 2021-04-18 11:41:04 +0200 |
---|---|---|
committer | CaselIT <cfederico87@gmail.com> | 2021-06-22 23:05:35 +0200 |
commit | b511670231e99c5278d58e789f9efb7855488b41 (patch) | |
tree | 231ab1213581dc6db708f478d2d54d48dcd16518 /alembic/runtime | |
parent | b1e5a23c0f53482dd06b013ce8a9453dd0e5eb5d (diff) | |
download | alembic-b511670231e99c5278d58e789f9efb7855488b41.tar.gz |
Drop compatibility with python 2.7.
Now alembic supports only python from version 3.6.
Change-Id: Iccf124c2d74af801d90a16c9003cdad318768625
Diffstat (limited to 'alembic/runtime')
-rw-r--r-- | alembic/runtime/migration.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/alembic/runtime/migration.py b/alembic/runtime/migration.py index bf48e2b..5ed2136 100644 --- a/alembic/runtime/migration.py +++ b/alembic/runtime/migration.py @@ -15,13 +15,12 @@ from sqlalchemy.engine.strategies import MockEngineStrategy from .. import ddl from .. import util from ..util import sqla_compat -from ..util.compat import callable from ..util.compat import EncodedIO log = logging.getLogger(__name__) -class _ProxyTransaction(object): +class _ProxyTransaction: def __init__(self, migration_context): self.migration_context = migration_context @@ -46,7 +45,7 @@ class _ProxyTransaction(object): self.migration_context._transaction = None -class MigrationContext(object): +class MigrationContext: """Represent the database state made available to a migration script. @@ -681,7 +680,7 @@ class MigrationContext(object): ) -class HeadMaintainer(object): +class HeadMaintainer: def __init__(self, context, heads): self.context = context self.heads = set(heads) @@ -788,7 +787,7 @@ class HeadMaintainer(object): self._update_version(from_, to_) -class MigrationInfo(object): +class MigrationInfo: """Exposes information about a migration step to a callback listener. The :class:`.MigrationInfo` object is available exclusively for the @@ -914,7 +913,7 @@ class MigrationInfo(object): return self.revision_map.get_revisions(self.destination_revision_ids) -class MigrationStep(object): +class MigrationStep: @property def name(self): return self.migration_fn.__name__ |