mirror of
https://github.com/python/cpython.git
synced 2025-10-29 09:29:26 +00:00
bpo-24744: Raises error in pkgutil.walk_packages if path is str (#1926)
bpo-24744: Raise error in pkgutil.walk_packages if path is str Previously an empty result list was accidentallly returned, since the code iterated over the string as if it were the expected list of paths, and of course found nothing.
This commit is contained in:
parent
1eb6c0074d
commit
b9c3da5c89
4 changed files with 19 additions and 0 deletions
|
|
@ -395,6 +395,10 @@ that may require changes to your code.
|
|||
Changes in the Python API
|
||||
-------------------------
|
||||
|
||||
* :meth:`pkgutil.walk_packages` now raises ValueError if *path* is a string.
|
||||
Previously an empty list was returned. (Contributed by Sanyam Khurana in
|
||||
:issue:`24744`.)
|
||||
|
||||
* A format string argument for :meth:`string.Formatter.format`
|
||||
is now :ref:`positional-only <positional-only_parameter>`.
|
||||
Passing it as a keyword argument was deprecated in Python 3.5. (Contributed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue