-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for SQLAlchemy 2.0 #111
Comments
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Set environment variable `SQLALCHEMY_WARN_20=1` to show all SQLAlchemy 2.0 deprecation warnings when running the tests with tox. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Set environment variable `SQLALCHEMY_WARN_20=1` to show all SQLAlchemy 2.0 deprecation warnings when running the tests with tox. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Set up pytest to raise exception for `sqlalchemy.exc.RemovedIn20Warning` warnings by default. Ignore the warnings that are triggered by the test suite. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Use `text()` construct to wrap plain string SQL statements to avoid the following `RemovedIn20Warning`: Using plain strings to indicate SQL statements without using the text() construct is deprecated and will be removed in version 2.0. Ensure plain SQL statements are passed using the text() construct. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
The `declarative_base()` function has moved to `sqlalchemy.orm` in SQLAlchemy 2.0. Change the docs to use the new location. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
The `declarative_base()` function has moved to `sqlalchemy.orm` in SQLAlchemy 2.0. Change the tests to use the new location. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
The `autoload` parameter is deprecated in SQLAlchemy 1.4 and will be removed in version 2.0. The `autoload_with` parameter is already used, so just remove the deprecated `autoload` parameter. Refs #111.
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Use `Engine.begin()` to start a transaction and `Connection.execute()` over `Engine.execute()` in tests to resolve the following warnings: The Engine.execute() method is considered legacy as of the 1.x series of SQLAlchemy and will be removed in 2.0. All statement execution in SQLAlchemy 2.0 is performed by the Connection.execute() method of Connection, or in the ORM by the Session.execute() method of Session. The current statement is being autocommitted using implicit autocommit, which will be removed in SQLAlchemy 2.0. Use the .begin() method of Engine or Connection in order to use an explicit transaction for DML and DDL statements. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Use SQLAlchemy's compilation extension to build the SQL for creating and dropping the search functions and triggers. This resolves the following deprecation warning: The connection.execute() method in SQLAlchemy 2.0 will accept parameters as a single dictionary or a single sequence of dictionaries only. Parameters passed as keyword arguments, tuples or positionally oriened dictionaries and/or tuples will no longer be accepted. BREAKING CHANGE: `quote_identifier` function has been removed. BREAKING CHANGE: `SearchManager.search_function_ddl` method has been removed. Use `CreateSearchFunctionSQL(column)` instead. BREAKING CHANGE: `SearchManager.search_trigger_ddl`. Use `CreateSearchTriggerSQL(column)` instead. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Wrap the raw SQL queries passed to `Connection.execute()` with `text()` construct. This resolves the following deprecation warning: Passing a string to Connection.execute() is deprecated and will be removed in version 2.0. Use the text() construct, or the Connection.exec_driver_sql() method to invoke a driver-level SQL string. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Use SQLAlchemy's compilation extension to build the SQL for creating and dropping the search functions and triggers. This resolves the following deprecation warning: The connection.execute() method in SQLAlchemy 2.0 will accept parameters as a single dictionary or a single sequence of dictionaries only. Parameters passed as keyword arguments, tuples or positionally oriened dictionaries and/or tuples will no longer be accepted. BREAKING CHANGE: `quote_identifier` function has been removed. BREAKING CHANGE: `SearchManager.search_function_ddl` method has been removed. Use `CreateSearchFunctionSQL(column)` instead. BREAKING CHANGE: `SearchManager.search_trigger_ddl` method has been removed. Use `CreateSearchTriggerSQL(column)` instead. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Wrap the raw SQL queries passed to `Connection.execute()` with `text()` construct. This resolves the following deprecation warning: Passing a string to Connection.execute() is deprecated and will be removed in version 2.0. Use the text() construct, or the Connection.exec_driver_sql() method to invoke a driver-level SQL string. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Set up pytest to raise exception for `sqlalchemy.exc.RemovedIn20Warning` warnings by default. Ignore the warnings that are triggered by the test suite. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Use `text()` construct to wrap plain string SQL statements to avoid the following `RemovedIn20Warning`: Using plain strings to indicate SQL statements without using the text() construct is deprecated and will be removed in version 2.0. Ensure plain SQL statements are passed using the text() construct. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
The `declarative_base()` function has moved to `sqlalchemy.orm` in SQLAlchemy 2.0. Change the docs to use the new location. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
The `declarative_base()` function has moved to `sqlalchemy.orm` in SQLAlchemy 2.0. Change the tests to use the new location. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
The `autoload` parameter is deprecated in SQLAlchemy 1.4 and will be removed in version 2.0. The `autoload_with` parameter is already used, so just remove the deprecated `autoload` parameter. Refs #111.
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Use `Engine.begin()` to start a transaction and `Connection.execute()` over `Engine.execute()` in tests to resolve the following warnings: The Engine.execute() method is considered legacy as of the 1.x series of SQLAlchemy and will be removed in 2.0. All statement execution in SQLAlchemy 2.0 is performed by the Connection.execute() method of Connection, or in the ORM by the Session.execute() method of Session. The current statement is being autocommitted using implicit autocommit, which will be removed in SQLAlchemy 2.0. Use the .begin() method of Engine or Connection in order to use an explicit transaction for DML and DDL statements. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Use SQLAlchemy's compilation extension to build the SQL for creating and dropping the search functions and triggers. This resolves the following deprecation warning: The connection.execute() method in SQLAlchemy 2.0 will accept parameters as a single dictionary or a single sequence of dictionaries only. Parameters passed as keyword arguments, tuples or positionally oriened dictionaries and/or tuples will no longer be accepted. BREAKING CHANGE: `quote_identifier` function has been removed. BREAKING CHANGE: `SearchManager.search_function_ddl` method has been removed. Use `CreateSearchFunctionSQL(column)` instead. BREAKING CHANGE: `SearchManager.search_trigger_ddl` method has been removed. Use `CreateSearchTriggerSQL(column)` instead. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Wrap the raw SQL queries passed to `Connection.execute()` with `text()` construct. This resolves the following deprecation warning: Passing a string to Connection.execute() is deprecated and will be removed in version 2.0. Use the text() construct, or the Connection.exec_driver_sql() method to invoke a driver-level SQL string. Refs #111
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Pass `future=True` flag to `create_engine`, `sessionmaker` and `Session` in tests. Refs #111.
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Pass `future=True` flag to `create_engine`, `sessionmaker` and `Session` in tests. Refs #111.
jpvanhal
added a commit
that referenced
this issue
Aug 7, 2023
Test against SQLAlchemy 2.0 and update the SQLAlchemy dependency to remove the `<1.5` version restriction. Closes #111.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As an example,
sync_trigger
gives you the following error:TypeError: Additional arguments should be named _, got 'autoload'
The text was updated successfully, but these errors were encountered: