asanypath 2.7.0__tar.gz → 2.7.1__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.0 → asanypath-2.7.1}/PKG-INFO +5 -2
  2. {asanypath-2.7.0 → asanypath-2.7.1}/README.md +3 -0
  3. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/_version.py +2 -2
  4. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/sync.py +2 -1
  5. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_sync.py +23 -0
  6. {asanypath-2.7.0 → asanypath-2.7.1}/.copilot/skills/async-python-lib/SKILL.md +0 -0
  7. {asanypath-2.7.0 → asanypath-2.7.1}/.copilot/skills/gitguro/SKILL.md +0 -0
  8. {asanypath-2.7.0 → asanypath-2.7.1}/.github/CODEOWNERS +0 -0
  9. {asanypath-2.7.0 → asanypath-2.7.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  10. {asanypath-2.7.0 → asanypath-2.7.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  11. {asanypath-2.7.0 → asanypath-2.7.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  12. {asanypath-2.7.0 → asanypath-2.7.1}/.github/dependabot.yml +0 -0
  13. {asanypath-2.7.0 → asanypath-2.7.1}/.github/workflows/publish.yml +0 -0
  14. {asanypath-2.7.0 → asanypath-2.7.1}/.github/workflows/unittests.yml +0 -0
  15. {asanypath-2.7.0 → asanypath-2.7.1}/.gitignore +0 -0
  16. {asanypath-2.7.0 → asanypath-2.7.1}/.pre-commit-config.yaml +0 -0
  17. {asanypath-2.7.0 → asanypath-2.7.1}/CODE_OF_CONDUCT.md +0 -0
  18. {asanypath-2.7.0 → asanypath-2.7.1}/CONTRIBUTING.md +0 -0
  19. {asanypath-2.7.0 → asanypath-2.7.1}/LICENSE +0 -0
  20. {asanypath-2.7.0 → asanypath-2.7.1}/asanypath.png +0 -0
  21. {asanypath-2.7.0 → asanypath-2.7.1}/compose.yml +0 -0
  22. {asanypath-2.7.0 → asanypath-2.7.1}/hatch_build.py +0 -0
  23. {asanypath-2.7.0 → asanypath-2.7.1}/pyproject.toml +0 -0
  24. {asanypath-2.7.0 → asanypath-2.7.1}/scripts/bench.py +0 -0
  25. {asanypath-2.7.0 → asanypath-2.7.1}/scripts/bench_rmtree.py +0 -0
  26. {asanypath-2.7.0 → asanypath-2.7.1}/scripts/bench_upload.py +0 -0
  27. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/__init__.py +0 -0
  28. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/__init__.pyi +0 -0
  29. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/_backend_opts.py +0 -0
  30. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/_credstore.py +0 -0
  31. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/_prompt.py +0 -0
  32. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/_resume.py +0 -0
  33. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/_transfer.py +0 -0
  34. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/artifactory.py +0 -0
  35. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/asanypath.py +0 -0
  36. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/asanypath.pyi +0 -0
  37. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/azure.py +0 -0
  38. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/batcher.py +0 -0
  39. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/cache.py +0 -0
  40. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/cli.py +0 -0
  41. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/click.py +0 -0
  42. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/cloud.py +0 -0
  43. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/common.py +0 -0
  44. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/exceptions.py +0 -0
  45. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/ftp.py +0 -0
  46. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/gcs.py +0 -0
  47. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/http.py +0 -0
  48. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/local.py +0 -0
  49. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/options.py +0 -0
  50. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/py.typed +0 -0
  51. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/s3.py +0 -0
  52. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/ssh.py +0 -0
  53. {asanypath-2.7.0 → asanypath-2.7.1}/src/asanypath/unsupported.py +0 -0
  54. {asanypath-2.7.0 → asanypath-2.7.1}/tests/__init__.py +0 -0
  55. {asanypath-2.7.0 → asanypath-2.7.1}/tests/conftest.py +0 -0
  56. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_artifactory.py +0 -0
  57. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_asanypath.py +0 -0
  58. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_auth_errors.py +0 -0
  59. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_azure.py +0 -0
  60. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_backend_options.py +0 -0
  61. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_batcher.py +0 -0
  62. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_cache.py +0 -0
  63. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_cli.py +0 -0
  64. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_click.py +0 -0
  65. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_cloudpathmixin.py +0 -0
  66. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_commonpathmixin.py +0 -0
  67. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_credstore.py +0 -0
  68. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_endpoints.py +0 -0
  69. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_ftp.py +0 -0
  70. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_gcs.py +0 -0
  71. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_http.py +0 -0
  72. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_http_auth.py +0 -0
  73. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_isolation.py +0 -0
  74. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_local.py +0 -0
  75. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_options.py +0 -0
  76. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_py_typed.py +0 -0
  77. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_resume.py +0 -0
  78. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_s3.py +0 -0
  79. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_scandir.py +0 -0
  80. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_ssh.py +0 -0
  81. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_ssh_hostkeys.py +0 -0
  82. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_syncpath.py +0 -0
  83. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_transport_hardening.py +0 -0
  84. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_unsupported_path.py +0 -0
  85. {asanypath-2.7.0 → asanypath-2.7.1}/tests/test_upload.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: asanypath
3
- Version: 2.7.0
3
+ Version: 2.7.1
4
4
  Summary: Async pathlib for local and cloud storage
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -20,7 +20,7 @@ Classifier: Programming Language :: Python :: 3.15
20
20
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
21
  Requires-Python: >=3.10
22
22
  Requires-Dist: anyio>=4
23
- Requires-Dist: asanypath-native~=2.7.0
23
+ Requires-Dist: asanypath-native~=2.7.1
24
24
  Requires-Dist: msgspec>=0.22.0
25
25
  Requires-Dist: yarl>=1.2
26
26
  Provides-Extra: all
@@ -292,6 +292,9 @@ workers.
292
292
 
293
293
  Cloud paths share a background event loop per process. After `fork`, the child
294
294
  resets the inherited runner and starts its own loop lazily on the next sync call.
295
+ An S3 sync path passed to a spawned worker retains its backend configuration,
296
+ including any credentials stored on the path. Don't share or store its pickle
297
+ as if it were just a URL.
295
298
 
296
299
  ### Large uploads stream automatically
297
300
 
@@ -235,6 +235,9 @@ workers.
235
235
 
236
236
  Cloud paths share a background event loop per process. After `fork`, the child
237
237
  resets the inherited runner and starts its own loop lazily on the next sync call.
238
+ An S3 sync path passed to a spawned worker retains its backend configuration,
239
+ including any credentials stored on the path. Don't share or store its pickle
240
+ as if it were just a URL.
238
241
 
239
242
  ### Large uploads stream automatically
240
243
 
@@ -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.0'
22
- __version_tuple__ = version_tuple = (2, 7, 0)
21
+ __version__ = version = '2.7.1'
22
+ __version_tuple__ = version_tuple = (2, 7, 1)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -140,7 +140,8 @@ class _SyncProxy:
140
140
  # (every cloud path method call triggers these branches), but edge cases
141
141
  # like "non-callable attributes that are collections" are hard to trigger
142
142
  # directly without synthetic mocking.
143
- attr = getattr(self._async, name)
143
+ # Pickle probes __setstate__ before restoring the _async slot.
144
+ attr = getattr(object.__getattribute__(self, "_async"), name)
144
145
 
145
146
  # Properties and plain values
146
147
  if not callable(attr): # pragma: no cover
@@ -9,6 +9,7 @@
9
9
  from __future__ import annotations
10
10
 
11
11
  import multiprocessing
12
+ from multiprocessing.reduction import ForkingPickler
12
13
 
13
14
  import pytest
14
15
 
@@ -61,6 +62,28 @@ class TestSyncProxy:
61
62
  p = AsAnyPath("s3://bucket/key.txt")
62
63
  assert isinstance(p, _SyncProxy)
63
64
 
65
+ def test_s3_forking_pickler_roundtrip(self):
66
+ path = AsAnyPath(
67
+ "s3://bucket/key.txt",
68
+ endpoint_url="https://s3.example.invalid",
69
+ aws_region="us-east-1",
70
+ aws_access_key_id="test-key",
71
+ aws_secret_access_key="test-secret",
72
+ )
73
+
74
+ restored = ForkingPickler.loads(ForkingPickler.dumps(path))
75
+
76
+ assert isinstance(restored, _SyncProxy)
77
+ assert restored == path
78
+ assert restored.endpoint_url == "https://s3.example.invalid"
79
+ assert restored._native_kwargs == path._native_kwargs
80
+
81
+ def test_s3_spawn_pool_accepts_proxy(self):
82
+ path = AsAnyPath("s3://bucket/key.txt", aws_region="us-east-1")
83
+
84
+ with multiprocessing.get_context("spawn").Pool(1) as pool:
85
+ assert pool.apply_async(str, (path,)).get(timeout=10) == "s3://bucket/key.txt"
86
+
64
87
  def test_cloud_is_an_asanypath_instance(self):
65
88
  p = AsAnyPath("s3://bucket/key.txt")
66
89
  assert isinstance(p, AsAnyPath)
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
File without changes
File without changes
File without changes