From edee8d3157ffc59a33b30166a492261c2d629e14 Mon Sep 17 00:00:00 2001 From: Stephen Morton Date: Sun, 8 Dec 2024 14:10:41 -0800 Subject: [PATCH] add CLONE_NEWTIME to os.__all__ (#13221) --- .github/workflows/daily.yml | 4 +++- .github/workflows/stubtest_stdlib.yml | 4 +++- stdlib/@tests/stubtest_allowlists/linux-py312.txt | 10 ---------- stdlib/@tests/stubtest_allowlists/linux-py313.txt | 8 -------- stdlib/os/__init__.pyi | 1 + 5 files changed, 7 insertions(+), 20 deletions(-) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 548807e81..8ca4191af 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -34,7 +34,9 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: ["ubuntu-latest", "windows-latest", "macos-latest"] + # As of 2024-10-18, ubuntu-latest can refer to different Ubuntu versions, + # which can can cause problems with os module constants. + os: ["ubuntu-24.04", "windows-latest", "macos-latest"] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] fail-fast: false diff --git a/.github/workflows/stubtest_stdlib.yml b/.github/workflows/stubtest_stdlib.yml index 7224f0ea6..9ae15305b 100644 --- a/.github/workflows/stubtest_stdlib.yml +++ b/.github/workflows/stubtest_stdlib.yml @@ -30,7 +30,9 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: ["ubuntu-latest", "windows-latest", "macos-latest"] + # As of 2024-10-18, ubuntu-latest can refer to different Ubuntu versions, + # which can can cause problems with os module constants. + os: ["ubuntu-24.04", "windows-latest", "macos-latest"] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] fail-fast: false diff --git a/stdlib/@tests/stubtest_allowlists/linux-py312.txt b/stdlib/@tests/stubtest_allowlists/linux-py312.txt index a2c251dcd..a4083aa22 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py312.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py312.txt @@ -1,13 +1,3 @@ -# ======= -# >= 3.12 -# ======= - -# These seem like they should be available on Linux, but they're not -# on GitHub Actions runners for some reason. -os.CLONE_NEWTIME -posix.CLONE_NEWTIME - - # ============================================================= # Allowlist entries that cannot or should not be fixed; <= 3.12 # ============================================================= diff --git a/stdlib/@tests/stubtest_allowlists/linux-py313.txt b/stdlib/@tests/stubtest_allowlists/linux-py313.txt index 046fd9e54..e69de29bb 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py313.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py313.txt @@ -1,8 +0,0 @@ -# ======= -# >= 3.12 -# ======= - -# These seem like they should be available on Linux, but they're not -# on GitHub Actions runners for some reason. -os.CLONE_NEWTIME -posix.CLONE_NEWTIME diff --git a/stdlib/os/__init__.pyi b/stdlib/os/__init__.pyi index 98260b14e..64691b514 100644 --- a/stdlib/os/__init__.pyi +++ b/stdlib/os/__init__.pyi @@ -231,6 +231,7 @@ if sys.platform == "linux" and sys.version_info >= (3, 12): "CLONE_NEWNET", "CLONE_NEWNS", "CLONE_NEWPID", + "CLONE_NEWTIME", "CLONE_NEWUSER", "CLONE_NEWUTS", "CLONE_SIGHAND",