Locking dependency versions in reqs.txt
See original GitHub issueThe package broke last week because it was incompatible with Werkzeug==2.1.0
.
So I looked at requirements.txt
expecting to see version rules, but it’s all loosey goosey
# requirements.txt
dash
requests
flask
retrying
ipython
ipykernel
ansi2html
nest-asyncio
https://github.com/plotly/jupyter-dash/blob/master/requirements.txt
I get that you want it free floating with the latest dash, but shouldn’t things be a bit more nailed down to prevent future breakage?
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Python pip requirements.txt lock file
The short answer is python has no concept of lock files, equally it can be argued python has no package dependency files at...
Read more >Python Dependency Locking with pip-tools | Lincoln Loop
Dependency locking means you can specify the direct dependencies your code requires, for example, celery==4.4. * and the tooling will lock, not ...
Read more >Equivalent of `package.json' and `package-lock.json` for `pip`
Here, requirements.in lists your direct dependencies, often with loose version constraints and pip-compile generates locked down ...
Read more >Why requirements.txt isn't enough - model.predict
Your dependencies also have dependencies (2nd+ degree), and these versions are not necessarily locked down. Not having these versions locked ...
Read more >Sure you can pip freeze your dependencies out to a file but ...
lock file with all deps pinned to their exact versions. Then you'd commit both files to version control, but you would only ever...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There’s a few ways ways to guarantee reliability:
node_modules/some-dep/node_modules/subdep
)I’m afraid your notion of reliability doesn’t match the practical reality of the Python ecosystem. There are many projects who at some point thought they’re important enough to dictate pinned versions to other projects, but they were all soon humbled by the outcry of dozens of configurations they just broke. I’m happy dash doesn’t make the same mistake.
Since PEP 621 exists, I’d do away with “requirements.in” and just use the
project.dependencies
table inpyproject.toml
, but yes, that’s a good approach for applications. I didn’t go into it since dash and dash-jupyter are libraries and it’s therefore a bit off topic.There’s also other cool ideas once could get into like
cargo update -Z minimal-versions
, which allows you check if you’re really telling the truth about your lower bounds and will lead you to specify them correctly. (Not a big problem since most people will run your code using new-ish versions of most things, but a good idea nontheless!). But since I’m not aware of that existing in pip, it’s probably also off topic.