-
Notifications
You must be signed in to change notification settings - Fork 270
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
Make colorama dependency optional #1180
Make colorama dependency optional #1180
Conversation
Instead of using colorama directly for terminal colours, use the constants in securesystemslib.interface which map to colorama colours IFF colorama is installed. This change results in a red password prompt when colorama is installed and a standard terminal output coloured prompt when colorama is not installed. Signed-off-by: Joshua Lock <jlock@vmware.com>
The repo script was the only user and can now do the right thing when colorama isn't available in the environment. Signed-off-by: Joshua Lock <jlock@vmware.com>
Sorry for the late comment. But I don't think we actually want to remove Now, if we remove We use What do you think... @joshuagl, @jku? I'm happy to once more revisit the requirements handling (see #978 and #982 for prior work). |
so I think you're making a lot of sense (I had missed the idea of generating requirements-pinned.txt completely). The only thing I'm missing is why do we want colorama as a dependency at all -- as far as I can tell where now using securesystemslib features only, there's essentially no colorama anywhere? EDIT: or is the idea to document a version for every possible (even transient optional) dependency? |
I admit that the documentation is not ideal. |
I think |
If let's say |
That said, I think the easiest thing to do would be to just nuke |
Fair point, I guess this does make sense. Is this something you'd like fixed before upcoming release? On the point of nuking colorama completely -- that probably makes sense? there should be a fairly high bar to adding dependencies to projects like this and coloramas usefulness does not seem to reach that bar... |
I think there is no fixing needed. Let's just leave this PR merged as is (I did add a note about it to the changelog) and remove colorama in securesystemslib rather soon, hopefully before they push an update that breaks tuf without us noticing, which I think is fairly unlikely. |
Fixes N/A
Description of the changes being introduced by the pull request:
TERM_
values defined insecuresystemslib.interface
. These values are set automatically depending on whether colorama is importable, and therefore make the colorama dependency an optional/soft dependencyPlease verify and check that the pull request fulfills the following
requirements: