metaflow 2.18.6__py2.py3-none-any.whl → 2.18.7__py2.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.
@@ -60,6 +60,15 @@ class Pip(object):
60
60
  else:
61
61
  self.logger = lambda *args, **kwargs: None # No-op logger if not provided
62
62
 
63
+ def _get_resolved_python_version(self, prefix):
64
+ try:
65
+ result = self.micromamba._call(["list", "--prefix", prefix, "--json"])
66
+ for package in result:
67
+ if package.get("name") == "python":
68
+ return package["version"]
69
+ except Exception:
70
+ return None
71
+
63
72
  def solve(self, id_, packages, python, platform):
64
73
  prefix = self.micromamba.path_to_environment(id_)
65
74
  if prefix is None:
@@ -67,13 +76,19 @@ class Pip(object):
67
76
  msg += "for id {id}".format(id=id_)
68
77
  raise PipException(msg)
69
78
 
79
+ resolved_python = self._get_resolved_python_version(prefix)
80
+ if not resolved_python:
81
+ raise PipException(
82
+ "Could not determine Python version from conda environment"
83
+ )
84
+
70
85
  debug.conda_exec("Solving packages for PyPI environment %s" % id_)
71
86
  with tempfile.TemporaryDirectory() as tmp_dir:
72
87
  report = "{tmp_dir}/report.json".format(tmp_dir=tmp_dir)
73
88
  implementations, platforms, abis = zip(
74
89
  *[
75
90
  (tag.interpreter, tag.platform, tag.abi)
76
- for tag in pip_tags(python, platform)
91
+ for tag in pip_tags(resolved_python, platform)
77
92
  ]
78
93
  )
79
94
  custom_index_url, extra_index_urls = self.indices(prefix)
@@ -142,6 +157,13 @@ class Pip(object):
142
157
 
143
158
  def download(self, id_, packages, python, platform):
144
159
  prefix = self.micromamba.path_to_environment(id_)
160
+
161
+ resolved_python = self._get_resolved_python_version(prefix)
162
+ if not resolved_python:
163
+ raise PipException(
164
+ "Could not determine Python version from conda environment"
165
+ )
166
+
145
167
  metadata_file = METADATA_FILE.format(prefix=prefix)
146
168
  # download packages only if they haven't ever been downloaded before
147
169
  if os.path.isfile(metadata_file):
@@ -192,7 +214,11 @@ class Pip(object):
192
214
  if os.path.isfile(os.path.join(path, f)) and f.endswith(".whl")
193
215
  ]
194
216
  if (
195
- len(set(pip_tags(python, platform)).intersection(wheel_tags(wheel)))
217
+ len(
218
+ set(pip_tags(resolved_python, platform)).intersection(
219
+ wheel_tags(wheel)
220
+ )
221
+ )
196
222
  == 0
197
223
  ):
198
224
  raise PipException(
@@ -211,7 +237,7 @@ class Pip(object):
211
237
  implementations, platforms, abis = zip(
212
238
  *[
213
239
  (tag.interpreter, tag.platform, tag.abi)
214
- for tag in pip_tags(python, platform)
240
+ for tag in pip_tags(resolved_python, platform)
215
241
  ]
216
242
  )
217
243
 
metaflow/version.py CHANGED
@@ -1 +1 @@
1
- metaflow_version = "2.18.6"
1
+ metaflow_version = "2.18.7"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: metaflow
3
- Version: 2.18.6
3
+ Version: 2.18.7
4
4
  Summary: Metaflow: More AI and ML, Less Engineering
5
5
  Author: Metaflow Developers
6
6
  Author-email: help@metaflow.org
@@ -26,7 +26,7 @@ License-File: LICENSE
26
26
  Requires-Dist: requests
27
27
  Requires-Dist: boto3
28
28
  Provides-Extra: stubs
29
- Requires-Dist: metaflow-stubs==2.18.6; extra == "stubs"
29
+ Requires-Dist: metaflow-stubs==2.18.7; extra == "stubs"
30
30
  Dynamic: author
31
31
  Dynamic: author-email
32
32
  Dynamic: classifier
@@ -36,7 +36,7 @@ metaflow/tuple_util.py,sha256=_G5YIEhuugwJ_f6rrZoelMFak3DqAR2tt_5CapS1XTY,830
36
36
  metaflow/unbounded_foreach.py,sha256=p184WMbrMJ3xKYHwewj27ZhRUsSj_kw1jlye5gA9xJk,387
37
37
  metaflow/util.py,sha256=g2SOU_CRzJLgDM_UGF9QDMANMAIHAsDRXE6S76_YzsY,14594
38
38
  metaflow/vendor.py,sha256=A82CGHfStZGDP5pQ5XzRjFkbN1ZC-vFmghXIrzMDDNg,5868
39
- metaflow/version.py,sha256=Pn7zOYZ6qYMTNx9fPEWG0JaDYLz3PooxX1CgtYpj3hA,28
39
+ metaflow/version.py,sha256=AIRLGaVLM-FX3-8i8T2EI3rpQbi7la4g-ypfTc6tIww,28
40
40
  metaflow/_vendor/__init__.py,sha256=y_CiwUD3l4eAKvTVDZeqgVujMy31cAM1qjAB-HfI-9s,353
41
41
  metaflow/_vendor/typing_extensions.py,sha256=q9zxWa6p6CzF1zZvSkygSlklduHf_b3K7MCxGz7MJRc,134519
42
42
  metaflow/_vendor/zipp.py,sha256=ajztOH-9I7KA_4wqDYygtHa6xUBVZgFpmZ8FE74HHHI,8425
@@ -361,7 +361,7 @@ metaflow/plugins/pypi/conda_decorator.py,sha256=fXG9EvImP4Eqle_Trhb3tQhs40xTc4cx
361
361
  metaflow/plugins/pypi/conda_environment.py,sha256=j6QaIWmP50K2veN6Sywa04S2hfByR1YMqy7OyZpwvYs,24925
362
362
  metaflow/plugins/pypi/micromamba.py,sha256=UltfY8NmLphfZ-AbpaMFIdxIeOXLdTYDrMrabvPrYVU,17352
363
363
  metaflow/plugins/pypi/parsers.py,sha256=gpOOG2Ph95wI73MWCAi7XjpK0gYhv5k5YIGBs73QPuE,8556
364
- metaflow/plugins/pypi/pip.py,sha256=WhPyA18RoVT40sqbZRJdCEij4euL9PZwLfm1SrAKqmU,14333
364
+ metaflow/plugins/pypi/pip.py,sha256=N5C3tjuWG2pr4VGZR8YgnRc0HwfRL7LZmOnxxA9ZmEc,15239
365
365
  metaflow/plugins/pypi/pypi_decorator.py,sha256=sBxmDH3WIWVfJDsSauiMy58fevOJuJeLSuS6MnIpw44,7312
366
366
  metaflow/plugins/pypi/pypi_environment.py,sha256=FYMg8kF3lXqcLfRYWD83a9zpVjcoo_TARqMGZ763rRk,230
367
367
  metaflow/plugins/pypi/utils.py,sha256=W8OhDrhz7YIE-2MSSN5Rj7AmESwsN5YDmdnro152J4w,3551
@@ -428,12 +428,12 @@ metaflow/user_decorators/mutable_flow.py,sha256=EywKTN3cnXPQF_s62wQaC4a4aH14j8oe
428
428
  metaflow/user_decorators/mutable_step.py,sha256=-BY0UDXf_RCAEnC5JlLzEXGdiw1KD9oSrSxS_SWaB9Y,16791
429
429
  metaflow/user_decorators/user_flow_decorator.py,sha256=2yDwZq9QGv9W-7kEuKwa8o4ZkTvuHJ5ESz7VVrGViAI,9890
430
430
  metaflow/user_decorators/user_step_decorator.py,sha256=4558NR8RJtN22OyTwCXO80bAMhMTaRGMoX12b1GMcPc,27232
431
- metaflow-2.18.6.data/data/share/metaflow/devtools/Makefile,sha256=TT4TCq8ALSfqYyGqDPocN5oPcZe2FqoCZxmGO1LmyCc,13760
432
- metaflow-2.18.6.data/data/share/metaflow/devtools/Tiltfile,sha256=Ty5p6AD3MwJAcAnOGv4yMz8fExAsnNQ11r8whK6uzzw,21381
433
- metaflow-2.18.6.data/data/share/metaflow/devtools/pick_services.sh,sha256=DCnrMXwtApfx3B4S-YiZESMyAFHbXa3VuNL0MxPLyiE,2196
434
- metaflow-2.18.6.dist-info/licenses/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
435
- metaflow-2.18.6.dist-info/METADATA,sha256=JzuYlrkoFTlpyNqOTpGLHbAyaze0Z7zLRLQ-186L3No,6740
436
- metaflow-2.18.6.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
437
- metaflow-2.18.6.dist-info/entry_points.txt,sha256=RvEq8VFlgGe_FfqGOZi0D7ze1hLD0pAtXeNyGfzc_Yc,103
438
- metaflow-2.18.6.dist-info/top_level.txt,sha256=v1pDHoWaSaKeuc5fKTRSfsXCKSdW1zvNVmvA-i0if3o,9
439
- metaflow-2.18.6.dist-info/RECORD,,
431
+ metaflow-2.18.7.data/data/share/metaflow/devtools/Makefile,sha256=TT4TCq8ALSfqYyGqDPocN5oPcZe2FqoCZxmGO1LmyCc,13760
432
+ metaflow-2.18.7.data/data/share/metaflow/devtools/Tiltfile,sha256=Ty5p6AD3MwJAcAnOGv4yMz8fExAsnNQ11r8whK6uzzw,21381
433
+ metaflow-2.18.7.data/data/share/metaflow/devtools/pick_services.sh,sha256=DCnrMXwtApfx3B4S-YiZESMyAFHbXa3VuNL0MxPLyiE,2196
434
+ metaflow-2.18.7.dist-info/licenses/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
435
+ metaflow-2.18.7.dist-info/METADATA,sha256=rjd-ZidDUaQyWvbyExLrzZmadNpHPsqEiOkg-TRTlZ4,6740
436
+ metaflow-2.18.7.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
437
+ metaflow-2.18.7.dist-info/entry_points.txt,sha256=RvEq8VFlgGe_FfqGOZi0D7ze1hLD0pAtXeNyGfzc_Yc,103
438
+ metaflow-2.18.7.dist-info/top_level.txt,sha256=v1pDHoWaSaKeuc5fKTRSfsXCKSdW1zvNVmvA-i0if3o,9
439
+ metaflow-2.18.7.dist-info/RECORD,,