FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Allowing pyOpenSSL import to fail for GAE. by dhermes · Pull Request #1446 · googleapis/google-cloud-python · GitHub

Allowing pyOpenSSL import to fail for GAE. - #1446

Merged
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:fix-1445
Feb 12, 2016
Merged

Allowing pyOpenSSL import to fail for GAE.#1446
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:fix-1445

Conversation

dhermes commented Feb 11, 2016

Copy link
Copy Markdown
Contributor

Fixes #1445.

googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 11, 2016

Copy link
Copy Markdown
Contributor

@dhermes ping me when you're ready for review.

dhermes commented Feb 11, 2016

Copy link
Copy Markdown
Contributor Author

I am "ready" for review. The AppVeyor fail is noted in #1434

IMO, the coverage drop just needs a pragma no cover. WDYT?

Copy link
Copy Markdown
Contributor

I think it'd be nice to see a test case for this, if possible.

theacodes self-assigned this Feb 11, 2016

dhermes commented Feb 12, 2016

Copy link
Copy Markdown
Contributor Author

@jonparrott I have previously implemented tests that mock import failures and the pay-off does not justify the amount that goes in.

Maybe there is a better way and I just don't know how to do it?

Copy link
Copy Markdown
Contributor

I guess I more want to ensure that _get_pem_key and _get_signature_bytes raises a more useful error than an AttributeError if crypto is not available.

dhermes commented Feb 12, 2016

Copy link
Copy Markdown
Contributor Author

OK cool I can add that feature and test for it.

dhermes commented Feb 12, 2016

Copy link
Copy Markdown
Contributor Author

@jonparrott PTAL. (Also remind me to squash to the commits before merging.)

Comment thread gcloud/credentials.py Outdated

return crypto.load_privatekey(crypto.FILETYPE_PEM, pem_text)
if crypto is None:
raise EnvironmentError('pyOpenSSL must be installed to load a '

This comment was marked as spam.

This comment was marked as spam.

Copy link
Copy Markdown
Contributor

LGTM with minor nits. You can squash commits if you want, but I don't see an issue with these being separate commits.

dhermes commented Feb 12, 2016

Copy link
Copy Markdown
Contributor Author

@jonparrott PTAL

Comment thread gcloud/credentials.py Outdated
if not isinstance(string_to_sign, six.binary_type):
string_to_sign = string_to_sign.encode('utf-8')
if crypto is None:
raise EnvironmentError('pyOpenSSL must be installed to sign '

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Copy link
Copy Markdown
Contributor

Good to go with the tiniest little nit. Feel free to merge once that's fixed and travis is happy.

dhermes added a commit that referenced this pull request Feb 12, 2016
Allowing pyOpenSSL import to fail for GAE.
dhermes merged commit ad88be0 into googleapis:master Feb 12, 2016
dhermes deleted the fix-1445 branch February 12, 2016 19:28
atulep pushed a commit that referenced this pull request Apr 6, 2023
atulep pushed a commit that referenced this pull request Apr 6, 2023
atulep pushed a commit that referenced this pull request Apr 18, 2023
parthea pushed a commit that referenced this pull request Oct 22, 2023
parthea pushed a commit that referenced this pull request Mar 6, 2026
* docs: revise sample for nested schema

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* added TODO

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auth cla: yes This human has signed the Contributor License Agreement. packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL