mirror of
https://github.com/python/cpython.git
synced 2025-11-28 22:18:54 +00:00
Bug #1446043: correctly raise a LookupError if an encoding name given
to encodings.search_function() contains a dot.
This commit is contained in:
parent
4ddfcd3b60
commit
a92979a1db
2 changed files with 4 additions and 1 deletions
|
|
@ -90,7 +90,7 @@ def search_function(encoding):
|
||||||
else:
|
else:
|
||||||
modnames = [norm_encoding]
|
modnames = [norm_encoding]
|
||||||
for modname in modnames:
|
for modname in modnames:
|
||||||
if not modname:
|
if not modname or '.' in modname:
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
mod = __import__('encodings.' + modname,
|
mod = __import__('encodings.' + modname,
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,9 @@ Core and builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Bug #1446043: correctly raise a LookupError if an encoding name given
|
||||||
|
to encodings.search_function() contains a dot.
|
||||||
|
|
||||||
- Bug #1560617: in pyclbr, return full module name not only for classes,
|
- Bug #1560617: in pyclbr, return full module name not only for classes,
|
||||||
but also for functions.
|
but also for functions.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue