uv/crates
Garth Kidd 7909e9650f
Remove unused import. (#6996)
`_virtualenv.py` doesn't need to import `__future__.annotations`, as it
has none.

Removing the import:

* Restores the action of the VIRTUALENV_PATCH on Python 3.6

* Eliminates 24 lines of error messages displayed by Python 3.6 when it
starts in an environment created by uv:

```plaintext
Error processing line 1 of /tmp/tmp.ENwqZ0oeyb/lib/python3.6/site-packages/_virtualenv.pth:

  Traceback (most recent call last):
    File "~/.pyenv/versions/3.6.15/lib/python3.6/site.py", line 168, in addpackage
      exec(line)
    File "<string>", line 1, in <module>
    File "/tmp/tmp.ENwqZ0oeyb/lib/python3.6/site-packages/_virtualenv.py", line 3
      from __future__ import annotations
                                       ^
  SyntaxError: future feature annotations is not defined

Remainder of file ignored
```

(Python displays the errors above twice.)

I appreciate the Python team no longer support Python 3.6, but
RedHat-style Linux distributions will support Python 3.6 in their
`/usr/libexec/platform-python` until [releasever 8 expires in
2029](https://access.redhat.com/support/policy/updates/errata#RHEL8_Planning_Guide).
I'm happy for the community to move on, in general, but don't see the
harm in helping those who can't.

I'm not yet sure what in the “remainder of file ignored” is necessary
for my project's build, as I haven't yet finished digging that from
under Hatch. I'll follow up on #6426 when I do, so we can concentrate on
getting to the happy cow.

## Test Plan

```sh
( set -eu
  export VIRTUAL_ENV="$(mktemp -d)"
  ./target/release/uv venv "$VIRTUAL_ENV" --python=python3.6
  ./target/release/uv pip install cowsay        
  $VIRTUAL_ENV/bin/python -m cowsay --text 'Look, a talking cow!' )
  ```
  
Happy output:

```plaintext
Using Python 3.6.15 interpreter at: ~/.local/bin/python3.6
Creating virtualenv at: /tmp/tmp.VHl4XNi3oI
Activate with: source /tmp//tmp.VHl4XNi3oI/bin/activate
Resolved 1 package in 929ms
Installed 1 package in 17ms
 + cowsay==6.0
  ____________________
| Look, a talking cow! |
  ====================
                    \
                     \
                       ^__^
                       (oo)\_______
                       (__)\       )\/\
                           ||----w |
                           ||     ||
```

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-09-04 09:40:58 -04:00
..
bench Use lower-bound semantics for all Python compatibility comparisons (#6882) 2024-09-02 18:23:42 +00:00
cache-key Use hasher to compute resolution hash (#5495) 2024-07-26 23:24:09 +00:00
distribution-filename Lift requirement that .egg-info filenames must include version (#6179) 2024-08-18 13:04:40 -04:00
distribution-types ci(windows): Introduce setup-dev-drive.ps1, maximize dev drive usage (#6858) 2024-08-30 08:54:25 -04:00
install-wheel-rs Parses wheels WHEEL and METADATA files content as email messages (#6616) 2024-08-25 18:31:07 -04:00
once-map Use FxHash in uv-auth (#6149) 2024-08-16 13:14:51 -04:00
pep440-rs Fix typos (#6891) 2024-08-30 19:45:33 -04:00
pep508-rs Normalize specifiers by sorting (#6333) 2024-08-29 21:06:19 +00:00
platform-tags allow manylinux compatibility override via _manylinux module. (#6039) 2024-08-21 01:57:42 +00:00
pypi-types Avoid using editable tag in lockfile for non-package dependencies (#6728) 2024-08-28 01:19:05 +00:00
requirements-txt Avoid using editable tag in lockfile for non-package dependencies (#6728) 2024-08-28 01:19:05 +00:00
uv Remove unused import. (#6996) 2024-09-04 09:40:58 -04:00
uv-auth Fix typos in docs, error messages and comments (#6910) 2024-09-01 11:37:43 +00:00
uv-build Stream build backend output to debug! (#6903) 2024-09-02 19:46:09 +00:00
uv-cache Avoid canonicalizing cache directory (#6949) 2024-09-03 00:11:44 +00:00
uv-cli Pin .python-version in uv init (#6869) 2024-09-03 19:43:50 -04:00
uv-client Make headers title case for backward compatibility (#6887) 2024-09-03 13:28:45 -04:00
uv-configuration Add source distribution support to uv-build crate (#6896) 2024-09-02 18:14:49 +00:00
uv-dev Show env option in CLI reference documentation (#6863) 2024-09-03 12:10:49 -05:00
uv-dispatch Use separate types to represent raw vs. resolver markers (#6646) 2024-08-26 18:00:21 +00:00
uv-distribution Avoid deadlocks when multiple uv processes lock resources (#6790) 2024-08-29 11:16:14 -05:00
uv-extract Enforce extension validity at parse time (#5888) 2024-08-08 21:39:47 -04:00
uv-fs Remove canonicalize calls (#6919) 2024-09-01 18:23:11 +00:00
uv-git Avoid deadlocks when multiple uv processes lock resources (#6790) 2024-08-29 11:16:14 -05:00
uv-installer Differentiate startup and compile timeouts (#6958) 2024-09-03 10:32:43 +02:00
uv-macros Autogenerate possible values for enums in reference documentation (#5137) 2024-07-17 12:37:33 -04:00
uv-normalize Support dev dependencies in virtual workspace roots (#5709) 2024-08-01 21:04:30 +00:00
uv-options-metadata Autogenerate possible values for enums in reference documentation (#5137) 2024-07-17 12:37:33 -04:00
uv-pubgrub Respect the user's upper-bound in requires-python (#6824) 2024-08-29 18:37:05 +00:00
uv-python Pin .python-version in uv init (#6869) 2024-09-03 19:43:50 -04:00
uv-requirements Avoid using editable tag in lockfile for non-package dependencies (#6728) 2024-08-28 01:19:05 +00:00
uv-resolver Prune unreachable wheels from lockfile (#6961) 2024-09-04 11:08:37 +02:00
uv-scripts Avoid writing invalid PEP 723 scripts on tool.uv.sources (#6706) 2024-08-27 17:49:08 +00:00
uv-settings Use windows registry to discover python (#6761) 2024-08-29 22:48:22 +02:00
uv-shell Expand tildes when matching against PATH (#6829) 2024-08-29 19:50:09 +00:00
uv-state Migrate to XDG and Linux strategy for macOS directories (#5806) 2024-08-20 11:31:46 -05:00
uv-tool Avoid deadlocks when multiple uv processes lock resources (#6790) 2024-08-29 11:16:14 -05:00
uv-trampoline fix: adjust close_handles pointer offsets to match distlib cleanup_fds (#6955) 2024-09-04 13:31:57 +02:00
uv-types Read hash from URL fragment if --hashes are omitted (#6731) 2024-08-28 00:03:01 +00:00
uv-version Bump version to v0.4.4 (#6988) 2024-09-04 00:30:38 +00:00
uv-virtualenv Remove unused import. (#6996) 2024-09-04 09:40:58 -04:00
uv-warnings Upgrade to Rust 1.80.0 (#5472) 2024-07-27 01:49:47 +00:00
uv-workspace Add warning when VIRTUAL_ENV is set but will not be respected in project commands (#6864) 2024-09-03 19:51:43 -04:00
README.md Use prettier to format the documentation (#5708) 2024-08-02 08:58:31 -05:00

Crates

bench

Functionality for benchmarking uv.

cache-key

Generic functionality for caching paths, URLs, and other resources across platforms.

distribution-filename

Parse built distribution (wheel) and source distribution (sdist) filenames to extract structured metadata.

distribution-types

Abstractions for representing built distributions (wheels) and source distributions (sdists), and the sources from which they can be downloaded.

install-wheel-rs

Install built distributions (wheels) into a virtual environment.]

once-map

A waitmap-like concurrent hash map for executing tasks exactly once.

pep440-rs

Utilities for interacting with Python version numbers and specifiers.

pep508-rs

Utilities for interacting with PEP 508 dependency specifiers.

platform-host

Functionality for detecting the current platform (operating system, architecture, etc.).

platform-tags

Functionality for parsing and inferring Python platform tags as per PEP 425.

uv

Command-line interface for the uv package manager.

uv-build

A PEP 517-compatible build frontend for uv.

uv-cache

Functionality for caching Python packages and associated metadata.

uv-client

Client for interacting with PyPI-compatible HTTP APIs.

uv-dev

Development utilities for uv.

uv-dispatch

A centralized struct for resolving and building source distributions in isolated environments. Implements the traits defined in uv-types.

uv-distribution

Client for interacting with built distributions (wheels) and source distributions (sdists). Capable of fetching metadata, distribution contents, etc.

uv-extract

Utilities for extracting files from archives.

uv-fs

Utilities for interacting with the filesystem.

uv-git

Functionality for interacting with Git repositories.

uv-installer

Functionality for installing Python packages into a virtual environment.

uv-python

Functionality for detecting and leveraging the current Python interpreter.

uv-normalize

Normalize package and extra names as per Python specifications.

uv-package

Types and functionality for working with Python packages, e.g., parsing wheel files.

uv-requirements

Utilities for reading package requirements from pyproject.toml and requirements.txt files.

uv-resolver

Functionality for resolving Python packages and their dependencies.

uv-shell

Utilities for detecting and manipulating shell environments.

uv-types

Shared traits for uv, to avoid circular dependencies.

pypi-types

General-purpose type definitions for types used in PyPI-compatible APIs.

uv-virtualenv

A venv replacement to create virtual environments in Rust.

uv-warnings

User-facing warnings for uv.

uv-workspace

Workspace abstractions for uv.

requirements-txt

Functionality for parsing requirements.txt files.