Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935486 - dev-python/pypiserver-2.1.1 fails tests when dev-python/twine built for different Python than importlib-metadata
Summary: dev-python/pypiserver-2.1.1 fails tests when dev-python/twine built for diffe...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-04 13:10 UTC by Jonathan Lovelace
Modified: 2024-07-05 17:37 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-python:pypiserver-2.1.1:20240704-125438.log (dev-python:pypiserver-2.1.1:20240704-125438.log,142.21 KB, text/plain; charset=utf-8)
2024-07-04 13:10 UTC, Jonathan Lovelace
Details
emerge-info.txt (emerge-info.txt,10.04 KB, text/plain; charset=utf-8)
2024-07-04 13:10 UTC, Jonathan Lovelace
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Lovelace 2024-07-04 13:10:16 UTC
Created attachment 896969 [details]
dev-python:pypiserver-2.1.1:20240704-125438.log

When rebuilding to switch from python3_11 to python3_12 PYTHON_TARGETS, =dev-python/pypiserver-2.1.1 fails its tests for me, specifically the tests tests/test_server.py::test_twine_upload and ests/test_server.py::test_twine_register:

=========================================================================== short test summary info ============================================================================
FAILED tests/test_server.py::test_twine_upload[open_server-open_pypirc] - AssertionError: Twine upload failed. See stdout/err
FAILED tests/test_server.py::test_twine_upload[authed_server-authed_pypirc] - AssertionError: Twine upload failed. See stdout/err
FAILED tests/test_server.py::test_twine_upload[partial_authed_server-authed_pypirc] - AssertionError: Twine upload failed. See stdout/err
FAILED tests/test_server.py::test_twine_register[open_server-open_pypirc] - AssertionError: Twine register failed. See stdout/err
FAILED tests/test_server.py::test_twine_register[authed_server-authed_pypirc] - AssertionError: Twine register failed. See stdout/err
FAILED tests/test_server.py::test_twine_register[partial_authed_server-authed_pypirc] - AssertionError: Twine register failed. See stdout/err
=========================================================== 6 failed, 477 passed, 6 deselected, 8 warnings in 17.53s ===========================================================

The captured stdout doesn't look relevant, but the captured stderr from one of the tests (the others seem to look similar) is:

---------------------------------------------------------------------------- Captured stderr call -----------------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.11/twine", line 5, in <module>
    from twine.__main__ import main
  File "/usr/lib/python3.11/site-packages/twine/__init__.py", line 33, in <module>
    import importlib_metadata
ModuleNotFoundError: No module named 'importlib_metadata'
--------------------------------------------------------------------------- Captured stdout teardown ---------------------------------------------------------------------------

And I discovered that dev-python/twine hasn't been update to Python 3.12 yet, while importlib-metadata has.
Comment 1 Jonathan Lovelace 2024-07-04 13:10:31 UTC
Created attachment 896970 [details]
emerge-info.txt
Comment 2 Larry the Git Cow gentoo-dev 2024-07-05 17:37:27 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc68f7aa3f396ba6686aaffe97d1cfb7dd44e10b

commit bc68f7aa3f396ba6686aaffe97d1cfb7dd44e10b
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-07-05 17:35:43 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-07-05 17:37:23 +0000

    dev-python/pypiserver: Check for dev-python/twice w/ PYTHON_USEDEP
    
    Closes: https://bugs.gentoo.org/935486
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/pypiserver/pypiserver-2.1.1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)