Skip to content

[3.14] gh-162473: Fix test.test_capi.test_watchers assuming which watcher IDs are avail… (GH-162474) - #163156

Merged
itamaro merged 1 commit into
python:3.14from
miss-islington:backport-2123e52-3.14
Dec 4, 2026
Merged

itamaro merged 1 commit into
python:3.14from
miss-islington:backport-2123e52-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Fix test.test_capi.test_watchers assuming which watcher IDs are available

Some watcher tests hardcode watcher IDs 1 and 3 and assume them to be available.
Instead, force an available watcher ID by creating and then immediately removing
a watcher. This makes the tests a bit more resilient in the face of other
modules registering watchers.
(cherry picked from commit 2123e52)

Co-authored-by: Alex Malyshev lex.malyshev@gmail.com

…her IDs are avail… (pythonGH-162474)

Fix test.test_capi.test_watchers assuming which watcher IDs are available

Some watcher tests hardcode watcher IDs 1 and 3 and assume them to be available.
Instead, force an available watcher ID by creating and then immediately removing
a watcher.  This makes the tests a bit more resilient in the face of other
modules registering watchers.
(cherry picked from commit 2123e52)

Co-authored-by: Alex Malyshev <lex.malyshev@gmail.com>
@bedevere-app bedevere-app Bot added skip news type-bug An unexpected behavior, bug, or error type-feature A feature request or enhancement labels Dec 4, 2026
@bedevere-app bedevere-app Bot added tests Tests in the Lib/test dir awaiting review labels Dec 4, 2026
@itamaro itamaro removed the type-feature A feature request or enhancement label Dec 4, 2026
@itamaro
itamaro enabled auto-merge (squash) December 4, 2026 18:10
@itamaro
itamaro merged commit 1b3341c into python:3.14 Dec 4, 2026
55 of 61 checks passed
@miss-islington
miss-islington deleted the backport-2123e52-3.14 branch December 4, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants