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

uv init creates project with warning about Requires-Python #5299

Closed
zanieb opened this issue Jul 22, 2024 · 2 comments · Fixed by #5322
Closed

uv init creates project with warning about Requires-Python #5299

zanieb opened this issue Jul 22, 2024 · 2 comments · Fixed by #5322
Assignees
Labels
bug Something isn't working preview Experimental behavior

Comments

@zanieb
Copy link
Member

zanieb commented Jul 22, 2024

❯ mkdir example
❯ cd example
❯ uv init
warning: `uv init` is experimental and may change without warning
Initialized project example
❯ tree .
.
├── README.md
├── pyproject.toml
└── src
    └── example
        └── __init__.py

3 directories, 3 files
❯ uv run -- python -c "import example"
warning: `uv run` is experimental and may change without warning
Using Python 3.12.1 interpreter at: /Users/zb/Library/Application Support/uv/python/cpython-3.12.1-macos-aarch64-none/bin/python3
Creating virtualenv at: .venv
warning: No `requires-python` field found in the workspace. Defaulting to `>=3.12`.
Resolved 1 package in 2ms
   Built example @ file:///Users/zb/workspace/example
Prepared 1 package in 1.02s
Installed 1 package in 0.86ms
 + example==0.1.0 (from file:///Users/zb/workspace/example)

We should set a Python requirement to avoid creating warnings in our own tool:

warning: No requires-python field found in the workspace. Defaulting to >=3.12.

@charliermarsh charliermarsh added bug Something isn't working preview Experimental behavior labels Jul 22, 2024
@charliermarsh
Copy link
Member

Is it just: the version of the current interpreter?

@zanieb
Copy link
Member Author

zanieb commented Jul 22, 2024

Probably. Or our "default" (the latest) Python version if that's not present?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working preview Experimental behavior
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants