Skip to content

Fix EntityPath for Python 3.14 by subclassing OS-specific pathlib classes#3

Open
Vanthys wants to merge 1 commit intoTheBiomics:devfrom
Vanthys:fix/pathlib-314-entitypath
Open

Fix EntityPath for Python 3.14 by subclassing OS-specific pathlib classes#3
Vanthys wants to merge 1 commit intoTheBiomics:devfrom
Vanthys:fix/pathlib-314-entitypath

Conversation

@Vanthys
Copy link

@Vanthys Vanthys commented Feb 23, 2026

Python 3.14 removed/refactored the private pathlib attribute _flavour. EntityPath previously accessed Path('.')._flavour, which caused an AttributeError: 'PosixPath' object has no attribute '_flavour'

This merge request removes the dependency on private pathlib internals and updates EntityPath to subclass the appropriate concrete path class (PosixPath or WindowsPath) based on the current platform.

Works on Python 3.14+ and is backwards compatible with Python 3.11-3.13. Also there is no change to public API or expected behavior of EntityPath.

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