From: jason3gb Date: Tue, 25 May 2021 19:40:48 +0000 (-0400) Subject: Removed automap deprecation warning X-Git-Tag: rel_1_4_16~9^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4460d21e1331bdc8593c6d09a238885badd021f9;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Removed automap deprecation warning Fixed a deprecation warning that was emitted when using :func:`_automap.automap_base` without passing an existing ``Base``. Fixes: #6529 ### Description Fixed the automap's declarative import from sqlalchemy.orm instead from the deprecated ext.declarative package ### Checklist This pull request is: - [ ] A documentation / typographical error fix - Good to go, no issue or tests are needed - [x] A short code fix - please include the issue number, and create an issue if none exists, which must include a complete example of the issue. one line code fixes without an issue and demonstration will not be accepted. - Please include: `Fixes: #` in the commit message - please include tests. one line code fixes without tests will not be accepted. - [ ] A new feature implementation - please include the issue number, and create an issue if none exists, which must include a complete example of how the feature would look. - Please include: `Fixes: #` in the commit message - please include tests. **Have a nice day!** Closes: #6533 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/6533 Pull-request-sha: 46d40005eae51fd7423da66f6ad4072f65744c1c Change-Id: I432df70d4221873ca229076d5d3ac20b2870c13b --- diff --git a/doc/build/changelog/unreleased_14/6529.rst b/doc/build/changelog/unreleased_14/6529.rst new file mode 100644 index 0000000000..df650cb435 --- /dev/null +++ b/doc/build/changelog/unreleased_14/6529.rst @@ -0,0 +1,8 @@ +.. change:: + :tags: bug, ext + :tickets: 6529 + + Fixed a deprecation warning that was emitted when using + :func:`_automap.automap_base` without passing an existing + ``Base``. + diff --git a/lib/sqlalchemy/ext/automap.py b/lib/sqlalchemy/ext/automap.py index 3d2e3eb293..e20435911b 100644 --- a/lib/sqlalchemy/ext/automap.py +++ b/lib/sqlalchemy/ext/automap.py @@ -560,9 +560,9 @@ be applied as:: """ # noqa -from .declarative import declarative_base as _declarative_base from .. import util from ..orm import backref +from ..orm import declarative_base as _declarative_base from ..orm import exc as orm_exc from ..orm import interfaces from ..orm import relationship