Skip to content

Comments

BUG: Use context manager for MemoryDataset#3461

Merged
snowman2 merged 1 commit intorasterio:mainfrom
snowman2:context
Dec 11, 2025
Merged

BUG: Use context manager for MemoryDataset#3461
snowman2 merged 1 commit intorasterio:mainfrom
snowman2:context

Conversation

@snowman2
Copy link
Member

@snowman2 snowman2 commented Dec 9, 2025

No description provided.

@snowman2 snowman2 added this to the 1.5.0 milestone Dec 9, 2025
@snowman2 snowman2 requested a review from sgillies December 9, 2025 17:49
@snowman2 snowman2 added the bug label Dec 9, 2025
@snowman2 snowman2 changed the title BUG: Use context manager for open datasets BUG: Use context manager for MemoryDataset and WarpedVRT Dec 9, 2025
imgProjOptions = CSLSetNameValue(imgProjOptions, "SRC_METHOD", "RPC")
elif src_geoloc_array is not None:
arr = np.stack((src_geoloc_array[0], src_geoloc_array[1]))
geoloc_dataset = exit_stack.enter_context(MemoryDataset(arr, crs=src_crs))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was never closed previously,

bUseApproxTransformer = False
elif src_geoloc_array is not None:
arr = np.stack((src_geoloc_array[0], src_geoloc_array[1]))
geoloc_dataset = exit_stack.enter_context(MemoryDataset(arr, crs=src_crs))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was never closed previously,

@snowman2 snowman2 force-pushed the context branch 2 times, most recently from a112fcc to df5f636 Compare December 9, 2025 19:57
@snowman2 snowman2 changed the title BUG: Use context manager for MemoryDataset and WarpedVRT BUG: Use context manager for MemoryDataset Dec 9, 2025
@snowman2 snowman2 merged commit 6c3ff37 into rasterio:main Dec 11, 2025
48 of 49 checks passed
@snowman2 snowman2 deleted the context branch December 11, 2025 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant