-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Description
Packages with incomplete version data cause an unhandled exception, see stacktrace below
Expected behavior
A comprehensive error message that tells the user which package is incomplete and what exactly is missing.
pip version
25.1.1
Python version
3.12
OS
Windows
How to Reproduce
- Setup a local package with pyproject-toml. Leave out the version info
- Inside the package put some dummy code under "src"
- Create a venv inside this package, e.g. ".venv"
- Call pip install .
Output
Looking in indexes: https://pypi.python.org/simple
Requirement already satisfied: pip in c:\work.venv\lib\site-packages (25.1.1)
ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
File "C:\Work.venv\Lib\site-packages\pip_internal\commands\install.py", line 587, in _determine_conflicts
return check_install_conflicts(to_install)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Work.venv\Lib\site-packages\pip_internal\operations\check.py", line 116, in check_install_conflicts
package_set, _ = create_package_set_from_installed()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Work.venv\Lib\site-packages\pip_internal\operations\check.py", line 58, in create_package_set_from_installed
package_set[name] = PackageDetails(dist.version, dependencies)
^^^^^^^^^^^^
File "C:\Work.venv\Lib\site-packages\pip_internal\metadata\importlib_dists.py", line 175, in version
return parse_version(self._dist.version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Work.venv\Lib\site-packages\pip_vendor\packaging\version.py", line 56, in parse
return Version(version)
^^^^^^^^^^^^^^^^
File "C:\Work.venv\Lib\site-packages\pip_vendor\packaging\version.py", line 200, in init
match = self._regex.search(version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Code of Conduct
- I agree to follow the PSF Code of Conduct.