kvesteri / sqlalchemy-continuum

Versioning extension for SQLAlchemy.
BSD 3-Clause "New" or "Revised" License
568 stars 128 forks source link

sqlalchemy.exc.SADeprecationWarning on from sqlalchemy_continuum import make_versioned with sqlalchemy > 2 #345

Closed jhannink closed 8 months ago

jhannink commented 8 months ago

I am using sqlalchemy-continuum == 1.4.0 and sqlalchemy == 2.0.21 and trying to do the following:

from sqlalchemy_continuum import make_versioned

which results in

E   sqlalchemy.exc.SADeprecationWarning: The `sqlalchemy.orm.mapper()` symbol is deprecated and will be removed in a future release. For the mapper-wide event target, use the 'sqlalchemy.orm.Mapper' class.

The reason/fix for this probably described here: https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#the-original-mapper-function-now-a-core-element-of-declarative-renamed

Basically my question is

marksteward commented 8 months ago

Yes, it's just a deprecation. We'll update before it's removed.

jhannink commented 8 months ago

Ah, now I see it too. Was still running with warnings as errors to not miss them during updating to sqlalchemy > 2 😂 Thx