Skip to content

gh-150579: use lazy imports for concurrent.futures#150585

Open
henryiii wants to merge 1 commit into
python:mainfrom
henryiii:henryiii/fix/lazyconcurrentfutures
Open

gh-150579: use lazy imports for concurrent.futures#150585
henryiii wants to merge 1 commit into
python:mainfrom
henryiii:henryiii/fix/lazyconcurrentfutures

Conversation

@henryiii
Copy link
Copy Markdown
Contributor

@henryiii henryiii commented May 29, 2026

This module has a manual lazy import hack using __getattr__. Now that lazy imports exist and cannot be disabled, this could use lazy imports instead.

Key differences: this will now show up in sys.lazy_modules when accessed. Error messages should be a bit better without the wrapper __getattr__ involved. That's the only differences I can think of.

Closes #150579 (though that can be closed without this, the bug was already fixed in #144957).

This module has a manual lazy import hack using `__getattr__`. Now that lazy imports exist and cannot be disabled, this could use lazy imports instead.

Key differences: this will now show up in sys.lazy_modules when accessed. Error messages should be a bit better without the wrapper `__getattr__` involved.  That's the only differences I can think of.

Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3.15: Lazy imports break with __getattr__ (concurrent.futures)

1 participant