cubicweb #1459809 SyntaxError: invalid syntax - cubicweb-dev for python2.5 (unittest inside) [resolved]

While upgrading a debian machine, I got

Setting up cubicweb-dev (3.10.7-1) ...
/usr/lib/python2.5/site-packages/cubicweb/web/test/unittest_application.py:301: Warning: 'with' will become a reserved keyword in Python 2.6
Compiling /usr/lib/python2.5/site-packages/cubicweb/web/test/unittest_application.py ...
  File "/usr/lib/python2.5/site-packages/cubicweb/web/test/unittest_application.py", line 301
    with self.assertRaises(Unauthorized) as cm:
             ^
SyntaxError: invalid syntax

/usr/lib/python2.5/site-packages/cubicweb/web/test/unittest_views_basecontrollers.py:50: Warning: 'with' will become a reserved keyword in Python 2.6
Compiling /usr/lib/python2.5/site-packages/cubicweb/web/test/unittest_views_basecontrollers.py ...
File "/usr/lib/python2.5/site-packages/cubicweb/web/test/unittest_views_basecontrollers.py", line 50
  with self.assertRaises(ValidationError) as cm:
          ^
SyntaxError: invalid syntax

pycentral: pycentral pkginstall: error byte-compiling files (191)
pycentral pkginstall: error byte-compiling files (191)
dpkg: error processing cubicweb-dev (--configure):
 subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
prioritynormal
typebug
done in3.10.8
load0.100
load left0.000
closed by<not specified>