From 09c42ef05d9253fb9f51cd1782e13167d8d74e43 Mon Sep 17 00:00:00 2001 From: Lindsey Gray Date: Thu, 14 Dec 2023 06:27:01 -0600 Subject: [PATCH 1/3] use file_path instead of files in fsspec globbing --- src/uproot/_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uproot/_util.py b/src/uproot/_util.py index 952232f35..894ddbc4b 100644 --- a/src/uproot/_util.py +++ b/src/uproot/_util.py @@ -835,7 +835,7 @@ def _regularize_files_inner( file_names_full = [ file.full_name for file in fsspec.open_files( - files, + file_path, **uproot.source.fsspec.FSSpecSource.extract_fsspec_options(options), ) ] From f0945781cfe6252bc24d13d6c53b82c35ff3fb1d Mon Sep 17 00:00:00 2001 From: Lindsey Gray Date: Thu, 14 Dec 2023 06:39:21 -0600 Subject: [PATCH 2/3] Update test_0692_fsspec_reading.py to include different file name varieties --- tests/test_0692_fsspec_reading.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/test_0692_fsspec_reading.py b/tests/test_0692_fsspec_reading.py index 2bad9136f..6e1bb5c0c 100644 --- a/tests/test_0692_fsspec_reading.py +++ b/tests/test_0692_fsspec_reading.py @@ -392,6 +392,13 @@ def test_issue_1035(handler): @pytest.mark.network @pytest.mark.xrootd +@pytest.mark.parametrize( + "filename", + [ + {"root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012B_*.root": "Events"}, + "root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012B_*.root:Events", + ] +) @pytest.mark.parametrize( "handler", [ @@ -399,13 +406,11 @@ def test_issue_1035(handler): None, ], ) -def test_fsspec_globbing_xrootd(handler): +def test_fsspec_globbing_xrootd(handler, filename): pytest.importorskip("XRootD") pytest.importorskip("fsspec_xrootd") iterator = uproot.iterate( - { - "root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012B_*.root": "Events" - }, + filename, ["PV_x"], handler=handler, ) From 24316ed6b8ba5a783d67c5759a0dd30bac4199dd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 14 Dec 2023 12:40:34 +0000 Subject: [PATCH 3/3] style: pre-commit fixes --- tests/test_0692_fsspec_reading.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_0692_fsspec_reading.py b/tests/test_0692_fsspec_reading.py index 6e1bb5c0c..71883ac75 100644 --- a/tests/test_0692_fsspec_reading.py +++ b/tests/test_0692_fsspec_reading.py @@ -395,9 +395,11 @@ def test_issue_1035(handler): @pytest.mark.parametrize( "filename", [ - {"root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012B_*.root": "Events"}, + { + "root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012B_*.root": "Events" + }, "root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012B_*.root:Events", - ] + ], ) @pytest.mark.parametrize( "handler",