Bug 2183383

Summary: python-jupyter-packaging fails to build with the latest setuptools version
Product: [Fedora] Fedora Reporter: Charalampos Stratakis <cstratak>
Component: python-jupyter-packagingAssignee: Lumír Balhar <lbalhar>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: lbalhar, mhroncok, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-jupyter-packaging-0.12.3-5.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-04-19 13:37:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2144132    

Description Charalampos Stratakis 2023-03-31 00:11:21 UTC
python-jupyter-packaging fails to build with the latest setuptools version.

This report is automated and not very verbose, but we'll try to get back here with details.

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/cstratak/setuptools-67.5.1/fedora-rawhide-x86_64/05731447-python-jupyter-packaging/

For all our attempts to build python-jupyter-packaging with the latest setuptools, see:
https://copr.fedorainfracloud.org/coprs/cstratak/setuptools-67.5.1/package/python-jupyter-packaging/

Let us know here if you have any questions.

Comment 1 Miro Hrončok 2023-03-31 09:32:06 UTC
The reason seems to be quite obvious:

ERROR tests/test_build_api.py - DeprecationWarning: pkg_resources is deprecated as an API
ERROR tests/test_build_api.py - DeprecationWarning: pkg_resources is deprecated as an API
ERROR tests/test_core_functions.py - DeprecationWarning: pkg_resources is deprecated as an API
ERROR tests/test_core_functions.py - DeprecationWarning: pkg_resources is deprecated as an API
ERROR tests/test_datafiles_paths.py - DeprecationWarning: pkg_resources is deprecated as an API
ERROR tests/test_datafiles_paths.py - DeprecationWarning: pkg_resources is deprecated as an API
ERROR tests/test_deprecated.py - DeprecationWarning: pkg_resources is deprecated as an API
ERROR tests/test_deprecated.py - DeprecationWarning: pkg_resources is deprecated as an API
ERROR tests/test_is_stale.py - DeprecationWarning: pkg_resources is deprecated as an API
ERROR tests/test_is_stale.py - DeprecationWarning: pkg_resources is deprecated as an API
ERROR tests/test_main.py - DeprecationWarning: pkg_resources is deprecated as an API
ERROR tests/test_main.py - DeprecationWarning: pkg_resources is deprecated as an API
ERROR tests/test_utility_functions.py - DeprecationWarning: pkg_resources is deprecated as an API
ERROR tests/test_utility_functions.py - DeprecationWarning: pkg_resources is deprecated as an API

What's funny is that the import seems to come from setuptools themselves:

tests/test_utility_functions.py:6: in <module>
    import jupyter_packaging.setupbase as pkg
jupyter_packaging/__init__.py:6: in <module>
    from .setupbase import *  # noqa
jupyter_packaging/setupbase.py:44: in <module>
    from setuptools.command.develop import develop
/usr/lib/python3.11/site-packages/setuptools/command/develop.py:8: in <module>
    from setuptools.command.easy_install import easy_install
/usr/lib/python3.11/site-packages/setuptools/command/easy_install.py:50: in <module>
    from setuptools.sandbox import run_setup
/usr/lib/python3.11/site-packages/setuptools/sandbox.py:13: in <module>
    import pkg_resources
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:121: in <module>
    warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)
E   DeprecationWarning: pkg_resources is deprecated as an API

Comment 2 Miro Hrončok 2023-03-31 09:37:51 UTC
I've reported https://github.com/pypa/setuptools/issues/3878

Comment 3 Lumír Balhar 2023-04-12 11:47:51 UTC
I can fix tests to fix FTBFS but that might just shift the issue somewhere else. There is no response from upstream yet.

Comment 4 Miro Hrončok 2023-04-12 11:59:53 UTC
I don't think a DeprecationWarnign emitted while building packages with this backend has the potential to break other packages.

FWIW:

$ repoquery -q --repo=rawhide{,-source} --whatrequires python3-jupyter-packaging | pkgname
python-nbclassic
python-widgetsnbextension
sagemath

Some were already tested and they built:

https://copr.fedorainfracloud.org/coprs/cstratak/setuptools-67.5.1/package/python-widgetsnbextension/
https://copr.fedorainfracloud.org/coprs/cstratak/setuptools-67.5.1/package/sagemath/
python-nbclassic wasn't, presumably because it was added to Fedora later

Comment 5 Charalampos Stratakis 2023-04-13 01:51:29 UTC
Example fix: https://src.fedoraproject.org/rpms/python-colcon-ros/pull-request/1#request_diff

Comment 7 Fedora Update System 2023-04-19 13:35:38 UTC
FEDORA-2023-3cdb0c8374 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-3cdb0c8374

Comment 8 Fedora Update System 2023-04-19 13:37:06 UTC
FEDORA-2023-3cdb0c8374 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.