mgedmin / mgedmin/python-imports.vim

stdlib module checks do not work on Fedora and SuSE

Open
#16 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Vim Script
Stars
46
Forks
9
PR merge metrics
No merged PRs in 30d

Description

The hardcoded /lib/ part of pythonStdlibPath is uncorrect, as it is located in /usr/lib64 on these platforms.

Since 3.9 you can use sys.platlibdir (which is lib or lib64 according to the platform) to construct the correct path.

Alternately, since 3.10 sys.stdlib_module_names contains the list of stdlib modules, that could be added directly to sys.builtin_module_names without doing the file checks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the pythonStdlibPath logic and inspect how the plugin checks for standard-library modules. Compare the hardcoded /lib/ path with Fedora and SuSE layouts, then evaluate the sys.platlibdir and sys.stdlib_module_names approaches described in the issue. Done means standard-library checks work on those platforms without the incorrect path assumption.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, vim
Domain
operating-systems, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.