Commit Graph

160 Commits

Author SHA1 Message Date
Zanie Blue 7778a11b2d
Use more verbose spelling of "virtualenv" during creation (#7523)
This stands out alongside other messaging which uses the longer spelling
"virtual environment"
2024-09-18 21:22:37 -05:00
Mathieu Kniewallner 8341d810b2
docs: list supported sdist formats (#7168)
## Summary

Explicitly list the formats and extensions that uv supports, based on
[this
list](86ee8d2c01/crates/distribution-filename/src/extension.rs (L70-L77)).
Not a huge fan of adding the section in `concepts/resolution.md`, but I
did not find a better place. Alternatively we could maybe add a
dedicated page that shortly explains Python package types (wheels,
sdists), where such a section could live?

## Test Plan

Local run of the documentation.
2024-09-07 19:16:12 +00:00
Mathieu Kniewallner c9e4395322
docs: add missing `console` highlights (#6900)
## Summary

Spotted a few missing `console` highlights in the documentation.
2024-08-31 19:04:19 -04:00
Zanie Blue c56102bde3
Fix some broken links (#6705) 2024-08-27 17:24:49 +00:00
Boris Verkhovskiy 3355259ce6
Link to Trio (#6322) 2024-08-21 07:48:52 -05:00
Sergey Filimonov cd4855326c
Update README.md: Mention uvx is an alias for uv tool run (#6286)
<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

I think it's important to clarify that `uvx` is simply an alias for `uv
tool run`. This distinction helps avoid confusion about when to use `uv`
versus `uvx`. I thought the [blog
post](https://astral.sh/blog/uv-unified-python-packaging) explained this
well.

Just something that I ran into, I understand others may have a different
perspective!

## Test Plan

n/a

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-08-21 03:01:27 +00:00
Zanie Blue 2f86c674a8 Update README for uv 0.3.0 (#6165)
🚀
[Rendered](https://github.com/astral-sh/uv/tree/zb/3-readme?tab=readme-ov-file#uv)
2024-08-20 11:31:46 -05:00
Andrew Gallant 33480d61eb switch to jiff from chrono (#6205)
This PR migrates uv's use of `chrono` to `jiff`.

I did most of this work a while back as one of my tests to ensure Jiff
could actually be used in a real world project. I decided to revive
this because I noticed that `reqwest-retry` dropped its Chrono
dependency,
which is I believe the only other thing requiring Chrono in uv.
(Although, we use a fork of `reqwest-middleware` at present, and that
hasn't been updated to latest upstream yet. I wasn't quite sure of the
process we have for that.)

In course of doing this, I actually made two changes to uv:

First is that the lock file now writes an RFC 3339 timestamp for
`exclude-newer`. Previously, we were using Chrono's `Display`
implementation for this which is a non-standard but "human readable"
format. I think the right thing to do here is an RFC 3339 timestamp.

Second is that, in addition to an RFC 3339 timestamp, `--exclude-newer`
used to accept a "UTC date." But this PR changes it to a "local date."
That is, a date in the user's system configured time zone. I think
this makes more sense than a UTC date, but one alternative is to drop
support for a date and just rely on an RFC 3339 timestamp. The main
motivation here is that automatically assuming UTC is often somewhat
confusing, since just writing an unqualified date like `2024-08-19` is
often assumed to be interpreted relative to the writer's "local" time.
2024-08-20 11:31:46 -05:00
Jo f2d6718038
Update environment variables doc (#5994)
## Summary

This PR adds descriptions for the `UV_TOOL_DIR`, `UV_PYTHON_INSTALL_DIR`
and `XDG_*` environment variables.

Additionally, it moves some env vars that are not command-line arguments
to the below "uv respects" section.

Closes #5746
2024-08-16 08:13:40 -05:00
Charlie Marsh 15dfb660ab
Bump version to v0.2.37 (#6134) 2024-08-15 22:13:03 -04:00
Zanie Blue 8d66718077
Bump version to 0.2.36 (#6060) 2024-08-13 12:05:11 -05:00
Zanie Blue e097f948c9
Bump version to 0.2.35 (#5984) 2024-08-09 19:21:06 -05:00
Charlie Marsh f7110e0a07
Enable mirror for `python-build-standalone` downloads (#5719)
## Summary

This came up again recently, so decided to do it real quick.

Closes https://github.com/astral-sh/uv/issues/5224.
2024-08-07 21:34:19 -04:00
Charlie Marsh c681c5a33c
Bump version to v0.2.34 (#5889) 2024-08-07 16:33:53 -04:00
konsti 6e310f2702
Rewrite resolver docs (#5723)
This PR rewrites the resolver concept and adds a resolver internals page
targeted at power users.

The new resolution concept documentation has three parts:
* An introduction for people how never heard of "resolution" before, and
a motivating example what it does. I've also shoved the part about
equally valid resolutions in there.
* Features you commonly use: Non-universal vs. universal resolution,
lowest resolution amd pre-releases.
* Expert features, we don't advertise them, you'll only need them in
complex cases when you already know and i kept them to the reference
points you need in this case: Constraints, overrides and exclude-newer.

I intentionally didn't lay out any detail of the resolution itself, the
idea is that users get a vague sense of "uv has to select fitting
versions", but then they learn the options they have to use and some
common failure points without ever coming near SAT or even graphs.

The resolution internals reference page is targeted at power users who
need to understand what is going on behind the scenes. It assumes ample
prior knowledge and exists to explain the uv-specific behaviors for
someone who already understands dependency resolution conceptually and
has interacted with their dependency tree before. I had a section on the
lockfile but removed it because it found the lockfile to be too
self-documenting.

I haven't touched the readme.

Closes #5603
Closes #5238
Closes #5237

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-08-03 08:47:11 -05:00
konsti db371560bc
Use prettier to format the documentation (#5708)
To enforce the 100 character line limit in markdown files introduced in
https://github.com/astral-sh/uv/pull/5635, and to automate the
formatting of markdown files, i've added prettier and formatted our
markdown files with it.

I've excluded the changelog and the generated references documentation
from this for having too many changes, but we can also include them.

I'm not particular on which style we use. My main motivations are
(major) not having to reflow markdown files myself anymore and (minor)
consistence between all markdown files. I've chosen prettier for similar
reason as we chose black, it's a single good style that's automated and
shared in the community. I do prefer prettier's style of not breaking
inside of a link name though.

This PR is in two parts, the first adds prettier to CI and documents
using it, while the second actually formats the docs. When merge
conflicts arise, we can drop the last commit and regenerate it with `npx
prettier --prose-wrap always --write BENCHMARKS.md CONTRIBUTING.md
README.md STYLE.md docs/*.md docs/concepts/**/*.md docs/guides/**/*.md
docs/pip/**/*.md`.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-08-02 08:58:31 -05:00
Ahmed Ilyas ff9f3dede1
Support build constraints (#5639)
## Summary

Partially resolves #5561. Haven't added overrides support yet but I can
add it tomorrow if the current approach for constraints is ok.

## Test Plan

`cargo test`

Manually checked trace logs after changing the constraints.
2024-08-02 02:15:58 +00:00
Zanie Blue b14945a7b1
Bump version to 0.2.33 (#5712) 2024-08-01 21:39:17 +00:00
Charlie Marsh 38c232e466
Bump version to v0.2.32 (#5641) 2024-07-30 18:56:39 -04:00
Charlie Marsh 5d727cb0af
Deprecate the `--isolated` flag (#5466)
## Summary

This PR deprecates the `--isolated` flag. The treatment varies across
the APIs:

- For non-preview APIs, we warn but treat it as equivalent to
`--no-config`.
- For preview APIs, we warn and ignore it, with two exceptions...
- For `tool run` and `run` specifically, we don't even warn, because we
can't differentiate the command-specific `--isolated` from the global
`--isolated`.
2024-07-30 22:40:38 +00:00
Charlie Marsh 48162de974
Bump version to v0.2.31 (#5568) 2024-07-29 14:06:20 -04:00
Charlie Marsh 6901a14aa0
Bump version to v0.2.30 (#5486) 2024-07-26 13:36:05 -04:00
Charlie Marsh d51b429837
Add `--no-config` to replace `--isolated` (#5463)
## Summary

I'll deprecate `--isolated` separately, since it _is_ still used for
some other behaviors.

Closes #5428.
2024-07-25 19:58:36 -04:00
Zanie Blue 35b6726df5
Bump version to 0.2.29 (#5431) 2024-07-24 22:23:34 +00:00
Zanie Blue 3a85353707
Bump version to 0.2.28 (#5363) 2024-07-23 14:04:55 -05:00
Zanie Blue 833097b93f
Bump version to 0.2.27 (#5230) 2024-07-19 22:06:49 +00:00
Charlie Marsh fe403576c5
Bump version to v0.2.26 (#5149) 2024-07-17 12:51:11 -04:00
Charlie Marsh d1010228b3
Bump version to v0.2.25 (#5083) 2024-07-15 22:38:59 +00:00
Charlie Marsh b629ab89c5
Set absolute URLs prior to uploading to PyPI (#5038)
## Summary

Closes https://github.com/astral-sh/uv/issues/5030.
2024-07-13 17:29:21 +00:00
Zanie Blue 527b711bc7
Bump version to 0.2.24 (#4974) 2024-07-10 13:50:12 -05:00
Janosh Riebesell 8da91f5a97
Remove confusing punctuation in readme (#4929)
admittedly, nitpick PR but i initially misread the trailing dot in

```
# Create a virtual environment at .venv.
```

as part of the directory name, i.e. that the env would be placed in
`.venv.`
2024-07-09 13:01:07 -05:00
Zanie Blue 4bc36c0cb8
Bump version to 0.2.23 (#4903) 2024-07-08 12:29:37 -05:00
Charlie Marsh f5e84bbbab
Bump version to v0.2.22 (#4862) 2024-07-07 19:23:38 +00:00
Charlie Marsh f450b45780
Add `UV_OVERRIDE` environment variable for `--override` (#4836)
Closes https://github.com/astral-sh/uv/issues/4827
2024-07-05 16:03:17 -05:00
Zanie Blue ebfe6d8fcc
Bump version to 0.2.21 (#4757) 2024-07-03 04:27:00 +00:00
Zanie Blue e88e1373e6
Bump version to 0.2.20 (#4745) 2024-07-02 22:30:43 +00:00
Zanie Blue c5bf64abeb
Bump version to 0.2.19 (#4738) 2024-07-02 21:15:58 +00:00
Charlie Marsh 13b0beb56f
Bump version to v0.2.18 (#4650) 2024-06-29 14:30:01 -04:00
Zanie Blue 2eb1e6693c
Bump version to 0.2.17 (#4573) 2024-06-26 23:16:44 +00:00
Charlie Marsh 95b4aacc25
Bump version to v0.2.16 (#4561) 2024-06-26 17:00:09 -04:00
Zanie Blue bfc342da94
Bump version to 0.2.15 (#4475)
Releasing 0.2.15 with a few additions over 0.2.14. Motivated by the
incorrect tagging of 0.2.14 (#4474).

Generated the changelog with a small patch to Rooster allowing me to
force the previous commit to be correct.

```diff
diff --git a/src/rooster/_cli.py b/src/rooster/_cli.py
index 2a4f61b..4ec1299 100644
--- a/src/rooster/_cli.py
+++ b/src/rooster/_cli.py
@@ -38,6 +38,7 @@ def release(
     without_sections: list[str] = typer.Option(
         [], help="Sections to exclude from the changelog"
     ),
+    previous_commit: str = None,
 ):
     """
     Create a new release.
@@ -58,7 +59,11 @@ def release(
         typer.echo("It looks like there are no version tags for this project.")
 
     # Get the commits since the last release
-    changes = list(get_commits_between(config, repo, last_version))
+    changes = list(
+        get_commits_between(
+            config, repo, last_version, force_first_commit=previous_commit
+        )
+    )
     since = "since last release" if last_version else "in the project"
     typer.echo(f"Found {len(changes)} commits {since}.")
 
diff --git a/src/rooster/_git.py b/src/rooster/_git.py
index 597bb88..66bc54e 100644
--- a/src/rooster/_git.py
+++ b/src/rooster/_git.py
@@ -29,12 +29,13 @@ def get_commits_between(
     target: Path,
     first_version: Version | None = None,
     second_version: Version | None = None,
+    force_first_commit: str | None = None,
 ) -> Generator[git.Commit, None, None]:
     """
     Yield all commits between two tags
     """
     repo = git.repository.Repository(target.absolute())
-    first_commit = (
+    first_commit = force_first_commit or (
         repo.lookup_reference(
             TAG_PREFIX + config.version_tag_prefix + str(first_version)
         )
```
2024-06-24 10:04:09 -05:00
Zanie Blue 64e07b68a8
Reapply "Bump version to 0.2.14" (#4472)
Restores #4431

This reverts commit 9ff6a5ed74 (#4436)
2024-06-24 09:14:16 -05:00
Zanie Blue 9ff6a5ed74
Revert "Bump version to 0.2.14 (#4431)" (#4436)
This reverts commit e0ad649c74.

We shouldn't be linking to this version in the readme.

See https://github.com/astral-sh/uv/issues/4432
2024-06-21 16:24:32 +00:00
Zanie Blue e0ad649c74
Bump version to 0.2.14 (#4431) 2024-06-20 13:58:10 -05:00
Zanie Blue fa6ed34105
Bump version to 0.2.13 (#4388) 2024-06-18 11:46:32 -05:00
Zanie Blue b8c0391667
Bump version to 0.2.12 (#4371) 2024-06-17 16:46:28 -05:00
Charlie Marsh c4483017ac
Add `UV_EXCLUDE_NEWER` environment variable (#4287)
## Summary

Closes https://github.com/astral-sh/uv/issues/4286.
2024-06-12 15:54:01 -04:00
Charlie Marsh 44041bccd2
Bump version to v0.2.11 (#4258) 2024-06-11 20:47:25 -04:00
samypr100 68abf85f0d
feat: mTLS support (#4171)
## Summary

Closes https://github.com/astral-sh/uv/issues/3626

This adds mTLS support to uv via the standard env var `SSL_CLIENT_CERT`.

## Test Plan

Tested locally using a [nginx proxy to
pypi](https://github.com/hauntsaninja/nginx_pypi_cache) using my own
self-signed ca + certs + client certs generated via
[mkcert](https://github.com/FiloSottile/mkcert). Used this proxy with
both uv and pip to make sure we have feature partity in mTLS
functionality.
2024-06-10 20:11:35 -05:00
Charlie Marsh c91fed550d
Document Windows 10 requirement (#4210)
## Summary

Closes https://github.com/astral-sh/uv/issues/4207.
2024-06-10 18:50:21 +00:00