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

Restore 'grpc' extra for testing on Python 2.7. #1697

Merged
merged 1 commit into from
Apr 5, 2016
Merged

Restore 'grpc' extra for testing on Python 2.7. #1697

merged 1 commit into from
Apr 5, 2016

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Apr 4, 2016

Bump minimum required 'grpc' version to 0.13.1, which supports UCS-4 and UCS-2 builds on Linux.

Closes #1572.

Bump minimum required 'grpc' version to 0.13.1, which supports UCS-4 and
UCS-2 builds on Linux.

Closes #1572.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 4, 2016
basepython =
python2.7
commands =
pip install gcloud[grpc]

This comment was marked as spam.

@tseaver
Copy link
Contributor Author

tseaver commented Apr 4, 2016

time .tox/py27/pip install gcloud[grpc] call trades off about one second on my machine, in exchange for some DRYness (maintaining the pinned grpcio version only in setup.py). Until we can just make grpcio an unconditional dependency, that seems like a reasonable tradeoff: it might even help people figure out how to satisfy the optional dependency.

@dhermes
Copy link
Contributor

dhermes commented Apr 4, 2016

I am big time 👎 on adding any unnecessary time to running our test suite. Running tests is one of the biggest barriers to contributing.

@tseaver
Copy link
Contributor Author

tseaver commented Apr 4, 2016

On my machine, with this change:

$ time tox -e py27
GLOB sdist-make: /home/tseaver/projects/agendaless/Google/src/gcloud-python/setup.py
py27 inst-nodeps: /home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/dist/gcloud-0.12.0.zip
py27 installed: -f file:///home/tseaver/.pip/wheels,cffi==1.5.2,cryptography==1.3.1,enum34==1.1.2,futures==3.0.5,gcloud==0.12.0,googleapis-common-protos==1.1.0,grpcio==0.13.1,httplib2==0.9.2,idna==2.1,ipaddress==1.0.16,linecache2==1.0.0,nose==1.3.7,nose-exclude==0.4.1,oauth2client==2.0.1,protobuf==3.0.0b2.post2,pyasn1==0.1.9,pyasn1-modules==0.0.8,pycparser==2.14,pyOpenSSL==16.0.0,rsa==3.4.2,six==1.10.0,traceback2==1.4.0,unittest2==1.1.0
py27 runtests: PYTHONHASHSEED='4256048390'
py27 runtests: commands[0] | pip install gcloud[grpc]
Requirement already satisfied (use --upgrade to upgrade): gcloud[grpc] in /home/tseaver/projects/agendaless/Google/src/gcloud-python
----------------------------------------------------------------------
# elided
Ran 1835 tests in 0.864s

OK
___________________________________ summary ____________________________________
  py27: commands succeeded
  congratulations :)

real    0m8.512s
user    0m7.338s
sys 0m0.975s

With explicit dependencies:

$ time tox -e py27
GLOB sdist-make: /home/tseaver/projects/agendaless/Google/src/gcloud-python/setup.py
py27 inst-nodeps: /home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/dist/gcloud-0.12.0.zip
py27 installed: -f file:///home/tseaver/.pip/wheels,cffi==1.5.2,cryptography==1.3.1,enum34==1.1.2,futures==3.0.5,gcloud==0.12.0,googleapis-common-protos==1.1.0,grpcio==0.13.1,httplib2==0.9.2,idna==2.1,ipaddress==1.0.16,linecache2==1.0.0,nose==1.3.7,nose-exclude==0.4.1,oauth2client==2.0.1,protobuf==3.0.0b2.post2,pyasn1==0.1.9,pyasn1-modules==0.0.8,pycparser==2.14,pyOpenSSL==16.0.0,rsa==3.4.2,six==1.10.0,traceback2==1.4.0,unittest2==1.1.0
py27 runtests: PYTHONHASHSEED='1552785647'
# elided
Ran 1835 tests in 0.861s

OK
___________________________________ summary ____________________________________
  py27: commands succeeded
  congratulations :)

real    0m7.543s
user    0m6.394s
sys 0m0.947s

which is a net cost of one second: hardly worth arguing about.

@dhermes
Copy link
Contributor

dhermes commented Apr 4, 2016

I understand the DRY objection but the whole point of using tox is avoiding calling pip install in these cases. The check/install/run flow is not optimized for us manually calling pip install.

@tseaver
Copy link
Contributor Author

tseaver commented Apr 4, 2016

The "wart" (invoking the extra explicitly) will go away once we can safely just depend on grpcio for all supported Python versions. And again, we are talking about one second of wall clock time here per Python 2.7 tox environment: compared to the possibility of having the pinned grcpio version drift between setup.py and tox.ini, that seems like a good tradeoff.

@dhermes
Copy link
Contributor

dhermes commented Apr 4, 2016

OK go ahead and merge

@tseaver tseaver merged commit 188515f into googleapis:master Apr 5, 2016
@tseaver tseaver deleted the 1527-restore_grpc_for_py27_testing branch April 5, 2016 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: core cla: yes This human has signed the Contributor License Agreement. packaging testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants