Skip to content

Fix Pipenv discovery when here cannot find a project root - #1913

Merged
t-kalinowski merged 2 commits into
mainfrom
fix/pipenv-project-root
Jul 30, 2026
Merged

Fix Pipenv discovery when here cannot find a project root#1913
t-kalinowski merged 2 commits into
mainfrom
fix/pipenv-project-root

Conversation

@t-kalinowski

Copy link
Copy Markdown
Member

Summary

Fixes #1909.

Pipenv discovery could repeat project-root resolution after locating a Pipfile. If here::here() failed on that second lookup, reticulate discarded the Pipenv result and continued discovery.

Reticulate now passes the located Pipfile directory to pipenv_python(). A no-argument call also returns NULL when here cannot resolve a root.

Changes

Public-facing:

  • Pipenv discovery can use a located Pipfile even when here cannot independently resolve the project root.
  • A missing here root no longer surfaces from a no-argument Pipenv probe.

Internal:

  • Add a regression test through py_discover_config() with a temporary Pipenv environment.
  • Document the fix in NEWS.

@t-kalinowski
t-kalinowski force-pushed the fix/pipenv-project-root branch from 2ad0856 to 5943781 Compare July 30, 2026 22:05
@t-kalinowski
t-kalinowski force-pushed the fix/pipenv-project-root branch from 5943781 to e9e7cd0 Compare July 30, 2026 23:23
@t-kalinowski
t-kalinowski merged commit f6775c5 into main Jul 30, 2026
13 checks passed
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.

Unguarded here::here() in pipenv_python() errors when working directory has no project root

1 participant