Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add implementation plan for new Python package manager PDM #4128
Add implementation plan for new Python package manager PDM #4128
Changes from 2 commits
cbdc454
8f2e75e
f3939d1
777ea34
e5f42c8
bd66503
b6d9eef
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are editable dependencies relevant outside a development context? You can't use them to build, you need to use a copied version.
The way this works is, you'd specify the editable package in dev dependencies and a non-editable version in the regular dependencies. That way, when you install in dev mode, the editable version is referenced, when you install in non-dev mode, the real copied package is used.
I've tried this locally and it works fine. Have I missed something we need from editable packages? I don't think we even want editable packages outside a dev context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean this?
I tried locking a project with such a setup but
pdm.lock
only sayseditable=true
.Is that expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought so. My assumption was that the lock file would indicate it as editable, but then only install it as such when you selected the dev dependencies with
pdm install --dev
. However, when I unselect the dev groun locally withpdm install --prod
, it still installs it as editable.But, I can pass
--no-editable
, and it works fine.pdm install --prod --no-editable
copies the code directly into the venv, rather than creating a.pth
file. The important bit being that we can install it editable in dev so that we can e.g., map the directory in docker compose to the relative location referenced.For a future prod-only dependencies version of the
api
target in the API Dockerfile, we'd usepdm install --prod --no-editable --frozen-lockfile
.I wonder if the best way to do this would actually be to install the prod dependencies only in the Dockerfile, then add an entrypoint to the compose service that runs
pdm install --dev
to bootstrap the development environment in the container for local use.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sarayourfriend I think @krysal has approached that before to resolve #1008. Maybe something to reconsider after this transition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR just updates the API, which I agree is fine for a single PR. But we have a lot of other uses of Pipenv, like in utilities and the ingestion server. Can we create separate issues for those and do them in individual PRs, to keep things atomic and easy to review?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll make separate issues for them so that we can track progress of the migration and each PR will be small and atomic.