From: Federico Caselli Date: Wed, 11 Mar 2020 12:49:57 +0000 (+0100) Subject: Add missing changelog X-Git-Tag: rel_1_4_0b1~470^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc1e9fb2893554ad1ef908109a9508bc1aa28a38;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Add missing changelog Add a changelog plus migration notes for the behavior that's been improved by #4656, #4689 Original patch I2e291eba4297867fc0ddb5d875b9f7af34751d01 Change-Id: Ie956f55ba79b2a4f7a0c972a47c767de2ffd0081 --- diff --git a/doc/build/changelog/migration_14.rst b/doc/build/changelog/migration_14.rst index 35b2a7f91f..1172141131 100644 --- a/doc/build/changelog/migration_14.rst +++ b/doc/build/changelog/migration_14.rst @@ -48,6 +48,27 @@ Error conditions which fall under this category include: * To be continued... +.. _change_4656: + +Repaired internal importing conventions such that code linters may work correctly +--------------------------------------------------------------------------------- + +SQLAlchemy has for a long time used a parameter-injecting decorator to help resolve +mutually-dependent module imports, like this:: + + @util.dependency_for("sqlalchemy.sql.dml") + def insert(self, dml, *args, **kw): + +Where the above function would be rewritten to no longer have the ``dml`` parameter +on the outside. This would confuse code-linting tools into seeing a missing parameter +to functions. A new approach has been implemented internally such that the function's +signature is no longer modified and the module object is procured inside the function +instead. + + +:ticket:`4656` + +:ticket:`4689` API Changes - Core ================== diff --git a/doc/build/changelog/unreleased_14/4656.rst b/doc/build/changelog/unreleased_14/4656.rst new file mode 100644 index 0000000000..116cdb7838 --- /dev/null +++ b/doc/build/changelog/unreleased_14/4656.rst @@ -0,0 +1,15 @@ +.. change:: + :tags: bug, general + :tickets: 4656, 4689 + + Refactored the internal conventions used to cross-import modules that have + mutual dependencies between them, such that the inspected arguments of + functions and methods are no longer modified. This allows tools like + pylint, Pycharm, other code linters, as well as hypothetical pep-484 + implementations added in the future to function correctly as they no longer + see missing arguments to function calls. The new approach is also + simpler and more performant. + + .. seealso:: + + :ref:`change_4656` \ No newline at end of file