davidhalter / davidhalter/jedi
name conflict with builtin modules
- Dominant language
- Python
- Stars
- 6.2k
- Forks
- 535
- PR merge metrics
- No merged PRs in 30d
Description
When a library uses module names that conflicts with builtins, such as `_ast.py`, the import logic in https://github.com/davidhalter/jedi/blob/master/jedi/inference/compiled/subprocess/functions.py#L139 ends up using `importlib.machinery.BuiltinImporter` as it appears before `importlib.machinery.PathFinder` in `sys.meta_path`.
Contributor guide
Research direction
Start at jedi/inference/compiled/subprocess/functions.py around line 139 and inspect how importlib.machinery.BuiltinImporter and PathFinder are used through sys.meta_path. Reproduce the _ast.py name conflict and verify that a library module is selected instead of the builtin when both names collide.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100