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

Avoid future breakage of setup.py invokations #8711

Merged
merged 7 commits into from Nov 29, 2021
Merged

Conversation

astrojuanlu
Copy link
Contributor

See #8659.

@astrojuanlu astrojuanlu requested a review from a team as a code owner November 24, 2021 11:33
@astrojuanlu
Copy link
Contributor Author

I don't understand the test failure, seems unrelated?

@astrojuanlu astrojuanlu reopened this Nov 24, 2021
@astrojuanlu
Copy link
Contributor Author

Important to note that I don't think this has any downsides. Folks willing to use newer versions of setuptools for some exotic feature will need to switch to PEP-517 build system specification, which would enable pip build isolation. And even if they refuse to do that for some reason, they can always add another requirements.txt layer to install the setuptools version they want (although this is not where the ecosystem is going at all).

On the other hand, @agjohnson suggested capping the version only when method: setuptools, but I don't think it's worth the extra complexity in the code to add another if.

@astrojuanlu
Copy link
Contributor Author

Would be cool if we could test it with some real-world projects just be safe though.

@astrojuanlu
Copy link
Contributor Author

xref pypa/setuptools#2904

@humitos
Copy link
Member

humitos commented Nov 24, 2021

I don't understand the test failure, seems unrelated?

The test failing is related. Take a look at this line https://app.circleci.com/pipelines/github/readthedocs/readthedocs.org/3393/workflows/481df7c7-8c03-47a7-a85a-5b1e216b3202/jobs/7260?invite=true#step-106-186

It checks for the command executed and it contains setuptools where it should be "setuptools<58.3.0" 😄

@humitos
Copy link
Member

humitos commented Nov 24, 2021

I don't have full contex about this because there is too much things involved and too much reading required 😄 --however, it doesn't seem bad to pin setuptools to a version that works. @astrojuanlu, you are my packaging master, so if you say this is correct it is for me 😉

Would be cool if we could test it with some real-world projects just be safe though.

Did we already notice some projects failing because of this? I can help you test this if you want.

@astrojuanlu
Copy link
Contributor Author

There are no projects failing yet, because the removal hasn't happened. Hmmm I'll think of how we could test it

@astrojuanlu
Copy link
Contributor Author

Oh thanks for the pointer, there was a huge traceback and I got lost. Addressing.

@astrojuanlu
Copy link
Contributor Author

I think the only way of effectively demonstrating the effects of not merging this would be to locally replace the deprecation warnings introduced in setuptools 58.3.0 for setup_requires, easy_install, and setup.py install by actual errors and see what would happen. I suspect many old RTD projects would fail immediately.

pypa/setuptools@v58.2.0...v58.3.0

The setuptools in Python 3.8 `venv` is no longer ancient,
so it is not necessary to upgrade it anymore.
@astrojuanlu
Copy link
Contributor Author

Added an unrelated commit, but that involves setuptools too.

@stsewd
Copy link
Member

stsewd commented Nov 24, 2021

We should update https://docs.readthedocs.io/en/stable/builds.html#external-dependencies

@astrojuanlu astrojuanlu requested a review from a team as a code owner November 24, 2021 16:59
@agjohnson
Copy link
Contributor

but I don't think it's worth the extra complexity in the code to add another if

👍 we can iterate later if we need to buy ourselves more time on this deprecation

astrojuanlu and others added 2 commits November 29, 2021 20:04
Co-authored-by: Santos Gallegos <santos_g@outlook.com>
docs/builds.rst Outdated Show resolved Hide resolved
readthedocs/doc_builder/python_environments.py Outdated Show resolved Hide resolved
Co-authored-by: Santos Gallegos <santos_g@outlook.com>
@astrojuanlu astrojuanlu merged commit 61042df into master Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants