Remove workarounds and backports for Python 2 support

In particular:
- In common/, remove the backport of weakref.WeakMethod
- In docs/ and ui/, use the standard FileNotFoundError class
- Use built-in open() instead of io.open(), and stop importing io
- In core/stats.py, use the standard implementation of xml.etree instead
of the C one
This commit is contained in:
Candice Bentéjac 2022-12-05 16:34:01 +01:00
parent 635f85e7fd
commit 8bef398bed
9 changed files with 10 additions and 88 deletions

View file

@ -348,7 +348,7 @@ class TaskManager(BaseObject):
raise ValueError("Argument 'context' must be: 'COMPUTATION' or 'SUBMITTING'")
if len(ready) + len(computed) != len(toNodes):
del toNodes[:] # for python 2 compatibility, else use: toNodes.clear()
toNodes.clear()
toNodes.extend(ready)
return False