Created attachment 241004 [details] Update to 67.6.0 - Update to 67.6.0
Note: we can't do this until USE_PYTHON=distutils is switched to devel/py-setuptools58.
Exp-run looks fine (0 new failure compared to setuptools 63.1.0)
(In reply to Charlie Li from comment #1) Hope this switch soon, some ports update require setuptools >65.0.
(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.
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).
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?
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.
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.
(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.
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
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.
Version 67.7.2 was released just a few hours ago: https://pypi.org/project/setuptools/
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.
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.
*** Bug 271364 has been marked as a duplicate of this bug. ***
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.
(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.
Is there any way for us minions watching this to monitor progress?
(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.
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 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.
Created attachment 242941 [details] py-setuptools-68.0.0.patch
(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.
Created attachment 242943 [details] py-setuptools-68.0.0.patch Restore ${PYDISTUTILS_SETUP}
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 on attachment 242941 [details] py-setuptools-68.0.0.patch Restore previous path removing ${PYDISTUTILS_SETUP}
Comment on attachment 242943 [details] py-setuptools-68.0.0.patch Remove patch with unnecessary re-addition of ${PYDISTUTILS_SETUP}
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?
(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.
(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?
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(-)
(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.
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?
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(-)
Im sorry, I committed this without realizing. Reverting.
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(-)
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
(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.
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.
(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).
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.
Added PR/275005 to depends.
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
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.
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
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?
(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).
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
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
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.
(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.
(In reply to Charlie Li from comment #51) Shall we create devel/py-setuptools69 for temporarily use ?
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 ?
(In reply to void from comment #53) Does there have to be a reason? Please add them. :)
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
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.
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.
72.0.0 removed setup.py test, will probably need corresponding python.mk changes.
Working diff posted as review D46236. To test, you will need to apply all dependent PRs before this one, especially bug 280646.
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.
72.2.0 released.
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.
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.
I just ran into an issue with some Python scripts for a development environment requiring py-setuptools > 64. How is this proceeding?
*** Bug 282353 has been marked as a duplicate of this bug. ***
(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.
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.
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(+)
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
(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.
(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.
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
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 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.
(In reply to Charlie Li from comment #74) > [...] and certain variables are intentionally not alphabetically sorted. The reason for that is?
(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.
Python 3.8 has been removed from the tree so back to tracking the latest upstream, phab is updated.
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
(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
(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
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.
(In reply to Tatsuki Makino from comment #81) setuptools specifically, Python 3.12 removed a few pkgutil methods, fixed in ports 8927fe8f67e32805fe94c94356b013d59ca4af25
(In reply to Charlie Li from comment #82) Thank you for fixing. Most of */py-*@py312 can now be built.
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
After all, what prevents devel/py-setuptools from updating to newer version right now ?
(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.
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
(In reply to Charlie Li from comment #86) (In reply to p5B2EA84B3 from comment #87) Can Charlie Li *please* answer my questions?
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.
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.
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.
(In reply to Dmitry Marakasov from comment #90) +1
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(-)
(In reply to Alastair Hogge from comment #44) > … <https://freebsdfoundation.org/our-work/journal/browser-based-edition/pep-517-python-packagings-new-world-order/> … Not found, moved to: <https://freebsdfoundation.org/our-work/journal/browser-based-edition/13099/pep-517-python-packagings-new-world-order/> | <https://freebsdfoundation.org/wp-content/uploads/2023/11/li_python.pdf>
Also waiting for this: devel/py-maturin requires now setuptools 77.0.0 and I can't provide a patch for it :-(
(In reply to Michael Osipov from comment #95) Same here. Certbot 5.0 requires setuptools 77.0.3 or later.
I'll take it. This is a serious issue and needs to be resolved. Give me a day or two.
(In reply to Yuri Victorovich from comment #97) No you will not. Yes this is a serious issue, but cannot be resolved quickly.
(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
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?
(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.
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.
(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 ...
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
Created attachment 265019 [details] py-Tatsu diff py-Tatsu diff that builds in setuptools80 and setuptool63
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 :)
Created attachment 265020 [details] py-TatSu poudriere run on setuptools version 63
Created attachment 265021 [details] py-TatSu poudriere run on setuptools version 80
Upgrading science/py-netCDF4 requires setuptools>=77.0.1.
Upgrading net/py-maxminddb needs setuptools>=77.0.3
(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?
(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.
(In reply to Nicholas Kirby from comment #113) Would you care to create a separate issue?
(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
(In reply to Nicholas Kirby from comment #115) The latter, generalize it.
(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!
(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.
(In reply to Charlie Li from comment #118) Here are a couple examples: https://cgit.freebsd.org/ports/tree/astro/py-horoscopegenerator/files/patch-setup.py https://cgit.freebsd.org/ports/tree/astro/py-metpy/files/patch-pyproject.toml
(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)
(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.
devel/py-coverage also needs newer setuptools to upgrade to newer version.
*** Bug 293089 has been marked as a duplicate of this bug. ***
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.
(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?
(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.
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.
(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!
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.
Why is there so much goal post moving here? Update it to 77 and then break the rest out to a new bug.
+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.
(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.
(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.
(In reply to Kevin Bowling from comment #133) I like this method. Charlie: How can we help you to do this upgrade to 77 ?
(In reply to Olivier Cochard from comment #134) +1 this is a blocker for re-launching Packet Construction Set for FreeBSD.
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/
(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.
(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.
(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.
(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.
(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.
(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).
(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
(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.
kde@ ports build fine.
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(-)
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
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?
(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.
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.
(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.
*** Bug 294348 has been marked as a duplicate of this bug. ***
(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.
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).
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.
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.
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.
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
Created attachment 269747 [details] devel/py-virtualenvwrapper 4.8.4_2 patch
Created attachment 269749 [details] security/py-btchip-python 0.1.32_3 patch
Created attachment 269783 [details] sysutils/py-howdoi patch incompatible with setuptools 63.1.0
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 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.
Created attachment 269795 [details] net/ryu 4.26_8 patch
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.
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.
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.
Created attachment 269825 [details] science/py-meshio 5.3.5_2 patch incompatible with setuptools 63.1.0
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.
Created attachment 269841 [details] science/py-paida 3.2.1_2.10.1_3 patch
Created attachment 269865 [details] sysutils/py-howdoi 2.0.20_7 patch a little modified
Created attachment 269866 [details] sysutils/iocage 1.12_1 patch I will try to report it upstream later.
Created attachment 269867 [details] sysutils/iocage-devel patch
Created attachment 269917 [details] security/theonionbox patch
Created attachment 269920 [details] devel/py-persistent patch Patch taken from Debian: https://salsa.debian.org/python-team/packages/python-persistent/-/commit/d1aec867246435d504528074cbdc115808d75d5d
Created attachment 269943 [details] misc/thfuck 3.32_1 patch incompatible with setuptools 63.1.0
Created attachment 269947 [details] security/py-gnupg 3.1.1_2 patch
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.
Created attachment 269966 [details] irc/py-limnoria patch
Created attachment 269967 [details] devel/py-zconfig update to 4.3 patch incompatible with setuptools 63.1.0
Created attachment 269968 [details] finance/py-bitcoin patch
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.
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 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.
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.
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.
One of the downsides of waiting so long to update -> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296054
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.
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
Created attachment 272327 [details] devel/py-get-reader 1.0.0_2 patch
Created attachment 272365 [details] devel/py-oci 2.180.0_1 patch
Created attachment 272380 [details] devel/py-datatest 0.11.1_4 patch
Created attachment 272383 [details] security/py-ssh-audit 3.3.0_1 patch incompatible with setuptools 63.1.0
Created attachment 272390 [details] math/py-lrcalc 2.1_4 patch incompatible with setuptools 63.1.0
Created attachment 272404 [details] textproc/py-elasticsearch-culator 5.8.4_3 patch
This doesn't appear to be blocked on anything. Can this please get in soon??
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
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!
Created attachment 272410 [details] www/web2ldap patch
Created attachment 272411 [details] finance/py-thepassiveinvestor 1.2.2_1 patch
(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.
Created attachment 272447 [details] devel/py-unittest2 1.1.0_4 patch
Created attachment 272450 [details] devel/py-python-semantic-release 10.5.3_7 patch
Created attachment 272461 [details] math/py-slepc4py 3.22.2_6 patch
Created attachment 272462 [details] archivers/py-extractcode 31.0.0_2 patch
Can we have a git tree with all patches applied so people can test it as an overlay tree?
(In reply to Nuno Teixeira from comment #206) I will prepare an overlay tree. Wait for some time.
Created attachment 272467 [details] science/py-meshio 5.3.5 regenerated patch. incompatible with setuptools 63.1.0
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.
(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.
Prepared the overlay tree for testing: https://github.com/oikumene/overlay_setuptools
Created attachment 272565 [details] x11-fonts/py-compreffor update to 0.6.0 patch
Created attachment 272566 [details] textproc/py-wordcloud 1.9.6_1 patch incompatible with setuptools 63.1.0
Created attachment 272605 [details] devel/cpplint 2.0.2_1 patch incompatible with setuptools 63.1.0
Another exp-run: https://barleycorn.oikumene.net/ports-patch/setuptools/2026-07-06_04h16m32s/build.html
Created attachment 272693 [details] graphics/py-tesserocr 2.10.0_1 patch incompatible with setuptools 63.1.0
Created attachment 272721 [details] finance/py-fundamentalanalysis 0.3.1_1 patch
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.
(In reply to Hiroo Ono from comment #218) At least npm and node should not fail to build...
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?
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.
Created attachment 273243 [details] Update to 83.0.0 (independent test)
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]
Created attachment 273569 [details] Patch to Mk/Uses/python.mk to handle '.' and '_' conversion in .whl filenames
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.
*** Bug 294838 has been marked as a duplicate of this bug. ***
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
portmgr, can you push this and we will deal with the fallout later?
(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.