Skip to content

Instantly share code, notes, and snippets.

@daharon
Created August 18, 2011 20:32
Show Gist options
  • Save daharon/1155116 to your computer and use it in GitHub Desktop.
Save daharon/1155116 to your computer and use it in GitHub Desktop.
Error when importing GitPython in a Gevent app.
# This will crash.
from gevent import monkey
monkey.patch_all()
from git import Repo
$ python gevent_git_test.py
Traceback (most recent call last):
File "gevent_git_test.py", line 4, in <module>
from git import Repo
File "/home/daharon/temp/fabric/test/env/lib/python2.7/site-packages/git/__init__.py", line 28, in <module>
_init_externals()
File "/home/daharon/temp/fabric/test/env/lib/python2.7/site-packages/git/__init__.py", line 20, in _init_externals
import gitdb
File "/home/daharon/temp/fabric/test/env/lib/python2.7/site-packages/gitdb/__init__.py", line 35, in <module>
from db import *
File "/home/daharon/temp/fabric/test/env/lib/python2.7/site-packages/gitdb/db/__init__.py", line 6, in <module>
from base import *
File "/home/daharon/temp/fabric/test/env/lib/python2.7/site-packages/gitdb/db/base.py", line 6, in <module>
from gitdb.util import (
File "/home/daharon/temp/fabric/test/env/lib/python2.7/site-packages/gitdb/util.py", line 65, in <module>
pool = ThreadPool(0)
File "/home/daharon/temp/fabric/test/env/lib/python2.7/site-packages/async/pool.py", line 188, in __init__
self._taskgraph_lock = self.LockCls()
TypeError: allocate_lock() takes no arguments (1 given)
@abulte
Copy link

abulte commented Dec 6, 2012

Any idea how to circumvent that?

@abulte
Copy link

abulte commented Dec 6, 2012

Ok, found the associated issue gitpython-developers/async#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment