Bug 270358 - devel/py-setuptools: update to 81.0.0
Summary: devel/py-setuptools: update to 81.0.0
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Charlie Li
URL: https://reviews.freebsd.org/D46236
Keywords:
: 271364 282353 293089 294348 294838 (view as bug list)
Depends on: 270243 270510 273722 280646 281083 285467 293763 293772 293773 293778 293779 293782 293783 293794 294378 294381 294404 294431 294460 294470 294471 294633 295084 296510 296511
Blocks: 275877 279985 293635 293637 299101 300119 245316 274407 286575 286626 287581 293630 293631 293632 293633 293636 294505 294506
  Show dependency tree / graph
 
Reported: 2023-03-20 13:05 UTC by Wen Heping
Modified: 2026-10-26 22:27 UTC (History)
71 users (show)

See Also:
sunpoet: maintainer-feedback+
antoine: exp-run+


Attachments
Update to 67.6.0 (1.60 KB, text/plain)
2023-03-20 13:05 UTC, Wen Heping
no flags Details
devel/py-setuptools update to 67.6.1 (968 bytes, patch)
2023-04-16 01:06 UTC, Mike Fisher
no flags Details | Diff
Patch to update to 67.7.2 (834 bytes, patch)
2023-04-24 21:05 UTC, George Mitchell
no flags Details | Diff
py-setuptools-68.0.0.patch (1.35 KB, patch)
2023-06-22 03:52 UTC, Alastair Hogge
no flags Details | Diff
py-setuptools-68.0.0.patch (3.06 KB, patch)
2023-06-23 02:02 UTC, Alastair Hogge
no flags Details | Diff
py-setuptools-68.0.0.patch (3.09 KB, patch)
2023-06-23 06:42 UTC, Alastair Hogge
no flags Details | Diff
devel/py-setuptools: Update to 68.2.2 (3.98 KB, patch)
2023-10-12 01:04 UTC, Alastair Hogge
no flags Details | Diff
Update to 69.0.2 (4.00 KB, patch)
2023-11-29 01:25 UTC, Alastair Hogge
no flags Details | Diff
devel/py-setuptools: Update to 69.0.3 (4.20 KB, patch)
2023-12-24 00:24 UTC, Alastair Hogge
no flags Details | Diff
devel/py-setuptools: Update to 69.1.0 (4.20 KB, patch)
2024-02-16 02:11 UTC, Alastair Hogge
no flags Details | Diff
devel/py-setuptools: Update to 69.1.1 (4.19 KB, patch)
2024-02-29 00:16 UTC, Alastair Hogge
no flags Details | Diff
devel/py-setuptools: Update to 69.2.0 (4.20 KB, patch)
2024-03-31 00:30 UTC, Alastair Hogge
no flags Details | Diff
devel/py-setuptools: Update to 75.3.0 (5.65 KB, patch)
2025-03-15 02:19 UTC, Alastair Hogge
vishwin: maintainer-approval-
Details | Diff
py-Tatsu diff (1.91 KB, patch)
2025-10-30 06:32 UTC, Nicholas Kirby
no flags Details | Diff
py-TatSu poudriere run on setuptools version 63 (31.96 KB, text/plain)
2025-10-30 06:34 UTC, Nicholas Kirby
no flags Details
py-TatSu poudriere run on setuptools version 80 (35.84 KB, text/plain)
2025-10-30 06:34 UTC, Nicholas Kirby
no flags Details
py-setuptools 78.1.1 (2.80 KB, patch)
2026-03-11 08:51 UTC, Kevin Bowling
vishwin: maintainer-approval-
Details | Diff
devel/py-virtualenvwrapper 4.8.4_2 patch (1.51 KB, patch)
2026-04-14 04:28 UTC, Hiroo Ono
no flags Details | Diff
security/py-btchip-python 0.1.32_3 patch (1.01 KB, patch)
2026-04-14 04:39 UTC, Hiroo Ono
no flags Details | Diff
sysutils/py-howdoi patch incompatible with setuptools 63.1.0 (2.48 KB, patch)
2026-04-15 00:53 UTC, Hiroo Ono
no flags Details | Diff
www/py-webob 1.8.9_1 patch (1.69 KB, patch)
2026-04-15 02:58 UTC, Hiroo Ono
no flags Details | Diff
net/ryu 4.26_8 patch (1.76 KB, patch)
2026-04-15 06:25 UTC, Hiroo Ono
no flags Details | Diff
math/py-mathics-scanner 2.0.0_2 patch incompatible with setuptools 63.1.0 (2.19 KB, patch)
2026-04-15 06:49 UTC, Hiroo Ono
no flags Details | Diff
www/py-webob 1.8.9_1 2nd patch (1.26 KB, patch)
2026-04-15 11:26 UTC, Hiroo Ono
no flags Details | Diff
security/py-iris-client 2.0.1_2 patch (2.81 KB, patch)
2026-04-15 11:47 UTC, Hiroo Ono
no flags Details | Diff
science/py-meshio 5.3.5_2 patch incompatible with setuptools 63.1.0 (1.22 KB, patch)
2026-04-15 23:03 UTC, Hiroo Ono
no flags Details | Diff
devel/py-tree-sitter 0.20.4_2 atch (1.83 KB, patch)
2026-04-16 05:30 UTC, Hiroo Ono
no flags Details | Diff
science/py-paida 3.2.1_2.10.1_3 patch (1.44 KB, patch)
2026-04-16 08:39 UTC, Hiroo Ono
no flags Details | Diff
sysutils/py-howdoi 2.0.20_7 patch a little modified (2.73 KB, patch)
2026-04-17 08:50 UTC, Hiroo Ono
no flags Details | Diff
sysutils/iocage 1.12_1 patch (2.23 KB, patch)
2026-04-17 08:51 UTC, Hiroo Ono
no flags Details | Diff
sysutils/iocage-devel patch (2.32 KB, patch)
2026-04-17 08:53 UTC, Hiroo Ono
no flags Details | Diff
security/theonionbox patch (1.19 KB, patch)
2026-04-19 11:17 UTC, Hiroo Ono
no flags Details | Diff
devel/py-persistent patch (2.51 KB, patch)
2026-04-19 12:06 UTC, Hiroo Ono
no flags Details | Diff
misc/thfuck 3.32_1 patch incompatible with setuptools 63.1.0 (2.46 KB, patch)
2026-04-20 01:00 UTC, Hiroo Ono
no flags Details | Diff
security/py-gnupg 3.1.1_2 patch (1010 bytes, patch)
2026-04-20 09:40 UTC, Hiroo Ono
no flags Details | Diff
irc/py-limnoria patch (1.47 KB, patch)
2026-04-21 09:12 UTC, Hiroo Ono
no flags Details | Diff
devel/py-zconfig update to 4.3 patch incompatible with setuptools 63.1.0 (2.21 KB, patch)
2026-04-21 09:15 UTC, Hiroo Ono
no flags Details | Diff
finance/py-bitcoin patch (731 bytes, patch)
2026-04-21 09:25 UTC, Hiroo Ono
no flags Details | Diff
devel/py-get-reader 1.0.0_2 patch (1.48 KB, patch)
2026-07-01 11:00 UTC, Hiroo Ono
no flags Details | Diff
devel/py-oci 2.180.0_1 patch (1.23 KB, patch)
2026-07-02 08:39 UTC, Hiroo Ono
no flags Details | Diff
devel/py-datatest 0.11.1_4 patch (1.48 KB, patch)
2026-07-02 12:13 UTC, Hiroo Ono
no flags Details | Diff
security/py-ssh-audit 3.3.0_1 patch incompatible with setuptools 63.1.0 (1.44 KB, patch)
2026-07-02 12:26 UTC, Hiroo Ono
no flags Details | Diff
math/py-lrcalc 2.1_4 patch incompatible with setuptools 63.1.0 (1.35 KB, patch)
2026-07-02 14:18 UTC, Hiroo Ono
no flags Details | Diff
textproc/py-elasticsearch-culator 5.8.4_3 patch (2.71 KB, patch)
2026-07-02 18:00 UTC, Hiroo Ono
no flags Details | Diff
www/web2ldap patch (1.42 KB, patch)
2026-07-02 20:41 UTC, Hiroo Ono
no flags Details | Diff
finance/py-thepassiveinvestor 1.2.2_1 patch (1.62 KB, patch)
2026-07-02 21:03 UTC, Hiroo Ono
no flags Details | Diff
devel/py-unittest2 1.1.0_4 patch (1.50 KB, patch)
2026-07-03 13:52 UTC, Hiroo Ono
no flags Details | Diff
devel/py-python-semantic-release 10.5.3_7 patch (1.55 KB, patch)
2026-07-03 14:30 UTC, Hiroo Ono
no flags Details | Diff
math/py-slepc4py 3.22.2_6 patch (1.48 KB, patch)
2026-07-03 18:10 UTC, Hiroo Ono
no flags Details | Diff
archivers/py-extractcode 31.0.0_2 patch (1.37 KB, patch)
2026-07-03 18:24 UTC, Hiroo Ono
no flags Details | Diff
science/py-meshio 5.3.5 regenerated patch. incompatible with setuptools 63.1.0 (1.22 KB, patch)
2026-07-03 21:04 UTC, Hiroo Ono
no flags Details | Diff
x11-fonts/py-compreffor update to 0.6.0 patch (2.08 KB, patch)
2026-07-07 06:16 UTC, Hiroo Ono
no flags Details | Diff
textproc/py-wordcloud 1.9.6_1 patch incompatible with setuptools 63.1.0 (1.26 KB, patch)
2026-07-07 06:35 UTC, Hiroo Ono
no flags Details | Diff
devel/cpplint 2.0.2_1 patch incompatible with setuptools 63.1.0 (1.11 KB, patch)
2026-07-08 13:16 UTC, Hiroo Ono
no flags Details | Diff
graphics/py-tesserocr 2.10.0_1 patch incompatible with setuptools 63.1.0 (2.26 KB, patch)
2026-07-10 12:10 UTC, Hiroo Ono
no flags Details | Diff
finance/py-fundamentalanalysis 0.3.1_1 patch (1.60 KB, patch)
2026-07-11 11:10 UTC, Hiroo Ono
no flags Details | Diff
Update to 83.0.0 (independent test) (1.67 KB, patch)
2026-07-28 02:43 UTC, Ulas SAYGIN
no flags Details | Diff
Patch to Mk/Uses/python.mk to handle '.' and '_' conversion in .whl filenames (1.85 KB, patch)
2026-08-09 11:46 UTC, Jan Martin Mikkelsen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wen Heping freebsd_committer freebsd_triage 2023-03-20 13:05:51 UTC
Created attachment 241004 [details]
Update to 67.6.0

- Update to 67.6.0
Comment 1 Charlie Li freebsd_committer freebsd_triage 2023-03-20 15:51:44 UTC
Note: we can't do this until USE_PYTHON=distutils is switched to devel/py-setuptools58.
Comment 2 Antoine Brodin freebsd_committer freebsd_triage 2023-03-22 16:43:58 UTC
Exp-run looks fine (0 new failure compared to setuptools 63.1.0)
Comment 3 Wen Heping freebsd_committer freebsd_triage 2023-03-23 00:10:52 UTC
(In reply to Charlie Li from comment #1)
Hope this switch soon, some ports update require setuptools >65.0.
Comment 4 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-03-26 21:14:20 UTC
(In reply to Wen Heping from comment #3)

I have ports update pending for newer setuptools. It'll be great if you could commit it tomorrow. Otherwise I'd like to do so. Thanks.
Comment 5 Charlie Li freebsd_committer freebsd_triage 2023-03-26 21:22:29 UTC
Please don't yet. I have it running locally as well, but only for those under PEP-517 and not the distutils (setup.py) method. The exp-run showing no build failures is a mere coincidence.

The diff as it stands right now will not work for Python 3.12 at all. Additionally, the commented TEST_DEPENDS et al need to remain, since they will become usable once setuptools is removed as a RUN_DEPENDS unconditionally (addressed separately).
Comment 6 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-03-27 15:04:16 UTC
Hmm, I don't quite follow you regarding the PY_SETUPTOOLS and py-setuptools58.

We definitely would have:
- some port use USE_PYTHON=pep517 with newer setuptools
- many other ports still use USE_PYTHON=distutils

If you want to use py-setuptools58 (or anything except py-setuptools) for the latter, how can these ports coexist?
What's your plan to handle the conflict between py-setuptools and py-setuptools58?

Take textproc/codespell 2.2.4 for example.
from pyproject.toml (https://github.com/codespell-project/codespell/blob/v2.2.4/pyproject.toml#L66-L67):
[build-system]
requires = ["setuptools>=64", "setuptools_scm[toml]>=6.2"]

What is your solution for not updating py-setuptools?
Comment 7 Charlie Li freebsd_committer freebsd_triage 2023-03-27 16:16:06 UTC
Direct invocation of setup.py is explicitly not supported upstream after setuptools 58, so USE_PYTHON=distutils will use devel/py-setuptools58. Long technical read, but: https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html

setuptools is to be removed and forbidden to be specified as a RUN_DEPENDS. It is not necessary after deprecating pkg_resources and replacing its functionality with importlib, causes precisely the conflicts you describe and even wrong dependency trees.

wheel demonstrates a wrong dependency tree, since setuptools has no wheel functionality of its own and thus relies on it for bdist_wheel, etc. Since Python 3.12 no longer includes distutils, the current setuptools build procedure will not work and will have to use the PEP-517 procedure to build itself, which includes having wheel available beforehand.
Comment 8 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-03-27 16:57:52 UTC
I know all of them already but it does not answer my question at the end of comment #6.

I agree that setuptools should be removed from runtime dependency, but it still lives as a build dependency.

I'm talking about the real world. Not everyone builds packages in a clean environment, e.g. poudriere or jail. Users could build/run things directly on a FreeBSD box.

Let's say, a users needs both ports:
- port A uses USE_PYTHON=pep517 with newer setuptools
  ==> port A and py-setuptools (its build dependency)
- port B uses USE_PYTHON=distutils
  ==> port B and py-setuptoosl58 (its build dependency)

And your solution just does not work because py-setuptools conflicts with py-setuptoosl58.

Even if "the exp-run showing no build failures is a mere coincidence", it means we could use setuptools 67.6.0 now.
Comment 9 Charlie Li freebsd_committer freebsd_triage 2023-03-27 17:15:57 UTC
(In reply to Po-Chuan Hsieh from comment #8)
It's unfortunate that they have to conflict, particularly in not clean environments, but this is the upstream directive. Remember that much of Python's "real world" revolves around virtual environments (and pre-built wheels when available), not "bare metal". When upstream have been pleading everyone for years to stop directly executing setup.py, going as far as setting a last supported version for it, it's time to take heed even if "bare metal" conflicts arise. Conflicts like this suck big time but the ecosystem has to move forward.

What is further unsustainable is continuing to use latest setuptools on USE_PYTHON=distutils and running exp-runs on every update, knowing full well that this method is explicitly unsupported upstream and will eventually break and go away. This port will get updated to 67.6.0 or whatever release it may be once this is settled, but only after USE_PYTHON=distutils is rightfully banished to setuptools 58.
Comment 10 Christos Chatzaras 2023-04-15 16:55:20 UTC
py39-setuptools-63.1.0 is vulnerable:
  py39-setuptools -- denial of service vulnerability
  CVE: CVE-2022-40897
  WWW: https://vuxml.FreeBSD.org/freebsd/1b38aec4-4149-4c7d-851c-3c4de3a1fbd0.html
Comment 11 Mike Fisher 2023-04-16 01:06:03 UTC
Created attachment 241522 [details]
devel/py-setuptools update to 67.6.1

Looks like this won't be applied, but if it works for some environments, maybe the patch can save someone 5 minutes.
Comment 12 George Mitchell 2023-04-24 18:01:07 UTC
Version 67.7.2 was released just a few hours ago: https://pypi.org/project/setuptools/
Comment 13 George Mitchell 2023-04-24 21:05:31 UTC
Created attachment 241717 [details]
Patch to update to 67.7.2

In the spirit of the previous attachment, here's one that updates to 67.7.2.  It compiles, but I have not done any real testing of the result yet.
Comment 14 Charlie Li freebsd_committer freebsd_triage 2023-04-25 01:04:03 UTC
Update must build under PEP-517; the current method does not work on Python 3.12. This also does not get updated until after setuptools is both removed as RUN_DEPENDS and USE_PYTHON=distutils switched to setuptools58.
Comment 15 Charlie Li freebsd_committer freebsd_triage 2023-05-11 22:34:14 UTC
*** Bug 271364 has been marked as a duplicate of this bug. ***
Comment 16 p5B2EA84B3 2023-05-31 12:50:45 UTC
Because of
py39-setuptools-63.1.0 is vulnerable:
  py39-setuptools -- denial of service vulnerability
  CVE: CVE-2022-40897
  WWW: https://vuxml.FreeBSD.org/freebsd/1b38aec4-4149-4c7d-851c-3c4de3a1fbd0.html

priority has to be set to: affects many

I'd appreciate if we could have an version in the ports for Python3.9 that has no vulnerabilities. That should have priority over problems in Python3.12.
Comment 17 Charlie Li freebsd_committer freebsd_triage 2023-05-31 12:58:26 UTC
(In reply to p5B2EA84B3 from comment #16)
No.

The logistical problem affects every version of Python. There are still way too many packages that use distutils/setup.py, which is explicitly not supported past setuptools 58. This setup is already delicate enough and any updates have to be done in a specific order.
Comment 18 Dan Langille freebsd_committer freebsd_triage 2023-06-20 15:25:45 UTC
Is there any way for us minions watching this to monitor progress?
Comment 19 Charlie Li freebsd_committer freebsd_triage 2023-06-21 19:10:26 UTC
(In reply to Dan Langille from comment #18)
The big task currently is bug 270510, primarily to minimise the blast radius in rebuilding. Most packages have not needed setuptools to run for quite some time.
Comment 20 Alastair Hogge 2023-06-22 03:52:42 UTC
Created attachment 242931 [details]
py-setuptools-68.0.0.patch

A patch I am using locally for some minor Python Port development. It is provided here for interested users; I think it meets the current plans for Python and Setuptools in the Ports tree, if not, am happy to work on it.
Comment 21 Charlie Li freebsd_committer freebsd_triage 2023-06-22 14:53:23 UTC
Comment on attachment 242931 [details]
py-setuptools-68.0.0.patch

The only BUILD_DEPENDS and RUN_DEPENDS should be wheel. build and installer are already included as part of USE_PYTHON=pep517. plist is autogenerated from RECORD so USE_PYTHON=autoplist needs to remain. You will also need to rebase on the latest tree revision and remove everything under files/; nothing in there is/will be relevant anymore (easy_install is no longer installed).

Additionally, the test suite can be exposed once bug 270510 is completed.
Comment 22 Alastair Hogge 2023-06-23 02:02:44 UTC
Created attachment 242941 [details]
py-setuptools-68.0.0.patch
Comment 23 Alastair Hogge 2023-06-23 02:04:34 UTC
(In reply to Charlie Li from comment #21)

OK, I think this round of feedback has been addressed with the updated patch, thanks. 

> Additionally, the test suite can be exposed once bug 270510 is completed.

I will post a comment in that thread, thank you.
Comment 24 Alastair Hogge 2023-06-23 06:42:23 UTC
Created attachment 242943 [details]
py-setuptools-68.0.0.patch

Restore ${PYDISTUTILS_SETUP}
Comment 25 Charlie Li freebsd_committer freebsd_triage 2023-06-23 11:34:26 UTC
Comment on attachment 242943 [details]
py-setuptools-68.0.0.patch

${PYDISTUTILS_SETUP} is not used with USE_PYTHON=pep517. In any case, this is incorrect since this would not work with the upcoming Python 3.12 which removed distutils entirely.
Comment 26 Alastair Hogge 2023-06-26 01:01:48 UTC
Comment on attachment 242941 [details]
py-setuptools-68.0.0.patch

Restore previous path removing ${PYDISTUTILS_SETUP}
Comment 27 Alastair Hogge 2023-06-26 01:02:49 UTC
Comment on attachment 242943 [details]
py-setuptools-68.0.0.patch

Remove patch with unnecessary re-addition of  ${PYDISTUTILS_SETUP}
Comment 28 p5B2EA84B3 2023-06-27 07:51:26 UTC
This bug gets increasingly annoying. It has the potential for a rant, but I’ ll ask questions instead:

1. Why is the importance of this bug set to “Affects Only Me“? This is obviously wrong. It has to be changed to “Affects Many People ”.

2. Bug 270510 is a blocker. There importance is correctly set to “Affects Many People “. There are 2 lists of ports to work at, each three months old. The latest comment is from 2023-03-30 09:40:18 UTC. There is no indication visible that there has been done any work since then.

3. Have port maintainers of the ports on the lists of Bug 270510 been informed that they should “remove setuptools from RUN_DEPENDS”?

4. Do we need to create new PRs for each port of the  Bug 270510 lists?

5. As “the list” is three months old, is there a need for an actualized list?

6. Do we need here a supervision of the FreeBSD bugmasters for coordinating the progress as progress is not visible except for someone trying to provide a patch but that won't solve the Bug 270510 lists?
Comment 29 Charlie Li freebsd_committer freebsd_triage 2023-06-27 14:05:31 UTC
(In reply to p5B2EA84B3 from comment #28)
All of these bugs are ports framework-level bugs, as the dependencies involved are not specified in individual ports, but may have some transience; it's trickier than it looks. Lack of comments et al does not in any way imply lack of activity. That exp-run list is still current as the failure modes largely have not changed. There is nothing you can do here.
Comment 30 p5B2EA84B3 2023-07-17 22:47:48 UTC
(In reply to Charlie Li from comment #29)
As transparency lacks and words like "tricky" may hide a bigger mess, please show the place where reviews are discussed and state of progress can be looked at. I doubt that this issue is handled in an appropriate professional way. 

Can we do better, please?
Comment 31 commit-hook freebsd_committer freebsd_triage 2023-07-18 00:57:34 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9a80a6ee5e8ebf5c279b3d7a9e7e8b7dbabbaf0a

commit 9a80a6ee5e8ebf5c279b3d7a9e7e8b7dbabbaf0a
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2023-07-18 00:16:21 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2023-07-18 00:53:09 +0000

    devel/py-setuptools: convert individual consumers to ${PY_SETUPTOOLS}

    Currently a no-op, but in the future outputs the correct setuptools
    port depending on whether USES_PYTHON=distutils is specified.

    With hat: python
    PR: 270510, 270358

 archivers/py-blosc2/Makefile                          | 2 +-
 archivers/py-python-rpm-packaging/Makefile            | 2 +-
 archivers/py-sozipfile/Makefile                       | 2 +-
 archivers/py-zopfli/Makefile                          | 2 +-
 astro/py-metpy/Makefile                               | 2 +-
 astro/py-spacetrack/Makefile                          | 2 +-
 audio/py-gtts/Makefile                                | 2 +-
 benchmarks/uica/Makefile                              | 2 +-
 biology/py-resdk/Makefile                             | 2 +-
 databases/py-aiomysql/Makefile                        | 2 +-
 databases/py-asyncmy/Makefile                         | 2 +-
 databases/py-fastparquet/Makefile                     | 2 +-
 databases/py-geoalchemy2/Makefile                     | 2 +-
 databases/py-mysqlclient/Makefile                     | 2 +-
 databases/py-psycopg-c/Makefile                       | 2 +-
 databases/py-psycopg-pool/Makefile                    | 2 +-
 databases/py-psycopg/Makefile                         | 2 +-
 databases/py-sqlalchemy20/Makefile                    | 2 +-
 databases/py-tiledb/Makefile                          | 2 +-
 databases/rrdtool/Makefile                            | 2 +-
 deskutils/py-send2trash/Makefile                      | 2 +-
 deskutils/recoll/Makefile                             | 2 +-
 deskutils/zim/Makefile                                | 2 +-
 devel/ipython/Makefile                                | 2 +-
 devel/libgusb/Makefile                                | 2 +-
 devel/mercurial/Makefile                              | 2 +-
 devel/nanopb/Makefile                                 | 2 +-
 devel/py-QtPy/Makefile                                | 2 +-
 devel/py-aiosignal/Makefile                           | 2 +-
 devel/py-ansi/Makefile                                | 2 +-
 devel/py-anyio/Makefile                               | 2 +-
 devel/py-apptools/Makefile                            | 2 +-
 devel/py-aspectlib/Makefile                           | 2 +-
 devel/py-astroid/Makefile                             | 2 +-
 devel/py-attrs-strict/Makefile                        | 2 +-
 devel/py-autopage/Makefile                            | 2 +-
 devel/py-avro/Makefile                                | 2 +-
 devel/py-b2sdk/Makefile                               | 2 +-
 devel/py-backports.cached-property/Makefile           | 2 +-
 devel/py-backports.entry-points-selectable/Makefile   | 2 +-
 devel/py-blinker/Makefile                             | 2 +-
 devel/py-bytecode/Makefile                            | 2 +-
 devel/py-cachetools/Makefile                          | 2 +-
 devel/py-calver/Makefile                              | 2 +-
 devel/py-canonicaljson/Makefile                       | 2 +-
 devel/py-case/Makefile                                | 2 +-
 devel/py-cmd2/Makefile                                | 2 +-
 devel/py-configobj/Makefile                           | 2 +-
 devel/py-configupdater/Makefile                       | 2 +-
 devel/py-ctypesgen/Makefile                           | 2 +-
 devel/py-curtsies/Makefile                            | 2 +-
 devel/py-custodian/Makefile                           | 2 +-
 devel/py-cwcwidth/Makefile                            | 2 +-
 devel/py-cython-test-exception-raiser/Makefile        | 2 +-
 devel/py-d2to1/Makefile                               | 2 +-
 devel/py-dask/Makefile                                | 2 +-
 devel/py-datasette/Makefile                           | 2 +-
 devel/py-ddtrace/Makefile                             | 2 +-
 devel/py-debugpy/Makefile                             | 2 +-
 devel/py-deepmerge/Makefile                           | 2 +-
 devel/py-distributed/Makefile                         | 2 +-
 devel/py-editdistance/Makefile                        | 2 +-
 devel/py-envier/Makefile                              | 2 +-
 devel/py-envisage/Makefile                            | 4 ++--
 devel/py-epsilon/Makefile                             | 2 +-
 devel/py-ewah-bool-utils/Makefile                     | 2 +-
 devel/py-executing/Makefile                           | 2 +-
 devel/py-fasteners/Makefile                           | 2 +-
 devel/py-fixtures/Makefile                            | 2 +-
 devel/py-flake8-black/Makefile                        | 2 +-
 devel/py-flake8-bugbear/Makefile                      | 2 +-
 devel/py-flake8-comprehensions/Makefile               | 2 +-
 devel/py-flake8_simplify/Makefile                     | 2 +-
 devel/py-google-crc32c/Makefile                       | 2 +-
 devel/py-hunter/Makefile                              | 2 +-
 devel/py-importlib-metadata/Makefile                  | 2 +-
 devel/py-inflect/Makefile                             | 2 +-
 devel/py-jaraco.classes/Makefile                      | 2 +-
 devel/py-jaraco.collections/Makefile                  | 2 +-
 devel/py-jaraco.context/Makefile                      | 2 +-
 devel/py-jaraco.env/Makefile                          | 2 +-
 devel/py-jaraco.functools/Makefile                    | 2 +-
 devel/py-jaraco.itertools/Makefile                    | 2 +-
 devel/py-jaraco.logging/Makefile                      | 2 +-
 devel/py-jaraco.text/Makefile                         | 2 +-
 devel/py-jaraco.timing/Makefile                       | 2 +-
 devel/py-jaraco.util/Makefile                         | 2 +-
 devel/py-jupyter-server-mathjax/Makefile              | 2 +-
 devel/py-klepto/Makefile                              | 2 +-
 devel/py-libcst/Makefile                              | 2 +-
 devel/py-libtmux/Makefile                             | 2 +-
 devel/py-llfuse/Makefile                              | 2 +-
 devel/py-monkeytype/Makefile                          | 2 +-
 devel/py-moto/Makefile                                | 2 +-
 devel/py-msgpack/Makefile                             | 2 +-
 devel/py-mypy-protobuf/Makefile                       | 2 +-
 devel/py-mypy/Makefile                                | 2 +-
 devel/py-mystic/Makefile                              | 2 +-
 devel/py-opentelemetry-api/Makefile                   | 2 +-
 devel/py-opentelemetry-sdk/Makefile                   | 2 +-
 devel/py-parameterized/Makefile                       | 2 +-
 devel/py-parver/Makefile                              | 2 +-
 devel/py-path/Makefile                                | 2 +-
 devel/py-pathos/Makefile                              | 2 +-
 devel/py-pdoc/Makefile                                | 2 +-
 devel/py-pep621/Makefile                              | 2 +-
 devel/py-pint-pandas/Makefile                         | 2 +-
 devel/py-pint/Makefile                                | 2 +-
 devel/py-pip-requirements-parser/Makefile             | 2 +-
 devel/py-pip-run/Makefile                             | 2 +-
 devel/py-pip-tools/Makefile                           | 4 ++--
 devel/py-pipenv/Makefile                              | 4 ++--
 devel/py-pluggy/Makefile                              | 2 +-
 devel/py-pooch/Makefile                               | 2 +-
 devel/py-pox/Makefile                                 | 2 +-
 devel/py-ppft/Makefile                                | 2 +-
 devel/py-prance/Makefile                              | 2 +-
 devel/py-py-partiql-parser/Makefile                   | 2 +-
 devel/py-pyee/Makefile                                | 2 +-
 devel/py-pyface/Makefile                              | 2 +-
 devel/py-pyina/Makefile                               | 2 +-
 devel/py-pyls-black/Makefile                          | 2 +-
 devel/py-pyperf/Makefile                              | 2 +-
 devel/py-pyproject-metadata/Makefile                  | 2 +-
 devel/py-pyscaffold/Makefile                          | 2 +-
 devel/py-pytest-checkdocs/Makefile                    | 2 +-
 devel/py-pytest-enabler/Makefile                      | 2 +-
 devel/py-pytest-helpers-namespace/Makefile            | 2 +-
 devel/py-pytest-html/Makefile                         | 2 +-
 devel/py-pytest-localserver/Makefile                  | 2 +-
 devel/py-pytest-mpl/Makefile                          | 2 +-
 devel/py-pytest-plus/Makefile                         | 2 +-
 devel/py-pytest-services/Makefile                     | 2 +-
 devel/py-pytest-subtests/Makefile                     | 2 +-
 devel/py-pytest-sugar/Makefile                        | 2 +-
 devel/py-pytest/Makefile                              | 2 +-
 devel/py-pythonfinder/Makefile                        | 2 +-
 devel/py-pytweening/Makefile                          | 2 +-
 devel/py-pytz-deprecation-shim/Makefile               | 2 +-
 devel/py-pyvisa-py/Makefile                           | 2 +-
 devel/py-pyvisa/Makefile                              | 2 +-
 devel/py-pyyaml-include/Makefile                      | 2 +-
 devel/py-represent/Makefile                           | 2 +-
 devel/py-requirementslib/Makefile                     | 2 +-
 devel/py-resolvelib1/Makefile                         | 2 +-
 devel/py-retype/Makefile                              | 2 +-
 devel/py-rope/Makefile                                | 2 +-
 devel/py-rstr/Makefile                                | 2 +-
 devel/py-scikit-base/Makefile                         | 2 +-
 devel/py-semver/Makefile                              | 2 +-
 devel/py-setuptools-declarative-requirements/Makefile | 2 +-
 devel/py-setuptools-pkg/Makefile                      | 2 +-
 devel/py-setuptools-rust/Makefile                     | 4 ++--
 devel/py-shtab/Makefile                               | 2 +-
 devel/py-simpleeval/Makefile                          | 2 +-
 devel/py-subprocess-tee/Makefile                      | 2 +-
 devel/py-tempora/Makefile                             | 2 +-
 devel/py-time-machine/Makefile                        | 2 +-
 devel/py-trove-classifiers/Makefile                   | 2 +-
 devel/py-twine/Makefile                               | 2 +-
 devel/py-txi2p-tahoe/Makefile                         | 2 +-
 devel/py-typeguard/Makefile                           | 2 +-
 devel/py-validate-pyproject/Makefile                  | 2 +-
 devel/py-versioneer/Makefile                          | 2 +-
 devel/py-versioningit/Makefile                        | 2 +-
 devel/py-vistir/Makefile                              | 2 +-
 devel/py-watermark/Makefile                           | 2 +-
 devel/py-yamllint/Makefile                            | 2 +-
 devel/py-zarr/Makefile                                | 2 +-
 devel/py-zipp/Makefile                                | 2 +-
 devel/pylint/Makefile                                 | 2 +-
 devel/pytype/Makefile                                 | 2 +-
 finance/py-technical/Makefile                         | 2 +-
 graphics/py-PyOpenGL-accelerate/Makefile              | 2 +-
 graphics/py-fotokilof/Makefile                        | 2 +-
 graphics/py-pillow/Makefile                           | 2 +-
 graphics/py-pygeos/Makefile                           | 2 +-
 graphics/py-pyproj/Makefile                           | 2 +-
 graphics/py-rasterstats/Makefile                      | 2 +-
 graphics/py-traitsui/Makefile                         | 2 +-
 graphics/py-webcolors/Makefile                        | 2 +-
 math/e-antic/Makefile                                 | 2 +-
 math/py-autograd/Makefile                             | 2 +-
 math/py-cvxopt/Makefile                               | 2 +-
 math/py-fsph/Makefile                                 | 2 +-
 math/py-jacobi/Makefile                               | 2 +-
 math/py-jax/Makefile                                  | 2 +-
 math/py-ml-dtypes/Makefile                            | 2 +-
 math/py-numba-stats/Makefile                          | 2 +-
 math/py-openTSNE/Makefile                             | 2 +-
 math/py-pandas/Makefile                               | 2 +-
 math/py-permutation/Makefile                          | 2 +-
 math/py-py-find-1st/Makefile                          | 2 +-
 math/py-pygsl/Makefile                                | 2 +-
 math/py-pytensor/Makefile                             | 2 +-
 math/py-resample/Makefile                             | 2 +-
 math/py-rpy2/Makefile                                 | 2 +-
 math/py-scikit-fem/Makefile                           | 2 +-
 misc/libcomps/Makefile                                | 2 +-
 misc/py-crudini/Makefile                              | 2 +-
 misc/py-openai/Makefile                               | 2 +-
 misc/py-palettable/Makefile                           | 2 +-
 misc/py-spdx-tools/Makefile                           | 2 +-
 misc/py-tqdm/Makefile                                 | 2 +-
 misc/py-wandb/Makefile                                | 2 +-
 multimedia/py-pymediainfo/Makefile                    | 2 +-
 multimedia/py-pysubs2/Makefile                        | 2 +-
 multimedia/streamlink/Makefile                        | 2 +-
 net-mgmt/crmsh/Makefile                               | 4 ++--
 net-mgmt/net-snmp/Makefile                            | 4 ++--
 net/onionprobe/Makefile                               | 2 +-
 net/py-matrix-synapse-ldap3/Makefile                  | 2 +-
 net/py-pyroute2.minimal/Makefile                      | 2 +-
 net/py-pyroute2/Makefile                              | 2 +-
 news/py-sabctools/Makefile                            | 2 +-
 print/py-freetype-py/Makefile                         | 2 +-
 print/py-python-ly/Makefile                           | 2 +-
 print/py-ufolib2/Makefile                             | 2 +-
 print/py-uharfbuzz/Makefile                           | 2 +-
 science/py-asdf-standard/Makefile                     | 2 +-
 science/py-asdf-transform-schemas/Makefile            | 2 +-
 science/py-asdf-unit-schemas/Makefile                 | 2 +-
 science/py-asdf/Makefile                              | 2 +-
 science/py-pymatgen-analysis-alloys/Makefile          | 2 +-
 science/py-segregation/Makefile                       | 2 +-
 science/py-signac/Makefile                            | 2 +-
 science/py-spaghetti/Makefile                         | 2 +-
 science/smoldyn/Makefile                              | 2 +-
 science/thermofun/Makefile                            | 2 +-
 security/gpgme/Makefile                               | 4 ++--
 security/libpwquality/Makefile                        | 2 +-
 security/py-certomancer/Makefile                      | 2 +-
 security/py-httpx-auth/Makefile                       | 2 +-
 security/py-pyhanko-certvalidator/Makefile            | 2 +-
 security/py-pyhanko/Makefile                          | 2 +-
 security/py-pyspnego/Makefile                         | 2 +-
 sysutils/datadog-integrations/Makefile                | 2 +-
 sysutils/py-ansible-compat/Makefile                   | 2 +-
 sysutils/py-ansible-core/Makefile                     | 2 +-
 sysutils/py-ansible-lint/Makefile                     | 2 +-
 sysutils/py-distro/Makefile                           | 2 +-
 sysutils/py-hcloud/Makefile                           | 2 +-
 sysutils/py-liquidctl/Makefile                        | 2 +-
 sysutils/py-ploy/Makefile                             | 2 +-
 sysutils/py-ploy_ezjail/Makefile                      | 2 +-
 sysutils/py-psutil/Makefile                           | 2 +-
 sysutils/syslog-ng/Makefile                           | 2 +-
 textproc/codespell/Makefile                           | 2 +-
 textproc/py-asciinema/Makefile                        | 2 +-
 textproc/py-ini2toml/Makefile                         | 2 +-
 textproc/py-jq/Makefile                               | 2 +-
 textproc/py-linkify-it-py/Makefile                    | 2 +-
 textproc/py-markdown/Makefile                         | 2 +-
 textproc/py-markups/Makefile                          | 2 +-
 textproc/py-mistune/Makefile                          | 2 +-
 textproc/py-mistune2/Makefile                         | 2 +-
 textproc/py-nbsphinx/Makefile                         | 2 +-
 textproc/py-normality/Makefile                        | 2 +-
 textproc/py-ocrmypdf/Makefile                         | 2 +-
 textproc/py-openstep-plist/Makefile                   | 2 +-
 textproc/py-parse-type/Makefile                       | 2 +-
 textproc/py-parse/Makefile                            | 2 +-
 textproc/py-petl/Makefile                             | 2 +-
 textproc/py-pyaml/Makefile                            | 2 +-
 textproc/py-pygments/Makefile                         | 2 +-
 textproc/py-python-markdown-math/Makefile             | 2 +-
 textproc/py-sphinx-autoapi/Makefile                   | 2 +-
 textproc/py-sphinxcontrib-towncrier/Makefile          | 2 +-
 textproc/py-uc-micro-py/Makefile                      | 2 +-
 textproc/py-unicodeitplus/Makefile                    | 2 +-
 textproc/translate-toolkit/Makefile                   | 2 +-
 textproc/xml2rfc/Makefile                             | 2 +-
 www/onionbalance/Makefile                             | 2 +-
 www/py-aiohttp/Makefile                               | 2 +-
 www/py-aioquic/Makefile                               | 2 +-
 www/py-branca/Makefile                                | 2 +-
 www/py-cheroot/Makefile                               | 2 +-
 www/py-cherrypy/Makefile                              | 2 +-
 www/py-cssutils/Makefile                              | 2 +-
 www/py-dj41-django-cors-headers/Makefile              | 2 +-
 www/py-dj41-django-rich/Makefile                      | 2 +-
 www/py-django-bleach/Makefile                         | 2 +-
 www/py-django-braces/Makefile                         | 2 +-
 www/py-django-cors-headers/Makefile                   | 2 +-
 www/py-django-crispy-forms/Makefile                   | 2 +-
 www/py-django-haystack/Makefile                       | 2 +-
 www/py-django-rich/Makefile                           | 2 +-
 www/py-feedgenerator/Makefile                         | 2 +-
 www/py-flask-migrate/Makefile                         | 2 +-
 www/py-flask-socketio/Makefile                        | 2 +-
 www/py-flask-wtf/Makefile                             | 2 +-
 www/py-flask/Makefile                                 | 2 +-
 www/py-folium/Makefile                                | 2 +-
 www/py-hyperlink/Makefile                             | 2 +-
 www/py-lektor/Makefile                                | 2 +-
 www/py-pastedeploy/Makefile                           | 2 +-
 www/py-pyjwt/Makefile                                 | 2 +-
 www/py-pylsqpack/Makefile                             | 2 +-
 www/py-scgi/Makefile                                  | 2 +-
 www/py-tornado/Makefile                               | 2 +-
 www/py-waitress/Makefile                              | 2 +-
 www/py-werkzeug/Makefile                              | 2 +-
 www/py-woob/Makefile                                  | 2 +-
 www/radicale/Makefile                                 | 2 +-
 x11-fonts/py-afdko/Makefile                           | 2 +-
 x11-fonts/py-cffsubr/Makefile                         | 2 +-
 x11-fonts/py-glyphsLib/Makefile                       | 2 +-
 x11-fonts/py-opentype-sanitizer/Makefile              | 2 +-
 x11-fonts/py-ufonormalizer/Makefile                   | 2 +-
 309 files changed, 316 insertions(+), 316 deletions(-)
Comment 32 Dan Langille freebsd_committer freebsd_triage 2023-07-18 19:05:56 UTC
(In reply to commit-hook from comment #31)
Thank you for this.

I am now able to clear monitoring alerts which are over 95 days old.
Comment 33 Enji Cooper freebsd_committer freebsd_triage 2023-09-06 22:58:20 UTC
The current version is 68.1.2 according to PyPI: https://pypi.org/project/setuptools/ . I noticed this because I was looking at what we were shipping in relation to what is available with FreeBSD and I was surprised by the fact that the copy provided by FreeBSD is over a year old at this point.

I echo the need for transparency, given that there're CVEs out for devel/py-setuptools currently: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-40897#:~:text=Python%20Packaging%20Authority%20(PyPA)%20setuptools,ReDoS)%20in%20package_index.py. .

What is being done to rectify any issues present with the port(s) and update them to non-vulnerable versions?
Comment 34 commit-hook freebsd_committer freebsd_triage 2023-10-11 12:10:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=121d8af16a7efd4f4ec25c5851f9976b396192c0

commit 121d8af16a7efd4f4ec25c5851f9976b396192c0
Author:     Dan Langille <dvl@FreeBSD.org>
AuthorDate: 2023-10-11 12:09:02 +0000
Commit:     Dan Langille <dvl@FreeBSD.org>
CommitDate: 2023-10-11 12:09:48 +0000

    devel/py-setuptools: Update to 68.0.0

    PR:             270358

 devel/py-setuptools/Makefile                                  |  3 +--
 devel/py-setuptools/distinfo                                  |  6 +++---
 .../files/patch-setuptools_package__index.py (gone)           | 11 -----------
 3 files changed, 4 insertions(+), 16 deletions(-)
Comment 35 Dan Langille freebsd_committer freebsd_triage 2023-10-11 12:15:36 UTC
Im sorry, I committed this without realizing.  Reverting.
Comment 36 commit-hook freebsd_committer freebsd_triage 2023-10-11 12:17:58 UTC
A commit in branch main references this bug:

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

commit b1f7e31dea5e702afc08d2cd7e993f36ecf824cc
Author:     Dan Langille <dvl@FreeBSD.org>
AuthorDate: 2023-10-11 12:16:09 +0000
Commit:     Dan Langille <dvl@FreeBSD.org>
CommitDate: 2023-10-11 12:17:08 +0000

    devel/py-setuptools: revert upgrade to 68.0.0

    This reverts commit 121d8af16a7efd4f4ec25c5851f9976b396192c0.

    PR:             270358

 devel/py-setuptools/Makefile                                  |  3 ++-
 devel/py-setuptools/distinfo                                  |  6 +++---
 .../files/patch-setuptools_package__index.py (new)            | 11 +++++++++++
 3 files changed, 16 insertions(+), 4 deletions(-)
Comment 37 Alastair Hogge 2023-10-12 01:04:55 UTC
Created attachment 245574 [details]
devel/py-setuptools: Update to 68.2.2

devel/py-setuptools: Update to 68.2.2

https://setuptools.pypa.io/en/stable/history.html#v68-2-2
Comment 38 Alastair Hogge 2023-10-12 01:14:35 UTC
(In reply to p5B2EA84B3 from comment #30)

I failed miserably at making any movement or progress with Python on FreeBSD, I have next to no idea on what is going on, or how to proceed, attempting to pick up the pieces is a waste of everyone's time. Ports remain outdated, FreeBSD's Python platform lags as a result. Formal, and informal members of the community have leveled legitimate criticism on the progress in this space, see comment #28, comment 30, and comment 33; true to community values, silence is the response.
Comment 39 Charlie Li freebsd_committer freebsd_triage 2023-10-12 01:28:01 UTC
https://wiki.freebsd.org/Python/setuptools

Specifically on this bug, bug 270510 and switching all USE_PYTHON=distutils to use devel/py-setuptools58 must be completed, in that order, before this can be committed. Any help is welcome. Life, other obligations and fires get in the way, and their effects are amplified during rather complicated processes like this.
Comment 40 Enji Cooper freebsd_committer freebsd_triage 2023-10-15 17:19:20 UTC
(In reply to Charlie Li from comment #39)

Please feel free to reach out to me at ngie@ if you think I could help with this.

$work directly benefits from the update, as well as others, so I wouldn't mind doing the some of the heavy lifting (if it hasn't already been done) and passing off the work to someone else in the ports space (usually my ports patch submissions stall in the handoff/review phase since I only have a src-committers bit).
Comment 41 Cy Schubert freebsd_committer freebsd_triage 2023-11-10 04:23:30 UTC
BTW, I've installed py39-setuptools-68.2.2 using the attached patch locally. No issues so far. sysutils/py-ansible-core, which needs this version builds and installs correctly. Added sysutils/py-ansible-core PR to dependency list.
Comment 42 Cy Schubert freebsd_committer freebsd_triage 2023-11-10 04:45:49 UTC
Added PR/275005 to depends.
Comment 43 Alastair Hogge 2023-11-29 01:25:23 UTC
Created attachment 246650 [details]
Update to 69.0.2

Update to 69.0.2.

> poudriere-testport 12.4-{amd64,i386}-release: OK
> poudriere-testport 13.2-{amd64,i386}-release: OK
> poudriere-testport 14.0-{amd64,i386}-release: OK
> poudriere-testport main-{amd64,i386}:         OK
Comment 44 Alastair Hogge 2023-11-29 01:52:31 UTC
In case anyone missed it, there is fabulous piece of writing in the latest FreeBSD Journal, by one Charlie Li, PEP 517: Python Packaging’s New World Order. The article, rather eloquently, explains the context behind this Bug Report:

https://freebsdfoundation.org/our-work/journal/browser-based-edition/pep-517-python-packagings-new-world-order/

Thanks, Charlie.
Comment 45 Alastair Hogge 2023-12-24 00:24:26 UTC
Created attachment 247216 [details]
devel/py-setuptools: Update to 69.0.3

Update to 69.0.3:
https://github.com/pypa/setuptools/compare/v63.1.0...v69.0.3
Comment 46 Cy Schubert freebsd_committer freebsd_triage 2024-01-31 04:37:28 UTC
I've applied this patch to my up and coming tree (main + patches like this one, including making python 3.10 default). There have been on build issues so far.

Is depending on PR/270510 necessary?
Comment 47 Charlie Li freebsd_committer freebsd_triage 2024-01-31 04:43:11 UTC
(In reply to Cy Schubert from comment #46)
It is necessary. Further, there will be an additional dependency to switch the USE_PYTHON=distutils consumers to devel/py-setuptools58 due to the publicised deprecation and incompatibility for directly executing setup.py. Only one setuptools can be present in the same environment at a time. In the end, this specific order is to limit churn by only performing one mass PORTREVISION bump (bug 270510).
Comment 48 Alastair Hogge 2024-02-16 02:11:20 UTC
Created attachment 248496 [details]
devel/py-setuptools: Update to 69.1.0

devel/py-setuptools: Update to 69.1.0

Update to 69.1.0:
https://github.com/pypa/setuptools/compare/v63.1.0...v69.1.0

- Make use of PEP517 for installation
- Use bsd.port.options.mk/bsd.port.mk inclusion pair over legacy.
- Use ${DISTVERSION} over ${PORTVERSION}
- Port Makefile housekeeping
- Drop obsolete patches

poudriere-testport (Python-3.11):
> 13.2-{amd64,i386}-release: OK
> 14.0-{amd64,i386}-release: OK
> main-{amd64,i386}:         OK
Comment 49 Alastair Hogge 2024-02-29 00:16:43 UTC
Created attachment 248818 [details]
devel/py-setuptools: Update to 69.1.1

Update to 69.1.1:
https://github.com/pypa/setuptools/compare/v63.1.0...v69.1.1

- Drop obsolete patches
- Port Makefile housekeeping
- Switch to PEP517 build
- Use ${DISTVERSION} over ${PORTVERSION}
- Use bsd.port.options.mk/bsd.port.mk inclusion pair over legacy.

poudriere-testport:
> 13.2-{amd64,i386}-release: OK
> 14.0-{amd64,i386}-release: OK
> main-{amd64,i386}:         OK
Comment 50 Cy Schubert freebsd_committer freebsd_triage 2024-03-28 16:02:25 UTC
What's the status of this? Reason: I have a number ansible commits (in a branch) waiting in the wings pending this update. Once this is pushed can I push the batch of commits.
Comment 51 Charlie Li freebsd_committer freebsd_triage 2024-03-28 16:07:02 UTC
(In reply to Cy Schubert from comment #50)
At least bug 270510 must be completed. At least all USE_PYTHON=distutils cases need to move off this port before proceeding. There is no way around this without causing far too much unnecessary churn.
Comment 52 wen 2024-03-28 23:52:03 UTC
(In reply to Charlie Li from comment #51)
Shall we create devel/py-setuptools69 for temporarily use ?
Comment 53 void 2024-03-30 18:36:10 UTC
https://data.safetycli.com/vulnerabilities/CVE-2022-40897/52495/ is dated Dec 23, 2022.
Affecting all versions < 65.5.1.

Given that in ports we have

$ pkg search -x setuptools
py27-setuptools44-44.1.1_1     Python packages installer
py310-setuptools-63.1.0_1      Python packages installer
py310-setuptools58-58.5.3_3    Python packages installer
py311-setuptools-63.1.0_1      Python packages installer
py311-setuptools58-58.5.3_3    Python packages installer
py38-setuptools-63.1.0_1       Python packages installer
py38-setuptools58-58.5.3_3     Python packages installer
py39-setuptools-63.1.0_1       Python packages installer

why aren't any of these in vuln.xml.xz ?
Comment 54 Dan Langille freebsd_committer freebsd_triage 2024-03-30 19:36:29 UTC
(In reply to void from comment #53)
Does there have to be a reason?

Please add them. :)
Comment 55 Alastair Hogge 2024-03-31 00:30:10 UTC
Created attachment 249587 [details]
devel/py-setuptools: Update to 69.2.0

Update to 69.2.0:
https://github.com/pypa/setuptools/compare/v63.1.0...v69.2.0

[TESTPORT] poudriere-testport devel/py-setuptools:
[TESTPORT] main-amd64-current: PASS
[TESTPORT] main-i386-current: PASS
[TESTPORT] 13_2-amd64-release: PASS
[TESTPORT] 13_2-i386-release: PASS
[TESTPORT] 13_3-amd64-release: PASS
[TESTPORT] 13_3-i386-release: PASS
[TESTPORT] 14_0-amd64-release: PASS
[TESTPORT] 14_0-i386-release: PASS
Comment 56 Charlie Li freebsd_committer freebsd_triage 2024-07-08 06:06:11 UTC
This is now additionally blocked on a necessary upstream commit to the current devel/py-pyproject_hooks, as this will not build otherwise, PR and patch forthcoming.
Comment 57 Charlie Li freebsd_committer freebsd_triage 2024-07-26 18:29:11 UTC
71.0.0 now allows for de-vendoring its own dependencies, and in fact now prefers them already installed in the environment. Work will now include making sure those declared dependencies are not circular.
Comment 58 Charlie Li freebsd_committer freebsd_triage 2024-07-30 18:28:23 UTC
72.0.0 removed setup.py test, will probably need corresponding python.mk changes.
Comment 59 Charlie Li freebsd_committer freebsd_triage 2024-08-06 14:20:17 UTC
Working diff posted as review D46236. To test, you will need to apply all dependent PRs before this one, especially bug 280646.
Comment 60 Charlie Li freebsd_committer freebsd_triage 2024-08-11 04:59:16 UTC
net/py-suds is a casualty of the setuptools.command.test removal/deprecation stubbing:

* Getting build dependencies for wheel...
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 380, in <module>
    main()
  File "/usr/local/lib/python3.11/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.11/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.11/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=[])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
    self.run_setup()
  File "/usr/local/lib/python3.11/site-packages/setuptools/build_meta.py", line 497, in run_setup
    super().run_setup(setup_script=setup_script)
  File "/usr/local/lib/python3.11/site-packages/setuptools/build_meta.py", line 313, in run_setup
    exec(code, locals())
  File "<string>", line 509, in <module>
ImportError: cannot import name 'normalize_path' from 'setuptools.command.test' (/usr/local/lib/python3.11/site-packages/setuptools/command/test.py)

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

Stop.
make: stopped making "build" in /usr/ports/net/py-suds

This package does not have a pyproject.toml and is thus not compliant with PEP-517, but even reverting the port to USE_PYTHON=distutils results in the same error.
Comment 61 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-14 18:52:45 UTC
72.2.0 released.
Comment 62 Erik Inge Bolsø 2024-09-30 14:26:11 UTC
Current version also vulnerable to CVE-2024-6345, fixed in 70.0.0 and later.

https://nvd.nist.gov/vuln/detail/CVE-2024-6345
https://huntr.com/bounties/d6362117-ad57-4e83-951f-b8141c6e7ca5

Also not in vulnxml.
Comment 63 Charlie Li freebsd_committer freebsd_triage 2024-10-04 17:16:02 UTC
distutils removed legacy msvc compiler modules, which made it into setuptools 74.0.0. Broke some consumers that happen to reference them, notably devel/gobject-introspection and math/py-numpy.
Comment 64 O. Hartmann 2024-10-09 14:22:46 UTC
I just ran into an issue with some Python scripts for a development environment requiring py-setuptools > 64.

How is this proceeding?
Comment 65 Cy Schubert freebsd_committer freebsd_triage 2024-10-27 13:49:41 UTC
*** Bug 282353 has been marked as a duplicate of this bug. ***
Comment 66 Cy Schubert freebsd_committer freebsd_triage 2024-10-28 02:12:12 UTC
(In reply to Po-Chuan Hsieh from comment #4)

Agreed. Our ansible ports are considerably out of date. Updating them requires a new py-setuptools.
Comment 67 Charlie Li freebsd_committer freebsd_triage 2024-11-16 14:41:48 UTC
75.3.0 available on phab. Latest upstream version is 75.5.0, which drops Python 3.8 support and requires devel/py-packaging 24.2, which I trust sunpoet@ will get to soon.
Comment 68 commit-hook freebsd_committer freebsd_triage 2024-12-12 07:02:41 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=86ae776a26aebe0e5b88a966d9980aa485d76c73

commit 86ae776a26aebe0e5b88a966d9980aa485d76c73
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2024-12-12 06:57:09 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2024-12-12 06:57:09 +0000

    sysutils/py-ansible-core: remove setuptools upper bound

    Upstream added upper bound as a precaution at release time; the
    later versions build fine. Remove patch as appropriate when this
    port gets updated.

    With hat: python
    PR: 270358

 sysutils/py-ansible-core/files/patch-pyproject.toml (new) | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 69 Alastair Hogge 2025-02-20 09:12:33 UTC
I have a local patch, based on review D46236, which updates to 75.8.0. Sing out if you are interested.

poudriere-testport devel/py-setuptools:
main-amd64-default: Pass
main-i386-default: Pass
13_4-amd64-release: Pass
13_4-i386-release: Pass
14_1-amd64-release: Pass
14_1-i386-release: Pass
14_2-amd64-release: Pass
14_2-i386-release: Pass
Comment 70 Charlie Li freebsd_committer freebsd_triage 2025-02-24 18:31:48 UTC
(In reply to Alastair Hogge from comment #69)
lang/python38 still exists in the tree (despite expired status) so this needs to be capped at 75.3.0 for now, as 75.4.0 and later drop support. I personally run the latest upstream locally. Many Python packages that specify version ranges for setuptools only specify a major version so temporarily capping at an older minor shouldn't be too much of an issue.
Comment 71 Alastair Hogge 2025-02-24 19:43:05 UTC
(In reply to Charlie Li from comment #70)

Good to know, thanks. A py-sphinx update is also going to require an update to setuptools.
Comment 72 Charlie Li freebsd_committer freebsd_triage 2025-03-13 03:53:07 UTC
devel/py-ordered-set has not been a dependency since 73.0.0, as its uses have been replaced by the standard `dict`: https://github.com/pypa/setuptools/commit/8afe0c3e9c4c56f5d7343dc21f743e9cf83c594a
Comment 73 Alastair Hogge 2025-03-15 02:19:33 UTC
Created attachment 258679 [details]
devel/py-setuptools: Update to 75.3.0

Update to 75.3.0:
* Drop obsolete patches
* Switch to PEP517 build
* Use ${DISTVERSION} over ${PORTVERSION}
* port{clippy|fmt|lint} housekeeping

https://github.com/pypa/setuptools/releases/tag/v75.3.0

git formatted patch, apply with -E

poudriere-testport devel/py-setuptools (Python-3.11):
main-amd64-default: Pass
main-i386-default: Pass
13_4-amd64-release: Pass
13_4-i386-release: Pass
13_5-amd64-release: Pass
13_5-i386-release: Pass
14_1-amd64-release: Pass
14_1-i386-release: Pass
14_2-amd64-release: Pass
14_2-i386-release: Pass
Comment 74 Charlie Li freebsd_committer freebsd_triage 2025-03-21 19:12:39 UTC
Comment on attachment 258679 [details]
devel/py-setuptools: Update to 75.3.0

This has been outdated, and certain variables are intentionally not alphabetically sorted. Current working revision in phab.
Comment 75 Alastair Hogge 2025-03-22 03:29:14 UTC
(In reply to Charlie Li from comment #74)
> [...] and certain variables are intentionally not alphabetically sorted.

The reason for that is?
Comment 76 Charlie Li freebsd_committer freebsd_triage 2025-03-24 20:22:51 UTC
(In reply to Alastair Hogge from comment #75)
Matches the specified order in pyproject.toml [core]. I don't think upstream necessarily intentionally specified them like such but having our Makefile match their order makes for easier maintenance as they add or remove dependencies, or when certain ones switch away from setuptools as their build backend.
Comment 77 Charlie Li freebsd_committer freebsd_triage 2025-03-31 17:46:47 UTC
Python 3.8 has been removed from the tree so back to tracking the latest upstream, phab is updated.
Comment 78 Charlie Li freebsd_committer freebsd_triage 2025-04-05 16:27:02 UTC
From a full rebuild spurred by a -CURRENT __FreeBSD_version, didn't realise that since 69.3.0 name normalisation [0] is enforced on the resulting bdist wheels. There will need to be an audit on consumer PORTNAMEs to ensure name normalisation is followed, ie Mako -> mako.

[0] https://packaging.python.org/en/latest/specifications/source-distribution-format/#source-distribution-file-name
Comment 79 Charlie Li freebsd_committer freebsd_triage 2025-04-05 21:04:31 UTC
(In reply to Charlie Li from comment #78)
s/69.3.0/75.8.1/ (also 75.3.1), 69.3.0 deals with sdists, but the breakage audit is bdists
Comment 80 Alastair Hogge 2025-04-06 00:41:05 UTC
(In reply to Charlie Li from comment #76)
> Matches the specified order in pyproject.toml [core]. I don't think upstream necessarily intentionally specified them like such but having our Makefile match their order makes for easier maintenance as they add or remove dependencies, or when certain ones switch away from setuptools as their build backend.

I do not see how that is a problem when we have port tools that, to some degree, codify the policies of the Ports tree. The Port's tools, as far as I know, do not implement the upstream policies of Python projects; these days, our development environments, with minimal keystrokes make it easy to select, yank, and sort lines in a Port Makefile, or an upstream pyproject.toml. The Porter's Handbook, mentions the various tools[1][2][3], contributors can, and recommends using before updating a Port, or submitting a new Port.

It is consistently boring when committers covertly demand that other contributors read their minds on how, or why a committer has implemented a personal policy within a Port. Honestly, if I had mind reading capacities, FreeBSD committers' would be the last people in the Universe whose mind I would want to read, in fact, in this hypothetical, I would rather make my exit than read the minds of FreeBSD committers.

Please reduce the friction contributors have to heal with; the aims of the Project are greater than the ego of any one, or many committers.

To good health.

1: https://docs.freebsd.org/en/books/porters-handbook/book/#testing-portlint
2: https://docs.freebsd.org/en/books/porters-handbook/book/#testing-portclippy
3: https://docs.freebsd.org/en/books/porters-handbook/book/#testing-porttools
Comment 81 Tatsuki Makino 2025-04-09 22:32:41 UTC
Has the build for devel/py-setuptools@py312 started?

In my environment, py312-setuptools-63.1.0_3 fails for well-known reasons.
I have already tried several times, but I want to determine whether the reason is that my environment is still on 12.4-STABLE :) or if it is due to py-setuptools itself.

The following is an excerpt from the log.

* Getting build dependencies for wheel...
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
    main()
  File "/usr/local/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in main
    json_out["return_val"] = hook(**hook_input["kwargs"])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 137, in get_requires_for_build_wheel
    backend = _build_backend()
              ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 70, in _build_backend
    obj = import_module(mod_path)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 999, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/wrkdirs/usr/ports/devel/py-setuptools/work-py312/setuptools-63.1.0/setuptools/__init__.py", line 16, in <module>
    import setuptools.version
  File "/wrkdirs/usr/ports/devel/py-setuptools/work-py312/setuptools-63.1.0/setuptools/version.py", line 1, in <module>
    import pkg_resources
  File "/wrkdirs/usr/ports/devel/py-setuptools/work-py312/setuptools-63.1.0/pkg_resources/__init__.py", line 2191, in <module>
    register_finder(pkgutil.ImpImporter, find_on_path)
                    ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?

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

Stop.
Comment 82 Charlie Li freebsd_committer freebsd_triage 2025-04-10 13:50:39 UTC
(In reply to Tatsuki Makino from comment #81)
setuptools specifically, Python 3.12 removed a few pkgutil methods, fixed in ports 8927fe8f67e32805fe94c94356b013d59ca4af25
Comment 83 Tatsuki Makino 2025-04-11 19:58:16 UTC
(In reply to Charlie Li from comment #82)

Thank you for fixing.
Most of */py-*@py312 can now be built.
Comment 84 Charlie Li freebsd_committer freebsd_triage 2025-05-04 00:52:52 UTC
As of 80.1.0, setup.py install is scheduled to be removed after 31 October. This may mean USE_PYTHON=distutils will only be for the remaining Python 2 packages after that.

As of 80.3.0, easy_install is removed from the tree.

phab is updated once again
Comment 85 Yasuhiro Kimura freebsd_committer freebsd_triage 2025-05-06 12:12:03 UTC
After all, what prevents devel/py-setuptools from updating to newer version right now ?
Comment 86 Charlie Li freebsd_committer freebsd_triage 2025-05-06 13:48:16 UTC
(In reply to Yasuhiro Kimura from comment #85)
This needs to be exp-run again, possibly multiple times. There are a number of breaking changes that need to be accounted for, namely comment 58, comment 60, comment 78 and soon comment 84.

Comment 78 (bdist name normalisation, mostly lowercasing) is probably the easiest to inventory and prepare for, by temporarily patching the affected pyproject.toml or setup.py or setup.cfg. sunpoet@ had pre-emptively patched some of their ports in this regard, so it's more or less finding the remaining ones.

The other breaking changes may be more involved.
Comment 87 p5B2EA84B3 2025-05-29 18:24:02 UTC
1.) This needs to be exp-run again, possibly multiple times.
Can we have a look on the list of exp-runs, and the result of the last one.

2.) Comment 58
Did this happen? 

3.) Comment 60
What relevance does net/py-suds have, and what priority does this PR have?
Can we deprecate ports like this as they do not meet the new requirements?

4.) Comment 78
Is there a list of affected ports to work on?
Why is this really necessary at this stage?

5.) Comment 84
I do not see any relevance to the current default Python version.

Maybe such important issues should not be the burden of a single commiter, what it look like. 

As a matter of facts, if Python ports do need years for resolving problems with current upstream PIPs, there is a need to for reviewing/auditing the process Python gets handled by FreeBSD. Python does move faster than the cleanup here does happen.

For reference: https://reviews.freebsd.org/D46236
Comment 88 p5B2EA84B3 2025-06-05 15:20:38 UTC
(In reply to Charlie Li from comment #86)
(In reply to p5B2EA84B3 from comment #87)

Can Charlie Li *please* answer my questions?
Comment 89 Enji Cooper freebsd_committer freebsd_triage 2025-06-11 18:38:30 UTC
Silly question: is there a way ports could be marked "broken" with newer versions of setuptools, issues could be filed for the issues, and the port can be upgraded? I really feel for you Charlie, but I'm concerned that this bug is seeking to solve everything perfectly, when in reality we just need a working solution that's good enough and we can work together to fix the remaining issues.

If I had a ports bit and a mentor, I would happily work with you or others to help where I could in this space. It's important to me as a developer/user and it's going to become increasingly important to handle this as a corporate consumer of FreeBSD.
Comment 90 Dmitry Marakasov freebsd_committer freebsd_triage 2025-07-01 17:22:57 UTC
Can we add devel/py-setuptools80 (or -devel) and corresponding USE_PYTHON=distutils80 (or -devel) for the time being instead?
This is blocking more and more port updates, in particular all py-types-* ports and needs to be resolved asap.
Comment 91 p5B2EA84B3 2025-07-01 19:32:18 UTC
MAINTAINER TIMEOUT !!!!!

Charlie Li was last seen here on 2025-05-06 13:48:16 UTC 
he has ignored any messages since.

This behavior is by no means acceptable anymore.
Furthermore it is damaging the reputation all FreeBSD committers, as contributors get frustrated more and more. 

If necessary this and other never ending PR-stories might go public in presentations for professionals.
Comment 92 Emanuel Haupt freebsd_committer freebsd_triage 2025-07-18 11:31:04 UTC
(In reply to Dmitry Marakasov from comment #90)

+1
Comment 93 commit-hook freebsd_committer freebsd_triage 2025-08-04 15:24:48 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=929e3cf31a51f5eb1fa5c758a5b6a64609b6d6c5

commit 929e3cf31a51f5eb1fa5c758a5b6a64609b6d6c5
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2025-08-04 15:00:36 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2025-08-04 15:23:35 +0000

    devel/py-types-*,devel/py-pytest-regtest: drop maintainership

    Updates for these ports are blocked by gravely outdated version of
    py-setuptools whoch python team does not care of updating or providing
    an alternative port with newer version for for years. It makes no
    sense in maintaining these in FreeBSD ports collection under these
    circumstances.

    PR:             270358

 devel/py-pytest-regtest/Makefile   | 2 +-
 devel/py-types-Flask/Makefile      | 2 +-
 devel/py-types-Jinja2/Makefile     | 2 +-
 devel/py-types-MarkupSafe/Makefile | 2 +-
 devel/py-types-Pillow/Makefile     | 2 +-
 devel/py-types-PyYAML/Makefile     | 2 +-
 devel/py-types-Werkzeug/Makefile   | 2 +-
 devel/py-types-click/Makefile      | 2 +-
 devel/py-types-futures/Makefile    | 2 +-
 devel/py-types-protobuf/Makefile   | 2 +-
 devel/py-types-psycopg2/Makefile   | 2 +-
 devel/py-types-requests/Makefile   | 2 +-
 devel/py-types-urllib3/Makefile    | 2 +-
 13 files changed, 13 insertions(+), 13 deletions(-)
Comment 95 Michael Osipov freebsd_committer freebsd_triage 2025-08-25 18:31:07 UTC
Also waiting for this: devel/py-maturin requires now setuptools 77.0.0 and I can't provide a patch for it :-(
Comment 96 Yasuhiro Kimura freebsd_committer freebsd_triage 2025-09-03 09:31:25 UTC
(In reply to Michael Osipov from comment #95)

Same here. Certbot 5.0 requires setuptools 77.0.3 or later.
Comment 97 Yuri Victorovich freebsd_committer freebsd_triage 2025-09-08 15:59:40 UTC
I'll take it.

This is a serious issue and needs to be resolved. Give me a day or two.
Comment 98 Charlie Li freebsd_committer freebsd_triage 2025-09-08 17:15:33 UTC
(In reply to Yuri Victorovich from comment #97)
No you will not. Yes this is a serious issue, but cannot be resolved quickly.
Comment 99 Charlie Li freebsd_committer freebsd_triage 2025-09-08 18:00:22 UTC
(In reply to Enji Cooper from comment #89)
How many times do I need to explain that there is no such thing as perfection here. Unfortunately, there is no such thing as "good enough" in this case either, since one change that fixes half the consumers also break the other half, and both halves contain major dependencies for other software. It's just a no-win situation.

*sigh* since $LIFE has gotten in the way of being able to properly keep track of which ports need name normalisation fixes, anyone interested (along with myself with some spare machine capacity) in helping move this along can start doing this: test build every setuptools consumer that also specify USE_PYTHON=pep517, with particular attention to those failing at stage, especially errors looking like:

===>  Staging for py311-Mako-1.3.5
===>   Generating temporary packing list
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/local/lib/python3.11/site-packages/installer/__main__.py", line 98, in <module>
    _main(sys.argv[1:], "python -m installer")
  File "/usr/local/lib/python3.11/site-packages/installer/__main__.py", line 86, in _main
    with WheelFile.open(args.wheel) as source:
  File "/usr/local/lib/python3.11/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/installer/sources.py", line 162, in open
    with zipfile.ZipFile(path) as f:
         ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/zipfile.py", line 1295, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/wrkdirs/overlays/overlay/textproc/py-mako/work-py311/Mako-1.3.5/dist/Mako-1.3.5*-*.whl'
*** Error code 1

Stop.
make: stopped making "stage" in /overlays/overlay/textproc/py-mako

There will be many such cases, between mixed cases needing to go all lowercase and [-_.] normalised to underscore. Reference: https://packaging.python.org/en/latest/specifications/binary-distribution-format/#escaping-and-unicode

Note that PORTNAME of each package should continue to match what upstream call themselves, so no premature underscoring. Override DISTNAME if necessary instead. This part is primarily on the part of each individual port maintainer.

Any proposed fix in Mk/Uses/python.mk must then be tested again on non-setuptools USE_PYTHON=pep517 consumers, since it is not known if other build backends completely implement the binary wheel name normalisation that setuptools eventually did.

Hope this helps further explain how fragile this situation is. Not something for "a day or two", even on powerful hardware, because this includes resource-intensive ports like LLVM and Rust:
Queued: 3469 Inspected: 0 Ignored: 0 Built: 0 Failed: 0 Skipped: 0 Fetched: 0 Remaining: 3469
Comment 100 George Mitchell 2025-09-08 22:54:00 UTC
I have eight packages that meet your condition.  To get my feet wet, I'll try x11-toolkits/py-tkinter, the one I'm the most familiar with.  To be clear. the idea is to locally upgrade to py-setuptools 80.9.0 and see if py-tkinter builds and runs?

Is there a patch for upgrading to 80.9.0?
Comment 101 Charlie Li freebsd_committer freebsd_triage 2025-09-09 13:52:57 UTC
(In reply to George Mitchell from comment #100)
The living patch is on phabricator as review D46236.

x11-toolkits/py-tkinter is a bad example since the name has always been normalised, so it has always built fine in this regard. Better examples are anything that has a dash "-" or dot "." or mixed cases in the Python package name, ie the part after "py-". In Python package metadata, all three of dash, underscore "_" or dot are normalised to dash, and mixed case to lowercase. However, when it comes to tarballs/source distributions and binary wheels (that we generate during do-build), dash, underscore and dot are normalised to underscore instead, since the wheel filename convention uses dash as a different semantic separator.

Anyway, here are nearly all fails (non-Python-related ones excluded) from the comment 99 run:

devel/py-graphql-core@py311 py311-graphql-core-3.2.6 build-depends build-depends 37
textproc/py-TatSu@py311 TatSu-5.13.1 stage stage 140
devel/py-qt5-sip@py311 py311-PyQt5-sip-12.17.0 stage stage 172
devel/py-jaraco.envs@py311 py311-jaraco.envs-2.6.0 stage stage 74
devel/py-backports.entry-points-selectable@py311 py311-backports.entry-points-selectable-1.3.0 stage stage 77
devel/py-cerberus@py311 py311-Cerberus-1.3.7 stage stage 53
audio/py-pyogg@py311 py311-PyOgg-0.6.14.a1_3 stage stage 139
net/py-pyroute2.minimal@py311 py311-pyroute2.minimal-0.7.12 stage stage 47
security/py-ssh-audit@py311 py311-ssh-audit-3.3.0 check-plist stage 60
devel/py-jaraco.env@py311 py311-jaraco.env-1.0.0 stage stage 60
devel/py-xstatic-term.js@py311 py311-xstatic-term.js-0.0.7.0_4 stage stage 113
devel/py-backports.tarfile@py311 py311-backports.tarfile-1.0.0 stage stage 101
textproc/py-genshi@py311 py311-Genshi-0.7.9 stage stage 98
devel/py-xstatic-jquery.tablesorter@py311 py311-xstatic-jquery.tablesorter-2.14.5.2_2 stage stage 82
devel/py-QtPy@py311 py311-QtPy-2.4.1 stage stage 69
devel/py-makefun@py311 py311-makefun-1.16.0 build-depends build-depends 53
devel/py-pyTooling@py311 py311-pyTooling-8.3.0_1 stage stage 117
devel/py-datatest@py311 py311-datatest-0.11.1_1 build build 44
devel/py-jaraco.functools@py311 py311-jaraco.functools-4.3.0 stage stage 76
devel/py-ruamel.yaml.clib@py311 py311-ruamel.yaml.clib-0.2.12 stage stage 97
textproc/py-zope.i18nmessageid@py311 py311-zope.i18nmessageid-6.0.1 stage stage 104
textproc/py-parsec@py311 parsec-3.17 stage-qa stage 49
devel/py-jaraco.path@py311 py311-jaraco.path-3.7.2 stage stage 121
devel/py-jaraco.classes@py311 py311-jaraco.classes-3.4.0 stage stage 88
devel/py-qtbuilder@py311 py311-PyQt-builder-1.18.2 stage stage 93
devel/py-zconfig@py311 py311-ZConfig-4.2 build build 52
devel/py-tree-sitter-languages@py311 py311-tree-sitter-languages-1.10.2 build build 873
devel/py-repoze.tm2@py311 py311-repoze.tm2-2.1_1,2 stage stage 105
devel/py-jaraco.stream@py311 py311-jaraco.stream-3.0.3 stage stage 77
net/py-zope.proxy@py311 py311-zope.proxy-5.3 stage stage 82
devel/py-get-reader@py311 py311-get-reader-1.0.0_1 build build 64
devel/py-Farama-Notifications@py311 py311-Farama-Notifications-0.0.4 stage stage 66
devel/py-zc.lockfile@py311 py311-zc.lockfile-3.0.post1_1 stage stage 166
net/py-pyroute2.protocols@py311 py311-pyroute2.protocols-0.6.13_2 stage stage 127
devel/py-Automat@py311 py311-Automat-25.4.16 stage stage 123
devel/py-backports.cached-property@py311 py311-backports.cached-property-1.0.2_1 stage stage 115
textproc/py-fluent.syntax@py311 py311-fluent.syntax-0.19.0_1 stage stage 111
devel/py-oslo.rootwrap@py311 py311-oslo.rootwrap-7.4.0 stage stage 156
devel/py-oslo.i18n@py311 py311-oslo.i18n-6.5.0 stage stage 192
devel/py-apscheduler@py311 py311-APScheduler-3.11.0 stage stage 241
devel/py-jsonargparse@py311 py311-jsonargparse-3.19.4 check-sanity check-sanity 45
devel/py-xstatic-jquery.quicksearch@py311 py311-xstatic-jquery.quicksearch-2.0.3.2_2 stage stage 154
devel/py-unittest2@py311 py311-unittest2-1.1.0_3 build build 163
audio/py-gtts@py311 py311-gTTS-2.5.4 stage stage 123
devel/py-dogpile.cache@py311 py311-dogpile.cache-1.3.3 stage stage 212
x11-fonts/py-FindSystemFontsFilename@py311 py311-FindSystemFontsFilename-0.3.2 stage stage 105
devel/py-qt6-sip@py311 py311-PyQt6-sip-13.10.2 stage stage 357
devel/py-backports.csv@py311 py311-backports.csv-1.0.7_2 stage stage 294
devel/py-oslo.context@py311 py311-oslo.context-5.7.0 stage stage 381
graphics/py-ManimPango@py311 py311-ManimPango-0.5.0 stage stage 661
security/py-coincurve@py311 py311-coincurve-21.0.0 build build 469
net/py-GeoIP2@py311 py311-GeoIP2-5.1.0 stage stage 330
devel/py-repoze.lru@py311 py311-repoze.lru-0.7_1 stage stage 176
math/py-islpy@py311 py311-islpy-2024.2 build build 563
www/py-flask-sphinx-themes@py311 py311-Flask-Sphinx-Themes-1.0.2 stage stage 166
www/py-flask-bootstrap@py311 py311-Flask-Bootstrap-3.3.7.1_2 stage stage 171
www/py-flask-moment@py311 py311-Flask-Moment-1.0.6 stage stage 186
security/py-flask-httpauth@py311 py311-Flask-HTTPAuth-4.8.0 stage stage 173
www/py-flask-simpleldap@py311 py311-Flask-SimpleLDAP-2.0.0 stage stage 186
math/py-cypari2@py311 py311-cypari2-2.2.2 check-plist stage 1085
devel/py-backports.zoneinfo@py311 py311-backports.zoneinfo-0.2.1_2 stage stage 92
devel/py-jaraco.itertools@py311 py311-jaraco.itertools-6.4.3 stage stage 124
net/py-ripe.atlas.cousteau@py311 py311-ripe.atlas.cousteau-2.0.0 stage stage 140
math/py-mathics-scanner py311-Mathics_Scanner-2.0.0_1 stage stage 106

Good example here is net/py-zope.proxy: the Python package name in metadata is "zope.proxy", but distribution name (ie DISTNAME) and generated wheel normalises the dot to underscore:

=======================<phase: build          >============================
[...]
Successfully built zope_proxy-5.3-cp311-cp311-freebsd_16_0_current_amd64.whl
=======================<phase: stage          >============================
===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes USER=nobody UID=65534 GID=65534
===>  Staging for py311-zope.proxy-5.3
===>   py311-zope.proxy-5.3 depends on file: /usr/local/bin/python3.11 - found
===>   Generating temporary packing list
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/local/lib/python3.11/site-packages/installer/__main__.py", line 98, in <module>
    _main(sys.argv[1:], "python -m installer")
  File "/usr/local/lib/python3.11/site-packages/installer/__main__.py", line 86, in _main
    with WheelFile.open(args.wheel) as source:
  File "/usr/local/lib/python3.11/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/installer/sources.py", line 162, in open
    with zipfile.ZipFile(path) as f:
         ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/zipfile.py", line 1295, in __init__
    self.fp = io.open(file, filemode)
              ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/wrkdirs/usr/ports/net/py-zope.proxy/work-py311/zope.proxy-5.3/dist/zope.proxy-5.3*.whl'
*** Error code 1

Stop.
make: stopped making "stage" in /usr/ports/net/py-zope.proxy

It will be up to each individual port maintainer to decide how they want to deal with naming the port directory wrt Python's name normalisation rules, but matching PORTNAME to the Python package metadata, even if distribution files are normalised differently as described before, has always been the case.
Comment 102 George Mitchell 2025-09-09 14:12:43 UTC
Thanks for the pointers!  I tried net/py-zope.proxy as you suggested, and of course I get the same failure you showed, plus a lot of "friendly" SetuptoolsDeprecationWarnings.  I'll read them and see if I understand them well enough to help.
Comment 103 George Mitchell 2025-09-15 22:48:36 UTC
(In reply to George Mitchell from comment #102)
To my great regret, I find I am not comprehending the code necessary to do this upgrade (I write lots of stand-alone python programs I use locally, but I've never successfully written a package that someone else could use).  So with considerable embarrassment, I'm going to have to withdraw myself from this effort.  If there's another simpler way I can help, let me know ...
Comment 104 Nicholas Kirby 2025-10-06 15:06:12 UTC
I just started looking into the list on comment #99 and beginning with devel/py-graphql-core, the new pyproject.toml file in 3.2.6 lists dependency of py-setuptools greater than 59, but less than 76. So, if I'm understanding it right, it'll never build even if we can push py-setuptools to 80.9.0.

Would it be amenable for me to update this port to 3.3.0a10? It's an alpha based on GraphQL.js 17.0.0a3, so not IDEAL, but since 3.3.0 drops py-setuptools and builds using uv_build, this could solve this particular port's problem with both the existing py-setuptools, and the future of py-setuptools.

I just want to know if this would be allowable and I should go ahead and run up an updated port, and get a couple of poudriere builds going, or if it's a bad idea for a reason I am unaware of.

Thanks,
Nick
Comment 105 Nicholas Kirby 2025-10-30 06:32:52 UTC
Created attachment 265019 [details]
py-Tatsu diff

py-Tatsu diff that builds in setuptools80 and setuptool63
Comment 106 Nicholas Kirby 2025-10-30 06:33:39 UTC
Alright, I've been doing some work on this in my downtime and have a few questions...

No iteration of playing with the DISTNAME has gotten me the results I've wanted in regards to staging problems being resolved with both devel/py-setuptools at 63 and 80. It always is looking for one casement or another.

In the cases of devel/py-cerberus and textproc/py-TatSu, I've gotten both to build cleanly at both versions by overiding python.mk (in the Makefile) the PEP517_INSTALL_CMD and do-install to make the .whl and .dist-info files agnostic to their actual name.

So on line 762
PEP517_INSTALL_CMD?=	${PYTHON_CMD} -m installer --destdir ${STAGEDIR} --prefix ${PREFIX} ${BUILD_WRKSRC}/dist/${PORTNAME:C|[-_]+|_|g}-${DISTVERSION}*.whl
becomes
PEP517_INSTALL_CMD?=	${PYTHON_CMD} -m installer --destdir ${STAGEDIR} --prefix ${PREFIX} ${BUILD_WRKSRC}/dist/*.whl

and on line 992
${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME:C|[_]+|_|g}-${DISTVERSION}*.dist-info/RECORD >> ${_PYTHONPKGLIST}
becomes
${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/*.dist-info/RECORD >> ${_PYTHONPKGLIST}

Set in the individual port Makefiles.

Now the question is, how insane is this? I'm still very new to this kind of work and don't love getting hacky, but would this a) work, and b) be an acceptable change at the port level to provide compatibility until either the port updates beyond the problem(s), or a python.mk update/rewrite covers these cases?

Please let me know, I'm here to help or here to learn depending on how badly I've done this :)
Comment 107 Nicholas Kirby 2025-10-30 06:34:17 UTC
Created attachment 265020 [details]
py-TatSu poudriere run on setuptools version 63
Comment 108 Nicholas Kirby 2025-10-30 06:34:38 UTC
Created attachment 265021 [details]
py-TatSu poudriere run on setuptools version 80
Comment 109 Thierry Thomas freebsd_committer freebsd_triage 2025-11-04 14:05:20 UTC
Upgrading science/py-netCDF4 requires setuptools>=77.0.1.
Comment 110 Olivier Cochard freebsd_committer freebsd_triage 2025-11-24 12:45:14 UTC
Upgrading net/py-maxminddb needs setuptools>=77.0.3
Comment 111 Michael Osipov freebsd_committer freebsd_triage 2025-11-24 13:35:17 UTC
(In reply to Nicholas Kirby from comment #106)

there is an open issue which has the same issue. Maybe we should simply generalize to *.whl, that's it?
Comment 112 Nicholas Kirby 2025-11-24 14:10:21 UTC
(In reply to Michael Osipov from comment #111)

It's worked to fix the builds in a couple of ports I've updated and test built in poudriere port trees I've set up with both current (63.1.0_3) and test (80.9.0) to test both environments.

However, without knowing the reason for the Mk file to be as specific as it is I'm not sure I would change it globally.

I am by no means an expert in ports or python. My thoughts are putting a bit of ugly overwrites in the effected ports would be the better option, hoping they can individually "outgrow" the problem with updates. Since the problem seems to effect ~100 ports out of thousands, I'd be worried about making a global change, but I'm sure someone on the python team is qualified to make that call.

Fixing it either way I'm happy to do as much legwork as is needed. Would love the python team to sign off though since, like Charlie Li said, there's no such thing as a perfect solution here. But we are increasingly needing to move forward in some way. Sitting at 63.x is increasingly hampering updates.
Comment 113 Nicholas Kirby 2025-11-24 14:10:48 UTC
(In reply to Michael Osipov from comment #111)

It's worked to fix the builds in a couple of ports I've updated and test built in poudriere port trees I've set up with both current (63.1.0_3) and test (80.9.0) to test both environments.

However, without knowing the reason for the Mk file to be as specific as it is I'm not sure I would change it globally.

I am by no means an expert in ports or python. My thoughts are putting a bit of ugly overwrites in the effected ports would be the better option, hoping they can individually "outgrow" the problem with updates. Since the problem seems to effect ~100 ports out of thousands, I'd be worried about making a global change, but I'm sure someone on the python team is qualified to make that call.

Fixing it either way I'm happy to do as much legwork as is needed. Would love the python team to sign off though since, like Charlie Li said, there's no such thing as a perfect solution here. But we are increasingly needing to move forward in some way. Sitting at 63.x is increasingly hampering updates.
Comment 114 Michael Osipov freebsd_committer freebsd_triage 2025-11-25 10:39:44 UTC
(In reply to Nicholas Kirby from comment #113)

Would you care to create a separate issue?
Comment 115 Nicholas Kirby 2025-11-25 11:08:21 UTC
(In reply to Michael Osipov from comment #114)

Sorry, I don't quite understand.

Do you mean create a new PR specifically updating the individual ports and see if they get approved?

Or a PR suggesting that generalizing *.whl will correct the problem globally?

Thanks
Comment 116 Michael Osipov freebsd_committer freebsd_triage 2025-11-25 11:10:26 UTC
(In reply to Nicholas Kirby from comment #115)

The latter, generalize it.
Comment 117 Nicholas Kirby 2025-11-25 11:12:38 UTC
(In reply to Michael Osipov from comment #116)

Sounds good, I'll make the changes to my poudriere ports tree, do a test run of all the ports listed in Charlie Li's previous exp-run fail list, and then submit it as a new PR.

Thanks!
Comment 118 Charlie Li freebsd_committer freebsd_triage 2025-11-25 13:17:27 UTC
(In reply to Nicholas Kirby from comment #106)
Patch pyproject.toml or setup.py or setup.cfg, whichever one in the source that declares the Python package name, to the correct normalised form that would be enforced in later setuptools. The patch, or at least that aspect of it, can be removed after setuptools is updated in the tree. This is the approach that we (python@) have been using as such cases are encountered.
Comment 120 Nicholas Kirby 2025-11-25 14:05:47 UTC
(In reply to Charlie Li from comment #118)

Thanks for the guidance, and the examples, I'll get started on the list this morning, and once updated/tested, I'll submit them one at a time.

Sorry about the other PR. I suspected it was a security feature, but I didn't think about the typojacking problems pypi had had in the past. Just assumed it was an abundance of caution (which I agree is a good thing)
Comment 121 Max Brazhnikov freebsd_committer freebsd_triage 2025-12-16 20:00:13 UTC
(In reply to Charlie Li from comment #101)
Charlie, do you plan to notify maintainers of the affected ports and ask for help? There are three ports maintained by kde@ in your list and I wasn't aware of them.
Comment 122 Li-Wen Hsu freebsd_committer freebsd_triage 2025-12-29 14:39:44 UTC
devel/py-coverage also needs newer setuptools to upgrade to newer version.
Comment 123 Charlie Li freebsd_committer freebsd_triage 2026-02-10 18:06:07 UTC
*** Bug 293089 has been marked as a duplicate of this bug. ***
Comment 124 Charlie Li freebsd_committer freebsd_triage 2026-02-10 18:08:22 UTC
82.0.0 has removed pkg_resources wholesale. Yet another intrusive change since I'm sure there still exist stragglers using it instead of the importlib suite.
Comment 125 Max Brazhnikov freebsd_committer freebsd_triage 2026-02-10 19:46:15 UTC
(In reply to Charlie Li from comment #124)
> 82.0.0 has removed pkg_resources wholesale. Yet another intrusive change since
> I'm sure there still exist stragglers using it instead of the importlib suite.

Perhaps we should start deprecating old software, that doesn't support newer setuptools?
Comment 126 Enji Cooper freebsd_committer freebsd_triage 2026-02-12 03:29:51 UTC
(In reply to Max Brazhnikov from comment #125)

Seems like a good candidate for `BROKEN`, etc, to me. If the projects don't support newer setuptools, it's best to mark things broken and (hope) that others help divide and conquer updating to newer versions of setuptools, or sunset the ports, as needed.
Comment 127 Olivier Cochard freebsd_committer freebsd_triage 2026-02-25 11:29:00 UTC
I haven’t been able to upgrade net/py-maxminddb for months because it requires setuptools>=77.0.3.
We should consider deprecating older Python software that isn’t compatible with newer setuptools versions, since we lack the resources to manage the complexity of Python build dependencies.
Comment 128 Vladimir Druzenko freebsd_committer freebsd_triage 2026-02-25 12:14:36 UTC
(In reply to Max Brazhnikov from comment #125)
(In reply to Enji Cooper from comment #126)
(In reply to Olivier Cochard from comment #127)
I completely agree!
We've been waiting for this update for three years!
Comment 129 Charlie Li freebsd_committer freebsd_triage 2026-02-25 17:41:57 UTC
The comments about "oh why is it taking so long" are not helpful.

There will be no consumer deprecations unless such consumer is actually old and broken and unmaintained. There are a number of actively maintained upstream projects that are not particularly great at keeping up with Python packaging changes. News simply does not travel very fast in the greater Python ecosystem.

(In reply to Max Brazhnikov from comment #121)
Without something laid out in comment 99, the list of affected ports cannot be known in advance, and thus cannot notify individual maintainers until it happens. Some of this effort has to be maintainers being proactive instead of complaining about why this is taking so long, when preliminary steps have been laid out.
Comment 130 Kevin Bowling freebsd_committer freebsd_triage 2026-03-04 00:26:54 UTC
Why is there so much goal post moving here?  Update it to 77 and then break the rest out to a new bug.
Comment 131 Bruce M Simpson freebsd_committer freebsd_triage 2026-03-04 16:40:05 UTC
+1 keen to see this update as I've just had to commit a workaround for the lack of PEP 639 support in the currently shipping py-setuptools for Python 3.11 in pcs.
Comment 132 Charlie Li freebsd_committer freebsd_triage 2026-03-04 16:44:44 UTC
(In reply to Kevin Bowling from comment #130)
No.

The name normalisation "enforcement" for binary distributions/wheels, ie what we use for staging, started in 75.8.1 and 75.3.1. Updating to 77 does not solve the issue.
Comment 133 Kevin Bowling freebsd_committer freebsd_triage 2026-03-05 04:22:21 UTC
(In reply to Charlie Li from comment #132)
The point is choosing a line in the sand.  Multiple people have shown need for 77.  When bumping to that, anything that fails an exp-run and is not fixed in two weeks gets marked broken and tagged as long tail with low care and low reward for eventual followup or removal.  Then yet another bug and loop for 80+.  Continuously moving the goal posts and claiming this is hard is a clown show.
Comment 134 Olivier Cochard freebsd_committer freebsd_triage 2026-03-05 15:23:34 UTC
(In reply to Kevin Bowling from comment #133)
I like this method.

Charlie: How can we help you to do this upgrade to 77 ?
Comment 135 Bruce M Simpson freebsd_committer freebsd_triage 2026-03-06 12:22:39 UTC
(In reply to Olivier Cochard from comment #134)

+1 this is a blocker for re-launching Packet Construction Set for FreeBSD.
Comment 136 Kevin Bowling freebsd_committer freebsd_triage 2026-03-11 08:51:53 UTC
Created attachment 268710 [details]
py-setuptools 78.1.1

portmgr, I'd like to request an exprun for this patch to see what breaks.

78.1.1 is the version Debian is shipping in stable, testing, and unstable [1] as well as Fedora 43 [2].  So it is a good base to draw support and patches.

[1] https://tracker.debian.org/pkg/setuptools
[2] https://packages.fedoraproject.org/pkgs/python-setuptools/python3-setuptools/
Comment 137 Charlie Li freebsd_committer freebsd_triage 2026-03-11 15:13:19 UTC
(In reply to Kevin Bowling from comment #136)
Just no.

This is not a vote or picking a version based on vibes, like what Debian has. The details of our packaging procedures are different than Debian or other Linux distributions, so consulting them is not relevant. We are going directly to 81.0.0 for now, because it is pointless to do an intermediate version.

I've also updated the phab, review D46236, to include a small change in USES=python itself. It will fully enforce lowercase and include runs of periods (.) to be normalised, matching the fix to setuptools committed for 75.8.1 and 75.3.1. I had to check consumers of other PEP 517 build backends, like flit-core, maturin, meson-python, etc, for any cases of names that would normalise differently than the existing hyphen (-) and underscore (_) handling, specifically for names with uppercase and periods; none were found. setuptools was the last holdout for not fully enforcing the standard.

Please give review D46236 a try, especially if you have ports that are subject to the additional name normalisation, specifically anything with uppercase and periods. I will handle the exp-run locally like I did before.

This advice supersedes and replaces comment 99.
Comment 138 Kevin Bowling freebsd_committer freebsd_triage 2026-03-11 22:58:47 UTC
(In reply to Charlie Li from comment #137)
You have two weeks to demonstrate something tangible or your pattern of behavior taking out an indefinite lock and attacking everyone here will be considered for its effects on the overall health of the project.
Comment 139 Charlie Li freebsd_committer freebsd_triage 2026-03-11 23:28:09 UTC
(In reply to Kevin Bowling from comment #138)
You don't get to make threats like this either, especially not with unpaid volunteers. The one who is most angry and feeling burnt out without actually being burnt out is me. Until you have actually witnessed, dealt with and reconciled all the breaking changes, on top of all the whining from everyone who don't have a clue, continuing these comments don't help. The way you (and everyone else) can help is by following directions.

And speaking of breakages, I'm not even through the USE_PYTHON=distutils portion of the exp-run (USE_PYTHON=pep517 consumers to run separately) and we already have some common themes:

A number of consumers fail stage-qa because tests are getting installed into ${PYTHON_SITELIBDIR} (site-packages) as its own package/namespace. This is due to improper package discovery practices (from devel/py-homebase):
Error: Python package installs top-level 'test/' directory in site-packages
Error:   Location: lib/python3.11/site-packages/test
Error: This causes file conflicts with other packages. Exclude it via pyproject.toml:
Error:   [tool.setuptools.packages.find]
Error:   exclude = ["test", "test.*"]
Error: See: https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

I'm inclined to mark these cases BROKEN since these are more likely to not have as much recent upstream activity in any form.

www/py-html5lib still references a number of ancient setuptools (ie < 26) primitives, ostensibly for maximum compatibility with even EOLed Python. A fork, www/py-html5lib-modern, still uses references pkg_resources (as does www/py-html5lib). This is removed in 82 and later, which is why this PR holds on 81, but nonetheless prints a huge deprecation notice. The remaining pkg_resources is not guaranteed to work properly, and this non-guarantee is hit here. Given that the upstream repository has not had commit or other maintainer activity in about two years, some local patching may be warranted, which would be covered in a separate PR referencing this one. This port gets its own mention due to blocking many other ports from being built/tested, particularly those with active upstream activity.

A few others have version specifiers that violate the Python packaging standards.

More to come.
Comment 140 Alastair Hogge 2026-03-12 05:15:22 UTC
(In reply to Charlie Li from comment #137)

Hey Charlie,

Thanks for that massive patch (review D46236) to try. There were 56 occurrences of:
> No file found--skip this patch? [y]
> Skipping patch...
> Hunk #1 ignored at 0.
> 1 out of 1 hunks ignored--saving rejects to Oops.rej

Is that of concern? I applied the patch using $(patch -E --posix ${big-patch.diff})

Regarding, html5lib. I have a number Ports that I have modified locally to use the "modern" fork of that library, which is already in the Ports Tree. It was working very well wtih setuptools-7x.
Comment 141 Alastair Hogge 2026-03-12 05:15:46 UTC
(In reply to Charlie Li from comment #137)

Hey Charlie,

Thanks for that massive patch (review D46236) to try. There were 56 occurrences of:
> No file found--skip this patch? [y]
> Skipping patch...
> Hunk #1 ignored at 0.
> 1 out of 1 hunks ignored--saving rejects to Oops.rej

Is that of concern? I applied the patch using $(patch -E --posix < ${big-patch.diff})

Regarding, html5lib. I have a number Ports that I have modified locally to use the "modern" fork of that library, which is already in the Ports Tree. It was working very well wtih setuptools-7x.
Comment 142 Charlie Li freebsd_committer freebsd_triage 2026-03-12 05:43:05 UTC
(In reply to Alastair Hogge from comment #141)
Patch should only affect three files, unless you're using the botched one from arc diffing the wrong commit.

html5lib-modern is not relevant when consumers specifically specify html5lib in their metadata (pyproject.toml, setup.{py,cfg}, etc). They are two entirely separate packages. The author of html5lib-modern, when they get to it, plans on separating it further from html5lib by changing the module name (they currently collide with each other, so both cannot be present concurrently).
Comment 143 Alastair Hogge 2026-03-12 05:53:02 UTC
(In reply to Charlie Li from comment #142)
> Patch should only affect three files, unless you're using the botched one from arc diffing the wrong commit.

I think I am using something else. I remember the py-setuptools-8x patch only modifying setuptools, somehow, I ended up at:
https://reviews.freebsd.org/D46236?vs=173566&id=173567
Comment 144 Max Brazhnikov freebsd_committer freebsd_triage 2026-03-12 19:08:24 UTC
(In reply to Charlie Li from comment #137)
> Please give review D46236 a try, especially if you have ports that are subject
> to the additional name normalisation, specifically anything with uppercase and
> periods. I will handle the exp-run locally like I did before.
Charlie, people are willing to assist you with this update. If the patch in
review D46236 is ready for testing, please request an exp-run, so others can
see the scope of the problem and help with the affected ports. We also could
ask portmgr for a blanket approval for fixes. With all due respect to you,
local exp-runs is not the way to handle significant updates.
Comment 145 Max Brazhnikov freebsd_committer freebsd_triage 2026-03-13 10:23:32 UTC
kde@ ports build fine.
Comment 146 commit-hook freebsd_committer freebsd_triage 2026-03-13 13:03:41 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=74a30c4d5357d931d0af9e7dfd2316e4771d3fd2

commit 74a30c4d5357d931d0af9e7dfd2316e4771d3fd2
Author:     Max Brazhnikov <makc@FreeBSD.org>
AuthorDate: 2026-03-13 13:02:32 +0000
Commit:     Max Brazhnikov <makc@FreeBSD.org>
CommitDate: 2026-03-13 13:02:32 +0000

    devel/py-llvmlite: Improve port

    - Switch to pep517
    - Add patch to fix build with setuptools>=81

    PR:     270358

 devel/py-llvmlite/Makefile                       |  6 ++++--
 devel/py-llvmlite/files/patch-ffi_CMakeLists.txt |  2 +-
 devel/py-llvmlite/files/patch-setup.py (new)     | 11 +++++++++++
 3 files changed, 16 insertions(+), 3 deletions(-)
Comment 147 Alastair Hogge 2026-03-14 03:49:26 UTC
security/py-omemo-dr, required a change to ${PORTNAME}, I updated it to 1.2.0 at the same time, and also bumped, and corrected net-im/gajim to depend on the correct Python package name.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293794
Comment 148 Max Brazhnikov freebsd_committer freebsd_triage 2026-03-15 16:54:02 UTC
Some ports fails at stage-qa with errors like this:

Error: Python package installs top-level 'tests/' directory in site-packages
Error:   Location: lib/python3.11/site-packages/tests
Error: This causes file conflicts with other packages. Exclude it via pyproject.toml:
Error:   [tool.setuptools.packages.find]
Error:   exclude = ["tests", "tests.*"]

Can we get blanket approval to fix them?
Comment 149 Charlie Li freebsd_committer freebsd_triage 2026-03-15 16:59:05 UTC
(In reply to Max Brazhnikov from comment #148)
No. They were already failing under testport/bulk -t because we have had the appropriate bits in stage-qa to check this, not from setuptools's benevolence. Run poudriere-bulk(8) without -t and this "noise" disappears.

I agree that these should be fixed but not here. These are individual upstream projects' problems.
Comment 150 Kevin Bowling freebsd_committer freebsd_triage 2026-04-02 22:04:51 UTC
What is going on now?  The refusal to work standard processes calling portmgr for an exp-run is making the remaining work entirely dependent on your communication and organization skills, which continue not working out here.
Comment 151 Charlie Li freebsd_committer freebsd_triage 2026-04-09 09:07:34 UTC
(In reply to Kevin Bowling from comment #150)
Because this is anything but standard. Highly unusual, even.

Here is my last full run on only USE_PYTHON=distutils: https://people.freebsd.org/~vishwin/2026-03-18_18h03m52s/ however there has been churn since then. Even on just this portion, ie not including USE_PYTHON=pep517 although some are also built as dependencies of the USE_PYTHON=distutils items, the errors do not fall under any similar category. These include bad version metadata, extension module compile errors, pre-existing breakages, non-Python dependencies failing, etc etc.

I've been re-running the USE_PYTHON=distutils portion incrementally, as in using the repository of successfully built ports per run (compared to clearing everything). Doing any build run is extremely time- and resource-consuming. I'm trying to figure out how to reduce this with package fetching, however for operational reasons on my end it has to run on -CURRENT.
Comment 152 Charlie Li freebsd_committer freebsd_triage 2026-04-09 09:09:23 UTC
*** Bug 294348 has been marked as a duplicate of this bug. ***
Comment 153 Hiroo Ono 2026-04-09 09:26:14 UTC
(In reply to Kevin Bowling from comment #150)

Sorry, I missed this bug and thought the effort of updating setuptools was not on the table. I am in need of newer setuptools in porting pgadmin4, so I want to help this bug to be fixed as far as my skill and time is enough.
Comment 154 Charlie Li freebsd_committer freebsd_triage 2026-04-09 20:59:40 UTC
Here's my latest run of USE_PYTHON=distutils: https://people.freebsd.org/~vishwin/2026-04-09_13h50m09s/

Cut it off once the qt*-webengine ports started, because that would take more than forever. The failures in here are plenty to go around. Will run again after updating -CURRENT (__FreeBSD__version bump) to then try pkg fetching on the heavier dependencies (as everything will be cleared out).
Comment 155 Hiroo Ono 2026-04-10 11:22:17 UTC
Could make patches and verify build only for 2 ports today:
bug 294378 and bug 294381

Patched ports are compatible both setuptools 63.1 and 81.0.
Comment 156 Hiroo Ono 2026-04-11 06:58:38 UTC
databases/py-dbt-snowflake is listed in failed ports but it is not the case.
It is failing because the dependencies have been updated. Trying to update databases/py-dbt-snowflake revealed that it pulls in misc/py-polars-runtime as a dependency which is marked BROKEN. Can be ignored now.
Comment 157 Hiroo Ono 2026-04-11 11:39:12 UTC
Submitted patch (build both against setuptools 63.1 and 81.0):
    bug 294404
    bug 294410

Not setuptools related:
    math/py-rustworkx
        setuptools runs fine, but the make variable PYTHON_TAG seems to have disappeared from the Mk/Uses/python.mk, which causes the error. I do not know how to fix this.
Comment 158 Hiroo Ono 2026-04-13 11:14:27 UTC
Submitted patch (build both against setuptools 63.1.0 and 81.0.0):

    bug 294431: math/py-petsc4py
    bug 294460: devel/py-opendht
    bug 294470: graphics/py-pyvista
    bug 294471: www/twms
    bug 294472: www/web2ldap
Comment 159 Hiroo Ono 2026-04-14 04:28:10 UTC
Created attachment 269747 [details]
devel/py-virtualenvwrapper 4.8.4_2 patch
Comment 160 Hiroo Ono 2026-04-14 04:39:48 UTC
Created attachment 269749 [details]
security/py-btchip-python 0.1.32_3 patch
Comment 161 Hiroo Ono 2026-04-15 00:53:52 UTC
Created attachment 269783 [details]
sysutils/py-howdoi patch incompatible with setuptools 63.1.0
Comment 162 Hiroo Ono 2026-04-15 02:58:51 UTC
Created attachment 269788 [details]
www/py-webob 1.8.9_1 patch

The port of www/py-webob puts a small pyproject.toml and set USE_PYTHON= pep517, which result in an error with setuptools 81.0.0.
This patch removes pyproject.toml addition and get back to USE_PYTHON= distutils.
This is also compatible with setuptools 63.1.0, but I wonder what was the intension of adding pyproject.toml.
Comment 163 Charlie Li freebsd_committer freebsd_triage 2026-04-15 03:05:24 UTC
Comment on attachment 269788 [details]
www/py-webob 1.8.9_1 patch

Please do not switch anything back to USE_PYTHON=distutils or propose new ports of the same. It is deprecated, to be removed in a future setuptools (repeatedly delayed). Ports framework DEV_WARNING on this forthcoming.
Comment 164 Hiroo Ono 2026-04-15 06:25:43 UTC
Created attachment 269795 [details]
net/ryu 4.26_8 patch
Comment 165 Hiroo Ono 2026-04-15 06:49:23 UTC
Created attachment 269797 [details]
math/py-mathics-scanner 2.0.0_2 patch incompatible with setuptools 63.1.0

The change for math/py-mathics-scanner is just a PLIST change, so setting USE_PYTHON=autoplist brings compatibility for both setuptools 81.0.0 and 63.1.0.
Comment 166 Hiroo Ono 2026-04-15 11:26:44 UTC
Created attachment 269812 [details]
www/py-webob 1.8.9_1 2nd patch

Added dynamic= entry tp pyproject.toml.in, and it can now be built with setuptools 81.0.0, USE_PYTHON=pep517.
compatible with setuptools 63.1.0.
Comment 167 Hiroo Ono 2026-04-15 11:47:44 UTC
Created attachment 269813 [details]
security/py-iris-client 2.0.1_2 patch

As there were pyproject.toml distributed with the software (and also, I could not manage to build with USE_PYTHON=distutils), I changed to use USE_PYTHON=pep517 instead of distutils.
I could not avoid renaming PORTNAME from "iris-client" to "dfir-iris-client" which is the installed directory name under site-packages.
Comment 168 Hiroo Ono 2026-04-15 23:03:10 UTC
Created attachment 269825 [details]
science/py-meshio 5.3.5_2 patch incompatible with setuptools 63.1.0
Comment 169 Hiroo Ono 2026-04-16 05:30:15 UTC
Created attachment 269834 [details]
devel/py-tree-sitter 0.20.4_2 atch

devel/py-tree-sitter-languages failed to build because it tried to build an executable instead of a shared library at build time. It seems that distutils' Compiler.link_shared_object function does not work as expected, but I could not find a way to fix distutils. Patching devel/py-tree-sitter which builds share library of devel/py-tree-sitter-languages solved the problem.
Comment 170 Hiroo Ono 2026-04-16 08:39:29 UTC
Created attachment 269841 [details]
science/py-paida 3.2.1_2.10.1_3 patch
Comment 171 Hiroo Ono 2026-04-17 08:50:02 UTC
Created attachment 269865 [details]
sysutils/py-howdoi 2.0.20_7 patch a little modified
Comment 172 Hiroo Ono 2026-04-17 08:51:59 UTC
Created attachment 269866 [details]
sysutils/iocage 1.12_1 patch

I will try to report it upstream later.
Comment 173 Hiroo Ono 2026-04-17 08:53:01 UTC
Created attachment 269867 [details]
sysutils/iocage-devel patch
Comment 174 Hiroo Ono 2026-04-19 11:17:09 UTC
Created attachment 269917 [details]
security/theonionbox patch
Comment 176 Hiroo Ono 2026-04-20 01:00:59 UTC
Created attachment 269943 [details]
misc/thfuck 3.32_1 patch incompatible with setuptools 63.1.0
Comment 177 Hiroo Ono 2026-04-20 09:40:22 UTC
Created attachment 269947 [details]
security/py-gnupg 3.1.1_2 patch
Comment 178 Thierry Thomas freebsd_committer freebsd_triage 2026-04-20 18:06:04 UTC
This blocks also the upgrade of textproc/py-mathics-pygments:

it needs setuptools>=70.0.0.

Therefore the upgrades of math/py-mathics and math/mathicsscript to 10.0.0 are also blocked.
Comment 179 Hiroo Ono 2026-04-21 09:12:22 UTC
Created attachment 269966 [details]
irc/py-limnoria patch
Comment 180 Hiroo Ono 2026-04-21 09:15:01 UTC
Created attachment 269967 [details]
devel/py-zconfig update to 4.3 patch incompatible with setuptools 63.1.0
Comment 181 Hiroo Ono 2026-04-21 09:25:06 UTC
Created attachment 269968 [details]
finance/py-bitcoin patch
Comment 182 Hiroo Ono 2026-04-21 09:28:28 UTC
devel/py-fastentrypoints is a script to tweak distutils used by some softwares in ports (they copy the script and do not depend on this port), but if USE_PYTHON=distutils should no be set newly, there is little meaning that this port resides and it may be retired.
Comment 183 Hiroo Ono 2026-04-21 09:30:17 UTC
math/py-pynleq2 is a little difficult to move to setuptools 81.0.0.
The latest version dates about 8 years ago, and still uses deprecated numpy.distutils.
The numpy document https://numpy.org/devdocs/reference/distutils_status_migration.html
tells to move to methon or cmake+scikit-build, which needs a rewrite of the build script.
Using setuptools is not possible because it does not support fortran.
Comment 184 Hiroo Ono 2026-04-26 00:42:41 UTC
Comment on attachment 269747 [details]
devel/py-virtualenvwrapper 4.8.4_2 patch

The version 4.8.4 of virtualenvwrapper touches both this bug and bug 284845. Updating to 6.1.1, it becomes compatible with both setuptools 63.1.0 and 81.0.0, and sphinx 5.3.0 and 9.0.4. So I reported the update separately as bug 294782.
Comment 185 Hiroo Ono 2026-05-01 19:27:45 UTC
I gathered the patches in this and related bugs appearing until comment 184 (if I have not missed anything) here:
https://barleycorn.oikumene.net/ports-patch/setuptools/setuptools-gathered-1st.patch

Setuptools patch from review D46236 itself is not included.
Comment 186 Daniel Engberg freebsd_committer freebsd_triage 2026-05-30 14:40:39 UTC
How long is this going to continue? As pointed out by others the current approach doesn't work at all. I'll also remind people what we have a year old CVE (CVE-2025-47273) which is rated medium/high unpatched directly related to py-setuptools and likely even more because of everything it holds back.
Comment 187 Sir l33tname 2026-06-16 14:22:39 UTC
One of the downsides of waiting so long to update -> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296054
Comment 188 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2026-06-26 11:19:20 UTC
Can we expect to see this committed before the next quarterly branch?  The only remaining blockers are www/twms (bug 294471) which will be removed at the end of the month and science/py-tweedledum (bug 294633) for which I have a patch which is still awaiting review.
Comment 189 Hiroo Ono 2026-06-30 21:32:33 UTC
I did an extra poudriere build on current and ports as of 5/2 (Sorry, I did it on a very slow machine as it is the only current machine). I tested for ports that have USE_PYTHON=distutils or USE_PYTHON=pep517.

There are still some setuptools related errors (some of Phase:build and Log:???) and skipped ports to be checked.

https://barleycorn.oikumene.net/ports-patch/setuptools/2026-05-02_19h50m53s/build.html
Comment 190 Hiroo Ono 2026-07-01 11:00:03 UTC
Created attachment 272327 [details]
devel/py-get-reader 1.0.0_2 patch
Comment 191 Hiroo Ono 2026-07-02 08:39:57 UTC
Created attachment 272365 [details]
devel/py-oci 2.180.0_1 patch
Comment 192 Hiroo Ono 2026-07-02 12:13:34 UTC
Created attachment 272380 [details]
devel/py-datatest 0.11.1_4 patch
Comment 193 Hiroo Ono 2026-07-02 12:26:48 UTC
Created attachment 272383 [details]
security/py-ssh-audit 3.3.0_1 patch incompatible with setuptools 63.1.0
Comment 194 Hiroo Ono 2026-07-02 14:18:07 UTC
Created attachment 272390 [details]
math/py-lrcalc 2.1_4 patch incompatible with setuptools 63.1.0
Comment 195 Hiroo Ono 2026-07-02 18:00:42 UTC
Created attachment 272404 [details]
textproc/py-elasticsearch-culator 5.8.4_3 patch
Comment 196 Enji Cooper freebsd_committer freebsd_triage 2026-07-02 20:04:49 UTC
This doesn't appear to be blocked on anything. Can this please get in soon??
Comment 197 p5B2EA84B3 2026-07-02 20:20:58 UTC
We have a security vulnerability here that needs to be addressed:

py312-setuptools-63.1.0_3 is vulnerable:
  py-setuptools -- Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  CVE: CVE-2025-47273
  WWW: https://vuxml.FreeBSD.org/freebsd/690144e9-4f88-11f1-982e-00a098b42aeb.html
Comment 198 Enji Cooper freebsd_committer freebsd_triage 2026-07-02 20:26:50 UTC
I reviewed/approved the proposed change in https://reviews.freebsd.org/D46236 -- if others (notably those with ports commit bits and in the #python group) could review the change as well and test the version Charli has posted on Phabricator, that would help increase confidence with delivering the proposed update.
Thank you!
Comment 199 Hiroo Ono 2026-07-02 20:41:39 UTC
Created attachment 272410 [details]
www/web2ldap patch
Comment 200 Hiroo Ono 2026-07-02 21:03:34 UTC
Created attachment 272411 [details]
finance/py-thepassiveinvestor 1.2.2_1 patch
Comment 201 Charlie Li freebsd_committer freebsd_triage 2026-07-03 05:49:20 UTC
(In reply to Enji Cooper from comment #196)
Please see the patches added in comments above and below this referenced comment, my run of only the USE_PYTHON=distutils cases in comment 151 and Hiroo's run in comment 189, to get a glimpse of how broken consumers can get. We cannot just mark those ports broken, since they are not necessarily old, and they may have their own boatloads of consumers that are actively maintained. It is not nearly enough to only test ports that you use directly or as dependencies.

(In reply to p5B2EA84B3 from comment #197) (and anyone else wondering about the vuxml entry)
This is not exploitable for us. We don't include the deprecated bin/easy_install endpoint that would lead to the referenced code block. In ports/building context, setuptools only runs during stages where network access is not allowed. For the virtualenv/venv context, any Python package specifying setuptools as its build backend that would need building from source would have pip fetching and using the latest version (save version pinning cases). Note that system packages, ie Python packages built from ports and installed via pkg(8), are not available for use in virtualenv/venv by default.
Comment 202 Hiroo Ono 2026-07-03 13:52:13 UTC
Created attachment 272447 [details]
devel/py-unittest2 1.1.0_4 patch
Comment 203 Hiroo Ono 2026-07-03 14:30:42 UTC
Created attachment 272450 [details]
devel/py-python-semantic-release 10.5.3_7 patch
Comment 204 Hiroo Ono 2026-07-03 18:10:18 UTC
Created attachment 272461 [details]
math/py-slepc4py 3.22.2_6 patch
Comment 205 Hiroo Ono 2026-07-03 18:24:34 UTC
Created attachment 272462 [details]
archivers/py-extractcode 31.0.0_2 patch
Comment 206 Nuno Teixeira freebsd_committer freebsd_triage 2026-07-03 19:19:54 UTC
Can we have a git tree with all patches applied so people can test it as an overlay tree?
Comment 207 Hiroo Ono 2026-07-03 20:01:09 UTC
(In reply to Nuno Teixeira from comment #206)
I will prepare an overlay tree. Wait for some time.
Comment 208 Hiroo Ono 2026-07-03 21:04:47 UTC
Created attachment 272467 [details]
science/py-meshio 5.3.5 regenerated patch. incompatible with setuptools 63.1.0
Comment 209 Hiroo Ono 2026-07-03 22:44:10 UTC
Comment on attachment 269866 [details]
sysutils/iocage 1.12_1 patch

sysutils/iocage was updated and does not confilict with setuptools 81.0.0 anymore.
Comment 210 Nuno Teixeira freebsd_committer freebsd_triage 2026-07-04 00:22:24 UTC
(In reply to Hiroo Ono from comment #207)

Nice, thanks. I came up with an overlay tree idea that is what I use at my local testing where I have all commits under testing. I think it can be more usefull than applying all patches and fixes and it's very usefull to cherry-picks and merges.
Comment 211 Hiroo Ono 2026-07-04 06:36:20 UTC
Prepared the overlay tree for testing:
https://github.com/oikumene/overlay_setuptools
Comment 212 Hiroo Ono 2026-07-07 06:16:20 UTC
Created attachment 272565 [details]
x11-fonts/py-compreffor update to 0.6.0 patch
Comment 213 Hiroo Ono 2026-07-07 06:35:20 UTC
Created attachment 272566 [details]
textproc/py-wordcloud 1.9.6_1 patch incompatible with setuptools 63.1.0
Comment 214 Hiroo Ono 2026-07-08 13:16:25 UTC
Created attachment 272605 [details]
devel/cpplint 2.0.2_1 patch incompatible with setuptools 63.1.0
Comment 216 Hiroo Ono 2026-07-10 12:10:49 UTC
Created attachment 272693 [details]
graphics/py-tesserocr 2.10.0_1 patch incompatible with setuptools 63.1.0
Comment 217 Hiroo Ono 2026-07-11 11:10:48 UTC
Created attachment 272721 [details]
finance/py-fundamentalanalysis 0.3.1_1 patch
Comment 218 Hiroo Ono 2026-07-12 13:17:00 UTC
Another exp-run:
https://barleycorn.oikumene.net/ports-patch/setuptools/2026-07-10_04h46m37s/build.html

There are still many failed and skipped ports, but most of their failure reasons seem to be python 3.12 incompatibilities and dependency version mismatch. There are few setuptools related failure picked up. Maybe we can move forward.
Comment 219 Michael Osipov freebsd_committer freebsd_triage 2026-07-12 13:54:45 UTC
(In reply to Hiroo Ono from comment #218)

At least npm and node should not fail to build...
Comment 220 Andreas Turriff 2026-07-18 05:01:07 UTC
npm and node work for me with setuptools 81.0.0 on FreeBSD 15.1 and 14.4 using the system SSL coming with those systems. I wonder where Hiroo's build gets the depend on libcrypto.so.12 from. Different default SSL version in make.conf, perhaps?
Comment 221 Hiroo Ono 2026-07-18 20:13:50 UTC
Another exp-run.

https://barleycorn.oikumene.net/ports-patch/setuptools/2026-07-16_06h02m46s/build.html

Previous node and npm failures were due to mismatch in DEFAULT_VERSION+=ssl=... between builds. I rebuild all the listed and dependent ports (poudriere bulk -c) and node and npm build fine.
Comment 222 Ulas SAYGIN 2026-07-28 02:43:18 UTC
Created attachment 273243 [details]
Update to 83.0.0 (independent test)
Comment 223 Ulas SAYGIN 2026-07-28 02:46:48 UTC
FWIW, I independently tested updating devel/py-setuptools to 83.0.0 (the current
upstream release as of this writing) on a clean FreeBSD 15.1-RELEASE-p1 amd64
poudriere jail, before finding this existing PR.

Changes I made mirror what's already been discussed here: PORTVERSION bump,
removed the now-defunct pkgutil.ImpImporter patch (pkg_resources has been fully
removed from setuptools as of this version, so that patch target no longer
exists), and removed the BUILD_DEPENDS pin on py-wheel044<0.46.0 (83.0.0 vendors
its own wheel 0.46.3 under setuptools/_vendor/).

Testing performed:
- Baseline `poudriere testport` on unmodified 63.1.0: PASS
- `poudriere testport -p main devel/py-setuptools@py312` on updated 83.0.0: PASS
  (build/stage/QA/install/deinstall all clean)
- portlint -A / -AC: 0 fatal errors (2 pre-existing false-positive warnings,
  unrelated to this change)
- As a real-world non-Python consumer check: built dns/powerdns end-to-end with
  the updated setuptools installed in the jail, including its full dependency
  chain from scratch (boost-libs, curl, mysql84-client, postgresql18-client,
  sqlite3, lmdb, lua54, libsodium). All backend modules (bind, pipe, mysql,
  pgsql, sqlite3, lmdb) built and staged cleanly. Confirmed via INDEX-15 that
  powerdns, nginx, dovecot, and postfix don't depend on py-setuptools directly,
  so this is more of a sanity check than expected risk area.

This is a small, single-machine data point compared to the exp-runs already
posted here. Diff attached for reference (attachment ATTACHMENT_ID_BURAYA).
Happy to help re-run tests against whatever the current candidate patch is.
Thanks to everyone who's been pushing this forward — following comment
#218/#221, sounds like things are close.


Attachment #273243 [details]
Comment 224 Jan Martin Mikkelsen 2026-08-09 11:46:44 UTC
Created attachment 273569 [details]
Patch to Mk/Uses/python.mk to handle '.' and '_' conversion in .whl filenames
Comment 225 Jan Martin Mikkelsen 2026-08-09 11:49:10 UTC
The patch to update to 83.0.0 (comment 222) worked for me. I did observe a problem subsequently building devel/py-boolean.py, where I got this error:

FileNotFoundError: [Errno 2] No such file or directory: '/ports-work/usr/ports/devel/py-boolean.py/work-py312/boolean_py-5.0/dist/boolean.py-5.0*.whl'

Earlier in the build log, there was this message:

creating '/ports-work/usr/ports/devel/py-boolean.py/work-py312/boolean_py-5.0/dist/.tmp-szqjz5qc/boolean_py-5.0-py3-none-any.whl' and adding 'build/bdist.freebsd-15.1-RELEASE-p2-amd64/wheel' to it

Note the '_' vs. '.' difference in the .whl filename. I resolved that by modifying the regex for the install command Mk/Uses/python.mk. See patch in comment 224.

This is on a 15.1-p2 system, building in a chroot environment with a fresh installworld, and ports all building in dependency order.
Comment 226 Charlie Li freebsd_committer freebsd_triage 2026-09-05 13:57:42 UTC
*** Bug 294838 has been marked as a duplicate of this bug. ***
Comment 227 Palle Girgensohn freebsd_committer freebsd_triage 2026-09-29 12:26:40 UTC
Hi!

How is this HUGE thread bug report progressing? Am I correct in assuming that there are only five blockers left now?

How can I help?

Palle
Comment 228 Michael Osipov freebsd_committer freebsd_triage 2026-10-04 20:19:08 UTC
portmgr, can you push this and we will deal with the fallout later?
Comment 229 Charlie Li freebsd_committer freebsd_triage 2026-10-04 23:34:30 UTC
(In reply to Michael Osipov from comment #228)
We're almost here. Still need to finish cross-checking the latest list.

(In reply to Palle Girgensohn from comment #227)
I'd say about 50 to see if they are worthy of being blockers at this point. Particularly to determine if they were going to break regardless. Thankfully the ports with over 100 consumers (arbitrary number) are sorted.