Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-137282: Fix tab completion and dir() on concurrent.futures#137214

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ZeroIntensity merged 4 commits intopython:mainfromhenryiii:patch-2
Jul 31, 2025

Conversation

@henryiii
Copy link
Contributor

@henryiiihenryiii commentedJul 29, 2025
edited by bedevere-appbot
Loading

I just noticed that in 3.14rc1, tab completion is broken onconcurrent.futures. Tryingdir, I got:

>>> import concurrent.futures>>> dir(concurrent.futures)Traceback (most recent call last):  File "<python-input-2>", line 1, in <module>    dir(concurrent.futures)    ~~~^^^^^^^^^^^^^^^^^^^^  File "/Users/henryschreiner/.local/share/uv/python/cpython-3.14.0rc1+freethreaded-macos-x86_64-none/lib/python3.14t/concurrent/futures/__init__.py", line 47, in __dir__    return __all__ + ('__author__', '__doc__')           ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~TypeError: can only concatenate list (not "tuple") to list

There's a typo in the__dir__ function; it is trying to concatenate a list and a tuple. I could do[*__all__ , '__author__', '__doc__'] instead if that's preferred.

I didn't make an issue, but I can if that's preferred. Needs backport to 3.14. Also didn't add a test, but a test that checksdir on all modules would be useful. Static typing would have caught this.

Bug introduced in#136381.

@serhiy-storchaka
Copy link
Member

Lib/test/test___all__.py may be a good place for thedir() tests.

henryiii, ZeroIntensity, and aisk reacted with thumbs up emoji

@ZeroIntensity
Copy link
Member

I didn't make an issue, but I can if that's preferred.

I think it'd be a good idea to make an issue, as this should probably be a release blocker.

@ZeroIntensityZeroIntensity added the needs backport to 3.14bugs and security fixes labelJul 30, 2025
@henryiii
Copy link
ContributorAuthor

Okay, I will when not on an airplane. :)

@henryiiihenryiii changed the titlefix: dir(concurrent.futures) and tab completion brokengh-137282: dir(concurrent.futures) and tab completion brokenJul 31, 2025
Copy link
Member

@ZeroIntensityZeroIntensity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Please add a news entry and simple test.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii
Copy link
ContributorAuthor

Yes, I'm working on that. :)

ZeroIntensity reacted with heart emoji

@AA-TurnerAA-Turner changed the titlegh-137282: dir(concurrent.futures) and tab completion brokengh-137282:dir(concurrent.futures) and tab completion brokenJul 31, 2025
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii
Copy link
ContributorAuthor

I've started by adding a small change to the all test that fails before and works after this patch. I could split it out into a separate test or even separate file if that's better.

Copy link
Member

@ZeroIntensityZeroIntensity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think that works fine as a test, we don't need anything very special.

LGTM, with a few minor comments regarding formatting.

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
@serhiy-storchakaserhiy-storchaka changed the titlegh-137282:dir(concurrent.futures) and tab completion brokengh-137282: Fix tab completion and dir() on concurrent.futuresJul 31, 2025
Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM. 👍

@ZeroIntensityZeroIntensityenabled auto-merge (squash)July 31, 2025 15:28
@ZeroIntensityZeroIntensity merged commit2a87af0 intopython:mainJul 31, 2025
73 of 75 checks passed
@miss-islington-app
Copy link

Thanks@henryiii for the PR, and@ZeroIntensity for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJul 31, 2025
…ncurrent.futures` (pythonGH-137214)(cherry picked from commit2a87af0)Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@bedevere-app
Copy link

GH-137284 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelJul 31, 2025
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotAMD64 FreeBSD Refleaks 3.x (tier-3) has failed when building commit2a87af0.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1613/builds/1759) and take a look at the build logs.
  4. Check if the failure is related to this commit (2a87af0) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1613/builds/1759

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/buildbot/buildarea/3.x.ware-freebsd.refleak/build/Lib/test/support/__init__.py", line838, ingc_collect    gc.collect()ResourceWarning:unclosed <socket.socket fd=9, family=2, type=1, proto=6, laddr=('127.0.0.1', 18243), raddr=('127.0.0.1', 18244)>Task was destroyed but it is pending!task:<Task pending name='Task-99' coro=<BaseSelectorEventLoop._accept_connection2() done, defined at /buildbot/buildarea/3.x.ware-freebsd.refleak/build/Lib/asyncio/selector_events.py:217> wait_for=<Future pending cb=[Task.task_wakeup()]>>Warning -- Unraisable exceptionException ignored while calling deallocator <function _SelectorTransport.__del__ at 0x843173410>:Traceback (most recent call last):  File"/buildbot/buildarea/3.x.ware-freebsd.refleak/build/Lib/asyncio/selector_events.py", line873, in__del__    _warn(f"unclosed transport{self!r}",ResourceWarning,source=self)ResourceWarning:unclosed transport <_SelectorSocketTransport closing fd=9>kTraceback (most recent call last):  File"/buildbot/buildarea/3.x.ware-freebsd.refleak/build/Lib/test/support/__init__.py", line838, ingc_collect    gc.collect()ResourceWarning:unclosed <socket.socket fd=9, family=2, type=1, proto=6, laddr=('127.0.0.1', 35930), raddr=('127.0.0.1', 35931)>Task was destroyed but it is pending!task:<Task pending name='Task-3855' coro=<BaseSelectorEventLoop._accept_connection2() done, defined at /buildbot/buildarea/3.x.ware-freebsd.refleak/build/Lib/asyncio/selector_events.py:217> wait_for=<Future pending cb=[Task.task_wakeup()]>>Warning -- Unraisable exceptionException ignored while calling deallocator <function _SelectorTransport.__del__ at 0x8431d7410>:Traceback (most recent call last):  File"/buildbot/buildarea/3.x.ware-freebsd.refleak/build/Lib/asyncio/selector_events.py", line873, in__del__    _warn(f"unclosed transport{self!r}",ResourceWarning,source=self)ResourceWarning:unclosed transport <_SelectorSocketTransport closing fd=9>k

hugovk pushed a commit that referenced this pull requestAug 8, 2025
…oncurrent.futures` (GH-137214) (#137284)Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull requestAug 19, 2025
…ncurrent.futures` (pythonGH-137214)Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
kumaraditya303 pushed a commit to miss-islington/cpython that referenced this pull requestSep 9, 2025
… of `concurrent.futures` (pythonGH-137214) (python#137284)Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@aiskaiskaisk approved these changes

@serhiy-storchakaserhiy-storchakaserhiy-storchaka approved these changes

@ZeroIntensityZeroIntensityZeroIntensity approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@henryiii@serhiy-storchaka@ZeroIntensity@bedevere-bot@aisk

[8]ページ先頭

©2009-2025 Movatter.jp