Skip to content

fix: switch to python-discovery#2196

Merged
cjames23 merged 3 commits intopypa:masterfrom
flying-sheep:python-discovery
Feb 26, 2026
Merged

fix: switch to python-discovery#2196
cjames23 merged 3 commits intopypa:masterfrom
flying-sheep:python-discovery

Conversation

@flying-sheep
Copy link
Copy Markdown
Contributor

Fixes #2193 using public APIs only

@icfly2
Copy link
Copy Markdown

icfly2 commented Feb 26, 2026

the test failiures appear to be unrelated to the changes in the PR

Copy link
Copy Markdown
Member

@cjames23 cjames23 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for jumping on this!

@cjames23 cjames23 merged commit 49aa852 into pypa:master Feb 26, 2026
92 of 99 checks passed
@flying-sheep flying-sheep deleted the python-discovery branch February 26, 2026 16:37
@flying-sheep
Copy link
Copy Markdown
Contributor Author

np! btw, no idea why the “Allow edits and access to secrets by maintainers” was off, I actually really prefer when maintainers can edit my forks.

@jorng
Copy link
Copy Markdown

jorng commented Feb 26, 2026

Any chance we can get a rapid one-off release for this? It has broken a lot of CI pipelines, and it would be much easier if there was a release to resolve this, instead of having to pin a version of virtualenv in all projects using hatch.

finally:
virtualenv_discovery.propose_interpreters = propose_interpreters
python_info = python_discovery.get_interpreter(
python_version, (), env=self.get_interpreter_resolver_env(), predicate=self._interpreter_is_compatible
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Awesome!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks to @gaborbernat’s super fast response!

Sometimes all you have to do is ask. If you can think of any other monkey patching done in the code base, maybe it’s a good time to ask the relevant projects to add these respective features?

R7L208 added a commit to databrickslabs/tempo that referenced this pull request Mar 3, 2026
The lint-and-check CI job fails because virtualenv 21.0.0 removed the
propose_interpreters API that hatch 1.14.2 relies on. Hatch 1.16.5
(pypa/hatch#2196) fixes this by switching to the python-discovery package.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tnixon pushed a commit to databrickslabs/tempo that referenced this pull request Mar 3, 2026
* Add test for show() k parameter to verify per-series row limiting

Adds test_show_k_2 which calls show(n=20, k=2) on a TSDF with 4 rows
per series, verifying that only the 2 most recent rows per series are
returned. This exercises the k parameter path that was previously only
tested for the error case (k > n).

Closes #326

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Upgrade hatch to 1.16.5 to fix virtualenv 21.0.0 incompatibility

The lint-and-check CI job fails because virtualenv 21.0.0 removed the
propose_interpreters API that hatch 1.14.2 relies on. Hatch 1.16.5
(pypa/hatch#2196) fixes this by switching to the python-discovery package.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Revert hatch 1.16.5, pin virtualenv<21 to fix Python 3.9 CI

Hatch 1.16.5 requires Python >=3.10, breaking CI for DBR 11.3/12.2
(Python 3.9). Revert to hatch 1.14.2 and pin virtualenv<21 to avoid
the removed API in virtualenv 21.0.0 (matching PR #454).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add missing test data entry for test_show_k_2

The test was failing in CI because the test_show_k_2 entry was missing
from tsdf_tests.json. Add the init data reference matching other
test_show_* tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Hatch does not work with virtualenv 21.0.0

5 participants