mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-01 12:24:15 +00:00
Previously, we had two python interpreter metadata structs, one in gourgeist and one in puffin. Both would spawn a subprocess to query overlapping metadata and both would appear in the cli crate, if you weren't careful you could even have to different base interpreters at once. This change unifies this to one set of metadata, queried and cached once. Another effect of this crate is proper separation of python interpreter and venv. A base interpreter (such as `/usr/bin/python/`, but also pyenv and conda installed python) has a set of metadata. A venv has a root and inherits the base python metadata except for `sys.prefix`, which unlike `sys.base_prefix`, gets set to the venv root. From the root and the interpreter info we can compute the paths inside the venv. We can reuse the interpreter info of the base interpreter when creating a venv without having to query the newly created `python`.
38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
# Generated by `stubgen -p pep440_rs`
|
|
from typing import Any, ClassVar
|
|
|
|
class Version:
|
|
dev: Any
|
|
epoch: Any
|
|
post: Any
|
|
pre: Any
|
|
release: Any
|
|
major: Any
|
|
minor: Any
|
|
micro: Any
|
|
|
|
@classmethod
|
|
def __init__(cls, *args, **kwargs) -> None: ...
|
|
def any_prerelease(self, *args, **kwargs) -> Any: ...
|
|
def parse_star(self, *args, **kwargs) -> Any: ...
|
|
def __eq__(self, other) -> Any: ...
|
|
def __ge__(self, other) -> Any: ...
|
|
def __gt__(self, other) -> Any: ...
|
|
def __hash__(self) -> Any: ...
|
|
def __le__(self, other) -> Any: ...
|
|
def __lt__(self, other) -> Any: ...
|
|
def __ne__(self, other) -> Any: ...
|
|
|
|
class VersionSpecifier:
|
|
__hash__: ClassVar[None] = ...
|
|
|
|
@classmethod
|
|
def __init__(cls, *args, **kwargs) -> None: ...
|
|
def contains(self, *args, **kwargs) -> Any: ...
|
|
def __contains__(self, other) -> Any: ...
|
|
def __eq__(self, other) -> Any: ...
|
|
def __ge__(self, other) -> Any: ...
|
|
def __gt__(self, other) -> Any: ...
|
|
def __le__(self, other) -> Any: ...
|
|
def __lt__(self, other) -> Any: ...
|
|
def __ne__(self, other) -> Any: ...
|