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

test for valid fileno before creating RealFile #1557

Merged
merged 2 commits into from
Jul 12, 2023

Conversation

braingram
Copy link
Contributor

fileno is needed for memory mapping and numpy.frombuffer. Test that fileno does not result in an io.UnsupportedOperation before creating a generic_io.RealFile and if the error occurs, create a generic_io.RandomAccessFile instead.

fixes issue #1552

@braingram braingram added the development No backport required label Jun 6, 2023
@braingram braingram marked this pull request as ready for review June 6, 2023 16:23
@braingram braingram requested a review from a team as a code owner June 6, 2023 16:23
@github-actions github-actions bot added this to the 3.0.0 milestone Jun 6, 2023
@braingram
Copy link
Contributor Author

Python 3.8 devdeps failures are addressed in: #1556

fileno is needed for memory mapping and numpy.frombuffer.
Test that fileno does not result in an ``io.UnsupportedOperation``
before creating a ``generic_io.RealFile`` and if the error
occurs, create a ``generic_io.RandomAccessFile`` instead.

fixes issue asdf-format#1552
@braingram braingram enabled auto-merge July 12, 2023 13:52
@braingram braingram merged commit 8ef92d3 into asdf-format:main Jul 12, 2023
21 checks passed
@braingram braingram deleted the fsspec_fileno branch July 12, 2023 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development No backport required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants