Skip to content

Commit 38e8ef1

Browse files
committed
Use released Timed-Threads
1 parent b145292 commit 38e8ef1

File tree

11 files changed

+25
-52
lines changed

11 files changed

+25
-52
lines changed

.github/workflows/consistency-checks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
run: |
2323
sudo apt update -qq && sudo apt install llvm-dev remake
2424
python -m pip install --upgrade pip
25+
# First, install our Timed-Threads
26+
pip install Timed-Threads
2527
# We can comment out after next Mathics-Scanner release
2628
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
2729
pip install -e .

.github/workflows/macos.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,10 @@ jobs:
2828
python -m pip install --upgrade pip
2929
- name: Install Mathics3 with full Python dependencies
3030
run: |
31-
# First install our patched version of stopit
32-
git clone --depth 1 https://github.com/Mathics3/stopit.git
33-
cd stopit/
34-
pip install -e .
35-
cd ..
31+
# First, install our patched version of stopit called Timed-Threads
32+
pip install Timed-Threads
3633
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
3734
# We can comment out after next Mathics-Scanner release
38-
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
39-
# git clone --single-branch --branch operator-refactor-part1.5 https://github.com/Mathics3/mathics-scanner.git
40-
cd mathics-scanner/
41-
pip install -e .
42-
cd ..
43-
# We can comment out after next Mathics-Scanner release
4435
# python -m pip install Mathics-Scanner[full]
4536
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
4637
pip install -e .

.github/workflows/pyodide.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ jobs:
5454
5555
pip install "setuptools>=70.0.0" PyYAML click packaging pytest
5656
57-
# First install our patched version of stopit
58-
git clone --depth 1 https://github.com/Mathics3/stopit.git
59-
cd stopit/
60-
pip install -e .
61-
cd ..
6257
# We can comment out after next Mathics-Scanner release
6358
# python -m pip install --no-build-isolation -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner
6459
# pip install --no-build-isolation -e .

.github/workflows/ubuntu-bench.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,9 @@ jobs:
2424
- name: Install Mathics3 with full dependencies
2525
run: |
2626
python -m pip install --upgrade pip
27+
# First, install our Timed-Threads
28+
pip install Timed-Threads
2729
python -m pip install pytest-benchmark
28-
# First install our patched version of stopit
29-
git clone --depth 1 https://github.com/Mathics3/stopit.git
30-
cd stopit/
31-
pip install -e .
32-
cd ..
3330
# We can comment out after next Mathics-Scanner release
3431
# python -m pip install Mathics-Scanner[full]
3532
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]

.github/workflows/ubuntu-cython.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,8 @@ jobs:
2424
run: |
2525
sudo apt-get update -qq && sudo apt-get install -qq liblapack-dev llvm-dev tesseract-ocr
2626
python -m pip install --upgrade pip
27-
# First install our patched version of stopit
28-
git clone --depth 1 https://github.com/Mathics3/stopit.git
29-
cd stopit/
30-
pip install -e .
31-
cd ..
27+
# First, install our Timed-Threads
28+
pip install Timed-Threads
3229
# We can comment out after next Mathics-Scanner release
3330
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
3431
pip install -e .

.github/workflows/ubuntu.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,8 @@ jobs:
2424
- name: Install Mathics3 with full dependencies
2525
run: |
2626
python -m pip install --upgrade pip
27-
# First install our patched version of stopit
28-
git clone --depth 1 https://github.com/Mathics3/stopit.git
29-
cd stopit/
30-
pip install -e .
31-
cd ..
27+
# First, install our patched version of stopit called Timed-Threads
28+
python -m pip install Timed-Threads
3229
# We can comment out after next Mathics-Scanner release
3330
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
3431
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git

.github/workflows/windows.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,8 @@ jobs:
3333
set LLVM_DIR="C:\Program Files\LLVM"
3434
- name: Install Mathics3 with Python dependencies
3535
run: |
36-
# First install our patched version of stopit
37-
git clone --depth 1 https://github.com/Mathics3/stopit.git
38-
cd stopit/
39-
pip install -e .
40-
cd ..
41-
# We can comment out after next Mathics-Scanner release
42-
python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
43-
git clone --depth 1 https://github.com/Mathics3/mathics-scanner.git
44-
# git clone --single-branch --branch operator-refactor-part1.5 https://github.com/Mathics3/mathics-scanner.git
45-
cd mathics-scanner
46-
pip install -e .
47-
cd ..
36+
# First, install our patched version of stopit called Timed-Threads
37+
pip install Timed-Treads
4838
# We can comment out after next Mathics-Scanner release
4939
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
5040
pip install -e .

mathics/builtin/datentime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
from mathics.settings import TIME_12HOUR
4343

4444
if sys.platform == "emscripten":
45-
from stopit import SignalTimeout as TimeoutHandler
45+
from timed_threads import SignalTimeout as TimeoutHandler
4646
else:
4747
from timed_threads import ThreadingTimeout as TimeoutHandler
4848

mathics/eval/datetime.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def eval_pause(sleeptime: float, evaluation):
6666

6767

6868
if sys.platform == "emscripten":
69-
# from stopit import SignalTimeout as TimeoutHandler
69+
# from timed_threads import SignalTimeout as TimeoutHandler
7070

7171
def eval_timeconstrained(
7272
expr: BaseElement, timeout: float, failexpr: BaseElement, evaluation: Evaluation
@@ -75,7 +75,7 @@ def eval_timeconstrained(
7575
evaluation.message("TimeConstrained", "tcns")
7676

7777
else:
78-
from stopit import ThreadingTimeout as TimeoutHandler
78+
from timed_threads import ThreadingTimeout as TimeoutHandler
7979

8080
def eval_timeconstrained(
8181
expr: BaseElement, timeout: float, failexpr: BaseElement, evaluation: Evaluation

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ dependencies = [
2828
"requests",
2929
"scipy",
3030
"setuptools",
31-
# stopit is needed in TimeRemaining[]
32-
"stopit; platform_system != 'Emscripten'",
31+
# Timed-Threads is needed in TimeRemaining[]
32+
"Timed-Threads",
3333
"sympy>=1.13",
3434
]
3535
license = "GPL-3.0-or-later"

0 commit comments

Comments
 (0)