Describe the bug
The versioned_history example relies on sqlalchemy.orm.mapper which was deprecated in 1.4 and removed in 2.0.
https://docs.sqlalchemy.org/en/14/orm/mapping_api.html#sqlalchemy.orm.mapper
https://docs.sqlalchemy.org/en/20/orm/mapping_api.html#sqlalchemy.orm.mapper
With sqlalchemy 1.4 I was able to replace mapper with map_imperatively.
With sqlalchemy 2.0 the same attempted change errors out due to changes in 5ec5b0a
To reproduce
python3 -m unittest examples/versioned_history/test_versioning.py
Error
Running the example
sqlalchemy.exc.InvalidRequestError: The 'sqlalchemy.orm.mapper()' function is removed as of SQLAlchemy 2.0.
Use the 'sqlalchemy.orm.registry.map_imperatively()` method of the ``sqlalchemy.orm.registry`` class to perform classical mapping.
Running the example with attempting to change mapper with map_imperatively
File "sqlalchemy/orm/decl_api.py", line 1357, in _add_manager
assert manager.registry is None
Versions
Additional context
No response
Describe the bug
The
versioned_historyexample relies onsqlalchemy.orm.mapperwhich was deprecated in 1.4 and removed in 2.0.https://docs.sqlalchemy.org/en/14/orm/mapping_api.html#sqlalchemy.orm.mapper
https://docs.sqlalchemy.org/en/20/orm/mapping_api.html#sqlalchemy.orm.mapper
With sqlalchemy 1.4 I was able to replace
mapperwithmap_imperatively.With sqlalchemy 2.0 the same attempted change errors out due to changes in 5ec5b0a
To reproduce
Error
Running the example
Running the example with attempting to change
mapperwithmap_imperativelyVersions
Additional context
No response