diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2018-10-02 09:10:24 -0400 |
---|---|---|
committer | Gerrit Code Review <gerrit@ci.zzzcomputing.com> | 2018-10-02 09:10:24 -0400 |
commit | 2b9ba4049e94eaa4e6299d1d1c1d37fb236af99b (patch) | |
tree | 63f17fc8d9e8e8e25daee2e7532406e8a2f143bd | |
parent | acebd2df114c9d4f0ac226fbc2e7139fb9218251 (diff) | |
parent | cacc3c2057ab14faaf6c5b679bb2dbb6f8b98f8e (diff) | |
download | sqlalchemy-2b9ba4049e94eaa4e6299d1d1c1d37fb236af99b.tar.gz |
Merge "Fix dependency_for final argument"
-rw-r--r-- | doc/build/changelog/unreleased_12/pr473.rst | 9 | ||||
-rw-r--r-- | lib/sqlalchemy/util/langhelpers.py | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/doc/build/changelog/unreleased_12/pr473.rst b/doc/build/changelog/unreleased_12/pr473.rst new file mode 100644 index 000000000..6ee55164f --- /dev/null +++ b/doc/build/changelog/unreleased_12/pr473.rst @@ -0,0 +1,9 @@ +.. change:: + :tags: bug, misc + + Fixed issue where part of the utility language helper internals was passing + the wrong kind of argument to the Python ``__import__`` builtin as the list + of modules to be imported. The issue produced no symptoms within the core + library but could cause issues with external applications that redefine the + ``__import__`` builtin or otherwise instrument it. Pull request courtesy Joe + Urciuoli. diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py index 81bfee30a..c2ebf7637 100644 --- a/lib/sqlalchemy/util/langhelpers.py +++ b/lib/sqlalchemy/util/langhelpers.py @@ -859,7 +859,7 @@ def dependency_for(modulename): # unfortunately importlib doesn't work that great either tokens = modulename.split(".") mod = compat.import_( - ".".join(tokens[0:-1]), globals(), locals(), tokens[-1]) + ".".join(tokens[0:-1]), globals(), locals(), [tokens[-1]]) mod = getattr(mod, tokens[-1]) setattr(mod, obj.__name__, obj) return obj |