Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

Open
vishnuwazoku opened this issue Sep 11, 2024 · 1 comment

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
Contributor

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

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

No branches or pull requests

2 participants