Commit c89ac286 authored by Brett Cannon's avatar Brett Cannon

Issue #19410: Put back in special-casing of '' for

importlib.machinery.FileFinder.

While originally moved to stop special-casing '' as PathFinder farther
up the typical call chain now uses the cwd in the instance of '', it
was deemed an unnecessary risk to breaking subclasses of FileFinder to
take the special-casing out.
parent 360bdde0
......@@ -753,9 +753,6 @@ find and load modules.
.. versionadded:: 3.3
.. versionchanged:: 3.4
The empty string is no longer special-cased to be changed into ``'.'``.
.. attribute:: path
The path the finder will search in.
......
......@@ -812,6 +812,3 @@ that may require changes to your code.
working directory will also now have an absolute path, including when using
``-m`` with the interpreter (this does not influence when the path to a file
is specified on the command-line).
* :class:`importlib.machinery.FileFinder` no longer special-cases the empty string
to be changed to ``'.'``.
......@@ -1375,7 +1375,7 @@ class FileFinder:
loaders.extend((suffix, loader) for suffix in suffixes)
self._loaders = loaders
# Base (directory) path
self.path = path
self.path = path or '.'
self._path_mtime = -1
self._path_cache = set()
self._relaxed_path_cache = set()
......
......@@ -31,6 +31,9 @@ Core and Builtins
Library
-------
- Issue #19410: Undo the special-casing removal of '' for
importlib.machinery.FileFinder.
- Issue #19424: Fix the warnings module to accept filename containing surrogate
characters.
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment