boxd 0.1.1.dev6__tar.gz → 0.1.1.dev7__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 (41) hide show
  1. {boxd-0.1.1.dev6/src/boxd.egg-info → boxd-0.1.1.dev7}/PKG-INFO +2 -2
  2. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/pyproject.toml +8 -2
  3. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/_version_check.py +46 -7
  4. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7/src/boxd.egg-info}/PKG-INFO +2 -2
  5. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd.egg-info/requires.txt +1 -1
  6. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/LICENSE +0 -0
  7. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/README.md +0 -0
  8. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/setup.cfg +0 -0
  9. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/__init__.py +0 -0
  10. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/_generated/__init__.py +0 -0
  11. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/_generated/api_pb2.py +0 -0
  12. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/_generated/api_pb2_grpc.py +0 -0
  13. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/_sync.py +0 -0
  14. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/_utils.py +0 -0
  15. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/aio.py +0 -0
  16. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/auth.py +0 -0
  17. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/box.py +0 -0
  18. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/boxes.py +0 -0
  19. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/client.py +0 -0
  20. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/disks.py +0 -0
  21. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/domains.py +0 -0
  22. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/errors.py +0 -0
  23. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/exec.py +0 -0
  24. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/networks.py +0 -0
  25. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/templates.py +0 -0
  26. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/tokens.py +0 -0
  27. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd/types.py +0 -0
  28. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd.egg-info/SOURCES.txt +0 -0
  29. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd.egg-info/dependency_links.txt +0 -0
  30. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/src/boxd.egg-info/top_level.txt +0 -0
  31. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/tests/test_auth.py +0 -0
  32. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/tests/test_boxes.py +0 -0
  33. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/tests/test_e2e.py +0 -0
  34. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/tests/test_e2e_v2.py +0 -0
  35. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/tests/test_exec.py +0 -0
  36. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/tests/test_files.py +0 -0
  37. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/tests/test_lifecycle.py +0 -0
  38. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/tests/test_proxies.py +0 -0
  39. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/tests/test_utils.py +0 -0
  40. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/tests/test_v2.py +0 -0
  41. {boxd-0.1.1.dev6 → boxd-0.1.1.dev7}/tests/test_version_check.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boxd
3
- Version: 0.1.1.dev6
3
+ Version: 0.1.1.dev7
4
4
  Summary: Python SDK for the boxd cloud VM platform
5
5
  Author: Azin
6
6
  License-Expression: MIT
@@ -22,7 +22,7 @@ Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
23
  Requires-Dist: grpcio>=1.60
24
24
  Requires-Dist: protobuf>=4.25
25
- Requires-Dist: httpx>=0.27
25
+ Requires-Dist: httpx<1,>=0.27
26
26
  Provides-Extra: dev
27
27
  Requires-Dist: grpcio-tools>=1.60; extra == "dev"
28
28
  Requires-Dist: pytest>=8; extra == "dev"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "boxd"
3
- version = "0.1.1.dev6"
3
+ version = "0.1.1.dev7"
4
4
  description = "Python SDK for the boxd cloud VM platform"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -22,7 +22,13 @@ classifiers = [
22
22
  dependencies = [
23
23
  "grpcio>=1.60",
24
24
  "protobuf>=4.25",
25
- "httpx>=0.27",
25
+ # Cap below 1.0: httpx 1.0 (currently in pre-release as 1.0.devN)
26
+ # removed `httpx.AsyncClient`, which auth.py uses for the API-key →
27
+ # JWT exchange. Without this cap, anyone running `pip install --pre
28
+ # boxd` (necessary for staging dev builds) gets httpx 1.0.devN and
29
+ # the SDK crashes on the first call. Re-evaluate when httpx 1.0 ships
30
+ # stable and the AsyncClient migration path is documented.
31
+ "httpx>=0.27,<1",
26
32
  ]
27
33
 
28
34
  [project.urls]
@@ -100,15 +100,17 @@ class VersionCheckInterceptor(
100
100
 
101
101
 
102
102
  _SEMVER_RE = re.compile(r"^(\d+)\.(\d+)\.(\d+)(.*)$")
103
+ _SUFFIX_SEPARATORS_RE = re.compile(r"[.-]")
104
+ _SUFFIX_LETTER_DIGIT_RE = re.compile(r"(?<=\D)(?=\d)|(?<=\d)(?=\D)")
103
105
 
104
106
 
105
107
  def _compare_semver(a: str, b: str) -> int:
106
108
  """Return >0 if a > b, <0 if a < b, 0 if equal/unparseable.
107
109
 
108
110
  Handles pre-release suffixes ("0.1.1-dev.4", "0.1.1.dev4") by
109
- treating numeric-prefix ties as: release > pre-release, otherwise
110
- lexicographic suffix order. Unparseable input returns 0 never nag
111
- on garbage.
111
+ component-wise compare, numeric where both components are all-digits.
112
+ A release (no suffix) ranks above any pre-release of the same
113
+ numeric prefix. Unparseable input returns 0 — never nag on garbage.
112
114
  """
113
115
  pa = _SEMVER_RE.match(a.strip())
114
116
  pb = _SEMVER_RE.match(b.strip())
@@ -123,8 +125,45 @@ def _compare_semver(a: str, b: str) -> int:
123
125
  return 1
124
126
  if sa != "" and sb == "":
125
127
  return -1
126
- if sa < sb:
127
- return -1
128
- if sa > sb:
129
- return 1
128
+ return _compare_suffix(sa, sb)
129
+
130
+
131
+ def _compare_suffix(a: str, b: str) -> int:
132
+ if a == b:
133
+ return 0
134
+ parts_a = _parse_suffix(a)
135
+ parts_b = _parse_suffix(b)
136
+ for i in range(max(len(parts_a), len(parts_b))):
137
+ pa = parts_a[i] if i < len(parts_a) else None
138
+ pb = parts_b[i] if i < len(parts_b) else None
139
+ if pa is None:
140
+ return -1 # shorter prerelease ranks lower
141
+ if pb is None:
142
+ return 1
143
+ na = int(pa) if pa.isdigit() else None
144
+ nb = int(pb) if pb.isdigit() else None
145
+ if na is not None and nb is not None:
146
+ if na != nb:
147
+ return na - nb
148
+ elif na is not None:
149
+ return -1 # numeric < alphanumeric (SemVer §11.4.3)
150
+ elif nb is not None:
151
+ return 1
152
+ elif pa != pb:
153
+ return -1 if pa < pb else 1
130
154
  return 0
155
+
156
+
157
+ def _parse_suffix(s: str) -> list[str]:
158
+ """Decompose "-dev.6" / ".dev6" into ["dev", "6"]."""
159
+ if not s:
160
+ return []
161
+ stripped = s.lstrip("-.")
162
+ if not stripped:
163
+ return []
164
+ components: list[str] = []
165
+ for piece in _SUFFIX_SEPARATORS_RE.split(stripped):
166
+ if not piece:
167
+ continue
168
+ components.extend(p for p in _SUFFIX_LETTER_DIGIT_RE.split(piece) if p)
169
+ return components
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boxd
3
- Version: 0.1.1.dev6
3
+ Version: 0.1.1.dev7
4
4
  Summary: Python SDK for the boxd cloud VM platform
5
5
  Author: Azin
6
6
  License-Expression: MIT
@@ -22,7 +22,7 @@ Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
23
  Requires-Dist: grpcio>=1.60
24
24
  Requires-Dist: protobuf>=4.25
25
- Requires-Dist: httpx>=0.27
25
+ Requires-Dist: httpx<1,>=0.27
26
26
  Provides-Extra: dev
27
27
  Requires-Dist: grpcio-tools>=1.60; extra == "dev"
28
28
  Requires-Dist: pytest>=8; extra == "dev"
@@ -1,6 +1,6 @@
1
1
  grpcio>=1.60
2
2
  protobuf>=4.25
3
- httpx>=0.27
3
+ httpx<1,>=0.27
4
4
 
5
5
  [dev]
6
6
  grpcio-tools>=1.60
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