Skip to content

GH-45867: [Python] Fix SetuptoolsDeprecationWarning - #47141

Merged
pitrou merged 17 commits into
apache:mainfrom
rok:paddyroddy/fix-setuptools-deprecation
Dec 18, 2025
Merged

GH-45867: [Python] Fix SetuptoolsDeprecationWarning#47141
pitrou merged 17 commits into
apache:mainfrom
rok:paddyroddy/fix-setuptools-deprecation

Conversation

@paddyroddy

@paddyroddypaddyroddy commented Jul 20, 2025

Copy link
Copy Markdown
Contributor

Rationale for this change

When building locally, I get many errors along the lines of

Please ensure the files specified are contained by the root
of the Python package (normally marked by `pyproject.toml`).
By 2026-Mar-20, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://packaging.python.org/en/latest/specifications/glob-patterns/ for details.
terminal demo

What changes are included in this PR?

  • Make the licence SPDX compliant
  • Remove the licence classifier
  • Move the licence files from setup.cfg to pyproject.toml
  • Fix the disallowed glob patterns via symlinks
  • Bumped the minimum version of setuptools due to macOS CI failures (don't know why this happened, caching maybe?)

I appreciate the symlink change might prove controversial. See discussions in #45867, fixes#45867.

Are these changes tested?

When I rebuild locally, I get no errors any more.

Are there any user-facing changes?

Yes. The minimum required version of setuptools is now 77. However, this is available on >=3.9 so won't affect anyone really.

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #45867has been automatically assigned in GitHub to PR creator.

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #45867has been automatically assigned in GitHub to PR creator.

Comment threadpython/pyproject.toml
# versions released after 2022
"setuptools_scm[toml]>=8",
"setuptools>=64",
"setuptools>=77",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required due to setuptools<77 not recognizing the new license strings proposed in this PR (see pypa/setuptools#4903 for explanation). I'm not sure if this is controversial so bringing it up here. @raulcd

@github-actionsgithub-actionsBot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jul 20, 2025
@rok

rok commented Jul 20, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit

@github-actions

Copy link
Copy Markdown
no tasks were provided for the job
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/16398862798

@raulcd

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g python -g wheels

@github-actions

Copy link
Copy Markdown
Invalid group(s) {'wheels'}. Must be one of {'example-cpp', 'python', 'nightly-release', 'cpp', 'verify-rc-source-macos', 'wheel', 'test', 'verify-rc-source', 'cuda', 'vcpkg', 'linux-amd64', 'conan', 'r', 'nightly', 'ruby', 'linux', 'c-glib', 'linux-arm64', 'verify-rc-source-linux', 'example', 'packaging', 'integration', 'example-python', 'fuzz', 'nightly-tests', 'verify-rc', 'homebrew', 'nightly-packaging'}
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/16398880949

@raulcd

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g python

@github-actions

Copy link
Copy Markdown

Revision: 6b1a08b

Submitted crossbow builds: ursacomputing/crossbow @ actions-2fdf3226a1

TaskStatus
example-python-minimal-build-fedora-condaGitHub Actions
example-python-minimal-build-ubuntu-venvGitHub Actions
test-conda-python-3.10GitHub Actions
test-conda-python-3.10-hdfs-2.9.2GitHub Actions
test-conda-python-3.10-hdfs-3.2.1GitHub Actions
test-conda-python-3.10-pandas-latest-numpy-latestGitHub Actions
test-conda-python-3.11GitHub Actions
test-conda-python-3.11-dask-latestGitHub Actions
test-conda-python-3.11-dask-upstream_develGitHub Actions
test-conda-python-3.11-hypothesisGitHub Actions
test-conda-python-3.11-pandas-latest-numpy-1.26GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-latestGitHub Actions
test-conda-python-3.11-pandas-nightly-numpy-nightlyGitHub Actions
test-conda-python-3.11-pandas-upstream_devel-numpy-nightlyGitHub Actions
test-conda-python-3.11-spark-masterGitHub Actions
test-conda-python-3.12GitHub Actions
test-conda-python-3.12-cpython-debugGitHub Actions
test-conda-python-3.13GitHub Actions
test-conda-python-3.9GitHub Actions
test-conda-python-3.9-pandas-1.1.3-numpy-1.19.5GitHub Actions
test-conda-python-emscriptenGitHub Actions
test-cuda-python-ubuntu-22.04-cuda-11.7.1GitHub Actions
test-debian-12-python-3-amd64GitHub Actions
test-debian-12-python-3-i386GitHub Actions
test-fedora-42-python-3GitHub Actions
test-ubuntu-22.04-python-3GitHub Actions
test-ubuntu-22.04-python-313-freethreadingGitHub Actions
test-ubuntu-24.04-python-3GitHub Actions

Comment threadpython/LICENSE.txt Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does symbolic link work on Windows...?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I guess there's no other way to fix it then other than copying or creating new licence and notice files.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have copied over the files for the tests @rok

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per https://gitforwindows.org/symbolic-links.html:

Short version: there is no exact equivalent for POSIX symlinks on Windows, and the closest thing is unavailable for non-admins by default unless Developer Mode is enabled and a relatively recent Windows 10 version is used. Therefore, symlink emulation support is only turned on by default when that scenario is detected. Support can be enabled by the user, via the core.symlinks=true config setting.

Windows 10 reached EOL last month, and supposedly Developer Mode is required for Visual Studio use.

I'm not sure of all the Windows workflows that may / may not require developer mode, but maybe its worth just requiring it for any Windows devs of PyArrow so that symlinks can be used?

@kou

kou commented Jul 20, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g wheel

@koukou changed the title GH-45867: [PYTHON] Fix SetuptoolsDeprecationWarningGH-45867: [Python] Fix SetuptoolsDeprecationWarningJul 20, 2025
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #45867has been automatically assigned in GitHub to PR creator.

@github-actions

Copy link
Copy Markdown

Revision: 6b1a08b

Submitted crossbow builds: ursacomputing/crossbow @ actions-fe79dfe84b

TaskStatus
python-sdistGitHub Actions
wheel-macos-monterey-cp310-cp310-amd64GitHub Actions
wheel-macos-monterey-cp310-cp310-arm64GitHub Actions
wheel-macos-monterey-cp311-cp311-amd64GitHub Actions
wheel-macos-monterey-cp311-cp311-arm64GitHub Actions
wheel-macos-monterey-cp312-cp312-amd64GitHub Actions
wheel-macos-monterey-cp312-cp312-arm64GitHub Actions
wheel-macos-monterey-cp313-cp313-amd64GitHub Actions
wheel-macos-monterey-cp313-cp313-arm64GitHub Actions
wheel-macos-monterey-cp313-cp313t-amd64GitHub Actions
wheel-macos-monterey-cp313-cp313t-arm64GitHub Actions
wheel-macos-monterey-cp39-cp39-amd64GitHub Actions
wheel-macos-monterey-cp39-cp39-arm64GitHub Actions
wheel-manylinux-2-28-cp310-cp310-amd64GitHub Actions
wheel-manylinux-2-28-cp310-cp310-arm64GitHub Actions
wheel-manylinux-2-28-cp311-cp311-amd64GitHub Actions
wheel-manylinux-2-28-cp311-cp311-arm64GitHub Actions
wheel-manylinux-2-28-cp312-cp312-amd64GitHub Actions
wheel-manylinux-2-28-cp312-cp312-arm64GitHub Actions
wheel-manylinux-2-28-cp313-cp313-amd64GitHub Actions
wheel-manylinux-2-28-cp313-cp313-arm64GitHub Actions
wheel-manylinux-2-28-cp313-cp313t-amd64GitHub Actions
wheel-manylinux-2-28-cp313-cp313t-arm64GitHub Actions
wheel-manylinux-2-28-cp39-cp39-amd64GitHub Actions
wheel-manylinux-2-28-cp39-cp39-arm64GitHub Actions
wheel-musllinux-1-2-cp310-cp310-amd64GitHub Actions
wheel-musllinux-1-2-cp310-cp310-arm64GitHub Actions
wheel-musllinux-1-2-cp311-cp311-amd64GitHub Actions
wheel-musllinux-1-2-cp311-cp311-arm64GitHub Actions
wheel-musllinux-1-2-cp312-cp312-amd64GitHub Actions
wheel-musllinux-1-2-cp312-cp312-arm64GitHub Actions
wheel-musllinux-1-2-cp313-cp313-amd64GitHub Actions
wheel-musllinux-1-2-cp313-cp313-arm64GitHub Actions
wheel-musllinux-1-2-cp313-cp313t-amd64GitHub Actions
wheel-musllinux-1-2-cp313-cp313t-arm64GitHub Actions
wheel-musllinux-1-2-cp39-cp39-amd64GitHub Actions
wheel-musllinux-1-2-cp39-cp39-arm64GitHub Actions
wheel-windows-cp310-cp310-amd64GitHub Actions
wheel-windows-cp311-cp311-amd64GitHub Actions
wheel-windows-cp312-cp312-amd64GitHub Actions
wheel-windows-cp313-cp313-amd64GitHub Actions
wheel-windows-cp313-cp313t-amd64GitHub Actions
wheel-windows-cp39-cp39-amd64GitHub Actions

@rok

rok commented Dec 16, 2025

Copy link
Copy Markdown
Member

The macOS segfaults are expected and unrelated.

Comment threadpython/setup.py Outdated

@rokrok left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good to me! @raulcd

@github-actionsgithub-actionsBot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Dec 16, 2025
@rok
rok requested a review from pitrouDecember 17, 2025 22:54
Comment threadpython/setup.py Outdated
Comment threadpython/.gitignore Outdated
@github-actionsgithub-actionsBot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Dec 18, 2025
@pitrou

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g python

@pitrou

Copy link
Copy Markdown
Member

@github-actions crossbow submit wheelcp313*

@github-actions

Copy link
Copy Markdown

Revision: e47ca7c

Submitted crossbow builds: ursacomputing/crossbow @ actions-1176ee40f3

TaskStatus
wheel-macos-monterey-cp313-cp313-amd64GitHub Actions
wheel-macos-monterey-cp313-cp313-arm64GitHub Actions
wheel-macos-monterey-cp313-cp313t-amd64GitHub Actions
wheel-macos-monterey-cp313-cp313t-arm64GitHub Actions
wheel-manylinux-2-28-cp313-cp313-amd64GitHub Actions
wheel-manylinux-2-28-cp313-cp313-arm64GitHub Actions
wheel-manylinux-2-28-cp313-cp313t-amd64GitHub Actions
wheel-manylinux-2-28-cp313-cp313t-arm64GitHub Actions
wheel-musllinux-1-2-cp313-cp313-amd64GitHub Actions
wheel-musllinux-1-2-cp313-cp313-arm64GitHub Actions
wheel-musllinux-1-2-cp313-cp313t-amd64GitHub Actions
wheel-musllinux-1-2-cp313-cp313t-arm64GitHub Actions
wheel-windows-cp313-cp313-amd64GitHub Actions
wheel-windows-cp313-cp313t-amd64GitHub Actions

@github-actions

Copy link
Copy Markdown

Revision: e47ca7c

Submitted crossbow builds: ursacomputing/crossbow @ actions-8124fa0f6c

TaskStatus
example-python-minimal-build-fedora-condaGitHub Actions
example-python-minimal-build-ubuntu-venvGitHub Actions
test-conda-python-3.10GitHub Actions
test-conda-python-3.10-hdfs-2.9.2GitHub Actions
test-conda-python-3.10-hdfs-3.2.1GitHub Actions
test-conda-python-3.10-pandas-1.3.4-numpy-1.21.2GitHub Actions
test-conda-python-3.11GitHub Actions
test-conda-python-3.11-dask-latestGitHub Actions
test-conda-python-3.11-dask-upstream_develGitHub Actions
test-conda-python-3.11-hypothesisGitHub Actions
test-conda-python-3.11-pandas-latest-numpy-latestGitHub Actions
test-conda-python-3.11-spark-masterGitHub Actions
test-conda-python-3.12GitHub Actions
test-conda-python-3.12-cpython-debugGitHub Actions
test-conda-python-3.12-pandas-latest-numpy-1.26GitHub Actions
test-conda-python-3.12-pandas-latest-numpy-latestGitHub Actions
test-conda-python-3.13GitHub Actions
test-conda-python-3.13-pandas-nightly-numpy-nightlyGitHub Actions
test-conda-python-3.13-pandas-upstream_devel-numpy-nightlyGitHub Actions
test-conda-python-3.14GitHub Actions
test-conda-python-emscriptenGitHub Actions
test-cuda-python-ubuntu-22.04-cuda-11.7.1GitHub Actions
test-cuda-python-ubuntu-24.04-cuda-13.0.2GitHub Actions
test-debian-12-python-3-amd64GitHub Actions
test-debian-12-python-3-i386GitHub Actions
test-fedora-42-python-3GitHub Actions
test-ubuntu-22.04-python-3GitHub Actions
test-ubuntu-22.04-python-313-freethreadingGitHub Actions
test-ubuntu-24.04-python-3GitHub Actions

@pitrou

Copy link
Copy Markdown
Member

CI failures are unrelated, thanks a lot @paddyroddy !

@pitrou

Copy link
Copy Markdown
Member

@github-actions crossbow submit python-sdist

@github-actions

Copy link
Copy Markdown

Revision: e47ca7c

Submitted crossbow builds: ursacomputing/crossbow @ actions-b1e74a8dee

TaskStatus
python-sdistGitHub Actions

@pitrou
pitrou merged commit 866502e into apache:mainDec 18, 2025
31 checks passed
@pitroupitrou removed the awaiting change review Awaiting change review label Dec 18, 2025
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 2 benchmarking runs that have been run so far on merge-commit 866502e.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them.

Mottl pushed a commit to Mottl/arrow that referenced this pull request May 26, 2026
…7141)
### Rationale for this change
When building locally, I get many errors along the lines of
```
Please ensure the files specified are contained by the root
of the Python package (normally marked by `pyproject.toml`).
By 2026-Mar-20, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://packaging.python.org/en/latest/specifications/glob-patterns/ for details.
```
<img width="958" height="755" alt="terminal demo" src="https://github.com/user-attachments/assets/67f0e261-c4d2-403c-b004-688dfaaccda6" />
### What changes are included in this PR?
- Make the licence [SPDX compliant](https://spdx.org/licenses)
- Remove the licence classifier
- Move the licence files from `setup.cfg` to `pyproject.toml`
- Fix the [disallowed glob patterns](https://packaging.python.org/en/latest/specifications/glob-patterns) via symlinks
- Bumped the minimum version of `setuptools` due to macOS CI failures (don't know why this happened, caching maybe?)
I appreciate the symlink change might prove controversial. See discussions in apache#45867, fixesapache#45867.
### Are these changes tested?
When I rebuild locally, I get no errors any more.
### Are there any user-facing changes?
Yes. The minimum required version of `setuptools` is now `77`. However, this is available on `>=3.9` so won't affect anyone really.
* GitHub Issue: apache#45867
Authored-by: Patrick J. Roddy <patrickjamesroddy@gmail.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI][Python] A new version (77.0.2) of setuptools seems to have broken some of our builds

7 participants

@paddyroddy@rok@raulcd@kou@martin-traverse@pitrou@WillAyd