Further constrain dependency versions in requirements.txt #940
+98
−122
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.
This PR adds a few more constraints in
requirements.inon development dependencies that have come to light from further testing on different environments, and removes some entries that were for requirements that are not essential and whose handling needs further thought.In addition, this updates
scripts/generate_requirements.shto deal with a shortcoming of generatingrequirements.txtusingpip-compile. The versions of some transitive dependencies may need to be updated to address security releases, but simply re-runningpip-compileto produce a newrequirements.txtmay not update the versions because the dependencies that bring in the transitive dependencies have not themselves changed. The recommended practice for this situation is to put such version constraints into a separate constraint file and pass it as an argument topip-compile. (pip-compilehas explicit support for this.) Some additions to the script scripts/generate_requirements.sh encapsulate and document this process.In addition, I removed some no-longer-needed post-processing of the
requirements.txtfile fromscripts/generate_requirements.sh. It was a hack in the first place, and with the latestrequirements.in, it turns out to be unnecessary. While at it, I simplified the script some more and made it follow more style guidelines for Bash scripts.