question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using @latest on already existing dependency fails because of case sensitive matching of poetry

See original GitHub issue
  • 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).

Issue

By the documentation it seems that if I already have an existing dependency I can update it to the latest. However, I try to update a specific package that is installed by the name pint, but the official name is Pint.

The debug clearly shows poetry’s confusion about this:

   1: derived: Pint (^0.16)
   1: conflict: demap depends on pint (^0.15)
   1: ! not pint (^0.15) is satisfied by Pint (^0.16)
   1: ! which is caused by "demap depends on Pint (^0.16)"
   1: ! thus: version solving failed

Full debug can be found here: https://gist.github.com/hwalinga/b2bc4f2425c69cfafb836790e737d65a

Poetry should, just like pip, be case-insensitive on the dependency matching. You can install any package with pip without having the correct case and Poetry should not fail of that. (This is not just the first letter, pip install PiNt will also work for example, but capitalization of the first letter is of course something that is commonly encountered, Biopython is another example of that.)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
finswimmercommented, Dec 29, 2021

This seems to be solved. Feel free to leave a comment if you disagree.

0reactions
hwalingacommented, Mar 28, 2022

Whoops, I still have issues with this : (

Here is another reproducible example, not case sensitive this time:

docker run -it --rm python:3.8.6-buster /bin/bash
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py > install-poetry.py
python install-poetry.py --pre
export PATH="/root/.local/bin:$PATH"
poetry new testing
cd testing
curl -o pyproject.toml 'https://gist.githubusercontent.com/hwalinga/f3b51fd69c4284f15ee53f17980e0d94/raw/2833e068603b89e897562b372d8455784388e03f/pyproject.toml'
poetry install
poetry add -vvv pytest@latest

And the corresponding error log:

https://gist.github.com/a3a99dad6c0eb492f4d1c2748b60f52a

Read more comments on GitHub >

github_iconTop Results From Across the Web

History | Poetry - Python dependency management and ...
Fix an issue where Poetry fails with an AssertionError due to ... where not handled if they did not match the case-sensitive name...
Read more >
poetry install | SolverProblemError Because my_project ...
The problem with your current pyproject.toml is, that you declare built-in packages as dependencies, like os, pathlib, string and others.
Read more >
Changelog - PDM
#1099; Fix a bug where dependencies with requires-python pre-release versions caused pdm update to fail with InvalidPyVersion .
Read more >
regex · PyPI
Case -insensitive matches in Unicode use simple case-folding by default. Version 1 behaviour (new behaviour, possibly different from the re module):. Indicated ...
Read more >
Bad request error 400 when publishing to npm packages
In case this helps anyone, I was getting an HTTP 400 error when trying to publish to a new registry, while already having...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found