Bug 281823 - devel/py-incremental: Update to 24.7.2
Summary: devel/py-incremental: Update to 24.7.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL: https://github.com/twisted/incrementa...
Keywords:
Depends on:
Blocks: 281824
  Show dependency treegraph
 
Reported: 2024-10-02 18:34 UTC by Sascha Biberhofer
Modified: 2024-10-10 01:41 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments
devel/py-incremental: Update to 24.7.2 (1.23 KB, patch)
2024-10-02 18:34 UTC, Sascha Biberhofer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha Biberhofer 2024-10-02 18:34:42 UTC
Created attachment 253966 [details]
devel/py-incremental: Update to 24.7.2

This should update devel/py-incremental to 24.7.2. The resulting port builds fine for me, appears to create a complete python package when compared with a version installed directly via pip and (perhaps most importantly) appears to works fine with recent py-twisted versions, which require a more recent version of py-incremental than the one currently in ports.

Feedback is welcome as always. :)
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2024-10-02 19:12:22 UTC
Committed with adjustments, thanks!
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-10-02 19:13:15 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0472a238188abdac5673554480581a30495dbc73

commit 0472a238188abdac5673554480581a30495dbc73
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-10-02 19:10:52 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-10-02 19:12:32 +0000

    devel/py-incremental: update 21.3.0 → 24.7.2

    PR:     281823
    Submitted by:   Sascha Biberhofer <ports@skyforge.at> (initial version)

 devel/py-incremental/Makefile | 6 ++++--
 devel/py-incremental/distinfo | 6 +++---
 2 files changed, 7 insertions(+), 5 deletions(-)
Comment 3 John Hein 2024-10-07 21:57:51 UTC
This update breaks on python3.8 and python3.9 (in poudriere and out). [[1]]

This is likely complicated by being stuck with an older setuptools.  Going even older to setuptools58 is too old, of course - that doesn't support pyproject.toml / pep517, and this version of py-incremental doesn't have setup.py

py-incremental 24.7.2 builds if I patch my ports tree to use setuptools 75.1.0 (not sure where between 63.1.0 and 75.1.0 it starts working).  But that update to setuptools 75.1.0 is WIP pending other changes (bug 270358).

If the py-incremental update to 24.7.2 is not needed, maybe it can be reverted. And then make the update later when setuptools is updated to 75.1.0.

[[1]]
===>  Building for py38-incremental-24.7.2
* Getting build dependencies for wheel...
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 380, in <module>
    main()
  File "/usr/local/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 364, in main
    json_out["return_val"] = hook(**hook_input["kwargs"])
  File "/usr/local/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 141, in get_requires
_for_build_wheel
    return hook(config_settings)
  File "/usr/local/lib/python3.8/site-packages/setuptools/build_meta.py", line 177, in get_requires_for_build_wheel
    return self._get_build_requires(
  File "/usr/local/lib/python3.8/site-packages/setuptools/build_meta.py", line 159, in _get_build_requires
    self.run_setup()
  File "/usr/local/lib/python3.8/site-packages/setuptools/build_meta.py", line 174, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 1, in <module>
  File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 86, in setup
    _install_setup_requires(attrs)
  File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 75, in _install_setup_requires
    dist = MinimalDistribution(attrs)
  File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 57, in __init__
    super().__init__(filtered)
  File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 474, in __init__
    for ep in metadata.entry_points(group='distutils.setup_keywords'):
  File "/usr/local/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 999, in entry
_points
    return SelectableGroups.load(eps).select(**params)
  File "/usr/local/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 449, in load
    ordered = sorted(eps, key=by_group)
  File "/usr/local/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 996, in <gene
xpr>
    eps = itertools.chain.from_iterable(
  File "/usr/local/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/_itertools.py", line 16, in uniq
ue_everseen
    k = key(element)
AttributeError: 'PathDistribution' object has no attribute '_normalized_name'

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/py-incremental
Comment 4 John Hein 2024-10-07 21:58:44 UTC
Maybe revert and add bug 270358 to 'Depends on'?
Comment 5 John Hein 2024-10-07 22:20:59 UTC
(In reply to John Hein from comment #4)
I suspect py-incremental 24.7.2 might be needed for the py-twisted update (bug 281824 which was a security update although it does not appear that a corresponding change to security/vuxml was committed).
Comment 6 Sascha Biberhofer 2024-10-07 22:27:33 UTC
(In reply to John Hein from comment #5)
I'm sorry about the troubles here, I did not test the port with older python versions. :(

This version is indeed necessary for the py-twisted update which fixes a security vulnerability as you've correctly noted.

There is an additional dependency recorded in py-incremental's pyproject.toml for python versions <3.11:

https://github.com/twisted/incremental/blob/incremental-24.7.2/pyproject.toml#L5

Could it be that this dependency is simply missing for these python versions?
Comment 7 John Hein 2024-10-08 00:19:13 UTC
(In reply to Sascha Biberhofer from comment #6)
> There is an additional dependency recorded in py-incremental's pyproject.toml for python versions <3.11

py38-tomli-2.0.1_2 and py39-tomli-2.0.1_2 were installed when the build attempts failed.
Comment 8 Yuri Victorovich freebsd_committer freebsd_triage 2024-10-08 04:05:04 UTC
(In reply to John Hein from comment #3)

> This update breaks on python3.8 and python3.9 (in poudriere and out). [[1]]

I don't think that we can guarantee compatibility with Python versions older than the default Python version in ports.

Committers typically (almost always) only check with the default Python version.
Comment 9 John Hein 2024-10-08 17:15:03 UTC
(In reply to Yuri Victorovich from comment #8)
Yes, I understand how some things like this are some amount of best effort.

I think once setuptools is updated, this breakage goes away for free.  I'm not too worried about it at the moment.

I am test driving just using setuptools 75.1.0 in a local ports tree while waiting for all the surrounding python infrastructure issues to "work themselves out" (seems close).  Anyway, that helped get past this issue for the couple cases locally where it was needed.  Maybe that will help someone else.

I don't even think I would bother marking this broken for py38/39 at this point unless too many reports of the problem (including automated build logs) crop up.
Comment 10 John Hein 2024-10-10 01:41:45 UTC
(In reply to John Hein from comment #9)
It looks like the update to py-pyproject_hooks (1.1.0 -> 1.1.0_1) might be the culprit for this "no attribute '_normalized_name'" problem with py38/py39.

It breaks py-setuptools-scm the same way (see bug 281847 comment 10).