{"action":"created","issue":{"url":"https://api.github.com/repos/dask/gcsfs/issues/163","repository_url":"https://api.github.com/repos/dask/gcsfs","labels_url":"https://api.github.com/repos/dask/gcsfs/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/dask/gcsfs/issues/163/comments","events_url":"https://api.github.com/repos/dask/gcsfs/issues/163/events","html_url":"https://github.com/dask/gcsfs/issues/163","id":471768215,"node_id":"MDU6SXNzdWU0NzE3NjgyMTU=","number":163,"title":"\"ls\" behavior change between 0.2.1 and 0.3.0?","user":{"login":"JohnEmhoff","id":1692535,"node_id":"MDQ6VXNlcjE2OTI1MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1692535?v=4","gravatar_id":"","url":"https://api.github.com/users/JohnEmhoff","html_url":"https://github.com/JohnEmhoff","followers_url":"https://api.github.com/users/JohnEmhoff/followers","following_url":"https://api.github.com/users/JohnEmhoff/following{/other_user}","gists_url":"https://api.github.com/users/JohnEmhoff/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnEmhoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnEmhoff/subscriptions","organizations_url":"https://api.github.com/users/JohnEmhoff/orgs","repos_url":"https://api.github.com/users/JohnEmhoff/repos","events_url":"https://api.github.com/users/JohnEmhoff/events{/privacy}","received_events_url":"https://api.github.com/users/JohnEmhoff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-07-23T15:32:39Z","updated_at":"2019-07-23T16:55:01Z","closed_at":null,"author_association":"NONE","body":"It seems that in 0.2.1 the `ls` method will retrieve all items with a given prefix, while in 0.3.0 `ls` will only return directory-like entries. Is this an intended behavior change? It's obviously a breaking change, but either way I can't seem to find a workaround.\r\n\r\n\r\nHere's 0.2.1 listing some files from one of the public GCP datasets:\r\n```\r\n$ pip freeze | grep gcsfs\r\ngcsfs==0.2.1\r\n$ python -q\r\n>>> import gcsfs\r\n>>> c = gcsfs.GCSFileSystem()\r\n>>> c.ls('gs://gcp-public-data-landsat/index.csv')\r\n['gcp-public-data-landsat/index.csv.gz-Z2HDRBNIWV', 'gcp-public-data-landsat/index.csv.gz-62ZC8HYJDE', 'gcp-public-data-landsat/index.csv.gz-BVVBYIFND0', ....]\r\n```\r\n\r\nAnd here's 0.3.0 doing the same listing and getting zero results:\r\n```\r\n$ pip freeze | grep gcsfs\r\ngcsfs==0.3.0\r\n$ python -q\r\n>>> import gcsfs\r\n>>> c = gcsfs.GCSFileSystem()\r\n>>> c.ls('gs://gcp-public-data-landsat/index.csv')\r\n[]\r\n```"},"comment":{"url":"https://api.github.com/repos/dask/gcsfs/issues/comments/514294794","html_url":"https://github.com/dask/gcsfs/issues/163#issuecomment-514294794","issue_url":"https://api.github.com/repos/dask/gcsfs/issues/163","id":514294794,"node_id":"MDEyOklzc3VlQ29tbWVudDUxNDI5NDc5NA==","user":{"login":"martindurant","id":6042212,"node_id":"MDQ6VXNlcjYwNDIyMTI=","avatar_url":"https://avatars1.githubusercontent.com/u/6042212?v=4","gravatar_id":"","url":"https://api.github.com/users/martindurant","html_url":"https://github.com/martindurant","followers_url":"https://api.github.com/users/martindurant/followers","following_url":"https://api.github.com/users/martindurant/following{/other_user}","gists_url":"https://api.github.com/users/martindurant/gists{/gist_id}","starred_url":"https://api.github.com/users/martindurant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martindurant/subscriptions","organizations_url":"https://api.github.com/users/martindurant/orgs","repos_url":"https://api.github.com/users/martindurant/repos","events_url":"https://api.github.com/users/martindurant/events{/privacy}","received_events_url":"https://api.github.com/users/martindurant/received_events","type":"User","site_admin":false},"created_at":"2019-07-23T16:55:00Z","updated_at":"2019-07-23T16:55:00Z","author_association":"MEMBER","body":"That's correct - the previous behaviour was wrong! That is, the equivalent functionality on a local file-system would only list files within a directory, not all that happened to have that prefix.\r\nIf you wanted the previous listing, the easiest thing to do would be\r\n```\r\nfs.glob('gs://gcp-public-data-landsat/index.csv*')\r\n```"}}
{"actor":{"display_login":"martindurant"}}