Commit 79fa584e authored by Levin Zimmermann's avatar Levin Zimmermann

Restricted: Migrate np bits from Wendelin to ERP5

With a254bf50 we
migrated most of np related security code from Wendelin to ERP5, we only
missed few lines. This patch moves the remaining lines to ERP5 so
that all numpy related restricted python code is at one place and no
longer scattered at two different repos/files.

tested at: https://erp5js.nexedi.net/#/test_result_module/20230302-F5352509
parent 6132e453
......@@ -458,9 +458,13 @@ for dtype in ('int8', 'int16', 'int32', 'int64', \
allow_type(type(rz[0]))
allow_type(type(rz))
allow_type(np.dtype)
allow_type(np.timedelta64)
allow_type(type(np.c_))
allow_type(type(np.dtype('int16')))
allow_type(
type(np.array([('2017-07-12T12:30:20',)], dtype=[('date', 'M8[s]')])['date'])
)
# Modify 'safetype' dict in full_write_guard function of RestrictedPython
# (closure) directly to allow write access to ndarray
......
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