This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: concurrent.futures.__getattr__ raises the wrong AttributeError message
Type: Stage:
Components: Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Gobot1234, asvetlov, graingert
Priority: normal Keywords:

Created on 2022-01-25 15:16 by graingert, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 30887 merged graingert, 2022-01-25 15:16
Messages (4)
msg411611 - (view) Author: Thomas Grainger (graingert) * Date: 2022-01-25 15:16
>>> import types
>>> types.ModuleType("concurrent.futures").missing_attribute
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'concurrent.futures' has no attribute 'missing_attribute'
>>> import concurrent.futures
>>> concurrent.futures.missing_attribute
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/graingert/miniconda3/lib/python3.9/concurrent/futures/__init__.py", line 53, in __getattr__
    raise AttributeError(f"module {__name__} has no attribute {name}")
AttributeError: module concurrent.futures has no attribute missing_attribute
msg411615 - (view) Author: Thomas Grainger (graingert) * Date: 2022-01-25 15:28
this also applies to io and _pyio
msg413759 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2022-02-23 00:25
New changeset 9b12b1b803d7b73640ab637a74a6f35f3fe9db21 by Thomas Grainger in branch 'main':
bpo-46522: fix concurrent.futures and io AttributeError messages (GH-30887)
https://github.com/python/cpython/commit/9b12b1b803d7b73640ab637a74a6f35f3fe9db21
msg416940 - (view) Author: Gobot1234 (Gobot1234) * Date: 2022-04-07 19:57
I was just looking through the git diff for this PR and found a bug in this https://github.com/python/cpython/pull/30887/files#diff-2828caacf5c85c7bd6023ea0e4a381cc5c65179a9822398534c5e9ad9ccbd90dR73. There's a missing f on the io __getattr__'s message
History
Date User Action Args
2022-04-11 14:59:55adminsetgithub: 90680
2022-04-07 19:57:29Gobot1234setnosy: + Gobot1234
messages: + msg416940
2022-03-13 23:59:35asvetlovsetstage: resolved ->
2022-02-23 00:25:32asvetlovsetstatus: open -> closed
resolution: fixed
stage: resolved
2022-02-23 00:25:23asvetlovsetversions: - Python 3.9, Python 3.10
2022-02-23 00:25:04asvetlovsetnosy: + asvetlov
messages: + msg413759
2022-01-25 15:28:43graingertsetmessages: + msg411615
2022-01-25 15:16:23graingertcreate