Skip to content

gh-151929: Get uptime on BSD/macOS in pythoninfo#152189

Merged
vstinner merged 3 commits into
python:mainfrom
vstinner:pythoninfo_bsd
Jun 25, 2026
Merged

gh-151929: Get uptime on BSD/macOS in pythoninfo#152189
vstinner merged 3 commits into
python:mainfrom
vstinner:pythoninfo_bsd

Conversation

@vstinner

@vstinner vstinner commented Jun 25, 2026

Copy link
Copy Markdown
Member
  • Check sysctlbyname() function and sys/sysctl.h header in configure.
  • Add _testcapi.uptime_bsd() function.

* Check sysctlbyname() function and sys/sysctl.h header in
  configure.
* Add _testcapi.uptime_bsd() function.
@vstinner

Copy link
Copy Markdown
Member Author

Example on "macOS / build and test (macos-26)":

system.uptime: 0:09:15

@vstinner vstinner enabled auto-merge (squash) June 25, 2026 13:00
@vstinner vstinner merged commit b6d89ed into python:main Jun 25, 2026
52 checks passed
@vstinner vstinner deleted the pythoninfo_bsd branch June 25, 2026 13:11
@miss-islington-app

Copy link
Copy Markdown

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jun 25, 2026

Copy link
Copy Markdown

GH-152196 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 25, 2026
@miss-islington-app

Copy link
Copy Markdown

Sorry, @vstinner, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker b6d89edc4a13a71734ae1f1e386122bf62d68ed8 3.14

@miss-islington-app

Copy link
Copy Markdown

Sorry, @vstinner, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker b6d89edc4a13a71734ae1f1e386122bf62d68ed8 3.13

@bedevere-app

bedevere-app Bot commented Jun 25, 2026

Copy link
Copy Markdown

GH-152197 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jun 25, 2026
vstinner added a commit that referenced this pull request Jun 25, 2026
…52197)

gh-151929: Get uptime on BSD/macOS in pythoninfo (#152189)

* Check sysctlbyname() function and sys/sysctl.h header in
  configure.
* Add _testcapi.uptime_bsd() function.

(cherry picked from commit b6d89ed)
vstinner added a commit that referenced this pull request Jun 25, 2026
…152196)

gh-151929: Get uptime on BSD/macOS in pythoninfo (GH-152189)

* Check sysctlbyname() function and sys/sysctl.h header in
  configure.
* Add _testcapi.uptime_bsd() function.
(cherry picked from commit b6d89ed)

Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this pull request Jun 25, 2026
…52197) (#152207)

[3.14] gh-151929: Get uptime on BSD/macOS in pythoninfo (#152189) (#152197)

gh-151929: Get uptime on BSD/macOS in pythoninfo (#152189)

* Check sysctlbyname() function and sys/sysctl.h header in
  configure.
* Add _testcapi.uptime_bsd() function.

(cherry picked from commit b6d89ed)
(cherry picked from commit d25cf02)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant