Commit 01850935 authored by Ivan Tyagov's avatar Ivan Tyagov

Allow pytz

parent 469b5218
......@@ -75,6 +75,11 @@ allow_type(pd.MultiIndex)
allow_type(pd.core.groupby.DataFrameGroupBy)
allow_class(pd.DataFrame)
import pytz
allow_module('pytz')
allow_class(pytz.exceptions)
allow_class(pytz.exceptions.NonExistentTimeError)
# Modify 'safetype' dict in full_write_guard function
# of RestrictedPython (closure) directly To allow
# write access to ndarray, DataFrame, ZBigArray and RAMArray objects
......@@ -87,6 +92,10 @@ full_write_guard.func_closure[1].cell_contents.__self__[pd.tseries.index.Datetim
full_write_guard.func_closure[1].cell_contents.__self__[pd.core.indexing._iLocIndexer] = True
full_write_guard.func_closure[1].cell_contents.__self__[pd.Index] = True
full_write_guard.func_closure[1].cell_contents.__self__[pd.MultiIndex] = True
full_write_guard.func_closure[1].cell_contents.__self__[pytz.exceptions] = True
full_write_guard.func_closure[1].cell_contents.__self__[pytz.exceptions.NonExistentTimeError] = True
from wendelin.bigarray.array_zodb import ZBigArray
full_write_guard.func_closure[1].cell_contents.__self__[ZBigArray] = True
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