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

Install new VSI plugin handler for every instance of using an opener #1408

Merged
merged 6 commits into from
Jul 9, 2024

Conversation

sgillies
Copy link
Member

@sgillies sgillies commented Jul 1, 2024

Resolves #1406 by giving each fiona.open() collection its own VSI plugin handler when the opener keyword argument is used. Works with threads.

The approach is not unlike the one mentioned in OSGeo/gdal#8772 and benefits from the VSIRemovePluginHandler() function added in GDAL 3.9.0. With older versions of GDAL, the Pyopener registry will accumulate openers and GDAL will accumulate plugin handlers.

This PR also adds and uses Rasterio's chaining error handler and error stack checker.

Plugin handler installation is implicit and hidden from the API
user, but could be exposed in the future if needed.

Resolves #1406
@sgillies sgillies added the bug label Jul 1, 2024
@sgillies sgillies added this to the 1.10 milestone Jul 1, 2024
@sgillies sgillies self-assigned this Jul 1, 2024
This involves adding GDAL callback support for unlinking VSI files
and also a major stat() bug fix.
@sgillies sgillies marked this pull request as ready for review July 8, 2024 13:57
@sgillies sgillies merged commit 8c0a31e into main Jul 9, 2024
9 checks passed
@sgillies sgillies deleted the issue1406 branch July 9, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Solve various Python opener issues as in rasterio
1 participant