[pyramid] Drop guard of old cubicweb version
authorDenis Laxalde <denis.laxalde@logilab.fr>
Mon, 26 Sep 2016 18:21:43 +0200
changeset 11686 41d4f0f3855c
parent 11685 6c263b8091d3
child 11687 f9efc8012b64
[pyramid] Drop guard of old cubicweb version
cubicweb/pyramid/core.py
--- a/cubicweb/pyramid/core.py	Mon Sep 26 18:20:53 2016 +0200
+++ b/cubicweb/pyramid/core.py	Mon Sep 26 18:21:43 2016 +0200
@@ -22,9 +22,6 @@
 log = logging.getLogger(__name__)
 
 
-CW_321 = cubicweb.__pkginfo__.numversion >= (3, 21, 0)
-
-
 class Connection(cwsession.Connection):
     """ A specialised Connection that access the session data through a
     property.
@@ -247,16 +244,10 @@
     if session is None:
         return None
 
-    if CW_321:
-        cnx = session.new_cnx()
+    cnx = session.new_cnx()
 
-        def commit_state(cnx):
-            return cnx.commit_state
-    else:
-        cnx = repoapi.ClientConnection(session)
-
-        def commit_state(cnx):
-            return cnx._cnx.commit_state
+    def commit_state(cnx):
+        return cnx.commit_state
 
     def cleanup(request):
         try: