feat: introduce blocklist of unwanted requirements - #3469
Conversation
985d4f1 to
25a8c37
Compare
Commit 25da067 introduced a manually curated fragment for `tree-sitter` to work around shortcomings [1] of pip-compile. Generalize this technique by introducing a declarative blocklist and associated script. This feature is going to be needed by three unrelated features: fixing `pydub`, running `pip-compile.sh` on non-Apple platforms, and exploring the "complex platform dependent versioning path" proposed in PR Aider-AI#3444 [2]. As an added benefit, the blocklist script: - allows comments in the blocklist; and - removes extraneous comments from `requirements.txt`, avoiding misattribution and confusion if a human looks at them. [1]: jazzband/pip-tools#639 (comment) [2]: Aider-AI#3444 (comment)
|
Thanks for continuing to push this ahead. I thought about this exact thing. Special casing tree sitter smelled bad to me. My instinct is there must be a proper way to do this sort of complex environment-sensitive dependency management. After quickly looking at uv, poetry and other tools couldn't convince myself that they definitely solved this need in the more general complex case. So it didn't seem worth the work to switch to them at the moment. I think before building and adopting a complex, bespoke system for this we would need to spend more time confirming if there is a sensible existing tool/approach. This is all further complicated because of the way aider allows helpful/seamless installs and upgrades. See helper functions in So with all this in mind, I decided to special case tree-sitter for the moment. But was reluctant to continue that pattern without being certain there isn't a better way. |
Section Using environment markers in Poetry’s docs suggests to me that it might. I’m going to experiment with Poetry a little to see whether this might be worth a switch. |
|
There’s a thread on Python Discourse about how Poetry pulls off that feat: Insights into how poetry.lock works cross platform |
|
Closing in favor of #3516. |
This PR introduces a declarative blocklist and associated script. The idea is to generalize the
tree-sitter.intechnique from 25da067, because we’re going to need that same technique for two or maybe three upcoming changes:pydubfor Python 3.13;pip-compile.shon non-Apple platforms, and