GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [WIP] gh-92584: Rename the distutils package to _distutils by vstinner · Pull Request #92585 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented May 9, 2022

Copy link
Copy Markdown
Member

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
vstinner added 16 commits May 10, 2022 00:42
@vstinner
gh-92584: Rename the distutils package to _distutils
8497c74
Rename Lib/distutils/ directory to Lib/_distutils/.
@vstinner
Remove Doc/distutils/ and Doc/library/distutils.rst
7c79a5e
@vstinner
Remove distutils tests
36001d8
Keep _distutils.tests.support for peg_generator tests
@vstinner
Remove mentions of distutils in .gitignore
157ae9f
@vstinner
Remove deprecations
9852be0
@vstinner
Update _distutils imports
8162b4e
@vstinner
Update references to "distutils" package
3c29fb9
@vstinner
Update setup.py and Makefile.pre.in
ed6c0a8
@vstinner
Update test.support and test.libregrtest
5cb5fd1
@vstinner
Update test_sundry
48074ca
@vstinner
Update peg_generator build.py
64387fb
@vstinner
Update test_cppext
e316715
@vstinner
Update c-analyzer
ef3bc5c
@vstinner
Update _decimal tests formathelper.py
7a91966
Replace distutils.spawn.find_executable() with shutil.which().
@vstinner
Remove misc mentions of distutils
5cae44d
@vstinner
make regen-stdlib-module-names
1cfabfd
@vstinner
vstinner requested review from lysnikolaou, pablogsal and rhettinger as code owners May 9, 2022 22:43
@bedevere-bot bedevere-bot added the awaiting core review label May 9, 2022
@vstinner
vstinner marked this pull request as draft May 9, 2022 22:44
@vstinner vstinner changed the title gh-92584: Rename the distutils package to _distutils [WIP] gh-92584: Rename the distutils package to _distutils May 9, 2022
@vstinner vstinner mentioned this pull request May 9, 2022
pip imports the deprecated distutils module pypa/pip#11103
Closed
1 task done
@vstinner

vstinner commented May 9, 2022

Copy link
Copy Markdown
Member Author

test_tools and test_venv fail because of pip: pypa/pip#11103

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
Update import in Lib/_distutils/util.py
3862d1b
@vstinner vstinner mentioned this pull request May 9, 2022
PEP 632: Remove the distutils package (Python 3.12) #92584
Closed
@vstinner

vstinner commented May 9, 2022

Copy link
Copy Markdown
Member Author

By default, make install fails on ensurepip, also because of pip.

Temporary workaround: ./configure --with-ensurepip=no: make install doesn't run ensurepip and so doesn't fail.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented May 9, 2022

Copy link
Copy Markdown
Member Author

For now, this PR is a draft, and so I didn't write any documentation (no NEWS entry, no What's New in Python 3.12, etc.).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented May 9, 2022

Copy link
Copy Markdown
Member Author

Docs / Docs (pull_request) Failing

make -C Doc/ PYTHON=../python venv fails because of pip.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented May 10, 2022

Copy link
Copy Markdown
Member Author

Related issue: #92584

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

FFY00
FFY00 approved these changes May 10, 2022
View reviewed changes

@FFY00 FFY00 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This is correct, and seems like the best approach. We just have to fix pip.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@FFY00
FFY00 requested a review from jaraco May 10, 2022 00:41
@tiran

tiran commented May 10, 2022

Copy link
Copy Markdown
Member

@erlend-aasland and I will have the last modules ported to Modules/Setup.stdlib very soon. We won't need distutils any more then. I recommend that we do not rename distutils and instead remove it once and for all.

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tiran tiran added the DO-NOT-MERGE label May 10, 2022
@vstinner

vstinner commented May 10, 2022

Copy link
Copy Markdown
Member Author

@tiran:

@erlend-aasland and I will have the last modules ported to Modules/Setup.stdlib very soon. We won't need distutils any more then. I recommend that we do not rename distutils and instead remove it once and for all.

See the issue #92584: peg_generator, c-analyzer tool and test_cppext still use distutils. I would prefer to not break them.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Jun 17, 2022

Copy link
Copy Markdown
Member Author

See the issue #92584: peg_generator, c-analyzer tool and test_cppext still use distutils. I would prefer to not break them.

I modified test_cppext to build the C++ extension with setuptools. So far, so good: it works on all buildbots.

We can try a similar approach for test_peg_generator. Right now, test_peg_generator builds a library to make the test faster. I don't know how to port distutils code to setuptools.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Jun 17, 2022

Copy link
Copy Markdown
Member Author

@tiran:

@erlend-aasland and I will have the last modules ported to Modules/Setup.stdlib very soon.

How is it going? Is this work tracked somewhere?

For example, configure.ac mentions the array module, but setup.py still has code to build this extension. Is there a plan to remove the setup.py code, if the configure/Makefile code is enough? Or is there still a reason to keep the setup.py code?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tiran

tiran commented Jun 17, 2022

Copy link
Copy Markdown
Member

I have created GH-93939

tl;dr every module that uses addext() can be built without distutils (except for a quirk in multiprocessing). Modules that use add() are not yet ported. I have an open PR for _ctypes.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner closed this Jun 17, 2022
@vstinner
vstinner deleted the remove_distutils branch June 17, 2022 14:51
@vstinner

vstinner commented Jun 17, 2022

Copy link
Copy Markdown
Member Author

It seems like most core devs don't want to keep distutils hidden in the stdlib, but want to directly remove it. So I close my PR. Remaining steps are tracked by other issues.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@arhadthedev arhadthedev mentioned this pull request Jul 14, 2022
Deprecate and remove distutils #85454
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@FFY00 FFY00 FFY00 approved these changes
@rhettinger rhettinger Awaiting requested review from rhettinger
@pablogsal pablogsal Awaiting requested review from pablogsal pablogsal is a code owner
@lysnikolaou lysnikolaou Awaiting requested review from lysnikolaou lysnikolaou is a code owner
@jaraco jaraco Awaiting requested review from jaraco
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently will be requested when the pull request is marked ready for review ericsnowcurrently is a code owner
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner will be requested when the pull request is marked ready for review AA-Turner is a code owner
@hugovk hugovk Awaiting requested review from hugovk hugovk will be requested when the pull request is marked ready for review hugovk is a code owner
@StanFromIreland StanFromIreland Awaiting requested review from StanFromIreland StanFromIreland will be requested when the pull request is marked ready for review StanFromIreland is a code owner
@erlend-aasland erlend-aasland Awaiting requested review from erlend-aasland erlend-aasland will be requested when the pull request is marked ready for review erlend-aasland is a code owner
@emmatyping emmatyping Awaiting requested review from emmatyping emmatyping will be requested when the pull request is marked ready for review emmatyping is a code owner
@itamaro itamaro Awaiting requested review from itamaro itamaro will be requested when the pull request is marked ready for review itamaro is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting core review DO-NOT-MERGE

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@vstinner @tiran @FFY00 @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.