question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New warnings with SQLAlchemy 1.4

See original GitHub issue

When upgrading from SQLAlchemy 1.3.24 to 1.4.31 I see some new warnings. They also appear when with SQLAlchemy 1.4.1. I noticed these when running tests in my project and reproduced them by checking out master from this repo and running py.test tests/test_validity_strategy.py.

tests/test_validity_strategy.py::TestJoinTableInheritanceWithValidityVersioning::test_all_tables_contain_transaction_id_column
  sqlalchemy-continuum/sqlalchemy_continuum/table_builder.py:25: SADeprecationWarning: The Column.copy() method is deprecated and will be removed in a future release. (deprecated since: 1.4)
    column_copy = column.copy()
...
tests/test_validity_strategy.py::TestValidityStrategy::test_updated_end_transaction_id_of_previous_version
  sqlalchemy-continuum/sqlalchemy_continuum/unit_of_work.py:263: SAWarning: implicitly coercing SELECT object to scalar subquery; please use the .scalar_subquery() method to produce a scalar subquery.
    ) == subquery,

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
TomGoBravocommented, Feb 8, 2022

https://github.com/kvesteri/sqlalchemy-continuum/pull/269 is an attempt at fixing the .scalar issue.

1reaction
markstewardcommented, Jan 29, 2022

Yeah, as noted in https://github.com/kvesteri/sqlalchemy-continuum/pull/260 we’ve gone from ~650 warnings to ~5000 in 1.4. Any help fixing these gladly accepted! A lot of them are preparation for 2.0, such as the implicit .scalar issue.

On .copy, https://github.com/sqlalchemy/sqlalchemy/blob/main/doc/build/changelog/changelog_14.rst has this to say:

    Deprecated all schema-level ``.copy()`` methods and renamed to
    ``_copy()``.  These are not standard Python "copy()" methods as they
    typically rely upon being instantiated within particular contexts
    which are passed to the method as optional keyword arguments.   The
    :meth:`_schema.Table.tometadata` method is the public API that provides
    copying for :class:`_schema.Table` objects.
Read more comments on GitHub >

github_iconTop Results From Across the Web

What's New in SQLAlchemy 1.4?
The sqlalchemy.ext.declarative.declarative_base name is still present, emitting a 2.0 deprecation warning when 2.0 deprecations mode is enabled.
Read more >
SQLAlchemy 1.4 warnings on overlapping relationships with a ...
I have a model in SQLAlchemy which defines a many-to-many relationship using an association table ( automap is being used here because I'm ......
Read more >
Fix deprecation warnings reported by sqlalchemy 1.4 - Jira
SQLAlchemy 1.4 issues warnings for code that is going to break in 2.0. Examine those warnings an implement fixes.
Read more >
snowflake-sqlalchemy - PyPI
Release Notes · Comments not created when creating new table #118 · SQLAlchemy Column Metadata Cache not working · Timestamp DDL renders wrong...
Read more >
Changes — Flask-SQLAlchemy Documentation (2.x)
Update to support SQLAlchemy 1.4. SQLAlchemy URL objects are immutable. Some internal methods have changed to return a new URL instead of None...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found