v440 2.0.0.dev110__tar.gz → 2.0.0.dev111__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 (45) hide show
  1. {v440-2.0.0.dev110/src/v440.egg-info → v440-2.0.0.dev111}/PKG-INFO +1 -1
  2. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/pyproject.toml +1 -1
  3. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/core/Qual.py +9 -6
  4. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/tests/test_version.py +3 -3
  5. {v440-2.0.0.dev110 → v440-2.0.0.dev111/src/v440.egg-info}/PKG-INFO +1 -1
  6. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/LICENSE.txt +0 -0
  7. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/MANIFEST.in +0 -0
  8. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/README.rst +0 -0
  9. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/setup.cfg +0 -0
  10. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/__init__.py +0 -0
  11. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/BaseStringer.py +0 -0
  12. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/Cfg.py +0 -0
  13. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/ListStringer.py +0 -0
  14. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/Pattern.py +0 -0
  15. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/SlotStringer.py +0 -0
  16. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/__init__.py +0 -0
  17. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/cfg.toml +0 -0
  18. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/guarding.py +0 -0
  19. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/qualparse/Digest.py +0 -0
  20. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/qualparse/__init__.py +0 -0
  21. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/qualparse/devs.py +0 -0
  22. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/qualparse/posts.py +0 -0
  23. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/qualparse/pres.py +0 -0
  24. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/qualparse/segmenting.py +0 -0
  25. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/releaseparse/__init__.py +0 -0
  26. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/releaseparse/deleting.py +0 -0
  27. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/releaseparse/getting.py +0 -0
  28. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/releaseparse/listing.py +0 -0
  29. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/releaseparse/numerals.py +0 -0
  30. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/releaseparse/ranging.py +0 -0
  31. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/_utils/releaseparse/setting.py +0 -0
  32. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/core/Base.py +0 -0
  33. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/core/Local.py +0 -0
  34. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/core/Public.py +0 -0
  35. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/core/Release.py +0 -0
  36. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/core/Version.py +0 -0
  37. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/core/VersionError.py +0 -0
  38. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/core/__init__.py +0 -0
  39. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/tests/__init__.py +0 -0
  40. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/tests/test_testdata.py +0 -0
  41. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440/tests/testdata.toml +0 -0
  42. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440.egg-info/SOURCES.txt +0 -0
  43. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440.egg-info/dependency_links.txt +0 -0
  44. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440.egg-info/requires.txt +0 -0
  45. {v440-2.0.0.dev110 → v440-2.0.0.dev111}/src/v440.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: v440
3
- Version: 2.0.0.dev110
3
+ Version: 2.0.0.dev111
4
4
  Summary: This project provides mutable version objects in accordance with PEP440.
5
5
  Author-email: Johannes <johannes.programming@gmail.com>
6
6
  License: The MIT License (MIT)
@@ -36,7 +36,7 @@ keywords = []
36
36
  name = "v440"
37
37
  readme = "README.rst"
38
38
  requires-python = ">=3.11"
39
- version = "2.0.0.dev110"
39
+ version = "2.0.0.dev111"
40
40
 
41
41
  [project.license]
42
42
  file = "LICENSE.txt"
@@ -96,13 +96,14 @@ class Qual(SlotStringer):
96
96
  m: Any
97
97
  x: Any
98
98
  y: Any
99
+ self.dev = None
100
+ self.post = None
99
101
  pre: Any = (None, None)
100
- post: Any = None
101
102
  while v:
102
103
  m = Pattern.QUALIFIERS.leftbound.search(v)
103
104
  v = v[m.end() :]
104
105
  if m.group("N"):
105
- post = m.group("N")
106
+ self.post = int(m.group("N"))
106
107
  continue
107
108
  x = m.group("l")
108
109
  y = m.group("n")
@@ -110,11 +111,10 @@ class Qual(SlotStringer):
110
111
  self.dev = int(y)
111
112
  continue
112
113
  if x in ("post", "r", "rev"):
113
- post = y
114
+ self.post = int(y)
114
115
  continue
115
116
  pre = x, y
116
117
  self.pre = pre
117
- self.post = post
118
118
 
119
119
  def _todict(self: Self) -> dict:
120
120
  return dict(pre=self.pre, post=self.post, dev=self.dev)
@@ -152,8 +152,11 @@ class Qual(SlotStringer):
152
152
 
153
153
  @post.setter
154
154
  @guard
155
- def post(self: Self, value: Any) -> None:
156
- self._post = qualparse.parse_post(value)
155
+ def post(self: Self, value: Optional[SupportsIndex]) -> None:
156
+ if value is None:
157
+ self._post = None
158
+ return
159
+ self._post: int = abs(operator.index(value))
157
160
 
158
161
  @property
159
162
  def pre(self: Self) -> tuple:
@@ -159,15 +159,15 @@ class TestExample(unittest.TestCase):
159
159
 
160
160
  def test_example_6(self: Self) -> None:
161
161
  v: Version = Version("1.2.3")
162
- v.public.qual.post = "post1"
162
+ v.public.qual.post = 1
163
163
  v.local.string = "local.7.dev"
164
164
  self.assertEqual(str(v), "1.2.3.post1+local.7.dev") # Post-release version
165
165
  self.assertEqual(format(v, "-1"), "1.2.post1+local.7.dev") # Formatted version
166
- v.public.qual.post = "post.2"
166
+ v.public.qual.post = 2
167
167
  self.assertEqual(str(v), "1.2.3.post2+local.7.dev") # Modified version
168
168
  v.public.qual.post = None
169
169
  self.assertEqual(str(v), "1.2.3+local.7.dev") # Modified without post
170
- v.public.qual.post = "post", 3
170
+ v.public.qual.post = 3
171
171
  v.local.sort()
172
172
  self.assertEqual(str(v), "1.2.3.post3+dev.local.7") # After sorting local
173
173
  v.local.append(8)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: v440
3
- Version: 2.0.0.dev110
3
+ Version: 2.0.0.dev111
4
4
  Summary: This project provides mutable version objects in accordance with PEP440.
5
5
  Author-email: Johannes <johannes.programming@gmail.com>
6
6
  License: The MIT License (MIT)
File without changes
File without changes
File without changes
File without changes