mirror of https://github.com/python/cpython
bpo-46522: fix concurrent.futures and io AttributeError messages (GH-30887)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
This commit is contained in:
parent
1f455361ec
commit
9b12b1b803
|
@ -312,7 +312,7 @@ def __getattr__(name):
|
|||
global OpenWrapper
|
||||
OpenWrapper = open
|
||||
return OpenWrapper
|
||||
raise AttributeError(name)
|
||||
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
||||
|
||||
|
||||
# In normal operation, both `UnsupportedOperation`s should be bound to the
|
||||
|
|
|
@ -50,4 +50,4 @@ def __getattr__(name):
|
|||
ThreadPoolExecutor = te
|
||||
return te
|
||||
|
||||
raise AttributeError(f"module {__name__} has no attribute {name}")
|
||||
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
||||
|
|
|
@ -70,7 +70,7 @@ def __getattr__(name):
|
|||
global OpenWrapper
|
||||
OpenWrapper = open
|
||||
return OpenWrapper
|
||||
raise AttributeError(name)
|
||||
raise AttributeError("module {__name__!r} has no attribute {name!r}")
|
||||
|
||||
|
||||
# Pretend this exception was created here.
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Make various module ``__getattr__`` AttributeErrors more closely match a typical AttributeError
|
Loading…
Reference in New Issue