Skip to content

Conversation

esafak
Copy link
Contributor

@esafak esafak commented Aug 11, 2025

The PythonInfo class had a method called creators() that directly imported and used CreatorSelector from virtualenv.run.plugin.creators. This created a tight coupling between the discovery and creator plugin systems.

This commit removes the creators() method from PythonInfo, making it a pure data class. The logic for selecting a creator has been moved to the call sites, which now directly use CreatorSelector.for_interpreter(python_info).

This change prepares the discovery code to be moved into a new, standalone package (#2074).

  • ran the linter to address style issues (tox -e fix)
  • wrote descriptive pull request text
  • ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder
  • updated/extended the documentation

The PythonInfo class had a method called creators() that directly imported and used CreatorSelector from virtualenv.run.plugin.creators. This created a tight coupling between the discovery and creator plugin systems.

This commit removes the creators() method from PythonInfo, making it a pure data class. The logic for selecting a creator has been moved to the call sites, which now directly use CreatorSelector.for_interpreter(python_info).

This change prepares the discovery code to be moved into a new, standalone package.

Signed-off-by: Emre Şafak <[email protected]>
@gaborbernat gaborbernat enabled auto-merge (squash) August 11, 2025 18:04
@gaborbernat gaborbernat merged commit c41da72 into pypa:main Aug 11, 2025
87 of 88 checks passed
@esafak esafak deleted the feature/2074-decouple-discovery branch August 11, 2025 18:26
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.

2 participants