Skip to content

ci: avoid measuring refcounts on shared globals - #6313

Open
davidhewitt wants to merge 6 commits into
PyO3:mainfrom
davidhewitt:flaky-inheritance-tests
Open

ci: avoid measuring refcounts on shared globals#6313
davidhewitt wants to merge 6 commits into
PyO3:mainfrom
davidhewitt:flaky-inheritance-tests

Conversation

@davidhewitt

@davidhewitt davidhewitt commented Aug 9, 2026

Copy link
Copy Markdown
Member

The tests added in #6224 caused flake in CI because they are asserting exact refcount values on shared state. If tests run concurrently they can cause spurious failures.

I replaced those tests with three simpler tests which cover the cases of inheriting from object, another #[pyclass], and from dict (i.e. a native type). The new implementation also doesn't need the cycle collector so we can avoid GC and run these tests also on free-threaded Python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant