Skip to content

Commit

Permalink
Added fix for deprecation warning to pytest_asyncio (fsspec#297)
Browse files Browse the repository at this point in the history
* Added fix for deprecation warning to pytest_asyncio

* Updated changelog

* Linting
  • Loading branch information
hayesgb authored Feb 5, 2022
1 parent 39d40b3 commit fbe43c6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
**Change Log**
v2022.01.0
v2022.02.0
----------
- Updated requirements to fsspec >= 2021.10.1 to fix #280
- Fixed deprecation warning in pytest_asyncio by setting asycio_mode = True

v2021.10.1
----------
Expand Down
14 changes: 8 additions & 6 deletions adlfs/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def __init__(self, tenant_id, client_id, client_secret, store_name):

@staticmethod
def _get_kwargs_from_urls(paths):
""" Get the store_name from the urlpath and pass to storage_options """
"""Get the store_name from the urlpath and pass to storage_options"""
ops = infer_storage_options(paths)
out = {}
if ops.get("host", None):
Expand Down Expand Up @@ -165,7 +165,7 @@ def info(self, path, invalidate_cache=True, expected_error_code=404, **kwargs):
return info

def _trim_filename(self, fn, **kwargs):
""" Determine what kind of filestore this is and return the path """
"""Determine what kind of filestore this is and return the path"""
so = infer_storage_options(fn)
fileparts = so["path"]
return fileparts
Expand Down Expand Up @@ -548,7 +548,9 @@ def do_connect(self):
conn_str=self.connection_string
)
elif self.account_name:
self.account_url: str = f"https://{self.account_name}.blob.core.windows.net"
self.account_url: str = (
f"https://{self.account_name}.blob.core.windows.net"
)
creds = [self.credential, self.account_key]
if any(creds):
self.service_client = [
Expand Down Expand Up @@ -1592,7 +1594,7 @@ async def _put_file(
put_file = sync_wrapper(_put_file)

async def _cp_file(self, path1, path2, **kwargs):
""" Copy the file at path1 to path2 """
"""Copy the file at path1 to path2"""
container1, path1 = self.split_path(path1, delimiter="/")
container2, path2 = self.split_path(path2, delimiter="/")

Expand Down Expand Up @@ -1620,7 +1622,7 @@ def download(self, rpath, lpath, recursive=False, **kwargs):
async def _get_file(
self, rpath, lpath, recursive=False, delimiter="/", callback=None, **kwargs
):
""" Copy single file remote to local """
"""Copy single file remote to local"""
if os.path.isdir(lpath):
return
container_name, path = self.split_path(rpath, delimiter=delimiter)
Expand Down Expand Up @@ -1710,7 +1712,7 @@ def _open(


class AzureBlobFile(AbstractBufferedFile):
""" File-like operations on Azure Blobs """
"""File-like operations on Azure Blobs"""

DEFAULT_BLOCK_SIZE = 5 * 2 ** 20

Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ max-line-length = 120

[tool:pytest]
xfail_strict=true
asyncio_mode = auto

[versioneer]
VCS = git
Expand Down

0 comments on commit fbe43c6

Please sign in to comment.