🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@FFY00
Copy link
Member

@FFY00 FFY00 commented Dec 10, 2025

…r.discover

Signed-off-by: Filipe Laíns <lains@riseup.net>
@FFY00
Copy link
Member Author

FFY00 commented Dec 10, 2025

@Locked-chess-official, this draft PR includes the changes from GH-139900, introducing the .discover() method, and my initial proposed traceback implementation.

I think it should address the concerns you raised in GH-139899, could you give it a look?

@FFY00
Copy link
Member Author

FFY00 commented Dec 10, 2025

Right now it doesn't special-case relative imports, but the message is still helpful.

Python 3.15.0a2+ free-threading build (heads/gh-139899:6816705de0c, Dec 10 2025, 12:54:51) [GCC 15.2.1 20251112] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import aa
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import aa
  File "/home/anubis/git/cpython/test-cases/aa/__init__.py", line 1, in <module>
    from .bb import *
ModuleNotFoundError: No module named 'aa.bb'. Did you mean: 'aa.bbb'?

I think it should be alright for an initial implementation, and then we can improve — just trying to make the scope smaller to hopefully guarantee this proposal doesn't lose momentum and ends up stalled.

Signed-off-by: Filipe Laíns <lains@riseup.net>
@FFY00 FFY00 force-pushed the ModuleNotFoundError-suggestions branch from 3ef83d6 to 889c7ce Compare December 10, 2025 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant