asanypath 2.7.2__tar.gz → 3.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. {asanypath-2.7.2 → asanypath-3.0.0}/.copilot/skills/async-python-lib/SKILL.md +1 -1
  2. {asanypath-2.7.2 → asanypath-3.0.0}/.github/workflows/publish.yml +1 -2
  3. {asanypath-2.7.2 → asanypath-3.0.0}/.github/workflows/unittests.yml +1 -1
  4. {asanypath-2.7.2 → asanypath-3.0.0}/CONTRIBUTING.md +2 -2
  5. {asanypath-2.7.2 → asanypath-3.0.0}/PKG-INFO +4 -5
  6. {asanypath-2.7.2 → asanypath-3.0.0}/README.md +1 -1
  7. {asanypath-2.7.2 → asanypath-3.0.0}/pyproject.toml +5 -7
  8. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/_version.py +2 -2
  9. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/artifactory.py +2 -2
  10. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/azure.py +2 -2
  11. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/cloud.py +1 -19
  12. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/ftp.py +2 -2
  13. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/http.py +3 -2
  14. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/s3.py +2 -2
  15. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_ftp.py +3 -3
  16. {asanypath-2.7.2 → asanypath-3.0.0}/.copilot/skills/gitguro/SKILL.md +0 -0
  17. {asanypath-2.7.2 → asanypath-3.0.0}/.github/CODEOWNERS +0 -0
  18. {asanypath-2.7.2 → asanypath-3.0.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  19. {asanypath-2.7.2 → asanypath-3.0.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  20. {asanypath-2.7.2 → asanypath-3.0.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  21. {asanypath-2.7.2 → asanypath-3.0.0}/.github/dependabot.yml +0 -0
  22. {asanypath-2.7.2 → asanypath-3.0.0}/.gitignore +0 -0
  23. {asanypath-2.7.2 → asanypath-3.0.0}/.pre-commit-config.yaml +0 -0
  24. {asanypath-2.7.2 → asanypath-3.0.0}/CODE_OF_CONDUCT.md +0 -0
  25. {asanypath-2.7.2 → asanypath-3.0.0}/LICENSE +0 -0
  26. {asanypath-2.7.2 → asanypath-3.0.0}/asanypath.png +0 -0
  27. {asanypath-2.7.2 → asanypath-3.0.0}/compose.yml +0 -0
  28. {asanypath-2.7.2 → asanypath-3.0.0}/hatch_build.py +0 -0
  29. {asanypath-2.7.2 → asanypath-3.0.0}/scripts/bench.py +0 -0
  30. {asanypath-2.7.2 → asanypath-3.0.0}/scripts/bench_rmtree.py +0 -0
  31. {asanypath-2.7.2 → asanypath-3.0.0}/scripts/bench_upload.py +0 -0
  32. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/__init__.py +0 -0
  33. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/__init__.pyi +0 -0
  34. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/_backend_opts.py +0 -0
  35. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/_credstore.py +0 -0
  36. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/_prompt.py +0 -0
  37. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/_resume.py +0 -0
  38. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/_transfer.py +0 -0
  39. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/asanypath.py +0 -0
  40. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/asanypath.pyi +0 -0
  41. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/batcher.py +0 -0
  42. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/cache.py +0 -0
  43. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/cli.py +0 -0
  44. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/click.py +0 -0
  45. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/common.py +0 -0
  46. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/exceptions.py +0 -0
  47. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/gcs.py +0 -0
  48. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/local.py +0 -0
  49. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/options.py +0 -0
  50. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/py.typed +0 -0
  51. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/ssh.py +0 -0
  52. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/sync.py +0 -0
  53. {asanypath-2.7.2 → asanypath-3.0.0}/src/asanypath/unsupported.py +0 -0
  54. {asanypath-2.7.2 → asanypath-3.0.0}/tests/__init__.py +0 -0
  55. {asanypath-2.7.2 → asanypath-3.0.0}/tests/conftest.py +0 -0
  56. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_artifactory.py +0 -0
  57. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_asanypath.py +0 -0
  58. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_auth_errors.py +0 -0
  59. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_azure.py +0 -0
  60. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_backend_options.py +0 -0
  61. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_batcher.py +0 -0
  62. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_cache.py +0 -0
  63. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_cli.py +0 -0
  64. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_click.py +0 -0
  65. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_cloudpathmixin.py +0 -0
  66. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_commonpathmixin.py +0 -0
  67. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_credstore.py +0 -0
  68. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_endpoints.py +0 -0
  69. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_gcs.py +0 -0
  70. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_http.py +0 -0
  71. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_http_auth.py +0 -0
  72. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_isolation.py +0 -0
  73. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_local.py +0 -0
  74. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_options.py +0 -0
  75. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_py_typed.py +0 -0
  76. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_resume.py +0 -0
  77. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_s3.py +0 -0
  78. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_scandir.py +0 -0
  79. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_ssh.py +0 -0
  80. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_ssh_hostkeys.py +0 -0
  81. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_sync.py +0 -0
  82. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_syncpath.py +0 -0
  83. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_transport_hardening.py +0 -0
  84. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_unsupported_path.py +0 -0
  85. {asanypath-2.7.2 → asanypath-3.0.0}/tests/test_upload.py +0 -0
@@ -4,7 +4,7 @@
4
4
  Guide development of async Python libraries with clean APIs, proper typing, and thorough testing.
5
5
 
6
6
  ## Technical Stack
7
- - **Python**: 3.10+ with full async/await
7
+ - **Python**: 3.11+ with full async/await
8
8
  - **Package Manager**: uv (sync, run, build)
9
9
  - **Build**: hatchling
10
10
  - **Lint/Format**: ruff
@@ -74,7 +74,6 @@ jobs:
74
74
  uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7
75
75
  with:
76
76
  python-version: |
77
- 3.10
78
77
  3.11
79
78
  3.12
80
79
  3.13
@@ -87,7 +86,7 @@ jobs:
87
86
  working-directory: rust
88
87
  target: ${{ matrix.target }}
89
88
  manylinux: ${{ matrix.manylinux }}
90
- args: --release --out dist --interpreter 3.10 3.11 3.12 3.13 3.14 3.15
89
+ args: --release --out dist --interpreter 3.11 3.12 3.13 3.14 3.15
91
90
 
92
91
  - name: Upload native wheels
93
92
  uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
@@ -30,7 +30,7 @@ jobs:
30
30
  strategy:
31
31
  fail-fast: true
32
32
  matrix:
33
- python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
33
+ python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
34
34
  steps:
35
35
  - name: Checkout repository
36
36
  uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
@@ -4,7 +4,7 @@ Thank you for contributing to AsAnyPath.
4
4
 
5
5
  ## Getting Started
6
6
 
7
- Use Python 3.10 or newer and install the development dependencies:
7
+ Use Python 3.11 or newer and install the development dependencies:
8
8
 
9
9
  ```bash
10
10
  uv sync --extra dev
@@ -31,7 +31,7 @@ cargo check --manifest-path rust/Cargo.toml
31
31
  ## Pull Requests
32
32
 
33
33
  Keep pull requests focused and include tests for changed behavior. Preserve
34
- compatibility with Python 3.10 through 3.15. Describe user-visible changes and
34
+ compatibility with Python 3.11 through 3.15. Describe user-visible changes and
35
35
  document new configuration, credentials, or backend behavior in the README.
36
36
 
37
37
  Do not include credentials, private endpoints, customer data, or other
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: asanypath
3
- Version: 2.7.2
3
+ Version: 3.0.0
4
4
  Summary: Async pathlib for local and cloud storage
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -11,16 +11,15 @@ Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: OS Independent
12
12
  Classifier: Programming Language :: Python :: 3
13
13
  Classifier: Programming Language :: Python :: 3 :: Only
14
- Classifier: Programming Language :: Python :: 3.10
15
14
  Classifier: Programming Language :: Python :: 3.11
16
15
  Classifier: Programming Language :: Python :: 3.12
17
16
  Classifier: Programming Language :: Python :: 3.13
18
17
  Classifier: Programming Language :: Python :: 3.14
19
18
  Classifier: Programming Language :: Python :: 3.15
20
19
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
- Requires-Python: >=3.10
20
+ Requires-Python: >=3.11
22
21
  Requires-Dist: anyio>=4
23
- Requires-Dist: asanypath-native~=2.7.2
22
+ Requires-Dist: asanypath-native~=3.0.0
24
23
  Requires-Dist: msgspec>=0.22.0
25
24
  Requires-Dist: yarl>=1.2
26
25
  Provides-Extra: all
@@ -73,7 +72,7 @@ locally before connecting to a cloud account.
73
72
 
74
73
  ## Requirements
75
74
 
76
- - Python 3.10 through 3.15.
75
+ - Python 3.11 through 3.15.
77
76
  - Access credentials for each cloud service that your application uses.
78
77
 
79
78
  S3 authentication accepts explicit keys or uses the AWS SDK credential provider
@@ -16,7 +16,7 @@ locally before connecting to a cloud account.
16
16
 
17
17
  ## Requirements
18
18
 
19
- - Python 3.10 through 3.15.
19
+ - Python 3.11 through 3.15.
20
20
  - Access credentials for each cloud service that your application uses.
21
21
 
22
22
  S3 authentication accepts explicit keys or uses the AWS SDK credential provider
@@ -10,9 +10,8 @@ fallback-version = "0.0.0-dev"
10
10
  version-file = "src/asanypath/_version.py"
11
11
 
12
12
  [tool.uv]
13
- # filelock (pre-commit -> virtualenv) has security fixes only from 4.2.1, which
14
- # needs Python 3.11; Python 3.10 keeps the newest release it supports.
15
- constraint-dependencies = ["filelock>=4.2.1; python_version >= '3.11'"]
13
+ # filelock (pre-commit -> virtualenv) has security fixes only from 4.2.1.
14
+ constraint-dependencies = ["filelock>=4.2.1"]
16
15
 
17
16
  [[tool.uv.index]]
18
17
  url = "https://pypi.org/simple"
@@ -34,7 +33,7 @@ name = "asanypath"
34
33
  dynamic = ["version", "dependencies"]
35
34
  description = "Async pathlib for local and cloud storage"
36
35
  readme = "README.md"
37
- requires-python = ">=3.10"
36
+ requires-python = ">=3.11"
38
37
  license = "MIT"
39
38
  classifiers = [
40
39
  "Development Status :: 4 - Beta",
@@ -43,7 +42,6 @@ classifiers = [
43
42
  "Operating System :: OS Independent",
44
43
  "Programming Language :: Python :: 3",
45
44
  "Programming Language :: Python :: 3 :: Only",
46
- "Programming Language :: Python :: 3.10",
47
45
  "Programming Language :: Python :: 3.11",
48
46
  "Programming Language :: Python :: 3.12",
49
47
  "Programming Language :: Python :: 3.13",
@@ -85,13 +83,13 @@ asanypath = "asanypath.cli:main"
85
83
 
86
84
  [tool.ruff]
87
85
  line-length = 100
88
- target-version = "py310"
86
+ target-version = "py311"
89
87
 
90
88
  [tool.ruff.lint]
91
89
  select = ["E", "F", "I", "N", "W", "UP"]
92
90
 
93
91
  [tool.mypy]
94
- python_version = "3.10"
92
+ python_version = "3.11"
95
93
  warn_return_any = true
96
94
  warn_unused_configs = true
97
95
  disallow_untyped_defs = true
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '2.7.2'
22
- __version_tuple__ = version_tuple = (2, 7, 2)
21
+ __version__ = version = '3.0.0'
22
+ __version_tuple__ = version_tuple = (3, 0, 0)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -15,7 +15,7 @@ import os
15
15
  import shutil
16
16
  import tempfile
17
17
  from collections.abc import Mapping
18
- from datetime import datetime, timezone
18
+ from datetime import UTC, datetime
19
19
  from os import getenv
20
20
  from pathlib import Path
21
21
  from types import SimpleNamespace
@@ -408,7 +408,7 @@ class ArtifactoryPath(CloudPathMixin, ServiceEndpointMixin):
408
408
  if ts.endswith("Z"):
409
409
  ts = ts[:-1] + "+00:00"
410
410
  try:
411
- return datetime.fromisoformat(ts).astimezone(timezone.utc).timestamp()
411
+ return datetime.fromisoformat(ts).astimezone(UTC).timestamp()
412
412
  except ValueError:
413
413
  return None
414
414
 
@@ -14,7 +14,7 @@ from __future__ import annotations
14
14
 
15
15
  import base64
16
16
  from collections.abc import Mapping
17
- from datetime import datetime, timezone
17
+ from datetime import UTC, datetime
18
18
  from os import getenv
19
19
  from types import SimpleNamespace
20
20
  from uuid import uuid4
@@ -264,7 +264,7 @@ class AzurePath(CloudPathMixin, ServiceEndpointMixin):
264
264
  if last_modified:
265
265
  mtime = (
266
266
  datetime.strptime(last_modified, "%a, %d %b %Y %H:%M:%S GMT")
267
- .replace(tzinfo=timezone.utc)
267
+ .replace(tzinfo=UTC)
268
268
  .timestamp()
269
269
  )
270
270
  return SimpleNamespace(
@@ -1321,24 +1321,6 @@ class _CloudRawIO(io.RawIOBase):
1321
1321
  return self._pos
1322
1322
 
1323
1323
 
1324
- class _SpooledWriteBuffer(tempfile.SpooledTemporaryFile):
1325
- """Spooled write buffer exposing the IOBase probes ``TextIOWrapper`` needs.
1326
-
1327
- Python 3.10's ``SpooledTemporaryFile`` omits ``readable``/``writable``/
1328
- ``seekable`` (added in 3.11); the buffer is always opened ``w+b`` so all
1329
- three are unconditionally true.
1330
- """
1331
-
1332
- def readable(self) -> bool:
1333
- return True
1334
-
1335
- def writable(self) -> bool:
1336
- return True
1337
-
1338
- def seekable(self) -> bool:
1339
- return True
1340
-
1341
-
1342
1324
  class _CloudFile:
1343
1325
  """File handle backed by cloud read/write with lazy range-read support.
1344
1326
 
@@ -1402,7 +1384,7 @@ class _CloudFile:
1402
1384
  if "r" in self._mode:
1403
1385
  self._buf = io.BytesIO(data or b"")
1404
1386
  else:
1405
- self._buf = _SpooledWriteBuffer(max_size=self._SPOOL_MAX_SIZE, mode="w+b")
1387
+ self._buf = tempfile.SpooledTemporaryFile(max_size=self._SPOOL_MAX_SIZE, mode="w+b")
1406
1388
  if "b" not in self._mode:
1407
1389
  self._text_wrapper = io.TextIOWrapper(
1408
1390
  self._buf,
@@ -56,7 +56,7 @@ import hashlib
56
56
  import netrc
57
57
  import warnings
58
58
  from collections.abc import AsyncIterator, Awaitable, Callable
59
- from datetime import datetime, timezone
59
+ from datetime import UTC, datetime
60
60
  from os import getenv
61
61
  from types import SimpleNamespace
62
62
  from typing import IO, TYPE_CHECKING, TypeVar, cast
@@ -111,7 +111,7 @@ def _parse_mlst_mtime(modify: str | None) -> float | None:
111
111
  if not modify:
112
112
  return None
113
113
  fmt = "%Y%m%d%H%M%S.%f" if "." in modify else "%Y%m%d%H%M%S"
114
- return datetime.strptime(modify, fmt).replace(tzinfo=timezone.utc).timestamp()
114
+ return datetime.strptime(modify, fmt).replace(tzinfo=UTC).timestamp()
115
115
 
116
116
 
117
117
  _NETRC_WARNED = False
@@ -10,6 +10,7 @@ import logging
10
10
  import re
11
11
  from base64 import b64encode
12
12
  from collections.abc import AsyncGenerator, AsyncIterator, Callable
13
+ from datetime import UTC
13
14
  from os import getenv, linesep
14
15
  from typing import TYPE_CHECKING, Literal
15
16
  from xml.etree.ElementTree import XMLParser
@@ -597,7 +598,7 @@ class HTTPPath(CloudPathMixin):
597
598
  remaining ``stat`` fields. Returns a ``SimpleNamespace`` matching the
598
599
  cloud-backend convention (see ``S3Path.stat``).
599
600
  """
600
- from datetime import datetime, timezone
601
+ from datetime import datetime
601
602
  from email.utils import parsedate_to_datetime
602
603
  from types import SimpleNamespace
603
604
 
@@ -613,7 +614,7 @@ class HTTPPath(CloudPathMixin):
613
614
  try:
614
615
  mtime = (
615
616
  datetime.strptime(last_modified, "%a, %d %b %Y %H:%M:%S GMT")
616
- .replace(tzinfo=timezone.utc)
617
+ .replace(tzinfo=UTC)
617
618
  .timestamp()
618
619
  )
619
620
  except ValueError:
@@ -10,7 +10,7 @@ import asyncio
10
10
  import logging
11
11
  import os
12
12
  from collections.abc import Mapping
13
- from datetime import datetime, timezone
13
+ from datetime import UTC, datetime
14
14
  from types import SimpleNamespace
15
15
  from typing import cast
16
16
 
@@ -291,7 +291,7 @@ class S3Path(CloudPathMixin, ServiceEndpointMixin):
291
291
  if last_modified:
292
292
  mtime = (
293
293
  datetime.strptime(last_modified, "%a, %d %b %Y %H:%M:%S GMT")
294
- .replace(tzinfo=timezone.utc)
294
+ .replace(tzinfo=UTC)
295
295
  .timestamp()
296
296
  )
297
297
  return SimpleNamespace(
@@ -8,7 +8,7 @@
8
8
 
9
9
  from __future__ import annotations
10
10
 
11
- from datetime import datetime, timezone
11
+ from datetime import UTC, datetime
12
12
  from types import SimpleNamespace
13
13
  from unittest.mock import AsyncMock, MagicMock, patch
14
14
 
@@ -455,11 +455,11 @@ class TestFTPPath(testbase):
455
455
  [
456
456
  (
457
457
  "20240115093045",
458
- datetime(2024, 1, 15, 9, 30, 45, tzinfo=timezone.utc).timestamp(),
458
+ datetime(2024, 1, 15, 9, 30, 45, tzinfo=UTC).timestamp(),
459
459
  ),
460
460
  (
461
461
  "20240115093045.250000",
462
- datetime(2024, 1, 15, 9, 30, 45, 250000, tzinfo=timezone.utc).timestamp(),
462
+ datetime(2024, 1, 15, 9, 30, 45, 250000, tzinfo=UTC).timestamp(),
463
463
  ),
464
464
  (None, None),
465
465
  ("", None),
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes