uv/python/uv
Zanie Blue 7a885eaa09
Add hint on build backend import with preview disabled (#9691)
See #9686

```
❯ uv run python -c "import uv; uv.build_sdist"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/zb/workspace/uv/python/uv/__init__.py", line 45, in __getattr__
    raise AttributeError(err)
AttributeError: Using `uv.build_sdist` is not allowed. The uv build backend requires preview mode to be 
                enabled, e.g., via the `UV_PREVIEW=1` environment variable.

❯ uv run python -c "import uv; uv.foo"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/zb/workspace/uv/python/uv/__init__.py", line 48, in __getattr__
    raise AttributeError(err)
AttributeError: module 'uv' has no attribute 'foo'

❯ uv run python -c "import uv; uv.find_uv_bin"
```
2024-12-06 14:08:00 -06:00
..
__init__.py Add hint on build backend import with preview disabled (#9691) 2024-12-06 14:08:00 -06:00
__main__.py Discover and prefer the parent interpreter when invoked with `python -m uv` (#3736) 2024-05-22 11:34:24 -05:00
_build_backend.py Check `python/uv/` folder with `mypy` (#7891) 2024-10-03 13:05:01 +01:00
_find_uv.py Add build backend scaffolding (#7662) 2024-09-24 19:23:17 +02:00
py.typed Expose find_uv_bin and declare typing support (#1728) 2024-02-20 09:21:58 -06:00