Skip to content

Conversation

@charliermarsh
Copy link
Member

Summary

Closes #16818.

@charliermarsh charliermarsh added the bug Something isn't working label Nov 23, 2025
@charliermarsh charliermarsh marked this pull request as ready for review November 23, 2025 21:08
----- stderr -----
× No solution found when resolving dependencies:
╰─▶ Because only numpy==2.3.5 is available and numpy==2.3.5 has no wheels with a matching Python version tag (e.g., `cp312`), we can conclude that all versions of numpy cannot be used.
And because your project depends on numpy, we can conclude that your project's requirements are unsatisfiable.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Today, this resolution passes and the wheel is just omitted from the lockfile.

----- stderr -----
× No solution found when resolving dependencies:
╰─▶ Because only numpy==2.3.5 is available and numpy==2.3.5 has no Windows-compatible wheels, we can conclude that all versions of numpy cannot be used.
And because your project depends on numpy, we can conclude that your project's requirements are unsatisfiable.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here -- this passes too.

Copy link
Member

@konstin konstin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question about the resolver order, otherwise looks good.

for environment_marker in self.options.required_environments.iter().copied() {
// If the platform is part of the current environment...
if env.included_by_marker(environment_marker)
&& !find_environments(id, pubgrub).is_disjoint(environment_marker)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, we compute through which marker paths the package is currently reachable. Doesn't that mean we can miss an incompatible package if the dependency with a wider marker only appears later?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, maybe? But I think this is the same strategy as in the choose_version_registry path`.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we're getting saved by pseudo-packages having their version selection, with this PR this fails as it should:

[project]
name = "test-toml"
version = "0.1.0"
requires-python = ">=3.14"
dependencies = [
    'numpy; sys_platform == "win32"',
    'pandas',
]

[tool.uv]
required-environments = ['sys_platform == "linux"', 'sys_platform == "win32"']

[tool.uv.sources]
numpy = { url = "https://files.pythonhosted.org/packages/a3/2e/235b4d96619931192c91660805e5e49242389742a7a82c27665021db690c/numpy-2.3.5-cp314-cp314-win_amd64.whl" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

uv.lock doesn't include hashes for path-based wheels

3 participants