Skip to content

bpo-43425: Update setup.py not to use distutils.log - #26969

Merged
corona10 merged 3 commits into
python:mainfrom
corona10:bpo-43425-setup
Jul 2, 2021
Merged

corona10 merged 3 commits into
python:mainfrom
corona10:bpo-43425-setup

Conversation

@corona10

@corona10 corona10 commented Jun 30, 2021 •

Copy link
Copy Markdown
Member
@corona10

corona10 commented Jun 30, 2021 •

Copy link
Copy Markdown
Member Author

@vstinner

renaming build/scripts-3.11/idle3 to build/scripts-3.11/idle3.11 contains in names
Do you have any ideas? -> solved

@corona10 corona10 changed the title bpo-43425: Update setup.py not to use distutils.log Jul 1, 2021
@corona10 corona10 changed the title [WIP] bpo-43425: Update setup.py not to use distutils.log Jul 1, 2021
@corona10
corona10 force-pushed the bpo-43425-setup branch 2 times, most recently from 1709cb3 to b1ea241 Compare July 1, 2021 02:53
Comment thread setup.py
else:
newfilename = filename + minoronly
log.info('renaming %s to %s', filename, newfilename)
log.info(f'renaming {filename} to {newfilename}')

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.

With your change, I no longer see this message. IMO you should mimick distutils setup() function which sets the logging thredshold to INFO:

  File "/home/vstinner/python/main/./setup.py", line 2698, in main
    setup(# PyPI Metadata (PEP 301)
  File "/home/vstinner/python/main/Lib/distutils/core.py", line 134, in setup
    ok = dist.parse_command_line()
  File "/home/vstinner/python/main/Lib/distutils/dist.py", line 477, in parse_command_line
    log.set_verbosity(self.verbose)
  File "/home/vstinner/python/main/Lib/distutils/log.py", line 78, in set_verbosity
    set_threshold(INFO)

To see the message on the main branch:

$ rm -rf build/scripts-3.11/
$ make
(...)
renaming build/scripts-3.11/pydoc3 to build/scripts-3.11/pydoc3.11
renaming build/scripts-3.11/idle3 to build/scripts-3.11/idle3.11
renaming build/scripts-3.11/2to3 to build/scripts-3.11/2to3-3.11

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thank's nice catch :)

@corona10 corona10 changed the title bpo-43425: Update setup.py not to use distutils.log Jul 1, 2021
@corona10 corona10 changed the title [WIP] bpo-43425: Update setup.py not to use distutils.log Jul 1, 2021

@vstinner vstinner 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.

LGTM.

Ok, this time I can ready "renaming ..." logs ;-)

@corona10
corona10 merged commit a7e251b into python:main Jul 2, 2021
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @corona10 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 2, 2021
(cherry picked from commit a7e251b)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
@bedevere-bot

Copy link
Copy Markdown

GH-26986 is a backport of this pull request to the 3.10 branch.

miss-islington added a commit that referenced this pull request Jul 2, 2021
(cherry picked from commit a7e251b)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

6 participants