cubicweb/web/views/workflow.py
changeset 12503 b01dd0ef43aa
parent 12355 c703dc95c82e
child 12567 26744ad37953
--- a/cubicweb/web/views/workflow.py	Wed Mar 13 13:37:49 2019 +0100
+++ b/cubicweb/web/views/workflow.py	Thu Mar 14 14:43:18 2019 +0100
@@ -24,12 +24,9 @@
 
 from cubicweb import _
 
-import os
-
-from six import add_metaclass, text_type
+from six import text_type
 
 from logilab.mtconverter import xml_escape
-from logilab.common.deprecation import class_deprecated
 
 from cubicweb import Unauthorized
 from cubicweb.predicates import (one_line_rset,
@@ -38,7 +35,6 @@
 from cubicweb.view import EntityView
 from cubicweb.web import stdmsgs, action, component, form
 from cubicweb.web import formwidgets as fwdgs
-from cubicweb.web.views import TmpFileViewMixin
 from cubicweb.web.views import uicfg, forms, ibreadcrumbs
 from cubicweb.web.views.tabs import TabbedPrimaryView, PrimaryTab
 from cubicweb.web.views.dotgraphview import DotGraphView, DotPropsHandler
@@ -444,24 +440,3 @@
 
     def build_dotpropshandler(self):
         return WorkflowDotPropsHandler(self._cw)
-
-
-@add_metaclass(class_deprecated)
-class TmpPngView(TmpFileViewMixin, EntityView):
-    __deprecation_warning__ = '[3.18] %(cls)s is deprecated'
-    __regid__ = 'tmppng'
-    __select__ = match_form_params('tmpfile')
-    content_type = 'image/png'
-    binary = True
-
-    def cell_call(self, row=0, col=0):
-        key = self._cw.form['tmpfile']
-        if key not in self._cw.session.data:
-            # the temp file is gone and there's nothing
-            # we can do about it
-            # we should probably write it to some well
-            # behaved place and serve it
-            return
-        tmpfile = self._cw.session.data.pop(key)
-        self.w(open(tmpfile, 'rb').read())
-        os.unlink(tmpfile)