Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #14793

Updating pdm-pep517 and pep517 and renaming to new upstream names?

From Carsten Schoenert <c.schoenert@t-online.de>
Newsgroups linux.debian.maint.python
Subject Updating pdm-pep517 and pep517 and renaming to new upstream names?
Date 2023-01-02 19:00 +0100
Message-ID <FJxgl-f6Aq-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

happy new year to you all!

Not only the Python version in bookworm is moving right now, due some 
side effect around that also the PDM build backend is moving fast.

I was working around the Xmas days on one of the packages I usually take 
care on (python-griffe [1]) to get an new upstream version ready for 
uploading. While doing I noticed that my local work was not building 
successful anymore due a new version of python-packaging which has some 
different structure of folders and files.

> Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/pep517/wrappers.py", line 319, in _call_hook
>     raise BackendUnavailable(data.get('traceback', ''))
> pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/pep517/in_process/_in_process.py", line 77, in _build_backend
>     obj = import_module(mod_path)
>           ^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
>     return _bootstrap._gcd_import(name[level:], package, level)
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
>   File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
>   File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
>   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
>   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
>   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
>   File "/usr/lib/python3/dist-packages/pdm/pep517/api.py", line 10, in <module>
>     from pdm.pep517.editable import EditableBuilder
>   File "/usr/lib/python3/dist-packages/pdm/pep517/editable.py", line 13, in <module>
>     from pdm.pep517.wheel import WheelBuilder
>   File "/usr/lib/python3/dist-packages/pdm/pep517/wheel.py", line 24, in <module>
>     from pdm.pep517.base import Builder
>   File "/usr/lib/python3/dist-packages/pdm/pep517/base.py", line 12, in <module>
>     from pdm.pep517.metadata import Metadata
>   File "/usr/lib/python3/dist-packages/pdm/pep517/metadata.py", line 20, in <module>
>     from pdm.pep517.version import DynamicVersion
>   File "/usr/lib/python3/dist-packages/pdm/pep517/version.py", line 10, in <module>
>     from pdm.pep517.scm import get_version_from_scm
>   File "/usr/lib/python3/dist-packages/pdm/pep517/scm.py", line 17, in <module>
>     from packaging.version import LegacyVersion, Version
> ImportError: cannot import name 'LegacyVersion' from 'packaging.version' (/usr/lib/python3/dist-packages/packaging/version.py)
> 
> ERROR Backend 'pdm.pep517.api' is not available.
> E: pybuild pybuild:386: build: plugin pyproject failed with: exit code=1: python3.11 -m build --skip-dependency-check --no-isolation --wheel --outdir /build/python-griffe-0.25.2/.pybuild/cpython3_3.11_griffe

The same build issue can now be found on recent FTBFS issue reports done 
by Lucas archive rebuilds.

While trying to understand what has changed I noticed also that 
src:pdm-pep517 [2] got an upstream update to (Thanks Boyuan Yang for 
packaging it!).
But, pdm-pep517 got also a renaming on the upstream side to pdm-backend [3].

I've done a rather quick and dirty import of the new version on top of 
the existing tree from src:pdm-517 to investigate things further.

After using the updated python3-pdm-pep517 package I see another PDM 
related package that will need an update.

> Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/pep517/wrappers.py", line 319, in _call_hook
>     raise BackendUnavailable(data.get('traceback', ''))
> pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/pep517/in_process/_in_process.py", line 77, in _build_backend
>     obj = import_module(mod_path)
>           ^^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
>     return _bootstrap._gcd_import(name[level:], package, level)
>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
>   File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
>   File "<frozen importlib._bootstrap>", line 1128, in _find_and_load_unlocked
>   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
>   File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
>   File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
>   File "<frozen importlib._bootstrap>", line 1142, in _find_and_load_unlocked
> ModuleNotFoundError: No module named 'pdm.pep517'

The package failing while importing here is python3-pep517 (src:pep517 [4]).

But again as for pdm-pep517, also pep517 is renamed on the upstream side 
to pyproject-hooks [5].

I haven't done yet any local work on updating src:pep517 as I wanted to 
ask here on the list how to handle these two updated and renamed 
upstream projects.

The first one, src:pdm-pep517 seems not that difficult as it's only 
living in unstable and testing and the packages that are using the 
existing package as build dependency is rather small.

The second one, src:pep517 needs an transition to a new source package 
and also to a new binary package to me. And now it can get complicated, 
given we are about 4 weeks away from the first freeze step of the RMs.

What do other think?

I've attached DD listings about the usage of python3-pep517 and 
python3-pdm-pep517.


[1] https://tracker.debian.org/pkg/python-griffe
[2] https://tracker.debian.org/pkg/pdm-pep517
[3] https://github.com/pdm-project/pdm-backend
[4] https://tracker.debian.org/pkg/pep517
[5] https://github.com/pypa/pyproject-hooks

-- 
Regards
Carsten

Back to linux.debian.maint.python | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Updating pdm-pep517 and pep517 and renaming to new upstream names? Carsten Schoenert <c.schoenert@t-online.de> - 2023-01-02 19:00 +0100
  Re: Updating pdm-pep517 and pep517 and renaming to new upstream  names? Carsten Schoenert <c.schoenert@t-online.de> - 2023-01-02 19:20 +0100

csiph-web