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

Allow specification of version X.Y including prereleases #124

Closed
altendky opened this issue Jul 29, 2020 · 4 comments
Closed

Allow specification of version X.Y including prereleases #124

altendky opened this issue Jul 29, 2020 · 4 comments

Comments

@altendky
Copy link

Describe the bug
It would be nice to be able to specify a version such as 3.9 and have it get the latest prerelease if available. I am not sure exactly why but can understand that someone might want the present behavior (failure) when only prereleases are available but perhaps a markup like '3.9-+' (or something much less terrible than that) could be used to enable either pre or regular releases.

@altendky altendky added the bug Something isn't working label Jul 29, 2020
@konradpabjan
Copy link
Collaborator

Will the following syntax not work for your use case?

with:
    python-version: '3.9.0-alpha - 3.9.0' # SemVer's version range syntax

Currently there is Python 3.9.0b5 but lets say version Python 3.9.0b6 comes out and then finally Python 3.9.0 officially comes out.

By specifying the range, the latest pre-release version will always be pulled. Once a stable version of Python 3.9 comes out (no new pre-release versions should come out for that specific version), the stable version of Python would be used.

@konradpabjan konradpabjan removed the bug Something isn't working label Jul 29, 2020
@altendky
Copy link
Author

Thank you for the quick response and for pointing out the solution. I now see it was right there in the docs. My apologies for not finding it there myself.

I ended up with 3.9.0-alpha - 3.9.X to get 'all prerelease or release' and implemented that as follows.

https://github.com/altendky/qtrio/blob/2f041af7a346b91d5e8f0765ee33c86cdc6f7e50/.github/workflows/ci.yml#L95

        python: ['3.6', '3.7', '3.8', '3.9']

https://github.com/altendky/qtrio/blob/2f041af7a346b91d5e8f0765ee33c86cdc6f7e50/.github/workflows/ci.yml#L104

          python-version: '${{ matrix.python }}.0-alpha - ${{ matrix.python }}.X'

Now just waiting on PySide2 and PyQt5 to release 3.9-supporting wheels...

@altendky
Copy link
Author

Actually, I suppose this points out an error (I think) in the readme. The range with the 0 micro/patch version did not (would not sensibly) allow stable releases beyond .0 to be used. As I recall just major.minor didn't work either and I had to use the major.minor.X noted above.

@ezio-melotti
Copy link

See also #213.

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

3 participants