Closed vishnuwazoku closed 1 month ago
For a reproducer:
FROM python:3.10
RUN pip3 install hashin \
&& \
touch requirements.txt \
&& \
hashin -r requirements.txt -p 3.10 hashin
It takes:
expand_python_version
from third party Python code or-p PYTHON_VERSION
on the command line
The issue seems to stem from this piece of code.
The above regular expression assumes the minor version number can have only a single digit. Therefore the result will be incorrect for Python versions >= 3.10.
We probably want to change it to