Skip to content

Add python 3.14+ support#312

Closed
mvtm-dn wants to merge 1 commit into
perrygeo:masterfrom
mvtm-dn:master
Closed

Add python 3.14+ support#312
mvtm-dn wants to merge 1 commit into
perrygeo:masterfrom
mvtm-dn:master

Conversation

@mvtm-dn
Copy link
Copy Markdown

@mvtm-dn mvtm-dn commented Mar 31, 2026

Alas, but current implementation of fiona doesn't support python 3.14. So, replaced fiona with pyogrio/geopandas

Alas, but current implementation of fiona doesn't support python 3.14. So, replaced fiona with pyogrio/geopandas
@veenstrajelmer
Copy link
Copy Markdown

veenstrajelmer commented May 21, 2026

Thanks for creating this PR, we are currently running into this issue with updating another package to Python 3.14, since it has rasterstats as a dependency: Deltares/HYDROLIB#224. @perrygeo would it be possible to merge this PR and create a new release, or should we look for alternative solutions?

Comment thread src/rasterstats/io.py
Comment on lines +35 to +38
def pyogrio_generator(obj,layer=0):
collection=loads(read_dataframe(obj,layer).to_json())
for feat in collection["features"]:
yield feat
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This will load all the features into memory at once. Consider a chunked approach that can yield features but keep memory footprint low.

@perrygeo
Copy link
Copy Markdown
Owner

alternative (and some of the issues with pyogrio) explained here: #314

@perrygeo
Copy link
Copy Markdown
Owner

Check out #314 for the full implementation - now released in version 0.21.0

pyogrio is now the default, should have better wheel availability and hopefully better performance too. Users can opt into the fiona engine if needed for full backwards compatibility. Tested on Python 3.14.

I'll close this one if you don't mind. Thanks for bringing it to my attention and suggesting pyogrio

@perrygeo perrygeo closed this May 23, 2026
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.

3 participants