Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 936879 - dev-python/requests-2.32.3: ModuleNotFoundError: No module named 'setuptools.command.test'
Summary: dev-python/requests-2.32.3: ModuleNotFoundError: No module named 'setuptools....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
: 936897 936898 936900 936902 936903 936904 936905 936906 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-07-29 10:13 UTC by Brahmajit Das
Modified: 2024-07-29 17:39 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brahmajit Das 2024-07-29 10:13:54 UTC
With setuptools-72.0.0 test module and associated tests were removed[0] which results in build time errors such as

Traceback (most recent call last):
  File "/usr/lib/pypy3.10/runpy.py", line 199, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/pypy3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/lib/pypy3.10/site-packages/gpep517/__main__.py", line 443, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/pypy3.10/site-packages/gpep517/__main__.py", line 439, in main
    return func(args)
           ^^^^^^^^^^
  File "/usr/lib/pypy3.10/site-packages/gpep517/__main__.py", line 229, in build_wheel
    print(build_wheel_impl(args, args.wheel_dir), file=out)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/pypy3.10/site-packages/gpep517/__main__.py", line 221, in build_wheel_impl
    wheel_name = backend.build_wheel(str(wheel_dir), args.config_json)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/pypy3.10/site-packages/setuptools/build_meta.py", line 415, in build_wheel
    return self._build_with_temp_dir(
  File "/usr/lib/pypy3.10/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
    self.run_setup()
  File "/usr/lib/pypy3.10/site-packages/setuptools/build_meta.py", line 497, in run_setup
    super().run_setup(setup_script=setup_script)
  File "/usr/lib/pypy3.10/site-packages/setuptools/build_meta.py", line 313, in run_setup
    exec(code, locals())
  File "<string>", line 7, in <module>
ModuleNotFoundError: No module named 'setuptools.command.test'

[0]: https://github.com/pypa/setuptools/pull/4458/commits/b5bd38edc1cec78b6c1baca047aebf23c6635a48#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711L121

Reproducible: Always

Steps to Reproduce:
1. Emerge dev-python/setuptools-72.0.0
2. Emerge dev-python/requests-2.32.3
3. Observe failure
Actual Results:  
Build fails with ModuleNotFoundError: No module named 'setuptools.command.test' error

Expected Results:  
Build completes successfully

A PR has been submitted upstream https://github.com/psf/requests/pull/6774
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-29 15:53:00 UTC
commit b810436b245e3484624fb19fc2e5473cef31737f (HEAD -> master, origin/master, origin/HEAD)
Author: Eli Schwartz <eschwartz@gentoo.org>
Date:   Mon Jul 29 11:28:46 2024 -0400

    dev-python/setuptools: add 72.1.0, drop 72.0.0

    In 72.0.0 the test command was finally removed as has been threatened
    for a while. It turns out that many people still had referenced it in
    their setup.py even if they didn't actually use it, so simply building a
    wheel then failed -- the only deprecation warning had been if you
    actually attempted to use `setup.py test`.

    Setuptools 72.1.0 adds a deprecation shim to allow those packages to
    still build wheels successfully, to give projects time and warning that
    they need to remove this last remaining trace.

    We drop the old version too, as we don't want users to hit the version
    that breaks wheel building.

    Bug: https://github.com/pypa/setuptools/issues/4520
    Bug: https://github.com/pypa/setuptools/pull/4522
    Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Comment 2 Larry the Git Cow gentoo-dev 2024-07-29 16:31:08 UTC
The bug has been referenced in the following commit(s):

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

commit 6dd80a5968e640f9024dcdc28a5ea80ed9e07b34
Author:     Eli Schwartz <eschwartz@gentoo.org>
AuthorDate: 2024-07-29 16:24:54 +0000
Commit:     Eli Schwartz <eschwartz@gentoo.org>
CommitDate: 2024-07-29 16:30:42 +0000

    package.mask: mark the old setuptools version with the bug as bad
    
    Bug: https://bugs.gentoo.org/936879
    Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>

 profiles/package.mask | 5 +++++
 1 file changed, 5 insertions(+)
Comment 3 Toralf Förster gentoo-dev 2024-07-29 17:38:58 UTC
*** Bug 936906 has been marked as a duplicate of this bug. ***
Comment 4 Toralf Förster gentoo-dev 2024-07-29 17:39:03 UTC
*** Bug 936905 has been marked as a duplicate of this bug. ***
Comment 5 Toralf Förster gentoo-dev 2024-07-29 17:39:08 UTC
*** Bug 936904 has been marked as a duplicate of this bug. ***
Comment 6 Toralf Förster gentoo-dev 2024-07-29 17:39:12 UTC
*** Bug 936903 has been marked as a duplicate of this bug. ***
Comment 7 Toralf Förster gentoo-dev 2024-07-29 17:39:18 UTC
*** Bug 936902 has been marked as a duplicate of this bug. ***
Comment 8 Toralf Förster gentoo-dev 2024-07-29 17:39:23 UTC
*** Bug 936900 has been marked as a duplicate of this bug. ***
Comment 9 Toralf Förster gentoo-dev 2024-07-29 17:39:27 UTC
*** Bug 936898 has been marked as a duplicate of this bug. ***
Comment 10 Toralf Förster gentoo-dev 2024-07-29 17:39:33 UTC
*** Bug 936897 has been marked as a duplicate of this bug. ***