From bd90ebde7be47d4e3bf715903c30b7088fe66c02 Mon Sep 17 00:00:00 2001 From: Mohammad Ahtasham ul Hassan <60315450+aht007@users.noreply.github.com> Date: Thu, 28 Jul 2022 15:56:03 +0500 Subject: [PATCH] fix: unpin numpy (#30761) --- requirements/edx-sandbox/py38.in | 7 ------- requirements/edx-sandbox/py38.txt | 3 +-- xmodule/capa/safe_exec/safe_exec.py | 1 + 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/requirements/edx-sandbox/py38.in b/requirements/edx-sandbox/py38.in index 115c8d98f4..4c1a61bc27 100644 --- a/requirements/edx-sandbox/py38.in +++ b/requirements/edx-sandbox/py38.in @@ -12,10 +12,3 @@ random2 # Implementation of random module that works scipy # Math, science, and engineering library sympy # Symbolic math library codejail-includes # CodeJail manages execution of untrusted code in secure sandboxes. - -# numpy>=1.17.0 caused failures in importing numpy in code-jail environment. -# The issue will be investigated and fixed in https://openedx.atlassian.net/browse/BOM-2841. -numpy>=1.16.0,<1.17.0 - - - diff --git a/requirements/edx-sandbox/py38.txt b/requirements/edx-sandbox/py38.txt index 0927dba771..7232a1f2ed 100644 --- a/requirements/edx-sandbox/py38.txt +++ b/requirements/edx-sandbox/py38.txt @@ -42,9 +42,8 @@ nltk==3.7 # via # -r requirements/edx-sandbox/py38.in # chem -numpy==1.16.6 +numpy==1.22.4 # via - # -r requirements/edx-sandbox/py38.in # chem # matplotlib # openedx-calc diff --git a/xmodule/capa/safe_exec/safe_exec.py b/xmodule/capa/safe_exec/safe_exec.py index e08e58d488..92674117f4 100644 --- a/xmodule/capa/safe_exec/safe_exec.py +++ b/xmodule/capa/safe_exec/safe_exec.py @@ -28,6 +28,7 @@ from six.moves import xrange random = random_module.Random(%r) random.Random = random_module.Random +random.SystemRandom = random_module.SystemRandom sys.modules['random'] = random """