Skip to content
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

Move colorama to install_requires in setup.py #178

Merged
merged 1 commit into from
Sep 10, 2019

Conversation

lukpueh
Copy link
Member

@lukpueh lukpueh commented Sep 10, 2019

Fixes issue #:
closes #153

Description of the changes being introduced by the pull request:
colorama was added to colorize output generated by some functions in securesystemslib.interface.

Prior to this PR colorama was listed as extra requirement in setup.py under extras_require["crypto"] alongside cryptography.

However, securesystemslib.interface does not properly handle an installation without colorama, as e.g. secureystemslib.keys does for an installation without cryptography (or pynacl), thus it cannot be an extra requirement.

Moreover, colorama does not require C extensions, which would be a good reason to keep it out of the standard installation.

Please verify and check that the pull request fulfills the following
requirements
:

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

`colorama` was added to colorize output generated by some functions
in `securesystemslib.interface`.

Prior to this commit `colorama` was listed as extra requirement in
setup.py under `extras_require["crypto"]` alongside `cryptography`.

However, `securesystemslib.interface` does not properly handle an
installation without `colorama`, as e.g. `secureystemslib.keys`
does for an installation without `cryptography` (or `pynacl`), thus
it cannot be an extra requirement.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.951% when pulling 387d5e7 on lukpueh:require-colorama into da1af79 on secure-systems-lab:master.

@SantiagoTorres
Copy link
Collaborator

Thanks, Lukas! This is something that always bothered me. Would it be worthwhile to later add support for non-colorama versions? (i.e., why pull output colorized on terminals that don't support it?)

@lukpueh
Copy link
Member Author

lukpueh commented Sep 10, 2019

Yes absolutely, @SantiagoTorres! I think it would be useful to generally revise the code, related to optional dependencies (i.e. cyrptography, pynacl). IIRC, there is some unnecessary redundancy on one hand and then missing case handling on the other. I'll follow up with a separate issue.

But I think this is a reasonable quick fix to close #153.

@SantiagoTorres
Copy link
Collaborator

Oh certainly, agreed. I think it'd be a possible first issue for new contributors. Thanks!

@SantiagoTorres SantiagoTorres merged commit 4fe51e9 into secure-systems-lab:master Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lack of colorama hard dependency
3 participants