Skip to content

bpo-33717: set terse=True in pythoninfo.collect_platform #7797

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

Merged
merged 1 commit into from
Jun 19, 2018

Conversation

zhangyangyu
Copy link
Member

@zhangyangyu zhangyangyu commented Jun 19, 2018

I suggest using platform.platform(aliased=True, terse=True) in test.pythoninfo in < 3.8. This makes it more consistent with 3.8. platform.platform is largely changed in 3.8. More specially, I want libc version to be included in pythoninfo. Although libc version is wrong now but I think it will be fixed soon.

https://bugs.python.org/issue33717

@zhangyangyu zhangyangyu requested a review from vstinner June 19, 2018 15:28
@vstinner vstinner changed the title set terse=True in pythoninfo.collect_platform bpo-33717: set terse=True in pythoninfo.collect_platform Jun 19, 2018
@@ -142,7 +142,7 @@ def collect_platform(info_add):
info_add('platform.python_implementation',
platform.python_implementation())
info_add('platform.platform',
platform.platform(aliased=True))
platform.platform(aliased=True, terse=True))
Copy link
Member

Choose a reason for hiding this comment

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

It seems like terse=True returns less information.

platform.platform(aliased=True)
'Linux-4.16.14-300.fc28.x86_64-x86_64-with-fedora-28-Twenty_Eight'
platform.platform(aliased=True,terse=True)
'Linux-4.16.14-300.fc28.x86_64-x86_64-with-glibc2.3.4'

Copy link
Member Author

Choose a reason for hiding this comment

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

The distribution info. platform.dist is deprecated long ago and the buildbot already tells us what the exact distribution is. The info is already not available in master.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM.

@zhangyangyu zhangyangyu merged commit 71ca738 into python:3.7 Jun 19, 2018
@miss-islington
Copy link
Contributor

Thanks @zhangyangyu for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6.
🐍🍒⛏🤖

@zhangyangyu zhangyangyu deleted the pythoninfo-platform branch June 19, 2018 17:33
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 19, 2018
@bedevere-bot
Copy link

GH-7802 is a backport of this pull request to the 3.6 branch.

@bedevere-bot
Copy link

GH-7803 is a backport of this pull request to the 2.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 19, 2018
zhangyangyu added a commit that referenced this pull request Jun 19, 2018
…ythoninfo (GH-7797) (GH-7803)

(cherry picked from commit 71ca738)

Co-authored-by: Xiang Zhang <[email protected]>
zhangyangyu added a commit that referenced this pull request Jun 19, 2018
…ythoninfo (GH-7797) (GH-7802)

(cherry picked from commit 71ca738)

Co-authored-by: Xiang Zhang <[email protected]>
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.

5 participants