From 661859ff221cd2b71b818700446027352bc38c2b Mon Sep 17 00:00:00 2001 From: Matt Richards Date: Wed, 8 May 2024 21:50:05 +1000 Subject: [PATCH 1/4] add failing test --- pyogrio/tests/test_path.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyogrio/tests/test_path.py b/pyogrio/tests/test_path.py index dfc385c6..949cb946 100644 --- a/pyogrio/tests/test_path.py +++ b/pyogrio/tests/test_path.py @@ -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"), From d7cea92e2d95cbcba621dcd2d98e06d9ae2a95dc Mon Sep 17 00:00:00 2001 From: Matt Richards Date: Wed, 8 May 2024 21:51:55 +1000 Subject: [PATCH 2/4] fix --- pyogrio/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyogrio/util.py b/pyogrio/util.py index 32058a8f..26277f58 100644 --- a/pyogrio/util.py +++ b/pyogrio/util.py @@ -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("+")): From eec7f0d4192ad5b64c5be21c336181de5b14b80e Mon Sep 17 00:00:00 2001 From: Matt Richards Date: Thu, 9 May 2024 22:25:43 +1000 Subject: [PATCH 3/4] changelog --- CHANGES.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 58d4ecf4..bfe761c1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # CHANGELOG +## 0.8.1 (yyyy-mm-dd) + +- Fix bug preventing reading from file paths containing hashes in `read_dataframe` (#412) + ## 0.8.0 (2024-05-06) ### Improvements From b3e0f541ab391efeec47a0525adc6e18cec84bbf Mon Sep 17 00:00:00 2001 From: Matt Richards Date: Thu, 9 May 2024 22:31:17 +1000 Subject: [PATCH 4/4] section heading --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index bfe761c1..c0a493d5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,8 @@ ## 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)