Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-51597][PYTHON][3.5] Fix deprecated/invalid config in setup.cfg #50369

Closed
wants to merge 3 commits into from

Conversation

abravalheri
Copy link

@abravalheri abravalheri commented Mar 24, 2025

Dash-separated keys for setuptools config have been deprecated in v54.1.10 (2021) and removed in v78.

Moreover this particular config is not supported by setuptools: #50369 (comment)

What changes were proposed in this pull request?

Replace invalid configuration field in setup.cfg with a valid one

Why are the changes needed?

The previous configuration fails to build on setuptools>=78.0.0,<78.0.2 when support for dash-separated fields was removed after a long deprecation period. 78.0.2 postpones the deprecation for another year.

Does this PR introduce any user-facing change?

No as far as I am aware.

How was this patch tested?

Relying on the CI for successful builds. (I am not a user of apache spark).

Was this patch authored or co-authored using generative AI tooling?

No.

Dash-separated keys for setuptools config have been deprecated in [v54.1.10 (2021)](https://setuptools.pypa.io/en/latest/history.html#id855)and removed in [v78](https://setuptools.pypa.io/en/latest/history.html#v78-0-0).
@fertrevino
Copy link

+1 our CI complained just now

@Raphael-Vignes
Copy link

Same.

@jamie-cho
Copy link

+1

@imclvr
Copy link

imclvr commented Mar 24, 2025

Please, any ETA on this? We have some pipelines that started to fail because this issue, more or less a couple of hours before this PR was open.

Thanks a lot for taking care of this!

@nik-hinge
Copy link

There's precedent for this already in the 4.x branch:

cc: @HyukjinKwon @bjornjorgensen

@gabrielromero001
Copy link

We are facing the same issue

@aaron-robeson-8451
Copy link

+1

@bjornjorgensen
Copy link
Contributor

I have open #50371 for this..

@abravalheri
Copy link
Author

To be honest @bjornjorgensen, now that I am thinking about it, that field is not even the correct one...

The right config according to the docs is long_description = file: README

https://setuptools.pypa.io/en/latest/userguide/declarative_config.html

@bjornjorgensen
Copy link
Contributor

This was the warning that I get back in 2023 Usage of dash-separated 'description-file' will not be supported in future
versions. Please use the underscore name 'description_file' instead.

So I think 'description_file' will work. But you have to enable github actions on ours repo to make it run and test..

@bjornjorgensen
Copy link
Contributor

I you try to build it now it will fail because you have added a extra empty line -- linting :)

image

@bjornjorgensen
Copy link
Contributor

@abravalheri
image

@abravalheri
Copy link
Author

abravalheri commented Mar 24, 2025

Thanks @bjornjorgensen, I just enabled it.

@abravalheri
Copy link
Author

abravalheri commented Mar 24, 2025

So I think 'description_file' will work. But you have to enable github actions on ours repo to make it run and test..

This may not give you a failure, but possibly will not do what is intended? (it might be the case long_description is overwritten somewhere else, and that case it does not make a difference)

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

We're seeing the same in PyIceberg apache/iceberg-python#1838

@HyukjinKwon
Copy link
Member

oh wow

@HyukjinKwon
Copy link
Member

HyukjinKwon commented Mar 25, 2025

Thanks for the fix. Would you mind creating a JIRA? https://issues.apache.org/jira/projects/SPARK/issues. Let's also fill the PR description

@HyukjinKwon
Copy link
Member

@bjornjorgensen does it look good to you?

@abravalheri
Copy link
Author

abravalheri commented Mar 25, 2025

Thanks for the fix. Would you mind creating a JIRA? https://issues.apache.org/jira/projects/SPARK/issues. Let's also fill the PR description

I updated the PR description.
I will skip for now filling a JIRA because it seems that I have to create an account for that. That is a bit too much overhead for me given that I am not even a spark user 😅 for the time being.

Please feel free to close this PR if you have a different solution in the make, and/or mix and match the individual commits in a different PR.

@HyukjinKwon
Copy link
Member

I will create one no worries

@HyukjinKwon HyukjinKwon changed the title [PYTHON] Fix deprecated/invalid config in setup.cfg (3.5) [SPARK-51597][PYTHON] Fix deprecated/invalid config in setup.cfg (3.5) Mar 25, 2025
@HyukjinKwon
Copy link
Member

Looks fine but I will leave it to @bjornjorgensen to take a look / approve

@HyukjinKwon HyukjinKwon changed the title [SPARK-51597][PYTHON] Fix deprecated/invalid config in setup.cfg (3.5) [SPARK-51597][PYTHON][3.5] Fix deprecated/invalid config in setup.cfg Mar 25, 2025
@bjornjorgensen
Copy link
Contributor

@@ -19,4 +19,4 @@
universal = 1

[metadata]
description-file = README.md
long_description = file: README.md
Copy link
Contributor

Choose a reason for hiding this comment

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

Change it to description_file

HyukjinKwon pushed a commit that referenced this pull request Mar 25, 2025
…file`

### What changes were proposed in this pull request?
Change `description-file` to `description_file`

### Why are the changes needed?

`./dev/make-distribution.sh --name custom-spark --pip -Pkubernetes > output.txt 2>&1`
in the file there is this

```
+ echo 'Building python distribution package'
Building python distribution package
+ pushd /home/bjorn/spark/python
+ rm -rf pyspark.egg-info
+ python3 setup.py sdist
/usr/lib/python3.11/site-packages/setuptools/dist.py:745: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!

        ********************************************************************************
        Usage of dash-separated 'description-file' will not be supported in future
        versions. Please use the underscore name 'description_file' instead.

        This deprecation is overdue, please update your project and remove deprecated
        calls to avoid build errors in the future.

        See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
        ********************************************************************************

!!
  opt = self.warn_dash_deprecation(opt, section)
running sdist
running egg_info
```
### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Pass GA

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes #50369
Closes #50372

Closes #50371 from bjornjorgensen/bjornjorgensen-description_file3.5].

Authored-by: Bjørn Jørgensen <bjornjorgensen@gmail.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
@imclvr
Copy link

imclvr commented Mar 25, 2025

thanks a lot for fixing this @HyukjinKwon @bjornjorgensen @abravalheri , our pipelines are getting green again :)

@abravalheri abravalheri deleted the patch-1 branch March 25, 2025 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.