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

pdm export exports extra when not needed #741

Closed
1 task done
apollo13 opened this issue Nov 17, 2021 · 1 comment · Fixed by #742
Closed
1 task done

pdm export exports extra when not needed #741

apollo13 opened this issue Nov 17, 2021 · 1 comment · Fixed by #742
Labels
🐛 bug Something isn't working

Comments

@apollo13
Copy link

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

Using the following pyproject.toml:

[project]
name = ""
version = ""
description = ""
authors = [
    {name = "test", email = "test@example.com"},
]
dependencies = [
    "fhir.resources~=6.1",
]
requires-python = ">=3.9,<3.10"
dynamic = ["classifiers"]
license = {text = "MIT"}

[project.urls]
homepage = ""

[build-system]
requires = ["pdm-pep517"]
build-backend = "pdm.pep517.api"

[tool]
[tool.pdm]

and running pdm export --without-hashes results in a duplicated pydantic dependency (once with the email extra). This imo is not needed (and breaks tools like pex) because the export will include the dependencies from the extras anyways…

Actual behavior

pdm -v export --without-hashes     
The exported requirements file is no longer cross-platform. Using it on other platforms may cause unexpected result.
dnspython==2.1.0
email-validator==1.1.3
fhir.resources==6.1.0
idna==3.3
pydantic==1.8.2
pydantic[email]==1.8.2
typing-extensions==4.0.0

Expected behavior

pdm -v export --without-hashes     
The exported requirements file is no longer cross-platform. Using it on other platforms may cause unexpected result.
dnspython==2.1.0
email-validator==1.1.3
fhir.resources==6.1.0
idna==3.3
pydantic==1.8.2
typing-extensions==4.0.0

Environment Information

PDM version:        1.10.2
Python Interpreter: /usr/bin/python3.9 (3.9)
Project Root:       /tmp/bla
Project Packages:   /tmp/bla/__pypackages__/3.9
{
  "implementation_name": "cpython",
  "implementation_version": "3.9.8",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.14.17-301.fc35.x86_64",
  "platform_system": "Linux",
  "platform_version": "#1 SMP Mon Nov 8 13:57:43 UTC 2021",
  "python_full_version": "3.9.8",
  "platform_python_implementation": "CPython",
  "python_version": "3.9",
  "sys_platform": "linux"
}
@apollo13 apollo13 added the 🐛 bug Something isn't working label Nov 17, 2021
@frostming frostming mentioned this issue Nov 18, 2021
2 tasks
@apollo13
Copy link
Author

Thank you for the quick fix, I have successfully verified it against the current master!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant