diff --git a/avoid_network_tests.patch b/avoid_network_tests.patch deleted file mode 100644 index cbaee68..0000000 --- a/avoid_network_tests.patch +++ /dev/null @@ -1,460 +0,0 @@ ---- - gcsfs/tests/test_core.py | 44 ++++++++++++++++++++++++++++++++++++++++ - gcsfs/tests/test_mapping.py | 10 +++++++++ - setup.cfg | 6 ----- - setup.cfg | 3 ++ - 4 files changed, 57 insertions(+), 6 deletions(-) - ---- a/gcsfs/tests/test_mapping.py -+++ b/gcsfs/tests/test_mapping.py -@@ -15,6 +15,7 @@ def test_api(): - assert "mapping" in dir(gcsfs) - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_map_simple(): - with gcs_maker() as gcs: -@@ -26,6 +27,7 @@ def test_map_simple(): - assert list(d.items()) == [] - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_map_default_gcsfilesystem(): - with gcs_maker() as gcs: -@@ -33,6 +35,7 @@ def test_map_default_gcsfilesystem(): - assert d.fs is gcs - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_map_errors(): - with gcs_maker() as gcs: -@@ -69,6 +72,7 @@ def test_map_with_data(): - assert list(d) == [] - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_map_complex_keys(): - with gcs_maker() as gcs: -@@ -87,6 +91,7 @@ def test_map_complex_keys(): - assert ("x", 1, 2) in d - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_map_clear_empty(): - with gcs_maker() as gcs: -@@ -100,6 +105,7 @@ def test_map_clear_empty(): - assert list(d) == [] - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_map_pickle(): - with gcs_maker() as gcs: -@@ -114,6 +120,7 @@ def test_map_pickle(): - assert d2["x"] == b"1" - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_map_array(): - with gcs_maker() as gcs: -@@ -125,6 +132,7 @@ def test_map_array(): - assert d["x"] == b"A" * 1000 - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_map_bytearray(): - with gcs_maker() as gcs: -@@ -134,6 +142,7 @@ def test_map_bytearray(): - assert d["x"] == b"123" - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_new_bucket(): - with gcs_maker() as gcs: -@@ -156,6 +165,7 @@ def test_new_bucket(): - gcs.rmdir(new_bucket) - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_map_pickle(): - import pickle ---- a/setup.cfg -+++ b/setup.cfg -@@ -27,3 +27,6 @@ max-line-length = 120 - tag_build = - tag_date = 0 - -+[tool:pytest] -+markers = -+ network: marks tests which require network connection ---- a/gcsfs/tests/test_core.py -+++ b/gcsfs/tests/test_core.py -@@ -63,6 +63,7 @@ def test_many_connect(): - pool.join() - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_simple_upload(): - with gcs_maker() as gcs: -@@ -115,6 +116,7 @@ def test_multi_upload(): - assert gcs.info(fn)["contentType"] == "application/octet-stream" - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_info(): - with gcs_maker() as gcs: -@@ -122,6 +124,7 @@ def test_info(): - assert gcs.info(a) == gcs.ls(a, detail=True)[0] - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_ls2(): - with gcs_maker() as gcs: -@@ -133,6 +136,7 @@ def test_ls2(): - assert fn in gcs.ls(TEST_BUCKET + "/test") - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_pickle(): - import pickle -@@ -158,6 +162,7 @@ def test_pickle(): - assert gcs.ls(TEST_BUCKET) == gcs2.ls(TEST_BUCKET) - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_ls_touch(): - with gcs_maker() as gcs: -@@ -173,6 +178,7 @@ def test_ls_touch(): - assert set(d["name"] for d in L_d) == set([a, b]) - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_rm(): - with gcs_maker() as gcs: -@@ -188,6 +194,7 @@ def test_rm(): - gcs.rm("nonexistent") - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_rm_batch(): - with gcs_maker() as gcs: -@@ -200,6 +207,7 @@ def test_rm_batch(): - assert b not in gcs.find(TEST_BUCKET) - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_rm_recursive(): - files = ["/a", "/a/b", "/a/c"] -@@ -210,6 +218,7 @@ def test_rm_recursive(): - assert not gcs.exists(TEST_BUCKET + files[-1]) - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_file_access(): - with gcs_maker() as gcs: -@@ -223,6 +232,7 @@ def test_file_access(): - assert gcs.tail(fn, 10000) == data - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_file_info(): - with gcs_maker() as gcs: -@@ -238,6 +248,7 @@ def test_file_info(): - gcs.info(fn + "another") - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_du(): - with gcs_maker(True) as gcs: -@@ -250,6 +261,7 @@ def test_du(): - ) - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_ls(): - with gcs_maker(True) as gcs: -@@ -261,6 +273,7 @@ def test_ls(): - assert fn in gcs.ls(TEST_BUCKET + "/nested") - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_ls_detail(): - with gcs_maker(True) as gcs: -@@ -268,6 +281,7 @@ def test_ls_detail(): - assert all(isinstance(item, dict) for item in L) - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_gcs_glob(): - with gcs_maker(True) as gcs: -@@ -286,6 +300,7 @@ def test_gcs_glob(): - ) - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_read_keys_from_bucket(): - with gcs_maker(True) as gcs: -@@ -300,6 +315,7 @@ def test_read_keys_from_bucket(): - ) - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_url(): - with gcs_maker(True) as gcs: -@@ -311,6 +327,7 @@ def test_url(): - assert "http" in f.url() - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_seek(): - with gcs_maker(True) as gcs: -@@ -340,6 +357,7 @@ def test_seek(): - assert f.seek(i) == i - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_bad_open(): - with gcs_maker() as gcs: -@@ -347,6 +365,7 @@ def test_bad_open(): - gcs.open("") - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_copy(): - with gcs_maker(True) as gcs: -@@ -355,6 +374,7 @@ def test_copy(): - assert gcs.cat(fn) == gcs.cat(fn + "2") - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_move(): - with gcs_maker(True) as gcs: -@@ -414,6 +434,7 @@ def test_get_put_recursive(protocol): - ) - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_errors(): - with gcs_maker() as gcs: -@@ -451,6 +472,7 @@ def test_errors(): - assert "bucket" in str(e) - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_read_small(): - with gcs_maker(True) as gcs: -@@ -467,6 +489,7 @@ def test_read_small(): - assert len(f.cache.cache) < len(out) - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_seek_delimiter(): - with gcs_maker(True) as gcs: -@@ -486,6 +509,7 @@ def test_seek_delimiter(): - assert f.tell() == ind + 1 - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_read_block(): - with gcs_maker(True) as gcs: -@@ -504,6 +528,7 @@ def test_read_block(): - assert gcs.read_block(path, 5, None) == gcs.read_block(path, 5, 1000) - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_flush(): - with gcs_maker() as gcs: -@@ -524,6 +549,7 @@ def test_flush(): - wo.write(b"abc") - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_write_fails(): - with gcs_maker() as gcs: -@@ -555,6 +581,7 @@ def text_mode(): - assert f.read() == text - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_write_blocks(): - with gcs_maker() as gcs: -@@ -568,6 +595,7 @@ def test_write_blocks(): - assert gcs.info(TEST_BUCKET + "/temp")["size"] == 300000 - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_write_blocks2(): - with gcs_maker() as gcs: -@@ -578,6 +606,7 @@ def test_write_blocks2(): - assert gcs.info(TEST_BUCKET + "/temp1")["size"] == 2 ** 18 + 1 - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_readline(): - with gcs_maker(True) as gcs: -@@ -591,6 +620,7 @@ def test_readline(): - assert result == expected - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_readline_from_cache(): - with gcs_maker() as gcs: -@@ -615,6 +645,7 @@ def test_readline_from_cache(): - assert f.cache.cache == data - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_readline_empty(): - with gcs_maker() as gcs: -@@ -626,6 +657,7 @@ def test_readline_empty(): - assert result == data - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_readline_blocksize(): - with gcs_maker() as gcs: -@@ -646,6 +678,7 @@ def test_readline_blocksize(): - assert result == expected - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_next(): - with gcs_maker(True) as gcs: -@@ -655,6 +688,7 @@ def test_next(): - assert result == expected - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_iterable(): - with gcs_maker() as gcs: -@@ -678,6 +712,7 @@ def test_iterable(): - assert b"".join(out) == data - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_readable(): - with gcs_maker() as gcs: -@@ -688,6 +723,7 @@ def test_readable(): - assert f.readable() - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_seekable(): - with gcs_maker() as gcs: -@@ -698,6 +734,7 @@ def test_seekable(): - assert f.seekable() - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_writable(): - with gcs_maker() as gcs: -@@ -708,6 +745,7 @@ def test_writable(): - assert not f.writable() - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_merge(): - with gcs_maker() as gcs: -@@ -720,6 +758,7 @@ def test_merge(): - assert gcs.info(TEST_BUCKET + "/joined")["size"] == 20 - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_bigger_than_block_read(): - with gcs_maker(True) as gcs: -@@ -733,6 +772,7 @@ def test_bigger_than_block_read(): - assert b"".join(out) == csv_files["2014-01-01.csv"] - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_current(): - with gcs_maker() as gcs: -@@ -741,6 +781,7 @@ def test_current(): - assert gcs2.session is gcs.session - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_array(): - with gcs_maker() as gcs: -@@ -756,6 +797,7 @@ def test_array(): - assert out == b"A" * 1000 - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_attrs(): - with gcs_maker() as gcs: -@@ -778,6 +820,7 @@ def test_attrs(): - assert gcs.getxattr(a, "something") == "not" - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_request_user_project(): - with gcs_maker(): -@@ -797,6 +840,7 @@ def test_request_user_project(): - assert result["userProject"] == [TEST_PROJECT] - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_request_user_project_string(): - with gcs_maker(): -@@ -819,6 +863,7 @@ def test_request_user_project_string(): - assert result["userProject"] == [TEST_PROJECT] - - -+@pytest.mark.network - @my_vcr.use_cassette(match=["all"]) - def test_request_header(): - with gcs_maker(): diff --git a/gcsfs-0.7.1.tar.gz b/gcsfs-0.7.1.tar.gz deleted file mode 100644 index 5c56f64..0000000 --- a/gcsfs-0.7.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:03658dfbf1a734d987aab3631e0a342b3d7e24a24998b4d8d2491fdd21053720 -size 183232 diff --git a/gcsfs-2021.7.0-gh.tar.gz b/gcsfs-2021.7.0-gh.tar.gz new file mode 100644 index 0000000..6f4a347 --- /dev/null +++ b/gcsfs-2021.7.0-gh.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2cfefeb28a57180d2589eb993fd47a47ade286c1db6151f4fb6fe0ee4109275 +size 261238 diff --git a/python-gcsfs.changes b/python-gcsfs.changes index 0fed853..3bd6983 100644 --- a/python-gcsfs.changes +++ b/python-gcsfs.changes @@ -1,3 +1,30 @@ +------------------------------------------------------------------- +Wed Aug 18 10:29:33 UTC 2021 - Ben Greiner + +- Update to 2021.07.0 + * fix find/glob with a prefix (#399) +- Release notes between 0.7.1 and 2021.06.0 + * kwargs to aiohttpClient session + * graceful timeout when disconnecting at finalise (#397) + * negative ranges in cat_file (#394) + * no credentials bug fix (#390) + * use googleapis.com (#388) + * more retries (#387, 385, 380) + * Code cleanup (#381) + * license to match stated one (#378) + * deps updated (#376) + * switch to calver and fsspec pin + * keep up with fsspec 0.9.0 async + * one-shot find + * consistency checkers + * retries for intermittent issues + * timeouts + * partial cat + * http error status +- Fix running the testsuite -- gh#dask/gcsfs#292 + * drop avoid_network_tests.patch + * use the GitHub archive for VCR recordings + ------------------------------------------------------------------- Mon May 24 03:49:24 UTC 2021 - Steve Kowalik diff --git a/python-gcsfs.spec b/python-gcsfs.spec index 41d9eb5..35fd481 100644 --- a/python-gcsfs.spec +++ b/python-gcsfs.spec @@ -19,41 +19,40 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 %define skip_python36 1 +%define ghversiontag 2021.07.0 Name: python-gcsfs -Version: 0.7.1 +Version: 2021.7.0 Release: 0 Summary: Filesystem interface over GCS License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/dask/gcsfs -Source: https://files.pythonhosted.org/packages/source/g/gcsfs/gcsfs-%{version}.tar.gz -# PATCH-FIX-UPSTREAM avoid_network_tests.patch gh#dask/gcsfs#292 mcepl@suse.com -# skip tests which require network connection -Patch0: avoid_network_tests.patch +# Use the GitHub tarball: It contains the VCR recordings (test data to mock network requests) +Source: https://github.com/dask/gcsfs/archive/refs/tags/%{ghversiontag}.tar.gz#/gcsfs-%{version}-gh.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-aiohttp Requires: python-decorator -Requires: python-fsspec >= 0.8.0 +Requires: python-fsspec >= 2021.07.0 Requires: python-google-auth >= 1.2 Requires: python-google-auth-oauthlib Requires: python-requests Recommends: dask Recommends: python-gcsfs-fuse = %{version} +Suggests: python-crcmod BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module aiohttp} BuildRequires: %{python_module click} BuildRequires: %{python_module decorator} -BuildRequires: %{python_module fsspec >= 0.8.0} +BuildRequires: %{python_module fsspec >= 2021.07.0} BuildRequires: %{python_module fusepy} BuildRequires: %{python_module google-auth >= 1.2} BuildRequires: %{python_module google-auth-oauthlib} BuildRequires: %{python_module pytest} BuildRequires: %{python_module requests} BuildRequires: %{python_module vcrpy} -BuildRequires: libfuse2 # /SECTION %python_subpackages @@ -63,10 +62,8 @@ File-system interface for Google Cloud Storage. %package fuse Summary: Filesystem interface over GCS - FUSE interface Group: Development/Languages/Python -Requires: libfuse2 Requires: python-click Requires: python-fusepy -Requires: python-pandas %description fuse File-system interface for Google Cloud Storage. @@ -74,8 +71,7 @@ File-system interface for Google Cloud Storage. This package provides the optional FUSE interface. %prep -%setup -q -n gcsfs-%{version} -%autopatch -p1 +%autosetup -p1 -n gcsfs-%{ghversiontag} %build %python_build @@ -85,13 +81,14 @@ This package provides the optional FUSE interface. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -# Tests test_map_simple, test_map_with_data and test_map_clear_empty require a network connection -%pytest -k "not network" gcsfs/tests +export GCSFS_RECORD_MODE=none +export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/gcsfs/tests/fake-secret.json +%pytest -rfEs %files %{python_files} %doc README.rst %license LICENSE.txt -%{python_sitelib}/gcsfs-%{version}-py*.egg-info +%{python_sitelib}/gcsfs-%{version}-*-info %{python_sitelib}/gcsfs/ %exclude %{python_sitelib}/gcsfs/cli/