coiled 1.93.3.dev1__py3-none-any.whl → 1.93.3.dev2__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.
coiled/types.py CHANGED
@@ -1,3 +1,4 @@
1
+ import re
1
2
  from enum import Enum
2
3
  from logging import getLogger
3
4
  from pathlib import Path
@@ -152,6 +153,31 @@ class SoftwareEnvSpec(TypedDict):
152
153
  raw_conda: Optional[CondaEnvSchema]
153
154
 
154
155
 
156
+ # KNOWN_SUBDIRS is copied from conda's known subdirs
157
+ KNOWN_SUBDIRS = (
158
+ "noarch",
159
+ "emscripten-wasm32",
160
+ "wasi-wasm32",
161
+ "freebsd-64",
162
+ "linux-32",
163
+ "linux-64",
164
+ "linux-aarch64",
165
+ "linux-armv6l",
166
+ "linux-armv7l",
167
+ "linux-ppc64",
168
+ "linux-ppc64le",
169
+ "linux-riscv64",
170
+ "linux-s390x",
171
+ "osx-64",
172
+ "osx-arm64",
173
+ "win-32",
174
+ "win-64",
175
+ "win-arm64",
176
+ "zos-z",
177
+ )
178
+ KNOWN_SUBDIR_RE = re.compile(r"(?:/|^)(?:" + "|".join(KNOWN_SUBDIRS) + r")(?:/|$)", flags=re.IGNORECASE)
179
+
180
+
155
181
  # This function is in this module to prevent circular import issues
156
182
  def parse_conda_channel(package_name: str, channel: str, subdir: str) -> Tuple[Optional[str], str]:
157
183
  """Return a channel and channel_url for a conda package with any extra information removed."""
@@ -159,10 +185,20 @@ def parse_conda_channel(package_name: str, channel: str, subdir: str) -> Tuple[O
159
185
  if channel == "<unknown>":
160
186
  logger.warning(f"Channel for {package_name} is unknown, setting to conda-forge")
161
187
  channel = "conda-forge"
162
- # Strip subdir from channel
163
- for subdir_suffix in (f"/{subdir}", f"/{subdir}/"):
164
- if channel.endswith(subdir_suffix):
165
- channel = channel[: -len(subdir_suffix)]
188
+ # Remove all known subdirs from channel for noarch packages, because
189
+ # some versions of conda set the channel to the platform-specific
190
+ # channel, even if the package is noarch. This is a workaround for
191
+ # https://github.com/conda/conda/issues/14790
192
+ if subdir == "noarch":
193
+ channel = KNOWN_SUBDIR_RE.sub("", channel)
194
+ else:
195
+ # Strip correct subdir from channel (e.g. "linux-64" or "osx-arm64")
196
+ # We are conservative in this case, because theoretically
197
+ # a private channel could have a different subdir in its name
198
+ for subdir_suffix in (f"/{subdir}", f"/{subdir}/"):
199
+ if channel.endswith(subdir_suffix):
200
+ channel = channel[: -len(subdir_suffix)]
201
+
166
202
  # Handle channel urls
167
203
  if channel.startswith(("http:", "https:")):
168
204
  channel_url = channel
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coiled
3
- Version: 1.93.3.dev1
3
+ Version: 1.93.3.dev2
4
4
  Summary: Python client for coiled.io dask clusters
5
5
  Project-URL: Homepage, https://coiled.io
6
6
  Maintainer-email: Coiled <info@coiled.io>
@@ -21,7 +21,7 @@ coiled/software.py,sha256=poBlJYwFrDe9rThEHYx3tBmqne88w7c4EDTSRH_3NOw,8006
21
21
  coiled/software_utils.py,sha256=8sHLmqP7XKosO0KyjDtGxFW1CkPvx0LysTNSvXrIWFo,28814
22
22
  coiled/spans.py,sha256=JRlgzO7Y1pdUUlGQbWw-Z8zgxIdfP8f0T4gmv1pOip8,1987
23
23
  coiled/spark.py,sha256=kooZCZT4dLMG_AQEOlaf6gj86G3UdowDfbw-Eiq94MU,9059
24
- coiled/types.py,sha256=9sHri6ulvdwjXQexf39BlM25GW59-AVsSm0D6smo1Ws,12472
24
+ coiled/types.py,sha256=MbuI-ihqcGA8-rDaPFlmcg3JdZc22NQgiz_L26gjMGw,13546
25
25
  coiled/utils.py,sha256=ddNyFDbinaQ8cgKZV4ZsaguWTsz9oban3MY6-rIeDeY,74195
26
26
  coiled/websockets.py,sha256=BaCNiOgPVtm55R_rf1TK78tzoFSKLp4z2UCW7S57iNA,5956
27
27
  coiled/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -91,8 +91,8 @@ coiled/v2/widgets/__init__.py,sha256=Bt3GHTTyri-kFUaqGRVydDM-sCg5NdNujDg2RyvgV8U
91
91
  coiled/v2/widgets/interface.py,sha256=YeMQ5qdRbbpM04x9qIg2LE1xwxyRxFbdDYnkrwHazPk,301
92
92
  coiled/v2/widgets/rich.py,sha256=3rU5-yso92NdeEh3uSvEE-GwPNyp6i0Nb5PE5czXCik,28974
93
93
  coiled/v2/widgets/util.py,sha256=Y8qpGqwNzqfCzgyRFRy7vcscBoXqop-Upi4HLPpXLgg,3120
94
- coiled-1.93.3.dev1.dist-info/METADATA,sha256=Sig-7hgDpLEPABByvIf8qaYlaM_DqE-W-9TypVWZg3U,2225
95
- coiled-1.93.3.dev1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
96
- coiled-1.93.3.dev1.dist-info/entry_points.txt,sha256=C8dz1ST_bTlTO-kNvuHBJQma9PyJPotg0S4xpPt5aHY,47
97
- coiled-1.93.3.dev1.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
98
- coiled-1.93.3.dev1.dist-info/RECORD,,
94
+ coiled-1.93.3.dev2.dist-info/METADATA,sha256=2Ok3RWv2sBUfopg4IuyLcVUpFxetwGa93q6WvPob25w,2225
95
+ coiled-1.93.3.dev2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
96
+ coiled-1.93.3.dev2.dist-info/entry_points.txt,sha256=C8dz1ST_bTlTO-kNvuHBJQma9PyJPotg0S4xpPt5aHY,47
97
+ coiled-1.93.3.dev2.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
98
+ coiled-1.93.3.dev2.dist-info/RECORD,,