Skip to content

Set path in loaded data to PurePath#471

Open
psomhorst wants to merge 1 commit intodevelopfrom
fix/purepath
Open

Set path in loaded data to PurePath#471
psomhorst wants to merge 1 commit intodevelopfrom
fix/purepath

Conversation

@psomhorst
Copy link
Copy Markdown
Contributor

When data objects containing paths are pickled and then unpickled on a different system, Paths can lead to errors, because PosixPaths can't be created non Windows machines, and WindowsPaths can't be created on Posix machines.

This PR replaces Paths in EITData with PurePaths. These are either PurePosixPaths or PureWindowsPaths, both of which can be handled on all machines. Only when the PurePaths are used for interacting with files (e.g., opening, getting the file size, etc.) they are converted to Paths.

When data objects are pickled and then unpickled on a different system, Paths can lead to errors, because PosixPaths can't be created non Windows machines, and WindowsPaths can't be created on Posix machines.

This commit replaces Paths in EITData with PurePaths. These are either PurePosixPaths or PureWindowsPaths, both of which can be handled on all machines.
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