-
Notifications
You must be signed in to change notification settings - Fork 41
Bug with Python 3.12 #257
Comments
Uh oh! Perhaps it wasn't so clever to subclass a class from the pathlib standard libary 😅 |
@TomNicholas - from the highlights, it looks like subclassing the pathlib.Path class is now supported directly Significant improvements in the standard library: The pathlib.Path class now supports subclassing The os module received several improvements for Windows support A command-line interface has been added to the sqlite3 module |
Oh interesting! I deliberately didn't subclass |
Those are great questions... I am not sure. Also it is unclear of what exactly changed here that is causing the lack of those methods... |
@TomNicholas from further down the page: Add support for subclassing pathlib.PurePath and pathlib.Path, plus their Posix- and Windows-specific variants. Subclasses may override the pathlib.PurePath.with_segments() method to pass information between path instances. |
@TomNicholas - how difficult of a fix would you think this would be? I am happy to help where possible. |
Probably really easy - I suspect that we would just need to rewrite To make it work on different versions of python I think we would need to wrap the definition of It might also be good to add a test that specifically checks that we can create a |
@TomNicholas - once #260 is merged, would you be willing to cut a new release for datatree, which would release 3.12 wheels? |
As of now, several components break with Python 3.12. Here is a sample of the output after installing Python 3.12 in the datatree dev environment. It appears to be related to pathlib, but I am not exactly sure. Any thoughts here?
The text was updated successfully, but these errors were encountered: