0

I've a package registry for my package framework. I want to get the latest alpha version from the package registry while there are beta versions available for same release. Example

Registry:
  - framework 0.0.1a0
  - framework 0.0.1a1
  - framework 0.0.1b0
  - framework 0.0.1b1

My pypoetry.toml file

[tool.poetry.dependencies]
framework = {version = "^0.0.1", allow-prerelease = true}

I want to install framework latest alpha version (0.0.1a1) while this configuration installs (0.0.1b1).

PaxPrz
  • 1,778
  • 1
  • 13
  • 29

1 Answers1

1

Install package of a specified version by adding a version variable and an "allow pre-releases" tag (--allow-prereleases) if its a pre-release package in your poetry add command.

For example:

                                 Specify the package version here
                                          vvvvvvvvvvv
poetry add --allow-prereleases bit-vector="^0.42.0a0"
                               ^^^^^^^^^^
                      Replace it with the package name

GitHub link to the exact issue

  • Thank you, but I need to keep updating this every time new alpha package is released. I need a permanent solution – PaxPrz Jun 18 '21 at 07:30
  • I believe you can use wild card syntax to specify the alpha package versions, so it'll find a matching version when doing poetry update. https://stackoverflow.com/questions/54720072/dependency-version-syntax-for-python-poetry – Woong Ze Yi Jun 18 '21 at 16:06
  • I did it with wild card too `0.0.1a*`, but didn't worked out. Is this right? – PaxPrz Jun 19 '21 at 05:29
  • It looks like there's something right and something wrong in your version var but I cant get what feels wrong. Try something like `0.0.1*`? https://github.com/python-poetry/poetry/issues/3538#issuecomment-843679864 – Woong Ze Yi Jun 19 '21 at 08:01