Skip to content

Instantly share code, notes, and snippets.

View xavfernandez's full-sized avatar

Xavier Fernandez xavfernandez

View GitHub Profile
With https://github.com/pypa/pip/pull/4676:
*Short hash*
(tmp-570ff8c04efbe63) [xfernandez@xaferiba pip]$ pip install -e git+https://github.com/PyCQA/mccabe.git@2b46671#egg=mccabe
Looking in indexes: https://somewhere
Obtaining mccabe from git+https://github.com/PyCQA/mccabe.git@2b46671#egg=mccabe
Updating /home/xfernandez/.virtualenvs/tmp-571ff8c04efbe63/src/mccabe clone (to revision 2b46671)
Could not find a tag or branch '2b46671', assuming commit or ref
Installing collected packages: mccabe
Found existing installation: mccabe 0.6.1
@xavfernandez
xavfernandez / keybase.md
Created August 13, 2014 21:47
keybase.md

Keybase proof

I hereby claim:

  • I am xavfernandez on github.
  • I am xavfernandez (https://keybase.io/xavfernandez) on keybase.
  • I have a public key whose fingerprint is FAF3 1B86 E42B 4DDD E63E A276 8FF3 CB83 1CC6 1143

To claim this, I am signing this object:

@xavfernandez
xavfernandez / gist:1ea7dc03d5dc793cd082
Created July 2, 2014 21:58
Python 3.3 hanging analysis
#/usr/lib/python3.3/subprocess.py, inside def _communicate_with_poll:
while self._fd2file:
timeout = self._remaining_time(endtime)
if timeout is not None and timeout < 0:
raise TimeoutExpired(self.args, orig_timeout)
try:
ready = poller.poll(timeout)
except select.error as e:
if e.args[0] == errno.EINTR:
git clone git@github.com:xavfernandez/pip.git
cd pip
git checkout debug_stuck
mkvirtualenv test_stuck --python=/usr/bin/python3.3
pip install pytest==2.5.2
pip install scripttest==1.3
pip install virtualenv==1.11.6
pip install mock==1.0.1
pip install pretend==1.0.8
pip install setuptools==4.0
@xavfernandez
xavfernandez / gist:9782553
Last active August 29, 2015 13:57
Mock asyncio call
from unittest import mock
import asyncio
@asyncio.coroutine
def test():
yield from range(10)
@asyncio.coroutine
def test2():
yield from test()