Missing psycopg2 >= 2.5 version requirement

Bug #1491357 reported by James Page
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tooz
Fix Released
Medium
Julien Danjou

Bug Description

The use of a cursor in a with state requires a minimum version of psycopg2 of 2.5 (see http://initd.org/psycopg/docs/cursor.html).

======================================================================
FAIL: tests.test_coordination.TestAPI.test_ensure_acquire_release_return(postgresql)
tests.test_coordination.TestAPI.test_ensure_acquire_release_return(postgresql)
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "tooz/tests/__init__.py", line 29, in skip_if_not_implemented
    return func(*args, **kwargs)
  File "/«PKGBUILDDIR»/tooz/tests/test_coordination.py", line 719, in test_ensure_acquire_release_return
    self.assertTrue(lock1.acquire())
  File "tooz/drivers/pgsql.py", line 135, in acquire
    return _lock()
  File "/usr/lib/python2.7/dist-packages/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/retrying.py", line 206, in call
    return attempt.get(self._wrap_exception)
  File "/usr/lib/python2.7/dist-packages/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/usr/lib/python2.7/dist-packages/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "tooz/drivers/pgsql.py", line 116, in _lock
    with _translating_cursor(self._conn) as cur:
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "tooz/drivers/pgsql.py", line 83, in _translating_cursor
    with conn.cursor() as cur:
AttributeError: __exit__

currently the dependency is un-versioned in test-requirements.txt

Julien Danjou (jdanjou)
Changed in python-tooz:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Julien Danjou (jdanjou)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tooz (master)

Fix proposed to branch: master
Review: https://review.openstack.org/219662

Changed in python-tooz:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tooz (master)

Change abandoned by Julien Danjou (<email address hidden>) on branch: master
Review: https://review.openstack.org/219662

Julien Danjou (jdanjou)
Changed in python-tooz:
status: In Progress → Fix Committed
Changed in python-tooz:
milestone: none → 1.27.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.