diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3e705dce..93d0b6c0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2bafa0f5..96b163f6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: diff --git a/CHANGELOG.md b/CHANGELOG.md index 30603476..fd5139c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 -------- diff --git a/adlfs/spec.py b/adlfs/spec.py index 711b5827..3aaf5f9e 100644 --- a/adlfs/spec.py +++ b/adlfs/spec.py @@ -9,7 +9,6 @@ import logging import os import re -import sys import typing import warnings import weakref @@ -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) + # 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, @@ -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) diff --git a/pyproject.toml b/pyproject.toml index ba598a12..ae6a5ce2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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",