https://codereview.appspot.com/7323052/diff/2001/oauth2client/client.py File oauth2client/client.py (right): https://codereview.appspot.com/7323052/diff/2001/oauth2client/client.py#newcode49 oauth2client/client.py:49: from oauth2client.crypt import OpenSSLVerifier 1.) Given the current state ...
12 years, 4 months ago
(2013-02-12 16:55:52 UTC)
#2
https://codereview.appspot.com/7323052/diff/2001/oauth2client/client.py File oauth2client/client.py (right): https://codereview.appspot.com/7323052/diff/2001/oauth2client/client.py#newcode49 oauth2client/client.py:49: from oauth2client.crypt import OpenSSLVerifier On 2013/02/12 16:55:52, dhermes wrote: ...
12 years, 4 months ago
(2013-02-12 17:06:17 UTC)
#3
https://codereview.appspot.com/7323052/diff/2001/oauth2client/client.py
File oauth2client/client.py (right):
https://codereview.appspot.com/7323052/diff/2001/oauth2client/client.py#newco...
oauth2client/client.py:49: from oauth2client.crypt import OpenSSLVerifier
On 2013/02/12 16:55:52, dhermes wrote:
> 1.) Given the current state of crypt, this can succeed if PyCrypto can be
> imported, it will just be None.
Fixed.
>
> 2.) Which "downstream" libraries depend on this? Maybe we should note this?
> Can't they do this check themselves?
HAS_OPENSSL is part of the public interface of this module, which is in GA, it
shouldn't have been removed.
>
> 3.) Why not instead something like:
>
> HAS_OPENSSL = (crypy.OpenSSLVerifier is not None) if HAS_CRYPTO else False
Simplified code along those lines.
https://codereview.appspot.com/7323052/diff/2001/tests/test_oauth2client_jwt.py
File tests/test_oauth2client_jwt.py (right):
https://codereview.appspot.com/7323052/diff/2001/tests/test_oauth2client_jwt....
tests/test_oauth2client_jwt.py:317: self.assertEqual(True, HAS_OPENSSL)
The test insures that the HAS_* values don't go away.
On 2013/02/12 16:55:52, dhermes wrote:
> Where is this test running? What is the point of these flags if they're always
> True? What is the point of this test if we only test in places they are True?
https://codereview.appspot.com/7323052/diff/2001/tests/test_oauth2client_jwt.py File tests/test_oauth2client_jwt.py (right): https://codereview.appspot.com/7323052/diff/2001/tests/test_oauth2client_jwt.py#newcode317 tests/test_oauth2client_jwt.py:317: self.assertEqual(True, HAS_OPENSSL) It also ensures they are True. If ...
12 years, 4 months ago
(2013-02-12 17:15:57 UTC)
#4
https://codereview.appspot.com/7323052/diff/2001/tests/test_oauth2client_jwt.py
File tests/test_oauth2client_jwt.py (right):
https://codereview.appspot.com/7323052/diff/2001/tests/test_oauth2client_jwt....
tests/test_oauth2client_jwt.py:317: self.assertEqual(True, HAS_OPENSSL)
It also ensures they are True.
If that's what you're testing, please move the imports down here to the test and
just let an ImportError in the test be your failure.
On 2013/02/12 17:06:17, jcgregorio_google wrote:
> The test insures that the HAS_* values don't go away.
>
> On 2013/02/12 16:55:52, dhermes wrote:
> > Where is this test running? What is the point of these flags if they're
always
> > True? What is the point of this test if we only test in places they are
True?
>
https://codereview.appspot.com/7323052/diff/2001/tests/test_oauth2client_jwt.py File tests/test_oauth2client_jwt.py (right): https://codereview.appspot.com/7323052/diff/2001/tests/test_oauth2client_jwt.py#newcode317 tests/test_oauth2client_jwt.py:317: self.assertEqual(True, HAS_OPENSSL) On 2013/02/12 17:15:57, dhermes wrote: > It ...
12 years, 4 months ago
(2013-02-12 17:19:13 UTC)
#5
https://codereview.appspot.com/7323052/diff/2001/tests/test_oauth2client_jwt.py
File tests/test_oauth2client_jwt.py (right):
https://codereview.appspot.com/7323052/diff/2001/tests/test_oauth2client_jwt....
tests/test_oauth2client_jwt.py:317: self.assertEqual(True, HAS_OPENSSL)
On 2013/02/12 17:15:57, dhermes wrote:
> It also ensures they are True.
Yes, which should be the case when running the unit tests.
>
> If that's what you're testing, please move the imports down here to the test
and
> just let an ImportError in the test be your failure.
>
> On 2013/02/12 17:06:17, jcgregorio_google wrote:
> > The test insures that the HAS_* values don't go away.
> >
> > On 2013/02/12 16:55:52, dhermes wrote:
> > > Where is this test running? What is the point of these flags if they're
> always
> > > True? What is the point of this test if we only test in places they are
> True?
> >
>
On 2013/02/12 17:20:02, dhermes wrote: > LGTM Committed in https://code.google.com/p/google-api-python-client/source/detail?r=ef1906792a38cba6f10c5ca84aa2568063e2c126
12 years, 4 months ago
(2013-02-12 18:20:24 UTC)
#7
Issue 7323052: Restore HAS_OPENSSL.
(Closed)
Created 12 years, 4 months ago by jcgregorio_google
Modified 12 years, 4 months ago
Reviewers: dhermes, jcgregorio_google
Base URL:
Comments: 6