lsst-resources 29.2025.3000__py3-none-any.whl → 29.2025.3100__py3-none-any.whl

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.
@@ -549,7 +549,7 @@ class ResourcePath: # numpydoc ignore=PR02
549
549
  return self, ""
550
550
 
551
551
  head, tail = self._pathModule.split(self.path)
552
- headuri = self._uri._replace(path=head)
552
+ headuri = self._uri._replace(path=head, fragment="", query="", params="")
553
553
 
554
554
  # The file part should never include quoted metacharacters
555
555
  tail = urllib.parse.unquote(tail)
@@ -619,7 +619,7 @@ class ResourcePath: # numpydoc ignore=PR02
619
619
  # regardless of the presence of a trailing separator
620
620
  originalPath = self._pathLib(self.path)
621
621
  parentPath = originalPath.parent
622
- return self.replace(path=str(parentPath), forceDirectory=True)
622
+ return self.replace(path=str(parentPath), forceDirectory=True, fragment="", query="", params="")
623
623
 
624
624
  def replace(
625
625
  self, forceDirectory: bool | None = None, isTemporary: bool = False, **kwargs: Any
@@ -866,6 +866,8 @@ class ResourcePath: # numpydoc ignore=PR02
866
866
  forceDirectory=forceDirectory,
867
867
  isTemporary=isTemporary,
868
868
  fragment=path_uri.fragment,
869
+ query=path_uri.query,
870
+ params=path_uri.params,
869
871
  )
870
872
 
871
873
  def relative_to(self, other: ResourcePath) -> str | None:
lsst/resources/tests.py CHANGED
@@ -392,6 +392,14 @@ class GenericTestCase(_GenericTestCase):
392
392
  self.assertEqual(child_file.parent().parent(), parent)
393
393
  self.assertEqual(child_subdir.dirname(), child_subdir)
394
394
 
395
+ # Make sure that the parent doesn't retain any fragment from the
396
+ # child.
397
+ child_fragment = child_subdir.join("a.txt#fragment")
398
+ self.assertEqual(child_fragment.fragment, "fragment")
399
+ fragment_parent = child_fragment.parent()
400
+ self.assertEqual(fragment_parent.fragment, "")
401
+ self.assertTrue(str(fragment_parent).endswith("/"))
402
+
395
403
  def test_escapes(self) -> None:
396
404
  """Special characters in file paths."""
397
405
  src = self.root_uri.join("bbb/???/test.txt")
@@ -496,6 +504,13 @@ class GenericTestCase(_GenericTestCase):
496
504
  self.assertEqual(fnew3.fragment, "fragment")
497
505
  self.assertEqual(fnew3.basename(), "b.txt", msg=f"Got: {fnew3._uri}")
498
506
 
507
+ # Check that fragment on the directory is dropped on join.
508
+ frag_dir = add_dir.join("subdir/#dir_fragment")
509
+ self.assertEqual(frag_dir.fragment, "dir_fragment")
510
+ fnew4 = frag_dir.join("a.txt")
511
+ self.assertEqual(fnew4.fragment, "")
512
+ self.assertTrue(str(fnew4).endswith("/a.txt"))
513
+
499
514
  # Join a resource path.
500
515
  subpath = ResourcePath("a/b.txt#fragment2", forceAbsolute=False, forceDirectory=False)
501
516
  fnew3 = root.join(subpath)
lsst/resources/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
  __all__ = ["__version__"]
2
- __version__ = "29.2025.3000"
2
+ __version__ = "29.2025.3100"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lsst-resources
3
- Version: 29.2025.3000
3
+ Version: 29.2025.3100
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
@@ -1,6 +1,6 @@
1
1
  lsst/__init__.py,sha256=9I6UQ9gj-ZcPlvsa0OPBo76UujxXVehVzw9yMAOQvyM,466
2
2
  lsst/resources/__init__.py,sha256=BDj6uokvd0ZQNGl-Xgz5gZd83Z0L2gFqGSk0KJpylP8,778
3
- lsst/resources/_resourcePath.py,sha256=oimnY99a8BBMKahtQxlsGl29fNsM1w5_IZ9mBpbRgzs,73673
3
+ lsst/resources/_resourcePath.py,sha256=lv10VASIk003mObVXR3gyCbXS-lJsU_LgXNZS7pGN9c,73811
4
4
  lsst/resources/dav.py,sha256=ZYP7PnQzS7epm5woxnn1_t1XhsPQZm6_q1kv8baUfn4,32100
5
5
  lsst/resources/davutils.py,sha256=xALuMRSvYroqn_Jz6bjnj43b4OgOgCJtNW49kyTtuiw,97983
6
6
  lsst/resources/file.py,sha256=lrwhsg4y1TKWNLymJ2ZfVSj2yGAbv15pk7z7AkhBq9M,24352
@@ -13,19 +13,19 @@ lsst/resources/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  lsst/resources/s3.py,sha256=NGJPM4BjtqFIPvg9vbp_blrIRt009NbOm06cr65Wqmw,29662
14
14
  lsst/resources/s3utils.py,sha256=ojWf9BPrK9mhGQ8jvs4_8Nsqf9360e79U5FnPTxe24A,14576
15
15
  lsst/resources/schemeless.py,sha256=GfJcKzZ0XIeepfQdW4HPZWiZlSp_ej0SEtSiJTrDUQs,10666
16
- lsst/resources/tests.py,sha256=G43eaajzIaA6D-zz63vsgYJTeSy9Bso-my_Dh4X34CE,44966
16
+ lsst/resources/tests.py,sha256=KAlwkRlLk9h3qWp07-5bLz9AuSkPOODFv5k49rRR5w0,45668
17
17
  lsst/resources/utils.py,sha256=6O3Mq7JbPEtqyD2lM77pRpwcPMfV5SxiNMknw-F2vNs,8097
18
- lsst/resources/version.py,sha256=GKnpddvvmGJ8yPsnT--mhT32jeA31BaGZsJcw6cTK7k,55
18
+ lsst/resources/version.py,sha256=ieqM-HeyuKM3_4zduaocPJMVYG02uci4CjCfGX5PncI,55
19
19
  lsst/resources/_resourceHandles/__init__.py,sha256=zOcZ8gVEBdAWcHJaZabA8Vdq-wAVcxjbmA_1b1IWM6M,76
20
20
  lsst/resources/_resourceHandles/_baseResourceHandle.py,sha256=lQwxDOmFUNJndTxsjpz-HxrQBL0L-z4aXQocHdOEI7c,4676
21
21
  lsst/resources/_resourceHandles/_davResourceHandle.py,sha256=12X5-K5KqzG4EV78ZkIIrjcZcFroXy3Y2JQ_N-SDqF0,6616
22
22
  lsst/resources/_resourceHandles/_fileResourceHandle.py,sha256=2nC8tfP_ynAfjpzrtkw_1ahx1CuMEFpZ5mLmofSShUk,3676
23
23
  lsst/resources/_resourceHandles/_httpResourceHandle.py,sha256=Yami8IVGeru4bLQCag-OvGG0ltz1qyEg57FY4IEB87Y,10995
24
24
  lsst/resources/_resourceHandles/_s3ResourceHandle.py,sha256=Cp-eBtptskbmthy3DwLKPpYPLvU_lrqtK10X37inHt0,12406
25
- lsst_resources-29.2025.3000.dist-info/licenses/COPYRIGHT,sha256=yazVsoMmFwhiw5itGrdT4YPmXbpsQyUFjlpOyZIa77M,148
26
- lsst_resources-29.2025.3000.dist-info/licenses/LICENSE,sha256=7wrtgl8meQ0_RIuv2TjIKpAnNrl-ODH-QLwyHe9citI,1516
27
- lsst_resources-29.2025.3000.dist-info/METADATA,sha256=eZY3oPJ4FQY63OQseJ123Ir2NahUbydki-BxC_AQLio,2237
28
- lsst_resources-29.2025.3000.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
29
- lsst_resources-29.2025.3000.dist-info/top_level.txt,sha256=eUWiOuVVm9wwTrnAgiJT6tp6HQHXxIhj2QSZ7NYZH80,5
30
- lsst_resources-29.2025.3000.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
31
- lsst_resources-29.2025.3000.dist-info/RECORD,,
25
+ lsst_resources-29.2025.3100.dist-info/licenses/COPYRIGHT,sha256=yazVsoMmFwhiw5itGrdT4YPmXbpsQyUFjlpOyZIa77M,148
26
+ lsst_resources-29.2025.3100.dist-info/licenses/LICENSE,sha256=7wrtgl8meQ0_RIuv2TjIKpAnNrl-ODH-QLwyHe9citI,1516
27
+ lsst_resources-29.2025.3100.dist-info/METADATA,sha256=3hOouTcTcI2aLmLjlR2TgccBLug3kkR41NyrVBMIed8,2237
28
+ lsst_resources-29.2025.3100.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
29
+ lsst_resources-29.2025.3100.dist-info/top_level.txt,sha256=eUWiOuVVm9wwTrnAgiJT6tp6HQHXxIhj2QSZ7NYZH80,5
30
+ lsst_resources-29.2025.3100.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
31
+ lsst_resources-29.2025.3100.dist-info/RECORD,,