poetry: Pre-release version of a package not found even with `--allow-prereleases`

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: archlinux
  • Poetry version: 1.1.4
  • Python version: 3.7.7

Issue

I am trying to install a pre-release verion of https://github.com/elastic/enterprise-search-python

Their recommended installation method is

python -m pip install --pre elastic-enterprise-search which works fine.

When trying to install it with poetry using

poetry add --allow-prereleases elastic-enterprise-search I am getting an old version: 0.2.1 (the same as the one without the --allow-prereleases switch.

Am I doing something wrong? Or is it that this package is configured incorrectly?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 5
  • Comments: 25 (13 by maintainers)

Commits related to this issue

Most upvoted comments

looks like doing:

mypackage = { version = "^3.0.0*", allow-prereleases = true}

works fine for poetry 1.1.5 works just fine for me. If allowing pre-releases just adding a wildcard * is probably the best bet to get the latest pre-release.

I have the same problem with poetry 1.1.5. All private repos so I can’t point out to the given packages, but essentially:

mypackage = { version = "^3.0.0", allow-prereleases = true}

does not resolve to using the 3.0.0.dev0 version, while if I write directly:

mypackage = { version = "^3.0.0.dev0", allow-prereleases = true}

poetry works fine.

But maybe there is a standard way of defining prerelease versions I am missing?

2 installs python-telegram-bot 20.a0 just fine for me at both 1.1.13 and master.

I’m having some trouble installing python-telegram-bot pre-release version 20.0a0:

Poetry version 1.1.13
# pyproject.toml
[tool.poetry.dependencies]
python = "^3.10"
# 1 - Installs version 13.12
# python-telegram-bot = {version = "^13.12", allow-prereleases = true}
# 2 - SolverProblemError
# python-telegram-bot = {version = "20.0a0", allow-prereleases = true}
# 3 - SolverProblemError
# python-telegram-bot = {version = "^20.0a0", allow-prereleases = true}

I’m quite confused and not sure how I can install the pre-release 😞

I second this! I’m unable to install pre-release versions with the --allow-prerelease flag using either Poetry 1.1.4 or 1.1.5. Even did a fresh reinstall of poetry on my system and still have the same problem. However, it does work for my colleagues with the same/similar setup.

Also verified that I can install the pre-release version when explicitly defining its version in pyproject.toml and it works in that case. However, I would like it to always pick the latest pre-release…