Skip to content

Commit

Permalink
uv/tests: fix for 'pysocks' optional dependency for 'requests'
Browse files Browse the repository at this point in the history
This comes from this dependency specification:

    dependencies = ["requests", "requests[socks] ; python_version < '3.10'"]

Previously, the `pysocks` dependency was unconditionally included when
the `socks` extra was enabled. But it should only be included when
`python_version < '3.10'`, which is now reflected here via a marker.
  • Loading branch information
BurntSushi committed Aug 7, 2024
1 parent ba71e70 commit b9949f0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/uv/tests/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,10 @@ fn lock_conditional_dependency_extra() -> Result<()> {
lock, @r###"
version = 1
requires-python = ">=3.7"
environment-markers = [
"python_version < '3.10'",
"python_version >= '3.10'",
]
exclude-newer = "2024-03-25 00:00:00 UTC"
[[distribution]]
Expand Down Expand Up @@ -1074,7 +1078,7 @@ fn lock_conditional_dependency_extra() -> Result<()> {
[distribution.optional-dependencies]
socks = [
{ name = "pysocks" },
{ name = "pysocks", marker = "python_version < '3.10'" },
]
[[distribution]]
Expand Down

0 comments on commit b9949f0

Please sign in to comment.