Further constrain dependency versions in order to support Python 3.9 #945
+125
−136
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 several more constraints in
requirements.inin order to produce a set that supports building TFQ for Python 3.9 as well as 3.10 – 3.12. This means TFQ can support versions 3.9 – 3.12 now (at least on Linux).In addition, this PR 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.This PR also removes 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 also simplified the script some more and made it follow more style guidelines for Bash scripts.