Running tests in Fedora packaging
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- build-system, testing
Research direction
Start by comparing /usr/bin/pytest with python3 -m pytest and the reported --import-mode prepend workaround in the skeleton's test setup. Use the jaraco/packaging/metadata.py traceback as a reproduction clue, then determine whether the package layout or imports need adjustment so Fedora test runs do not resolve jaraco.packaging as packaging.
Written by the indexing model from the issue text.
Description
Lately I have been reviewing a bunch of jaraco.* packages in Fedora, and every now-and-then I get issues with running the tests where the non-src-layout interferes with /usr/bin/pytest calls. Sometimes I work around it by changing the --import-mode prepend, sometimes I have to run python3 -m pytest.
One recent example was in jaraco.packaging where it errors as:
__________________ [doctest] packaging.metadata.hunt_down_url __________________
019
020 Given project metadata, figure out what the package URL is.
021
022 >>> hunt_down_url(load('.'))
UNEXPECTED EXCEPTION: ModuleNotFoundError("No module named 'packaging.version'")
Traceback (most recent call last):
File "/usr/lib64/python3.13/doctest.py", line 1395, in __run
exec(compile(example.source, filename, "single",
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
compileflags, True), test.globs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<doctest packaging.metadata.hunt_down_url[0]>", line 1, in <module>
File "/builddir/build/BUILD/python-jaraco-packaging-10.2.2-build/jaraco_packaging-10.2.2/jaraco/packaging/metadata.py", line 15, in load
return util.project_wheel_metadata(source_dir, isolated, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/build/util.py", line 42, in project_wheel_metadata
with DefaultIsolatedEnv() as env:
~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/build/env.py", line 90, in __enter__
self._env_backend = _PipBackend()
~~~~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/build/env.py", line 153, in __init__
self._create_with_virtualenv = not self._has_valid_outer_pip and self._has_virtualenv
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.13/functools.py", line 1037, in __get__
val = self.func(instance)
File "/usr/lib/python3.13/site-packages/build/env.py", line 162, in _has_valid_outer_pip
return _has_dependency('pip', '22.3')
File "/usr/lib/python3.13/site-packages/build/env.py", line 46, in _has_dependency
from packaging.version import Version
ModuleNotFoundError: No module named 'packaging.version'
/builddir/build/BUILD/python-jaraco-packaging-10.2.2-build/jaraco_packaging-10.2.2/jaraco/packaging/metadata.py:22: UnexpectedException
Basically it interpreted jaraco.packaging as packaging
I hope that a src-layout can mitigate the need for --import-mode importlib, but also it might need relative imports all around as well?
- Dominant language
- No language data
- Stars
- 152
- Forks
- 38
- Avg merge
- 6h 27m
- Merged PRs (30d)
- 4
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jaraco/skeleton
-
Difficulty 1/5 Under an hour Newbie friendliness 91/100
-
Difficulty 3/5 1-2 days Newbie friendliness 67/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
0.kind: bug
Difficulty 1/5 Under an hour Newbie friendliness 82/100
NixOS/nixpkgs#588857 · 1 reaction ·
Maintainers usually reply within 1 day
-
area:ui bug effort:low P2 source:agent
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
MattiaPARRINELLO/backstage#71 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
untemps/svelte-palette#298 ·
-
Retarget the extension to Fallout 10.5Possibly taken @ChrisonSimtian claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100