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

PEP 632: Deprecate distutils module #1581

Merged
merged 1 commit into from
Sep 4, 2020
Merged

PEP 632: Deprecate distutils module #1581

merged 1 commit into from
Sep 4, 2020

Conversation

zooba
Copy link
Member

@zooba zooba commented Sep 4, 2020

No description provided.

@gvanrossum
Copy link
Member

Would be kinda cool to get Greg Ward (http://www.gerg.ca/) as a co-author.

Copy link

@mattip mattip left a comment

Choose a reason for hiding this comment

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

This is a major change to the way c-extension modules are built, and will break most build scripts for c-extensions. Until now, python has been responsible for maintaining distutils, and the language of the PEP seems to be saying "nope, not our problem anymore". This is a major change. I think there should at least be one python release where distutils is deprecated but not removed. This would allow the wider ecosystem to accommodate the change. In addition to the projects visible on PyPI or conda, there are many non-public projects that this will impact. There needs to be very clear communication of migration paths (which could be as simple as the following), with a guarantee from setuptools that they will support current distutils usage. Another option may be to fork distutils out as a independent package, with the same level of support it has gotten from python in the last few years (very little).

try:
    from setuptools import distutils
except:
    import distutils

latest documentation for migration advice.

Some projects use alternate sets of shims over distutils, notably,
numpy.distutils. [4]_ Where known, these projects have been informed.
Copy link

Choose a reason for hiding this comment

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

Could you reference the informative message and the resulting discussion that took place with numpy and scipy?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you mean pypa/setuptools#2372 ? "Have been informed" was only true immediately as I wrote it, because I interrupted typing at this point to make sure it had been mentioned ;)

Copy link

Choose a reason for hiding this comment

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

Thanks, I have now subscribed to that discussion.

build the native extension modules in the standard library (except on
Windows). Because this is a CPython build-time dependency, it is
possible to continue to use distutils for this specific case without
it being part of the standard library.
Copy link

Choose a reason for hiding this comment

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

It would be more convincing if CPython were to also commit to using setuptools exclusively in its build process.

Copy link
Member Author

Choose a reason for hiding this comment

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

I addressed this on Discourse. CPython can use whatever internal tools it likes to build itself.

Compatibility shims already exist in setuptools and pip to
transparently migrate old code, however, these are controlled by
external projects and are in no way bound by this PEP. Consult their
latest documentation for migration advice.
Copy link

Choose a reason for hiding this comment

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

I think calling the PyPA-managed pip and setuptools projects "external" is not very accurate. Building such documentation should be a condition for accepting this PEP.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a CPython PEP, and the relevant people have already indicated that they don't want to be bound to particular actions by a CPython PEP.

@Rosuav
Copy link
Contributor

Rosuav commented Sep 4, 2020

Let's not get too bogged down in details here on this PR. Once the PEP is merged and published, discussion about its content can take place elsewhere.

@zooba You don't have a Discussions-To header, but the content of this PEP suggests that it's possibly a distutils-sig topic. Where was the conversation that led to this being created, and should further discussion about its content go to the same place?

@hugovk
Copy link
Member

hugovk commented Sep 4, 2020

There's a Discourse thread at https://discuss.python.org/t/pep-632-deprecate-distutils-module/5134

@mattip
Copy link

mattip commented Sep 4, 2020

... and the discussion thread promptly went to line 51 of my review here :)

@zooba
Copy link
Member Author

zooba commented Sep 4, 2020

You don't have a Discussions-To header, but the content of this PEP suggests that it's possibly a distutils-sig topic. Where was the conversation that led to this being created, and should further discussion about its content go to the same place?

Technically distutils-sig would make sense, but that list is basically "pypa-sig" now, and this is not a PyPA topic. So python-dev is the venue for discussionofficial list, while I expect most discussion to occur on Discourse.

@zooba
Copy link
Member Author

zooba commented Sep 4, 2020

I'm merging to make sure the PEP number is claimed and there is a rendered version on the website. It doesn't mean we're not going to make updates later. Initial discussions to https://discuss.python.org/t/pep-632-deprecate-distutils-module/5134 please

@zooba zooba merged commit 5d5c685 into python:master Sep 4, 2020
@zooba zooba deleted the pep-632 branch September 4, 2020 11:23
mnm678 pushed a commit to mnm678/peps that referenced this pull request Oct 22, 2020
Sign up for free to 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.

6 participants