Package: python-couchdbkit
Version: 0.5.2-1.1
Severity: important
Hi,
I'm getting the following errors when upgrading python-couchdbkit. The
attached patch fixes them, basically just adding a bunch of
"from __future__ import with_statement".
Processing triggers for python-support ...
/usr/lib/pymodules/python2.5/couchdbkit/consumer/ceventlet.py:51: Warning:
'with' will become a reserved keyword in Python 2.6
Compiling /usr/lib/pymodules/python2.5/couchdbkit/consumer/ceventlet.py ...
File "/usr/lib/pymodules/python2.5/couchdbkit/consumer/ceventlet.py", line 51
with resp.body_stream() as body:
^
SyntaxError: invalid syntax
/usr/lib/pymodules/python2.5/couchdbkit/consumer/cgevent.py:39: Warning: 'with'
will become a reserved keyword in Python 2.6
Compiling /usr/lib/pymodules/python2.5/couchdbkit/consumer/cgevent.py ...
File "/usr/lib/pymodules/python2.5/couchdbkit/consumer/cgevent.py", line 39
with resp.body_stream() as body:
^
SyntaxError: invalid syntax
/usr/lib/pymodules/python2.5/couchdbkit/ext/pylons/test.py:15: Warning: 'with'
will become a reserved keyword in Python 2.6
Compiling /usr/lib/pymodules/python2.5/couchdbkit/ext/pylons/test.py ...
File "/usr/lib/pymodules/python2.5/couchdbkit/ext/pylons/test.py", line 15
with open(fixture_path, "r") as fp:
^
SyntaxError: invalid syntax
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python-couchdbkit depends on:
ii python 2.6.6-3+squeeze5 interactive high-level object-orie
ii python-anyjson 0.2.3-1 Wraps the best available JSON impl
ii python-restkit 3.0.4-1 Restkit is an HTTP resource kit fo
ii python-support 1.0.11 automated rebuilding support for P
python-couchdbkit recommends no packages.
python-couchdbkit suggests no packages.
-- no debconf information
diff -Nur python-couchdbkit-0.5.2/couchdbkit/consumer/ceventlet.py python-couchdbkit-0.5.2.new//couchdbkit/consumer/ceventlet.py
--- python-couchdbkit-0.5.2/couchdbkit/consumer/ceventlet.py 2011-01-10 17:50:28.000000000 +0100
+++ python-couchdbkit-0.5.2.new//couchdbkit/consumer/ceventlet.py 2011-03-07 11:46:03.000000000 +0100
@@ -3,6 +3,8 @@
# This file is part of couchdbkit released under the MIT license.
# See the NOTICE for more information.
+from __future__ import with_statement
+
import traceback
import eventlet
@@ -13,7 +15,6 @@
from couchdbkit.consumer.sync import SyncConsumer
from couchdbkit.utils import json
-
class ChangeConsumer(object):
def __init__(self, db, callback, **params):
self.process_change = callback
diff -Nur python-couchdbkit-0.5.2/couchdbkit/consumer/cgevent.py python-couchdbkit-0.5.2.new//couchdbkit/consumer/cgevent.py
--- python-couchdbkit-0.5.2/couchdbkit/consumer/cgevent.py 2011-01-10 17:50:28.000000000 +0100
+++ python-couchdbkit-0.5.2.new//couchdbkit/consumer/cgevent.py 2011-03-07 11:46:03.000000000 +0100
@@ -3,6 +3,8 @@
# This file is part of couchdbkit released under the MIT license.
# See the NOTICE for more information.
+from __future__ import with_statement
+
import traceback
import gevent
diff -Nur python-couchdbkit-0.5.2/couchdbkit/ext/pylons/test.py python-couchdbkit-0.5.2.new//couchdbkit/ext/pylons/test.py
--- python-couchdbkit-0.5.2/couchdbkit/ext/pylons/test.py 2011-01-10 17:50:28.000000000 +0100
+++ python-couchdbkit-0.5.2.new//couchdbkit/ext/pylons/test.py 2011-03-07 11:46:03.000000000 +0100
@@ -1,3 +1,5 @@
+from __future__ import with_statement
+
from couchdbkit import BaseDocsLoader, ResourceNotFound
from couchdbkit.ext.pylons.db import init_db, sync_design, default_design_path
import os, json, unittest