Skip to content

Poetry does not correctly match zero-padded version numbers #7193

@jsenin

Description

@jsenin

I'm working in a proyect where a third party package has the dependecy suds-py3==1.3.3 . This exact match is not solved by poetry, because the released version is 1.3.3.0 https://pypi.org/project/suds-py3/1.3.3.0/

So installing 1.3.3 currently fails :

$ poetry add suds-py3==1.3.3

Could not find a matching version of package suds-py3

In order to avoid this issue I decided to install 1.3.3.0 by hand and then the required package,

poetry add suds-py3==1.3.3.0

Updating dependencies
Resolving dependencies... (0.1s)

Writing lock file

Package operations: 1 install, 0 updates, 0 removals

  • Installing suds-py3 (1.3.3.0)

And then install my package that requires `` suds-py3==1.3.3` but the installation fails again:

$ poetry add mypackage/

Updating dependencies
Resolving dependencies... (0.0s)

Because distutils (1.0) @ file:///home/jorge/projects/personal/poetry/mypackage depends on suds-py3 (1.3.3)
 and poetry depends on suds-py3 (1.3.3.0), distutils is forbidden.
So, because poetry depends on distutils (1.0) @ file:///home/jorge/projects/personal/poetry/mypackage, version solving failed.

I created a fake package to test the behaviour

.
├── mypackage
│   ├── __init__.py
│   └── setup.py
├── poetry.lock
└── pyproject.toml

Is this behaviour rigth ? I guess that previous instalation with 1.3.3.0 should be enough to satisfy mypakcage requirements with suds-py3==1.3.3

$ poetry --version
Poetry (version 1.3.0)

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye

$ arch
x86_64

$ python --version
Python 3.9.2


Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreRelated to the poetry-core libraryarea/pepsRelated to PEP support/compliancekind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions