Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

converted underscores in extra names creates invalid poetry export #7518

Closed
4 tasks done
chargr opened this issue Feb 15, 2023 · 3 comments
Closed
4 tasks done

converted underscores in extra names creates invalid poetry export #7518

chargr opened this issue Feb 15, 2023 · 3 comments
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@chargr
Copy link

chargr commented Feb 15, 2023

  • Poetry version: 1.3.2
  • Python version: 3.10
  • OS version and name: CentOS 6
    poetry add --lock ydata-profiling
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

ydata-profiling requires visions[type_image_path]
in the poetry.lock this is converted to 'type-image-path'
ideally these names are left not modified?

[[package]]
name = "ydata-profiling"
version = "4.0.0"
description = "Generate profile report for pandas DataFrame"
category = "main"
optional = false
python-versions = ">=3.7, <3.11"
files = [
    {file = "ydata-profiling-4.0.0.tar.gz", hash = "sha256:0d80cef94054573509a5b77b6b2290ff7ae300052e3d9364f62fceb1b9f15ea9"},
    {file = "ydata_profiling-4.0.0-py2.py3-none-any.whl", hash = "sha256:037d941519163c526e339806655e71a714cdbb3d792c7d3002a3eb0e76babe08"},
]

[package.dependencies]
htmlmin = "0.1.12"
jinja2 = ">=2.11.1,<3.2"
matplotlib = ">=3.2,<3.7"
multimethod = ">=1.4,<1.10"
numpy = ">=1.16.0,<1.24"
pandas = ">1.1,<1.4.0 || >1.4.0,<1.6"
phik = ">=0.11.1,<0.13"
pydantic = ">=1.8.1,<1.11"
PyYAML = ">=5.0.0,<6.1"
requests = ">=2.24.0,<2.29"
scipy = ">=1.4.1,<1.10"
seaborn = ">=0.10.1,<0.13"
statsmodels = ">=0.13.2,<0.14"
tqdm = ">=4.48.2,<4.65"
typeguard = ">=2.13.2,<2.14"
visions = {version = "0.7.5", extras = ["type-image-path"]}
[[package]]
name = "visions"
version = "0.7.5"
description = "Visions"
category = "main"
optional = false
python-versions = ">=3.6"
files = [
    {file = "visions-0.7.5-py3-none-any.whl", hash = "sha256:1e57219715255282a909cfb93d25d6e453535aa0c26640a0d6f03e40be6263d7"},
    {file = "visions-0.7.5.tar.gz", hash = "sha256:49259f291f7737df81c4bc65e9436c43f701acb73a577393be75b26b738d5bd2"},
]

[package.dependencies]
attrs = ">=19.3.0"
imagehash = {version = "*", optional = true, markers = "extra == \"type_image_path\""}
multimethod = ">=1.4"
networkx = ">=2.4"
numpy = "*"
pandas = ">=0.25.3"
Pillow = {version = "*", optional = true, markers = "extra == \"type_image_path\""}
tangled-up-in-unicode = ">=0.0.4"

[package.extras]
all = ["Pillow", "attrs (>=19.3.0)", "imagehash", "matplotlib", "multimethod (>=1.4)", "networkx (>=2.4)", "numpy", "pandas (>=0.25.3)", "pydot", "pygraphviz", "shapely", "tangled-up-in-unicode (>=0.0.4)"]
dev = ["IPython", "Sphinx-copybutton", "black (>=20.8b1)", "isort (>=5.0.9)", "mypy (>=0.770)", "nbsphinx", "recommonmark (>=0.6.0)", "setuptools (>=46.1.3)", "sphinx-autodoc-typehints (>=1.10.3)", "sphinx-rtd-theme (>=0.4.3)", "wheel (>=0.34.2)"]
plotting = ["matplotlib", "pydot", "pygraphviz"]
test = ["Pillow", "big-o (>=0.10.1)", "black (>=19.10b0)", "check-manifest (>=0.41)", "imagehash", "isort (>=5.0.9)", "matplotlib", "mypy (>=0.800)", "pandas", "pre-commit", "pyarrow (>=1.0.1)", "pydot", "pyspark", "pytest (>=5.2.0)", "pytest-spark (>=0.6.0)", "shapely", "twine (>=3.1.1)"]
type-geometry = ["shapely"]
type-image-path = ["Pillow", "imagehash"]

this creates an issue when using the poetry export plugin to create a requirements.txt which ends up containing:
the poetry export can not just blindly convert to underscores, because this is valid for other modules.

ydata-profiling==4.0.0
visions[type-image-path]==0.7.5

which then causes this pip error:

AssertionError: Internal issue: Candidate is not for this requirement visions[type-image-path,type-image-path] vs visions[type-image-path]
@chargr chargr added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 15, 2023
@chargr
Copy link
Author

chargr commented Feb 15, 2023

Additionally, why does the poetry export plugin specify the extra name at all? Is this not already a full list of packages, no extra should need to be triggered at this point?

@dimbleby
Copy link
Contributor

dimbleby commented Feb 16, 2023

@finswimmer finswimmer closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2023
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants