'type object 'Base' has no attribute '_decl_class_registry'

I am upgrading a library to a recent version of SQLAlchemy and I am getting this error

type object 'Base' has no attribute '_decl_class_registry'

On line

Base = declarative_base(metadata=metadata)

Base._decl_class_registry

How can I solve this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source