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

CI: Print detailed Python version #12176

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Mar 22, 2024

Purpose

  • Print more debug info on CI

Detail

Running python with a single --version gives info like:

Python 3.12.2
Python 3.13.0a5+

Running with a double --version --version gives more details:

Python 3.12.2 (v3.12.2:6abddd9f6a, Feb  6 2024, 17:02:06) [Clang 13.0.0 (clang-1300.0.29.30)]
Python 3.13.0a5+ (heads/main-dirty:63d6f2623e, Mar 22 2024, 15:29:42) [Clang 15.0.0 (clang-1500.3.9.4)]

This contains a commit hash and timestamp, which could be useful in identifying the Python version in more details.

@jayaddison jayaddison added github_actions Pull requests that update GitHub Actions code python Pull requests that update Python code labels Mar 22, 2024
@jayaddison
Copy link
Contributor

Hi @hugovk - is this intended for merge, or is it a one-time version-gathering task for #12174?

@hugovk
Copy link
Contributor Author

hugovk commented Mar 22, 2024

For merge, it could also be useful in the future.

python/cpython#117120 is a potential fix for #12174. For that PR, our own doctests are back down from ~45 mins to ~10 mins.

Copy link
Member

@chrisjsewell chrisjsewell left a comment

Choose a reason for hiding this comment

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

the more info the better thanks 😄

@chrisjsewell chrisjsewell merged commit b1548d0 into sphinx-doc:master Mar 22, 2024
22 checks passed
@picnixz
Copy link
Member

picnixz commented Mar 22, 2024

It's been more than 10 years that I was coding in Python and I didn't know about this --version --version... I've been enlightened.

@chrisjsewell
Copy link
Member

It's been more than 10 years that I was coding in Python and I didn't know about this --version --version... I've been enlightened.

The simpler form would be Python -VV, but I didn't want to be pedantic 😄

@hugovk hugovk deleted the python-version-version branch March 22, 2024 19:21
@hugovk
Copy link
Contributor Author

hugovk commented Mar 22, 2024

It's been more than 10 years that I was coding in Python and I didn't know about this --version --version... I've been enlightened.

It was added in 3.6: https://docs.python.org/3/using/cmdline.html#cmdoption-version

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 22, 2024
@AA-Turner AA-Turner added this to the 7.3.0 milestone Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
github_actions Pull requests that update GitHub Actions code python Pull requests that update Python code type:performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants