lsst-resources 29.2025.3200__tar.gz → 29.2025.3300__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 (53) hide show
  1. {lsst_resources-29.2025.3200/python/lsst_resources.egg-info → lsst_resources-29.2025.3300}/PKG-INFO +1 -1
  2. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/http.py +5 -11
  3. lsst_resources-29.2025.3300/python/lsst/resources/version.py +2 -0
  4. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300/python/lsst_resources.egg-info}/PKG-INFO +1 -1
  5. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/tests/test_http.py +11 -0
  6. lsst_resources-29.2025.3200/python/lsst/resources/version.py +0 -2
  7. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/COPYRIGHT +0 -0
  8. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/LICENSE +0 -0
  9. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/MANIFEST.in +0 -0
  10. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/README.md +0 -0
  11. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/doc/lsst.resources/CHANGES.rst +0 -0
  12. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/doc/lsst.resources/dav.rst +0 -0
  13. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/doc/lsst.resources/index.rst +0 -0
  14. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/doc/lsst.resources/internal-api.rst +0 -0
  15. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/doc/lsst.resources/s3.rst +0 -0
  16. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/pyproject.toml +0 -0
  17. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/__init__.py +0 -0
  18. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/__init__.py +0 -0
  19. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/_resourceHandles/__init__.py +0 -0
  20. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/_resourceHandles/_baseResourceHandle.py +0 -0
  21. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/_resourceHandles/_davResourceHandle.py +0 -0
  22. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/_resourceHandles/_fileResourceHandle.py +0 -0
  23. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/_resourceHandles/_httpResourceHandle.py +0 -0
  24. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/_resourceHandles/_s3ResourceHandle.py +0 -0
  25. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/_resourcePath.py +0 -0
  26. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/dav.py +0 -0
  27. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/davutils.py +0 -0
  28. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/file.py +0 -0
  29. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/gs.py +0 -0
  30. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/location.py +0 -0
  31. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/mem.py +0 -0
  32. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/packageresource.py +0 -0
  33. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/py.typed +0 -0
  34. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/s3.py +0 -0
  35. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/s3utils.py +0 -0
  36. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/schemeless.py +0 -0
  37. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/tests.py +0 -0
  38. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst/resources/utils.py +0 -0
  39. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst_resources.egg-info/SOURCES.txt +0 -0
  40. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst_resources.egg-info/dependency_links.txt +0 -0
  41. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst_resources.egg-info/requires.txt +0 -0
  42. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst_resources.egg-info/top_level.txt +0 -0
  43. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/python/lsst_resources.egg-info/zip-safe +0 -0
  44. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/setup.cfg +0 -0
  45. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/tests/test_dav.py +0 -0
  46. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/tests/test_file.py +0 -0
  47. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/tests/test_gs.py +0 -0
  48. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/tests/test_location.py +0 -0
  49. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/tests/test_mem.py +0 -0
  50. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/tests/test_resource.py +0 -0
  51. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/tests/test_s3.py +0 -0
  52. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/tests/test_s3utils.py +0 -0
  53. {lsst_resources-29.2025.3200 → lsst_resources-29.2025.3300}/tests/test_schemeless.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lsst-resources
3
- Version: 29.2025.3200
3
+ Version: 29.2025.3300
4
4
  Summary: An abstraction layer for reading and writing from URI file resources.
5
5
  Author-email: Rubin Observatory Data Management <dm-admin@lists.lsst.org>
6
6
  License: BSD 3-Clause License
@@ -430,9 +430,7 @@ def _get_dav_and_server_headers(path: ResourcePath | str) -> tuple[str | None, s
430
430
  config = HttpResourcePathConfig()
431
431
  with SessionStore(config=config).get(path) as session:
432
432
  resp = session.options(
433
- str(path),
434
- stream=False,
435
- timeout=config.timeout,
433
+ str(path), stream=False, timeout=config.timeout, headers=path._extra_headers
436
434
  )
437
435
 
438
436
  dav_header = server_header = None
@@ -1380,16 +1378,12 @@ class HttpResourcePath(ResourcePath):
1380
1378
  path : `str`
1381
1379
  A path that can be opened by the file system object.
1382
1380
  """
1383
- if (
1384
- fsspec is None
1385
- or not self.is_webdav_endpoint
1386
- or self.server not in HttpResourcePath.SUPPORTED_URL_SIGNERS
1387
- ):
1388
- if self.scheme.startswith("dav") and fsspec:
1389
- # Not webdav so convert to http.
1390
- return fsspec.url_to_fs(self.geturl())
1381
+ if fsspec is None:
1391
1382
  return super().to_fsspec()
1392
1383
 
1384
+ if not self.is_webdav_endpoint or self.server not in HttpResourcePath.SUPPORTED_URL_SIGNERS:
1385
+ return fsspec.url_to_fs(self.geturl(), client_kwargs={"headers": self._extra_headers})
1386
+
1393
1387
  if self.isdir():
1394
1388
  raise NotImplementedError(
1395
1389
  f"method HttpResourcePath.to_fsspec() not implemented for directory {self}"
@@ -0,0 +1,2 @@
1
+ __all__ = ["__version__"]
2
+ __version__ = "29.2025.3300"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lsst-resources
3
- Version: 29.2025.3200
3
+ Version: 29.2025.3300
4
4
  Summary: An abstraction layer for reading and writing from URI file resources.
5
5
  Author-email: Rubin Observatory Data Management <dm-admin@lists.lsst.org>
6
6
  License: BSD 3-Clause License
@@ -104,6 +104,17 @@ class GenericHttpTestCase(GenericTestCase, unittest.TestCase):
104
104
  )
105
105
  self.assertEqual(path.read(), b"test")
106
106
 
107
+ # Make sure that headers are added to fsspec.
108
+ # This triggers logic for "webdav" vs "not-webdav" that does an OPTIONS
109
+ # request, so we need to check that too.
110
+ responses.add(
111
+ responses.OPTIONS,
112
+ "http://test.example/",
113
+ match=[responses.matchers.header_matcher({"Authorization": "Bearer my-token"})],
114
+ )
115
+ fs, _ = path.to_fsspec()
116
+ self.assertEqual(fs.client_kwargs.get("headers"), {"Authorization": "Bearer my-token"})
117
+
107
118
  # Extra headers should be preserved through pickle, to ensure that
108
119
  # `mtransfer` and similar methods work in multi-process mode.
109
120
  dump = pickle.dumps(path)
@@ -1,2 +0,0 @@
1
- __all__ = ["__version__"]
2
- __version__ = "29.2025.3200"