Feature: Populate python_full_version instead of python_version in Pipfile when full python version is specified in "--python" arg #5345
Description
I verified that I am using the latest version of pipenv at the time of writing (2022.9.8
).
Is your feature request related to a problem? Please describe.
Not related to a problem, just observed a behavior I find odd given current functionality of pipenv. When creating a virtual environment, specifying a full python version (e.g., pipenv install --python 3.10.4
) generates a Pipfile with python_version = "3.10"
. Given that pipenv supports a python_full_version
key in the [requires] table, it seems odd to me that it doesn't use the full version field when a full python version is specified. Instead, it only uses the python_version
field and specifies the feature release (e.g., 3.10
).
Describe the solution you'd like
When using a full python version qualifier in the pipenv install
command (e.g., pipenv install --python 3.10.4
), the resulting Pipfile will use the python_full_version
field instead:
[requires]
python_full_version = "3.10.4"
If the full version is not specified, the current expected behavior should apply:
[requires]
python_version = "3.10"
Describe alternatives you've considered
An obvious workaround is to manually fill out the field, but if others agree with me, I believe this behavior should happen automatically.