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

Merging requirements-dev.lock into requirements.lock #525

Open
shroominic opened this issue Dec 18, 2023 · 4 comments
Open

Merging requirements-dev.lock into requirements.lock #525

shroominic opened this issue Dec 18, 2023 · 4 comments

Comments

@shroominic
Copy link

Why not merging booth .lock files into a single requirements.lock?

All dev packages could be appended with a check for a ENV var so if you are in dev mode you activate this var.
As example we could use RYE_DEV and append every dev requirement with your_dev_package; os.environ.get('RYE_DEV') == 'true'. This would remove the need for 2 files and we are all happy because we have cleaner git repos :)

@mitsuhiko
Copy link
Collaborator

I do want to replace these files with real lock files entirely. Given that they can end up with very different resolutions I'm not sure if I want to attempt to have a single requirements based lock file at the moment.

@shroominic
Copy link
Author

shroominic commented Dec 28, 2023

I think there is power in the ability to install the lock files using pip install -r requirements.lock for people cloning a repo and not already having rye installed so replacing these with a different solution might be worse in that sense.

@T-256
Copy link
Contributor

T-256 commented Dec 28, 2023

replacing these with a different solution might be worse in that sense

We could standardize pyproject.lock (similar to Cargo.lock), then pip could easily handle it.

@webknjaz
Copy link

webknjaz commented Jan 2, 2024

@shroominic misusing lockfiles as user-requests (requirements) is problematic when you work with more than one environment (a combination of Python/OS/arch) since they can easily contain transitive dependencies that are incompatible with other envs.

Here I tried to explain how the concept of lockfiles and the idea of what they do is misunderstood in the context of Python specifically: jazzband/pip-tools#1326 (comment)

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

No branches or pull requests

4 participants