]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Create initial 2.0 engine implementation
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 7 Apr 2020 18:15:43 +0000 (14:15 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 16 Apr 2020 17:35:55 +0000 (13:35 -0400)
commit2f617f56f2acdce00b88f746c403cf5ed66d4d27
tree0962f2c43c1a361135ecdab933167fa0963ae58a
parentbd303b10e2bf69169f07447c7272fc71ac931f10
Create initial 2.0 engine implementation

Implemented the SQLAlchemy 2 :func:`.future.create_engine` function which
is used for forwards compatibility with SQLAlchemy 2.   This engine
features always-transactional behavior with autobegin.

Allow execution options per statement execution.  This includes
that the before_execute() and after_execute() events now accept
an additional dictionary with these options, empty if not
passed; a legacy event decorator is added for backwards compatibility
which now also emits a deprecation warning.

Add some basic tests for execution, transactions, and
the new result object.   Build out on a new testing fixture
that swaps in the future engine completely to start with.

Change-Id: I70e7338bb3f0ce22d2f702537d94bb249bd9fb0a
Fixes: #4644
49 files changed:
doc/build/changelog/migration_20.rst
doc/build/changelog/unreleased_14/4644.rst [new file with mode: 0644]
doc/build/core/future.rst
lib/sqlalchemy/cextension/utils.c
lib/sqlalchemy/dialects/mssql/base.py
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/dialects/oracle/base.py
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/engine/create.py
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/engine/events.py
lib/sqlalchemy/engine/result.py
lib/sqlalchemy/engine/util.py
lib/sqlalchemy/event/attr.py
lib/sqlalchemy/event/legacy.py
lib/sqlalchemy/future/__init__.py
lib/sqlalchemy/future/engine.py [new file with mode: 0644]
lib/sqlalchemy/future/result.py
lib/sqlalchemy/log.py
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/sql/base.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/ddl.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/functions.py
lib/sqlalchemy/sql/schema.py
lib/sqlalchemy/testing/assertsql.py
lib/sqlalchemy/testing/config.py
lib/sqlalchemy/testing/engines.py
lib/sqlalchemy/testing/fixtures.py
lib/sqlalchemy/testing/suite/test_ddl.py
lib/sqlalchemy/testing/warnings.py
lib/sqlalchemy/util/deprecations.py
test/base/test_events.py
test/base/test_tutorials.py
test/dialect/mysql/test_reflection.py
test/engine/test_deprecations.py
test/engine/test_execute.py
test/engine/test_logging.py
test/engine/test_transaction.py
test/ext/test_baked.py
test/orm/test_deprecations.py
test/orm/test_events.py
test/orm/test_transaction.py
test/requirements.py
test/sql/test_defaults.py
test/sql/test_resultset.py
test/sql/test_sequences.py