indygreg / indygreg/PyOxidizer

importlib.metadata does not seem to work properly

Open
#304 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement need-info oxidized_importer
Dominant language
Rust
Stars
6.2k
Forks
256
PR merge metrics
No merged PRs in 30d

Description

Whenever I try to access some method of `importlib.metadata` it returns a empty value or an error. These errors only happen when I run the executable generated by the pyoxidizer.

`metadata.entry_points()` return an empty dictionary.

`metadata.version("pip")` return `TypeError: 'list' object is not an iterator`.

During some research I found some parts of the documentation that seem to talk about it (https://pyoxidizer.readthedocs.io/en/stable/oxidized_importer_behavior_and_compliance.html#importlib-metadata-compatibility), but I didn't realize what it is (maybe because I'm using an automatic translator)

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

Reproduce the reported behavior by calling importlib.metadata.entry_points() and importlib.metadata.version("pip") inside a PyOxidizer-generated executable. Read the importlib-metadata compatibility documentation linked in the issue and compare those results with a normal Python environment; done means both calls behave correctly in the generated executable.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.