Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
strategy:
fail-fast: false
matrix:
pyv: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
pyv: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
reqs: [ "latest" ]
include:
- pyv: "3.9"
- pyv: "3.10"
reqs: earliest
- pyv: "3.13"
- pyv: "3.14"
reqs: dev

steps:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ repos:
- id: isort
language_version: python3
- repo: https://github.com/ambv/black
rev: 22.3.0
rev: 24.10.0
hooks:
- id: black
language_version: python3
args:
- --target-version=py38
- --target-version=py310
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Unreleased
* Added `AzureBlobFileSystem.rm_file()`
* Keyword arguments for `put` and `put_file` are now proxied to the Azure Blob SDK client to
support specifying content settings, tags, and more.
* Removed support for Python 3.9 and added support for Python 3.14.

2025.8.0
--------
Expand Down
15 changes: 2 additions & 13 deletions adlfs/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import logging
import os
import re
import sys
import typing
import warnings
import weakref
Expand Down Expand Up @@ -2189,9 +2188,8 @@ def _get_chunks(self, data):

async def _stage_block(self, data, start, end, block_id, semaphore):
async with semaphore:
if self._sdk_supports_memoryview_for_writes():
# Use memoryview to avoid making copies of the bytes when we splice for partitioned uploads
data = memoryview(data)
Comment on lines -2193 to -2194
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead shouldn't we be keeping these lines and just remove the conditional? Now that adlfs will only support 3.10+ it will also mean it will only use the SDK on 3.10+ python versions which should always support memory views.

# Use memoryview to avoid making copies of the bytes when we splice for partitioned uploads
data = memoryview(data)
async with self.container_client.get_blob_client(blob=self.blob) as bc:
await bc.stage_block(
block_id=block_id,
Expand Down Expand Up @@ -2306,12 +2304,3 @@ def __setstate__(self, state):
self.__dict__.update(state)
self.loop = self._get_loop()
self.container_client = self._get_container_client()

def _sdk_supports_memoryview_for_writes(self) -> bool:
# The SDK validates iterable bytes objects passed to its HTTP request layer
# expose an __iter__() method. However, memoryview objects did not expose an
# __iter__() method till Python 3.10.
#
# We still want to leverage memorviews when we can to avoid unnecessary copies. So
# we check the Python version to determine if we can use memoryviews for writes.
return sys.version_info >= (3, 10)
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
keywords = ["file-system", "dask", "azure"]
requires-python = ">=3.9"
requires-python = ">=3.10"
dynamic = ["version"]
dependencies = [
"azure-core>=1.28.0,<2.0.0",
Expand Down