]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Add missing changelog
authorFederico Caselli <cfederico87@gmail.com>
Wed, 11 Mar 2020 12:49:57 +0000 (13:49 +0100)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 11 Mar 2020 17:48:03 +0000 (13:48 -0400)
Add a changelog plus migration notes for the behavior
that's been improved by #4656, #4689

Original patch I2e291eba4297867fc0ddb5d875b9f7af34751d01

Change-Id: Ie956f55ba79b2a4f7a0c972a47c767de2ffd0081

doc/build/changelog/migration_14.rst
doc/build/changelog/unreleased_14/4656.rst [new file with mode: 0644]

index 35b2a7f91fde655ee2139265dcb76ef7590b7ff3..1172141131abe2ce4ea4212d7e846629d4bea7ca 100644 (file)
@@ -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 (file)
index 0000000..116cdb7
--- /dev/null
@@ -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