Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

concurrent.futures.__getattr__ raises the wrong AttributeError message #90680

Closed
graingert mannequin opened this issue Jan 25, 2022 · 4 comments
Closed

concurrent.futures.__getattr__ raises the wrong AttributeError message #90680

graingert mannequin opened this issue Jan 25, 2022 · 4 comments
Labels
3.11 only security fixes

Comments

@graingert
Copy link
Mannequin

graingert mannequin commented Jan 25, 2022

BPO 46522
Nosy @asvetlov, @graingert, @Gobot1234
PRs
  • bpo-46522: fix concurrent.futures and io AttributeError messages #30887
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2022-02-23.00:25:32.643>
    created_at = <Date 2022-01-25.15:16:23.628>
    labels = ['3.11']
    title = 'concurrent.futures.__getattr__ raises the wrong AttributeError message'
    updated_at = <Date 2022-04-07.19:57:29.561>
    user = 'https://github.com/graingert'

    bugs.python.org fields:

    activity = <Date 2022-04-07.19:57:29.561>
    actor = 'Gobot1234'
    assignee = 'none'
    closed = True
    closed_date = <Date 2022-02-23.00:25:32.643>
    closer = 'asvetlov'
    components = []
    creation = <Date 2022-01-25.15:16:23.628>
    creator = 'graingert'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46522
    keywords = []
    message_count = 4.0
    messages = ['411611', '411615', '413759', '416940']
    nosy_count = 3.0
    nosy_names = ['asvetlov', 'graingert', 'Gobot1234']
    pr_nums = ['30887']
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue46522'
    versions = ['Python 3.11']

    @graingert
    Copy link
    Mannequin Author

    graingert mannequin commented Jan 25, 2022

    >>> 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

    @graingert graingert mannequin added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes labels Jan 25, 2022
    @graingert
    Copy link
    Mannequin Author

    graingert mannequin commented Jan 25, 2022

    this also applies to io and _pyio

    @asvetlov
    Copy link
    Contributor

    New changeset 9b12b1b by Thomas Grainger in branch 'main':
    bpo-46522: fix concurrent.futures and io AttributeError messages (GH-30887)
    9b12b1b

    @asvetlov asvetlov removed 3.9 only security fixes 3.10 only security fixes labels Feb 23, 2022
    @Gobot1234
    Copy link
    Mannequin

    Gobot1234 mannequin commented Apr 7, 2022

    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

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant