Drop a left-over 3.22 deprecation warning
authorDenis Laxalde <denis.laxalde@logilab.fr>
Fri, 22 Mar 2019 14:48:22 +0100
changeset 12536 c98e213f4eb2
parent 12535 7dbb523d5421
child 12537 95dbb61f5410
Drop a left-over 3.22 deprecation warning
cubicweb/migration.py
--- a/cubicweb/migration.py	Wed Mar 27 15:53:00 2019 +0100
+++ b/cubicweb/migration.py	Fri Mar 22 14:48:22 2019 +0100
@@ -24,7 +24,6 @@
 import tempfile
 from os.path import exists, join, basename, splitext
 from itertools import chain
-from warnings import warn
 
 from six import string_types
 
@@ -355,13 +354,7 @@
             scriptlocals['__name__'] = pyname
             with open(migrscript, 'rb') as fobj:
                 fcontent = fobj.read()
-            try:
-                code = compile(fcontent, migrscript, 'exec')
-            except SyntaxError:
-                # try without print_function
-                code = compile(fcontent, migrscript, 'exec', 0, True)
-                warn('[3.22] script %r should be updated to work with print_function'
-                     % migrscript, DeprecationWarning)
+            code = compile(fcontent, migrscript, 'exec')
             exec(code, scriptlocals)
             if funcname is not None:
                 try: