Sean Gillies
Sean Gillies
Done!
I've figured out why this appeared in Fiona 1.6. Here https://github.com/Toblerity/Fiona/blob/1.6.0/fiona/_drivers.pyx#L96-L100 we registered drivers *before* we set the error handler that turns GDAL/OGR errors into Python exceptions. This was a...
Fiona's listdir works much better on zipfiles now: ``` >>> import fiona >>> fiona.listdir("zip://data/data.zip") ['data'] >>> fiona.listdir("zip://data/data.zip!data") ['collection-pp.txt', 'collection.txt', 'coutwildrnp.cpg', 'coutwildrnp.dbf', 'coutwildrnp.gpkg', 'coutwildrnp.json', 'coutwildrnp.prj', 'coutwildrnp.shp', 'coutwildrnp.shx', 'coutwildrnp.tar', 'coutwildrnp.zip', 'curves_line.csv', 'example.topojson',...
I did add listdir to MemoryFIle. ``` >>> from fiona.io import ZipMemoryFile >>> with open("tests/data/data.zip", "rb") as f: ... with ZipMemoryFile(f.read()) as memfile: ... print(memfile.listdir()) ... print(memfile.listdir("data")) ... ['data'] ['collection-pp.txt',...
@rbuffat is right. You can't import ogrext without the linker trying to load libgdal. So these kind of ImportErrors happen too early. I think this is a documentation and packaging...
@StefanBrand thank you for explaining the approach! I had not heard about MonkeyType. Did adding type stubs find any Fiona bugs? It will be a while before I can give...
@m-richards fiona's path module was never intended to be used by other projects. It's only public by accident. If I had known geopandas was using them, I would have warned...
The failure is caused by the change at https://github.com/Toblerity/Fiona/blame/master/fiona/_path.py#L82. To fiona, `!` means nothing without an archive type URI scheme (zip, tar, gzip). But in 1.9, we did parse it...
Post 1.0 @perrygeo?