Skip to content

Fix: preserve absolute Path object for tfdir#91

Merged
ludoo merged 3 commits intomasterfrom
fix-tfdir-path-regression
Mar 31, 2026
Merged

Fix: preserve absolute Path object for tfdir#91
ludoo merged 3 commits intomasterfrom
fix-tfdir-path-regression

Conversation

@ludoo
Copy link
Copy Markdown
Collaborator

@ludoo ludoo commented Mar 31, 2026

Fixes a regression introduced during the recent Python modernization in , where started casting the variable to a string, effectively breaking downstream users (like ) that expect the object to be preserved so they can use the operator against .

This PR:

  • Reverts to return the original object when an absolute is passed to .
  • Casts to a string before encoding it for hashing to prevent an when is enabled.
  • Adds test coverage to prevent future regressions.
  • Adds a GEMINI.md file with basic rules for agents work in this repository.

ludoo added 3 commits March 31, 2026 07:39
- Ensure `_abspath` returns the original `Path` object when it's absolute, reverting the modernization regression.

- Cast `self.tfdir` to `str` before encoding to prevent `AttributeError` when cache is enabled.

- Add test cases to verify both behaviors.
@ludoo ludoo merged commit 17972f5 into master Mar 31, 2026
7 checks passed
@ludoo ludoo deleted the fix-tfdir-path-regression branch March 31, 2026 07:48
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