Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update load() to use Pathlib object open #1546

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

klinden
Copy link

@klinden klinden commented Feb 16, 2024

The load() method already accepts either a string or Pathlib object. Instead of converting the Pathlib object to a string and using the global open() function, convert strings to Pathlib objects and use Path.open(). This allows for passing and correctly handling objects that extend Path.

klinden and others added 2 commits February 16, 2024 16:23
The load() method already accepts either a string or Pathlib object. Instead of converting the Pathlib object to a string and using the global open() function, convert strings to Pathlib objects and use Path.open(). This allows for passing and correctly handling objects that extend Path.
@tomMoral
Copy link
Contributor

tomMoral commented Apr 4, 2024

Hello! Thanks for the PR, the change seems useful.

It is failing part of the CI because it looks like it breaks the file's tracking with the resource manager. the _unpickle function expects a str filename but is provided with a Path. We need to adress this point before merging the PR.

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.

None yet

2 participants