Commit 6890aa95 authored by Levin Zimmermann's avatar Levin Zimmermann

Remove even more numpy security duplications

With nexedi/wendelin@3f887532 and nexedi/wendelin@b4c22280 we already removed numpy security duplications:
this code already exists in ERP5 (with nexedi/erp5@a254bf50).
But we still missed some code parts: https://lab.nexedi.com/nexedi/wendelin/blob/b4c222803027a2d0d0fae793a4f16d4bea85f87d/product/Wendelin/__init__.py#L49-52
(perhaps because they looked different between erp5 and wendelin).

Furthermore with nexedi/erp5@79fa584e the last
numpy parts which only existed in Wendelin were also migrated to ERP5,
which is why we can finally also remove this from Wendelin.

Now all numpy related RestrictedPython definitions can be found in
the ERP5 codebase and they are no longer distributed over both ERP5
and Wendelin.
parent e543b8b8
...@@ -26,13 +26,6 @@ ...@@ -26,13 +26,6 @@
""" """
from AccessControl import allow_module, allow_type, allow_class from AccessControl import allow_module, allow_type, allow_class
import numpy as np
allow_type(np.dtype)
sz = np.array([('2017-07-12T12:30:20',)], dtype=[('date', 'M8[s]')])
allow_type(type(sz[0]['date']))
allow_module('sklearn') allow_module('sklearn')
allow_module('sklearn.model_selection') allow_module('sklearn.model_selection')
allow_module('sklearn.linear_model') allow_module('sklearn.linear_model')
...@@ -68,10 +61,6 @@ def allow_full_write(t): ...@@ -68,10 +61,6 @@ def allow_full_write(t):
safetype.__self__.update({t: True}) safetype.__self__.update({t: True})
allow_full_write(np.ndarray)
allow_full_write(np.core.records.recarray)
allow_full_write(np.core.records.record)
from wendelin.bigarray.array_zodb import ZBigArray from wendelin.bigarray.array_zodb import ZBigArray
allow_full_write(ZBigArray) allow_full_write(ZBigArray)
allow_type(ZBigArray) allow_type(ZBigArray)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment