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

BUG: Fix hash url parsing #412

Merged
merged 4 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## 0.8.1 (yyyy-mm-dd)

### Bug fixes

- Fix bug preventing reading from file paths containing hashes in `read_dataframe` (#412)

## 0.8.0 (2024-05-06)

### Improvements
Expand Down
1 change: 1 addition & 0 deletions pyogrio/tests/test_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def change_cwd(path):
("/home/user/data.gpkg", "/home/user/data.gpkg"),
(r"C:\User\Documents\data.gpkg", r"C:\User\Documents\data.gpkg"),
("file:///home/user/data.gpkg", "/home/user/data.gpkg"),
("/home/folder # with hash/data.gpkg", "/home/folder # with hash/data.gpkg"),
# cloud URIs
("https://testing/data.gpkg", "/vsicurl/https://testing/data.gpkg"),
("s3://testing/data.gpkg", "/vsis3/testing/data.gpkg"),
Expand Down
2 changes: 1 addition & 1 deletion pyogrio/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _parse_uri(path: str):
scheme : str
URI scheme such as "https" or "zip+s3".
"""
parts = urlparse(path)
parts = urlparse(path, allow_fragments=False)

# if the scheme is not one of GDAL's supported schemes, return raw path
if parts.scheme and not all(p in SCHEMES for p in parts.scheme.split("+")):
Expand Down