diff options
author | Brandt Bucher <brandtbucher@gmail.com> | 2019-04-07 08:00:41 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2019-04-07 08:00:41 (GMT) |
commit | 9d7b2c0909b78800d1376fd696f73824ea680463 (patch) | |
tree | 6e5f5f855d527c6429ea3c3cb20b70818489033f /Doc/whatsnew/3.8.rst | |
parent | 2dad96013ca24abdc5ba5a369ea42d70ff02487a (diff) | |
download | cpython-9d7b2c0909b78800d1376fd696f73824ea680463.zip cpython-9d7b2c0909b78800d1376fd696f73824ea680463.tar.gz cpython-9d7b2c0909b78800d1376fd696f73824ea680463.tar.bz2 |
bpo-35936: Updates to modulefinder (GH-11787)
* Properly handle SyntaxErrors in Python source files.
SyntaxErrors in the target module will rise normally, while SyntaxErrors in dependencies will be added to badmodules. This includes a new regression test.
* Fix name collision bug.
This fixes an issue where a "fromlist" import with the same name as a previously failed import would be incorrectly added to badmodules. This includes a new regression test.
* Replace mutable default values.
Bound empty lists have been replaced with the "if param is None" idiom.
* Replace deprecated imp usage.
Constants imported from imp have been moved to private module-level constants, and ModuleFinder.find_module has been refactored to use importlib. Other than an improvement on how frozen builtin imports are reported (as the frozen imports they are, rather than the stdlib modules they *may* have originated from), these changes maintain complete compatibility with past versions... including odd behavior for returning relative (below current directory, but not a C extension) vs. absolute (above current directory, or a C extension) paths.
Patch by Brandt Bucher.
Diffstat (limited to 'Doc/whatsnew/3.8.rst')
0 files changed, 0 insertions, 0 deletions