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 import overwrites previous sections of pyproject.toml #370

Closed
1 task done
Lyonsclay opened this issue Apr 1, 2021 · 0 comments · Fixed by #371
Closed
1 task done

pdm import overwrites previous sections of pyproject.toml #370

Lyonsclay opened this issue Apr 1, 2021 · 0 comments · Fixed by #371
Labels
🐛 bug Something isn't working

Comments

@Lyonsclay
Copy link

Lyonsclay commented Apr 1, 2021

  • 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

pdm import app/requirements.txt --format requirements --verbose

./pyproject.toml

[project]
dependencies = [
    "boto3==1.17.15",
    "botocore==1.20.15",
    "elasticsearch==7.11.0",
    "pandas==1.2.2",
]
dev-dependencies = []

[tool]
[tool.pdm]
[[tool.pdm.source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[build-system]
requires = ["pdm-pep517"]
build-backend = "pdm.pep517.api"

pdm import app/requirements-dev.txt --format requirements --dev --verbose

[project]
dependencies = []
dev-dependencies = [
    "black",
    "flake8",
    "pytest",
]

[tool]
[tool.pdm]
[[tool.pdm.source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[build-system]
requires = ["pdm-pep517"]
build-backend = "pdm.pep517.api"

Actual behavior

The first pdm import command correctly installs the dependencies list.
The second pdm import command correctly installs the dev-dependencies list but also remove the contents of the dependencies list.

Expected behavior

I would expect that subsequent import statements would preserve the content of the other sections.

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
PDM version:        1.4.5                                  
Python Interpreter: /Users/clay/.pyenv/shims/python (3.8.0)
Project Root:       /Users/clay/freakout  
{
  "implementation_name": "cpython",
  "implementation_version": "3.8.0",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "20.3.0",
  "platform_system": "Darwin",
  "platform_version": "Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64",
  "python_full_version": "3.8.0",
  "platform_python_implementation": "CPython",
  "python_version": "3.8",
  "sys_platform": "darwin"
}
@Lyonsclay Lyonsclay added the 🐛 bug Something isn't working label Apr 1, 2021
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