Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Running hashin with Python versions >= 3.10 raises PackageError('No releases can be found....') #184

Closed
vishnuwazoku opened this issue Sep 11, 2024 · 1 comment · Fixed by #186

Comments

@vishnuwazoku
Copy link

The issue seems to stem from this piece of code.

def expand_python_version(version):
    if not re.match(r"^\d\.\d$", version):
        return [version]

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

    if not re.match(r"^\d\.\d*\d$", version)
@hartwork
Copy link
Collaborator

For a reproducer:

FROM python:3.10
RUN pip3 install hashin \
        && \
    touch requirements.txt \
        && \
    hashin -r requirements.txt -p 3.10 hashin

It takes:

  • a) calling function expand_python_version from third party Python code or
  • b) use of argument -p PYTHON_VERSION on the command line

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants