Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py_require() checks and fails on 'equal' / 'not equal' Python version requests are used #1719

Merged
merged 5 commits into from
Jan 27, 2025

Conversation

edgararuiz
Copy link
Collaborator

  • uv run does not accept Python version ==3.11, and ==3.09. In this change, py_require() removes any == from Python version requirements
  • uv run does not accepts any combination of == requirements with non-equal requirements (>=, <=). In this change, py_require() checks and returns an informative error
  • uv run does not accept more than one, different, equal-to Python version. In this change, py_require() will check and return an error this occurs
  • Adds tests for the changes mentioned above, and updates tests that were sending equal and non-equal Python requirements
  • Unrelated, but just found out that newer pre-release versions of packages will modify the error output (https://pypi.org/project/tensorflow/#history), so switched the tests that requests a tensorflow 2.18 against an older snapshot from expect error test.
── Failure (test-py_require.R:12:3): Error requesting newer package version against an older snapshot ──
Snapshot of code has changed:
old[9:21] vs new[9:23]
    > py_require(exclude_newer = "2024-10-20")
    > uv_get_or_create_env()
      × No solution found when resolving `--with` dependencies:
-     ╰─▶ Because only tensorflow<2.18.dev0 is available and you require
-         tensorflow>=2.18.dev0, we can conclude that your requirements are
-         unsatisfiable.
+     ╰─▶ Because only the following versions of tensorflow are available:
+             tensorflow<2.18.dev0
+             tensorflow>2.19.dev0
+         and you require tensorflow>=2.18.dev0,<2.19.dev0, we can conclude that
+         your requirements are unsatisfiable.

@t-kalinowski t-kalinowski merged commit 37c5af7 into main Jan 27, 2025
16 checks passed
@t-kalinowski
Copy link
Member

Thanks!

@t-kalinowski t-kalinowski deleted the py_require-python-versions branch January 27, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants