Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Project bump changing dependency specification format causing upstream packages to break #461

Open
amitjindal opened this issue Sep 3, 2020 · 1 comment

Comments

@amitjindal
Copy link

Short description

project bump is changing format of dependencies that causes upstream poetry projects to break.

Command in question:

dephell project bump --from-format=poetry --from-path=pyproject.toml minor

I am not sure if I am doing something wrong. I tried to find any flag that should help in this behaviour but could not.
I even tried to remove python from dependencies. In that case it adds a '*' dependency for python.

Output

Originally I have:

[tool.poetry.dependencies]
python = "^3.8"
Werkzeug = "^1.0.1"
black = "^20.8b1"
coverage = "^5.2.1"

After running: dephell project bump --from-format=poetry --from-path=pyproject.toml minor

I have:

[tool.poetry.dependencies]
python = "==3.*,>=3.8.0"
Werkzeug = "==1.*,>=1.0.1"
black = "==20.*,>=20.8.0.b1"
coverage = "==5.*,>=5.2.1"

The real problem is python = "^3.8" getting converted to python = "==3.*,>=3.8.0"

Since this is a library, the upstream poetry fails as 3.* does not meets minimum requirement of 3.8. It works when I run the original.

Steps to reproduce

In any project that is based on pyproject.toml with poetry, use the python line:

[tool.poetry.dependencies]
python = "^3.8"

Then run:

$ dephell project bump init
$ dephell project bump --from-format=poetry --from-path=pyproject.toml minor`

Config

[tool.dephell.main]
# read from poetry format
from = {format = "poetry", path = "pyproject.toml"}
# and convert into setup.py
to = {format = "setuppy", path = "setup.py"}
# drop dev-dependencies
envs = ["main", "dev"]
versioning = "semver"

[tool.dephell.pytest]
# read dependencies from setup.py
from = {format = "setuppy", path = "setup.cfg"}
# install main dependencies and `tests` extra dependencies
envs = ["main", "tests"]
# run command `pytest`
command = "pytest"

Versions

dephell inspect self
{
  "cache": "5.38Mb",
  "path": "/Users/amitjindal/.pyenv/versions/3.8.5/lib/python3.8/site-packages/dephell",
  "python": "/Users/amitjindal/.pyenv/versions/3.8.5/bin/python3.8",
  "version": "0.8.3",
  "versions": {
    "dephell-archive": "0.1.7",
    "dephell-argparse": "0.1.3",
    "dephell-changelogs": "0.0.1",
    "dephell-discover": "0.2.10",
    "dephell-licenses": "0.1.7",
    "dephell-links": "0.1.5",
    "dephell-markers": "1.0.3",
    "dephell-pythons": "0.1.15",
    "dephell-setuptools": "0.2.4",
    "dephell-shells": "0.1.5",
    "dephell-specifier": "0.2.2",
    "dephell-venvs": "0.1.17",
    "dephell-versioning": "0.1.2"
  }
}

Please help.

@amitjindal
Copy link
Author

Hi. Anyone? Please tell me what I can do to prevent this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant