]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42403: Use @staticmethod in importlib (GH-23395)
authorVictor Stinner <vstinner@python.org>
Fri, 20 Nov 2020 13:44:02 +0000 (14:44 +0100)
committerGitHub <noreply@github.com>
Fri, 20 Nov 2020 13:44:02 +0000 (14:44 +0100)
commit3be8e220ede7764a403b74eb2051aa703dde2626
tree6e518107c32a37adf642f1ebf35a98eb1e191f30
parenta6109ef68d421712ba368ef502c4789e8de113e0
bpo-42403: Use @staticmethod in importlib (GH-23395)

Use @staticmethod on methods using @classmethod but don't use their
cls parameter on the following classes:

* BuiltinImporter
* FrozenImporter
* WindowsRegistryFinder
* PathFinder

Leave methods using @_requires_builtin or @_requires_frozen unchanged,
since this decorator requires the wrapped method to have an extra parameter
(cls or self).
Lib/importlib/_bootstrap.py
Lib/importlib/_bootstrap_external.py
Python/importlib.h
Python/importlib_external.h