Skip to content

fix(tests): replace FakePath with monkeypatch for Python 3.12 compat#2444

Merged
teknium1 merged 1 commit intomainfrom
hermes/hermes-31d7db3b
Mar 22, 2026
Merged

fix(tests): replace FakePath with monkeypatch for Python 3.12 compat#2444
teknium1 merged 1 commit intomainfrom
hermes/hermes-31d7db3b

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

Cherry-pick of #2261 by @dieutx, with fix for NameError (bare Path reference). Closes #2243.

Python 3.12 changed PosixPath.new to ignore redirected path args, breaking the FakePath subclass pattern. Replaced with monkeypatch on Path.exists.

20/20 gateway service tests pass.

…2 compat

Python 3.12 changed PosixPath.__new__ to ignore the redirected path
argument, breaking the FakePath subclass pattern. Use monkeypatch on
Path.exists instead.

Based on PR #2261 by @dieutx, fixed NameError (bare Path not imported).
@teknium1 teknium1 merged commit 887e8a8 into main Mar 22, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant