Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1911607 - python-setuptools fails to build with Python 3.10: ImportWarning: VendorImporter.exec_module() not found; falling back to load_module(
Summary: python-setuptools fails to build with Python 3.10: ImportWarning: VendorImpor...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-setuptools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1906852 1906854 1907394 (view as bug list)
Depends On:
Blocks: PYTHON3.10 1906852 1906854 1907394
TreeView+ depends on / blocked
 
Reported: 2020-12-30 10:39 UTC by Miro Hrončok
Modified: 2021-02-01 17:47 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-01 17:47:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pypa setuptools issues 2481 0 None closed [Forward compatibility][BUG] `pkg_resources.extern.VendorImporter` lacks `exec_module()` method 2021-01-29 16:05:05 UTC
Github pypa setuptools issues 2493 0 None closed DeprecationWarning with load_module on Python 3.10 in pkg_resources._handle_ns 2021-01-29 16:05:05 UTC

Description Miro Hrončok 2020-12-30 10:39:15 UTC
python-setuptools fails to build with Python 3.10.0a3.

spec = ModuleSpec(name='pkg_resources.extern.appdirs', loader=<pkg_resources.extern.VendorImporter object at 0x7f34d30d18e0>)

>   ???
E   ImportWarning: VendorImporter.exec_module() not found; falling back to load_module()

<frozen importlib._bootstrap>:681: ImportWarning
_______________ ERROR at setup of TestDistro.testExcludePackage ________________

self = <setuptools.tests.test_setuptools.TestDistro object at 0x7f34d15011f0>
method = <bound method TestDistro.testExcludePackage of <setuptools.tests.test_setuptools.TestDistro object at 0x7f34d15011f0>>

    def setup_method(self, method):
        self.e1 = Extension('bar.ext', ['bar.c'])
        self.e2 = Extension('c.y', ['y.c'])
    
>       self.dist = makeSetup(
            packages=['a', 'a.b', 'a.b.c', 'b', 'c'],
            py_modules=['b.d', 'x'],
            ext_modules=(self.e1, self.e2),
            package_dir={},
        )

setuptools/tests/test_setuptools.py:132: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
setuptools/tests/test_setuptools.py:29: in makeSetup
    return setuptools.setup(**args)
setuptools/__init__.py:153: in setup
    return distutils.core.setup(**attrs)
/usr/lib64/python3.10/distutils/core.py:108: in setup
    _setup_distribution = dist = klass(attrs)
setuptools/dist.py:423: in __init__
    _Distribution.__init__(self, {
/usr/lib64/python3.10/distutils/dist.py:292: in __init__
    self.finalize_options()
setuptools/dist.py:694: in finalize_options
    for ep in sorted(eps, key=by_order):
setuptools/dist.py:693: in <lambda>
    eps = map(lambda e: e.load(), pkg_resources.iter_entry_points(group))
pkg_resources/__init__.py:2447: in load
    return self.resolve()
pkg_resources/__init__.py:2453: in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
setuptools/__init__.py:16: in <module>
    import setuptools.version
setuptools/version.py:1: in <module>
    import pkg_resources
pkg_resources/__init__.py:73: in <module>
    from pkg_resources.extern import appdirs
<frozen importlib._bootstrap>:1026: in _find_and_load
    ???
<frozen importlib._bootstrap>:1005: in _find_and_load_unlocked
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

spec = ModuleSpec(name='pkg_resources.extern.appdirs', loader=<pkg_resources.extern.VendorImporter object at 0x7f34d30d18e0>)

>   ???
E   ImportWarning: VendorImporter.exec_module() not found; falling back to load_module()

<frozen importlib._bootstrap>:681: ImportWarning

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01850805-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-01-04 12:44:31 UTC
Possible partial fix: https://src.fedoraproject.org/rpms/python-setuptools/pull-request/53

Comment 2 Petr Viktorin 2021-01-06 12:49:30 UTC
The partial fix looks OK (at the very least for unblocking the other packages).
For the other part, I need to dive in deeper. So far I reported the Pytest internal error that seems to hides the real exception: https://github.com/pytest-dev/pytest/pull/8227

A relatively easy hotfix would be to ignore the warning. Let me know if this is urgent enough for that.

Comment 3 Miro Hrončok 2021-01-08 12:29:13 UTC
Ready as a PR, built in Copr.

Comment 4 Miro Hrončok 2021-01-08 12:30:50 UTC
*** Bug 1906852 has been marked as a duplicate of this bug. ***

Comment 5 Miro Hrončok 2021-01-08 12:34:16 UTC
*** Bug 1906854 has been marked as a duplicate of this bug. ***

Comment 6 Miro Hrončok 2021-01-08 12:34:52 UTC
*** Bug 1907394 has been marked as a duplicate of this bug. ***


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