Bug 1925189 - python-setuptools fails to build with Python 3.10: ModuleNotFoundError: No module named 'distutils.command.bdist_wininst'
Summary: python-setuptools fails to build with Python 3.10: ModuleNotFoundError: No mo...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-setuptools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1927173 1927192 1927200 1927201 1927202 (view as bug list)
Depends On: 1941609
Blocks: PYTHON3.10 1927173 1927192 1927200 1927201 1927202
TreeView+ depends on / blocked
 
Reported: 2021-02-04 14:55 UTC by Tomáš Hrnčiar
Modified: 2021-04-15 09:14 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-15 09:14:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pypa setuptools issues 2558 0 None open Python 3.10: ModuleNotFoundError: No module named 'distutils.command.bdist_wininst' 2021-02-16 09:55:08 UTC

Description Tomáš Hrnčiar 2021-02-04 14:55:01 UTC
python-setuptools fails to build with Python 3.10.0a5.

==================================== ERRORS ====================================
_____________ ERROR collecting setuptools/command/bdist_wininst.py _____________
setuptools/command/bdist_wininst.py:1: in <module>
    import distutils.command.bdist_wininst as orig
E   ModuleNotFoundError: No module named 'distutils.command.bdist_wininst'
=========================== short test summary info ============================
SKIPPED [2] setuptools/tests/test_msvc.py:17: could not import 'distutils.msvc9compiler': No module named 'winreg'
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
========================= 2 skipped, 1 error in 1.41s ==========================

The bdist_wininst command deprecated in Python 3.8 has been removed. The bdist_wheel command is now recommended to distribute binary packages on Windows. (Contributed by Victor Stinner in bpo-42802.)

https://docs.python.org/3.10/whatsnew/3.10.html#distutils

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01944769-python-setuptools/

For all our attempts to build python-setuptools with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-setuptools/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2021-02-04 15:12:08 UTC
Upstream issue: https://github.com/pypa/setuptools/issues/2558

(Bugzilla errors with Jira stuff when I try to add it to the appropriate field.)

Comment 2 Ben Cotton 2021-02-09 16:22:17 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 4 Miro Hrončok 2021-02-12 11:56:42 UTC
*** Bug 1927202 has been marked as a duplicate of this bug. ***

Comment 5 Miro Hrončok 2021-02-12 11:56:43 UTC
*** Bug 1927201 has been marked as a duplicate of this bug. ***

Comment 6 Miro Hrončok 2021-02-12 11:56:47 UTC
*** Bug 1927192 has been marked as a duplicate of this bug. ***

Comment 7 Miro Hrončok 2021-02-12 11:56:54 UTC
*** Bug 1927200 has been marked as a duplicate of this bug. ***

Comment 8 Miro Hrončok 2021-02-12 11:56:58 UTC
*** Bug 1927173 has been marked as a duplicate of this bug. ***

Comment 9 Tomáš Hrnčiar 2021-04-09 09:24:16 UTC
(In reply to Miro Hrončok from comment #3)
> https://src.fedoraproject.org/rpms/python-setuptools/pull-request/58

This PR was upstreamed and released in setuptools 56.0.0 that contains also fix[0] for ImportWarning: VendorImporter.find_spec() not found; falling back to find_module() we experienced with 7th alpha of Python 3.10. I created update[1] to this version but seems like there is another similar error with a different ImportWarning on Python 3.10 (see below). For now, I build setuptools 56.0.0 in our Python 3.10 COPR without tests.

[0] https://github.com/pypa/setuptools/pull/2633
[1] https://src.fedoraproject.org/rpms/python-setuptools/pull-request/60

+ /usr/bin/pytest --ignore=pavement.py
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 933, in _find_spec
AttributeError: '_SixMetaPathImporter' object has no attribute 'find_spec'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/pytest", line 33, in <module>
    sys.exit(load_entry_point('pytest==6.2.2', 'console_scripts', 'pytest')())
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 185, in console_main
    code = main()
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 143, in main
    config = _prepareconfig(args, plugins)
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 318, in _prepareconfig
    config = pluginmanager.hook.pytest_cmdline_parse(
  File "/usr/lib/python3.10/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/usr/lib/python3.10/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/usr/lib/python3.10/site-packages/pluggy/manager.py", line 84, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/usr/lib/python3.10/site-packages/_pytest/helpconfig.py", line 100, in pytest_cmdline_parse
    config: Config = outcome.get_result()
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1003, in pytest_cmdline_parse
    self.parse(args)
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1283, in parse
    self._preparse(args, addopts=addopts)
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1191, in _preparse
    self.hook.pytest_load_initial_conftests(
  File "/usr/lib/python3.10/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/usr/lib/python3.10/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/usr/lib/python3.10/site-packages/pluggy/manager.py", line 84, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/usr/lib/python3.10/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1070, in pytest_load_initial_conftests
    self.pluginmanager._set_initial_conftests(early_config.known_args_namespace)
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 503, in _set_initial_conftests
    self._try_load_conftest(current, namespace.importmode)
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 508, in _try_load_conftest
    self._getconftestmodules(anchor, importmode)
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 536, in _getconftestmodules
    mod = self._importconftest(conftestpath, importmode)
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 587, in _importconftest
    self.consider_conftest(mod)
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 663, in consider_conftest
    self.register(conftestmodule, name=conftestmodule.__file__)
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 443, in register
    self.consider_module(plugin)
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 669, in consider_module
    self._import_plugin_specs(getattr(mod, "pytest_plugins", []))
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 676, in _import_plugin_specs
    self.import_plugin(import_spec)
  File "/usr/lib/python3.10/site-packages/_pytest/config/__init__.py", line 703, in import_plugin
    __import__(importspec)
  File "/builddir/build/BUILD/setuptools-56.0.0/setuptools/__init__.py", line 18, in <module>
    from setuptools.dist import Distribution
  File "/builddir/build/BUILD/setuptools-56.0.0/setuptools/dist.py", line 27, in <module>
    from setuptools.extern import packaging
  File "<frozen importlib._bootstrap>", line 1021, in _find_and_load
  File "<frozen importlib._bootstrap>", line 996, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _find_spec
  File "<frozen importlib._bootstrap>", line 908, in _find_spec_legacy
ImportWarning: _SixMetaPathImporter.find_spec() not found; falling back to find_module()

Comment 10 Petr Viktorin (pviktori) 2021-04-09 09:32:25 UTC
_SixMetaPathImporter? That looks like an issue in python-six. Did that build well?


Note You need to log in before you can comment on or make changes to this bug.