Skip to content

fix: Hive catalog test failure on CPython 3.13.12#3043

Merged
Fokko merged 1 commit intoapache:mainfrom
geruh:dru-resets-mock
Feb 15, 2026
Merged

fix: Hive catalog test failure on CPython 3.13.12#3043
Fokko merged 1 commit intoapache:mainfrom
geruh:dru-resets-mock

Conversation

@geruh
Copy link
Contributor

@geruh geruh commented Feb 14, 2026

Rationale for this change

While reviewing some open PRs #3041, #3042, I noticed CI kept failing on the Python 3.13 job in the hive tests. Turns out CPython 3.13.12 was just released and included a change python/cpython#142651 which made Mock.call_count thread-safe by deriving it from len(call_args_list).

This broke our hive test, which was resetting the counter with mock.call_count = 0 directly. This switches to use reset_mock(), which properly clears all the internal call tracking state.

Are these changes tested?

make test passes

Are there any user-facing changes?

no

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks @geruh

@Fokko Fokko merged commit bbea0f0 into apache:main Feb 15, 2026
11 checks passed
Copy link

@sumedhsakdeo sumedhsakdeo left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @geruh !

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.

3 participants