Skip to content

Commit 4cf4c85

Browse files
authored
update versions (#488)
1 parent 560ff7a commit 4cf4c85

File tree

5 files changed

+32
-35
lines changed

5 files changed

+32
-35
lines changed

.github/workflows/tests.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@ permissions:
1818
jobs:
1919
tests:
2020
timeout-minutes: 45
21-
runs-on: ${{ matrix.os }}
21+
runs-on: "ubuntu-22.04"
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
os: [ubuntu-20.04]
26-
pyv: ["3.8"]
27-
reqs: ["earliest", "latest", "dev"]
25+
pyv: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
26+
reqs: [ "latest" ]
27+
include:
28+
- pyv: "3.9"
29+
reqs: earliest
30+
- pyv: "3.13"
31+
reqs: dev
2832

2933
steps:
3034
- uses: actions/checkout@v3

adlfs/spec.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import warnings
1414
import weakref
1515
from collections import defaultdict
16-
from datetime import datetime, timedelta
16+
from datetime import datetime, timedelta, timezone
1717
from glob import has_magic
1818
from typing import List, Optional, Tuple
1919
from uuid import uuid4
@@ -523,7 +523,7 @@ def do_connect(self):
523523
self.do_connect()
524524

525525
except Exception as e:
526-
raise ValueError(f"unable to connect to account for {e}")
526+
raise ValueError(f"unable to connect to account for {e}") from e
527527

528528
def split_path(
529529
self, path, delimiter="/", return_container: bool = False, **kwargs
@@ -1204,7 +1204,7 @@ async def _rm(
12041204
except FileNotFoundError:
12051205
pass
12061206
except Exception as e:
1207-
raise RuntimeError("Failed to remove %s for %s", path, e)
1207+
raise RuntimeError("Failed to remove %s for %s", path, e) from e
12081208

12091209
self.invalidate_cache()
12101210

@@ -1233,9 +1233,12 @@ async def _rm_files(
12331233

12341234
# Files and directory markers of empty directories can be deleted in any order. We delete them all
12351235
# asynchronously for performance reasons.
1236-
file_exs = await asyncio.gather(
1237-
*([cc.delete_blob(file) for file in files]), return_exceptions=True
1238-
)
1236+
with warnings.catch_warnings():
1237+
warnings.simplefilter("ignore")
1238+
1239+
file_exs = await asyncio.gather(
1240+
*([cc.delete_blob(file) for file in files]), return_exceptions=True
1241+
)
12391242
for ex in file_exs:
12401243
if ex is not None:
12411244
raise ex
@@ -1566,7 +1569,7 @@ async def _url(
15661569
blob_name=blob,
15671570
account_key=account_key,
15681571
permission=BlobSasPermissions(read=True),
1569-
expiry=datetime.utcnow() + timedelta(seconds=expires),
1572+
expiry=datetime.now(tz=timezone.utc) + timedelta(seconds=expires),
15701573
version_id=version_id,
15711574
content_disposition=content_disposition,
15721575
content_encoding=content_encoding,
@@ -2065,7 +2068,7 @@ def connect_client(self):
20652068
except Exception as e:
20662069
raise ValueError(
20672070
f"Unable to fetch container_client with provided params for {e}!!"
2068-
)
2071+
) from e
20692072

20702073
async def _async_fetch_range(self, start: int, end: int = None, **kwargs):
20712074
"""

adlfs/tests/conftest.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import asyncio
21
import datetime
32

43
import docker
@@ -40,8 +39,8 @@ def storage(host):
4039
if "data" not in [c["name"] for c in bbs.list_containers()]:
4140
bbs.create_container("data")
4241
container_client = bbs.get_container_client(container="data")
43-
bbs.insert_time = datetime.datetime.utcnow().replace(
44-
microsecond=0, tzinfo=datetime.timezone.utc
42+
bbs.insert_time = datetime.datetime.now(tz=datetime.timezone.utc).replace(
43+
microsecond=0
4544
)
4645
container_client.upload_blob("top_file.txt", data)
4746
container_client.upload_blob("root/rfile.txt", data)
@@ -60,17 +59,6 @@ def storage(host):
6059
bbs.delete_container("data")
6160

6261

63-
@pytest.fixture(scope="session")
64-
def event_loop():
65-
policy = asyncio.get_event_loop_policy()
66-
loop = policy.new_event_loop()
67-
try:
68-
yield loop
69-
finally:
70-
loop.close()
71-
policy.set_event_loop(loop)
72-
73-
7462
@pytest.fixture(scope="session", autouse=True)
7563
def spawn_azurite():
7664
print("Starting azurite docker container")

pyproject.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,20 @@ classifiers = [
1515
"Intended Audience :: Developers",
1616
"License :: OSI Approved :: BSD License",
1717
"Operating System :: OS Independent",
18-
"Programming Language :: Python :: 3.8",
1918
"Programming Language :: Python :: 3.9",
2019
"Programming Language :: Python :: 3.10",
20+
"Programming Language :: Python :: 3.11",
21+
"Programming Language :: Python :: 3.12",
22+
"Programming Language :: Python :: 3.13",
2123
]
2224
keywords = ["file-system", "dask", "azure"]
23-
requires-python = ">=3.8"
25+
requires-python = ">=3.9"
2426
dynamic = ["version"]
2527
dependencies = [
26-
"azure-core>=1.23.1,<2.0.0",
27-
"azure-datalake-store>=0.0.46,<0.1",
28+
"azure-core>=1.28.0,<2.0.0",
29+
"azure-datalake-store>=0.0.53,<0.1",
2830
"azure-identity",
29-
"azure-storage-blob>=12.12.0",
31+
"azure-storage-blob>=12.17.0",
3032
"fsspec>=2023.12.0",
3133
"aiohttp>=3.7.0",
3234
]

requirements/earliest.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-r base.txt
2-
fsspec==2023.9.0
3-
azure-core==1.23.1
4-
azure-datalake-store==0.0.46
5-
azure-storage-blob==12.12.0
2+
fsspec==2023.12.0
3+
azure-core==1.28.0
4+
azure-datalake-store==0.0.53
5+
azure-storage-blob==12.17.0

0 commit comments

Comments
 (0)