Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This is an EditorConfig file
# https://EditorConfig.org

root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = tab
indent_size = 4

[*.yml]
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true

[*.py]
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true

# Tab indentation (no size specified)
[Makefile]
indent_style = tab
10 changes: 5 additions & 5 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Stopit (macOS)
name: Timed Threads (macOS)

on:
push:
Expand All @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [macOS]
python-version: ['3.10', '3.11']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -25,10 +25,10 @@ jobs:
- name: Install OS dependencies
run: |
python -m pip install --upgrade pip
- name: Install stopit
- name: Install timed_threads
run: |
pip install "setuptools>=70.0.0" packaging pytest
pip install -e .
pip install -e .[dev]
- name: Test Stopit
run: |
python tests.py
pytest test
8 changes: 4 additions & 4 deletions .github/workflows/pyodide.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copied from SymPy https://github.com/sympy/sympy/pull/27183

name: Stopit (Pyodide)
name: Timed Theads (Pyodide)

on:
push:
Expand Down Expand Up @@ -54,10 +54,10 @@ jobs:
pip install "setuptools>=70.0.0" PyYAML click packaging pytest

pip install --no-build-isolation -v -v -v -e .
- name: Test stopit
- name: Test Timed Threads
run: |
# Activate the virtual environment
. .venv-pyodide/bin/activate
echo $PATH
python -c "import sys; print(sys.path); import stopit"
# python tests.py
python -c "import sys; print(sys.path); import timed_threads"
# python test
12 changes: 6 additions & 6 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Stopit (ubuntu)
name: Timed Threads (ubuntu)

on:
push:
Expand All @@ -11,18 +11,18 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12', '3.11', '3.8', '3.9', '3.10']
python-version: ['3.13', '3.11', '3.10', '3.12', '3.14']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install stopit
- name: Install Timed Threads
run: |
python -m pip install --upgrade pip
pip install "setuptools>=70.0.0" packaging pytest
pip install -e .
- name: Test stopit
pip install -e .[dev]
- name: Test Timed threads
run: |
python tests.py
pytest test
10 changes: 5 additions & 5 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Stopit (Windows)
name: Timed Threads (Windows)

on:
push:
Expand All @@ -21,11 +21,11 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install stopit
- name: Install Timed Threads
run: |
python -m pip install --upgrade pip
pip install "setuptools>=70.0.0" packaging pytest
pip install -e .
- name: Test stopit
pip install -e .[dev]
- name: Test Timed Threads
run: |
python tests.py
pytest test
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
*.c
*.cpp
*.egg
*.gz
*.nix
*.py[cod]
*.so
*.stackdump
*~
.coverage
.idea/
.mypy_cache
.project
.pydevproject
.settings
.vscode
/.cache
/.pyodide-xbuildenv-*
/.pytest_cache
/.python-version
*.egg-info
*.pyc
*.pyo
.DS_Store
/.python-version
/ChangeLog-spell-corrected
/Timed_Threads.egg-info
/.pyodide-xbuildenv*
/.python-version
/ChangeLog
/ChangeLog.orig
/ChangeLog.rej
__pycache__/
build/
dist/
tmp
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
default_language_version:
python: python
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: debug-statements
stages: [pre-commit]
exclude: ChangeLog-spell-corrected.diff|mathics/builtin/system.py
- id: end-of-file-fixer
stages: [pre-commit]
exclude: ChangeLog-spell-corrected.diff
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
stages: [pre-commit]
- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
language_version: python3
exclude: 'mathics/version.py'
stages: [pre-commit]
5 changes: 4 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Changes log
===========

2.0.0 - 2025
------------

1.1.2 - 2018-02-09
------------------

Expand All @@ -16,7 +19,7 @@ Changes log
1.1.0 - 2014-05-02
------------------

* Added support for TIMER signal based timeout control (Posix OS only)
* Added support for TIMER signal based timeout control (POSIX OS only)
* API changes due to new timeout controls
* An exhaustive documentation.

Expand Down
Empty file added ChangeLog-spell-corrected.diff
Empty file.
52 changes: 52 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# A GNU Makefile to run various tasks - compatibility for us old-timers.

# Note: This makefile include remake-style target comments.
# These comments before the targets start with #:
# remake --tasks to shows the targets and the comments

GIT2CL ?= ./admin-tools/git2cl
PYTHON ?= python3
PIP ?= $(PYTHON) -m pip
RM ?= rm
PIP_INSTALL_OPTS ?=

.PHONY: all build \
check clean \
develop \
pytest \
rmChangeLog \
test

#: Default target - same as "develop"
all: develop

#: Set up to run from the source tree
develop:
$(PIP) install -e .$(PIP_INSTALL_OPTS)

#: Install timed_threads
install:
$(PYTHON) -m pip install -e .

#: Run unit tests and Mathics doctest
check: pytest

#: Same as check
test: check

#: Remove derived files
clean:
@find . -name *.pyc -type f -delete;

#: Run py.test tests. Use environment variable "o" for pytest options
pytest:
$(PYTHON) -m pytest test $o

#: Remove ChangeLog
rmChangeLog:
$(RM) ChangeLog || true

#: Create a ChangeLog from git via git log and git2cl
ChangeLog: rmChangeLog
git log --pretty --numstat --summary | $(GIT2CL) >$@
patch -p0 ChangeLog < ChangeLog-spell-corrected.diff
Loading
Loading