v440 2.0.0.dev37__tar.gz → 2.0.0.dev39__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.
- {v440-2.0.0.dev37/src/v440.egg-info → v440-2.0.0.dev39}/PKG-INFO +1 -1
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/pyproject.toml +1 -1
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/_utils/SlotList.py +0 -1
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/_utils/qualparse.py +7 -9
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/core/Local.py +5 -5
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/tests/test_testdata.py +32 -9
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/tests/testdata.toml +15 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39/src/v440.egg-info}/PKG-INFO +1 -1
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/LICENSE.txt +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/MANIFEST.in +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/README.rst +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/setup.cfg +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/__init__.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/_utils/BaseList.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/_utils/Cfg.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/_utils/Digest.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/_utils/Pattern.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/_utils/VList.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/_utils/__init__.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/_utils/cfg.toml +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/_utils/utils.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/core/Base.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/core/Public.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/core/Qual.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/core/Release.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/core/Version.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/core/VersionError.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/core/__init__.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/tests/__init__.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440/tests/test_version.py +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440.egg-info/SOURCES.txt +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440.egg-info/dependency_links.txt +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440.egg-info/requires.txt +0 -0
- {v440-2.0.0.dev37 → v440-2.0.0.dev39}/src/v440.egg-info/top_level.txt +0 -0
|
@@ -108,14 +108,14 @@ def parse_dev(value: int) -> int:
|
|
|
108
108
|
|
|
109
109
|
@parse_dev.overload(list)
|
|
110
110
|
def parse_dev(value: list) -> Optional[int]:
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
x: Any
|
|
112
|
+
y: Any
|
|
113
|
+
x, y = map(utils.segment, value)
|
|
114
|
+
if x != "dev":
|
|
113
115
|
raise ValueError
|
|
114
|
-
if
|
|
116
|
+
if isinstance(y, str):
|
|
115
117
|
raise ValueError
|
|
116
|
-
|
|
117
|
-
raise ValueError
|
|
118
|
-
return v[1]
|
|
118
|
+
return y
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
@parse_dev.overload(str)
|
|
@@ -175,7 +175,5 @@ def parse_post(value: str) -> Optional[int]:
|
|
|
175
175
|
x, y = m.groups()
|
|
176
176
|
if x not in (None, "post", "rev", "r"):
|
|
177
177
|
raise ValueError
|
|
178
|
-
if y is None:
|
|
179
|
-
return None
|
|
180
|
-
else:
|
|
178
|
+
if y is not None:
|
|
181
179
|
return int(y)
|
|
@@ -28,20 +28,20 @@ class Local(VList):
|
|
|
28
28
|
except ValueError:
|
|
29
29
|
ans = self.data <= other
|
|
30
30
|
else:
|
|
31
|
-
ans = self.
|
|
31
|
+
ans = self._cmp() <= alt._cmp()
|
|
32
32
|
return ans
|
|
33
33
|
|
|
34
34
|
def __str__(self: Self) -> str:
|
|
35
35
|
"This magic method implements str(self)."
|
|
36
36
|
return ".".join(map(str, self))
|
|
37
37
|
|
|
38
|
-
def
|
|
38
|
+
def _cmp(self: Self) -> list:
|
|
39
39
|
return list(map(self._sortkey, self))
|
|
40
40
|
|
|
41
41
|
_data_calc: Digest = Digest("_data_calc")
|
|
42
42
|
|
|
43
43
|
@_data_calc.overload()
|
|
44
|
-
def _data_calc(self: Self) ->
|
|
44
|
+
def _data_calc(self: Self) -> list:
|
|
45
45
|
return list()
|
|
46
46
|
|
|
47
47
|
@_data_calc.overload(int)
|
|
@@ -56,7 +56,7 @@ class Local(VList):
|
|
|
56
56
|
return ans
|
|
57
57
|
|
|
58
58
|
@_data_calc.overload(str)
|
|
59
|
-
def _data_calc(self: Self, value: str) ->
|
|
59
|
+
def _data_calc(self: Self, value: str) -> list:
|
|
60
60
|
v: str = value
|
|
61
61
|
if v.startswith("+"):
|
|
62
62
|
v = v[1:]
|
|
@@ -69,7 +69,7 @@ class Local(VList):
|
|
|
69
69
|
return ans
|
|
70
70
|
|
|
71
71
|
@staticmethod
|
|
72
|
-
def _sortkey(value: Any) ->
|
|
72
|
+
def _sortkey(value: Any) -> tuple[bool, Any]:
|
|
73
73
|
return type(value) is int, value
|
|
74
74
|
|
|
75
75
|
@property
|
|
@@ -9,6 +9,7 @@ from typing import *
|
|
|
9
9
|
import iterprod
|
|
10
10
|
import packaging.version
|
|
11
11
|
|
|
12
|
+
from v440 import core
|
|
12
13
|
from v440.core.Release import Release
|
|
13
14
|
from v440.core.Version import Version
|
|
14
15
|
from v440.core.VersionError import VersionError
|
|
@@ -353,17 +354,39 @@ class TestPackagingExc(unittest.TestCase):
|
|
|
353
354
|
|
|
354
355
|
class TestExc(unittest.TestCase):
|
|
355
356
|
def test_exc(self: Self) -> None:
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
for
|
|
359
|
-
self.
|
|
357
|
+
x: str
|
|
358
|
+
y: list
|
|
359
|
+
for x, y in Util.util.data["strings"]["exc"].items():
|
|
360
|
+
with self.subTest(test_label=x):
|
|
361
|
+
self.go(queries=y)
|
|
360
362
|
|
|
361
|
-
def go(self: Self,
|
|
363
|
+
def go(self: Self, queries: list) -> None:
|
|
362
364
|
x: str
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
365
|
+
for x in queries:
|
|
366
|
+
with self.assertRaises(VersionError):
|
|
367
|
+
Version(x)
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
class TestSlots(unittest.TestCase):
|
|
371
|
+
def test_slots(self: Self) -> None:
|
|
372
|
+
x: Any
|
|
373
|
+
y: Any
|
|
374
|
+
for x, y in Util.util.data["core-non-attributes"].items():
|
|
375
|
+
with self.subTest(test_label=x):
|
|
376
|
+
self.go(**y)
|
|
377
|
+
|
|
378
|
+
def go(
|
|
379
|
+
self: Self,
|
|
380
|
+
clsname: str,
|
|
381
|
+
attrname: str,
|
|
382
|
+
attrvalue: Any,
|
|
383
|
+
data: Any = None,
|
|
384
|
+
) -> None:
|
|
385
|
+
module: Any = getattr(core, clsname)
|
|
386
|
+
cls: type = getattr(module, clsname)
|
|
387
|
+
obj: Any = cls(data)
|
|
388
|
+
with self.assertRaises(AttributeError):
|
|
389
|
+
setattr(obj, attrname, attrvalue)
|
|
367
390
|
|
|
368
391
|
|
|
369
392
|
if __name__ == "__main__":
|
|
@@ -1024,3 +1024,18 @@ part = 1
|
|
|
1024
1024
|
[epoch.test_epoch_as_none]
|
|
1025
1025
|
full = "1.2.3"
|
|
1026
1026
|
part = 0
|
|
1027
|
+
|
|
1028
|
+
[core-non-attributes.test-0000]
|
|
1029
|
+
clsname = "Base"
|
|
1030
|
+
attrname = "fdsfvdsff"
|
|
1031
|
+
attrvalue = 42
|
|
1032
|
+
|
|
1033
|
+
[core-non-attributes.test-0100]
|
|
1034
|
+
clsname = "Public"
|
|
1035
|
+
attrname = "fdsfvdsff"
|
|
1036
|
+
attrvalue = 42
|
|
1037
|
+
|
|
1038
|
+
[core-non-attributes.test-0200]
|
|
1039
|
+
clsname = "Qual"
|
|
1040
|
+
attrname = "fdsfvdsff"
|
|
1041
|
+
attrvalue = 42
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|