moat-lib-path 0.3.6__tar.gz → 0.3.7__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moat-lib-path
3
- Version: 0.3.6
3
+ Version: 0.3.7
4
4
  Summary: Hierarchical path representation and manipulation for MoaT
5
5
  Maintainer-email: Matthias Urlichs <matthias@urlichs.de>
6
6
  Project-URL: homepage, https://m-o-a-t.org
@@ -1,3 +1,9 @@
1
+ moat-lib-path (0.3.7-1) unstable; urgency=medium
2
+
3
+ * New release for 26.4.27
4
+
5
+ -- Matthias Urlichs <matthias@urlichs.de> Sat, 03 Oct 2026 14:53:15 +0200
6
+
1
7
  moat-lib-path (0.3.6-1) unstable; urgency=medium
2
8
 
3
9
  * New release for 26.4.26
@@ -22,7 +22,7 @@ name = "moat-lib-path"
22
22
  maintainers = [{email = "matthias@urlichs.de",name = "Matthias Urlichs"}]
23
23
  description='Hierarchical path representation and manipulation for MoaT'
24
24
  readme = "README.md"
25
- version = "0.3.6"
25
+ version = "0.3.7"
26
26
 
27
27
  [project.urls]
28
28
  homepage = "https://m-o-a-t.org"
@@ -196,14 +196,20 @@ class Path(Sequence[PathElem]):
196
196
  if mark:
197
197
  warnings.warn("Marking a path is deprecated")
198
198
 
199
- if _warn and a:
199
+ if not a:
200
+ pass
201
+ elif decoded and isinstance(a[0], RootPath) and prefix is None:
202
+ prefix = a[0]
203
+ a = a[1:]
204
+ elif isinstance(a[0], Path):
205
+ if len(a) > 1:
206
+ raise ValueError("Can't build a path this way")
207
+ a = a[0].as_tuple()
208
+ elif len(a) != 1 and _warn:
200
209
  warnings.warn(
201
210
  "Call 'Path.build(args)', not 'Path(*args)'", DeprecationWarning, stacklevel=2
202
211
  )
203
212
 
204
- if decoded and a and isinstance(a[0], RootPath) and prefix is None:
205
- prefix = a[0]
206
- a = a[1:]
207
213
  for x in a:
208
214
  if not isinstance(x, PathElemI): # pyright:ignore[reportArgumentType]
209
215
  raise TypeError(f"{x!r} cannot be in a path")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moat-lib-path
3
- Version: 0.3.6
3
+ Version: 0.3.7
4
4
  Summary: Hierarchical path representation and manipulation for MoaT
5
5
  Maintainer-email: Matthias Urlichs <matthias@urlichs.de>
6
6
  Project-URL: homepage, https://m-o-a-t.org
File without changes
File without changes
File without changes
File without changes