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
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: check
on: [push]
jobs:
install:
name: python
runs-on: ubuntu-latest
strategy:
max-parallel: 3
matrix:
python-version:
- "3.10"
- "3.11"
- "3.13"
env:
UV_PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v5

- name: Install just
uses: extractions/setup-just@v3

- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Install the project
run: just install

- name: Check python formating
run: just check-python-formating

- name: Check python typing
run: just check-python-typing

- name: Check python docstrings
run: just check-python-docstrings

- name: Check toml formating
run: just check-toml-formating

- name: Run tests
run: just test
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Python-generated files
__pycache__/
*.py[oc]
build/
dist/
wheels/
*.egg-info

# uv generated files
uv.lock

# Virtual environments
.venv

# coverage generated files
.coverage
htmlcov/

# Sphinx generated files
docs/_build/
docs/api/
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

40 changes: 11 additions & 29 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,37 +57,22 @@ Get Started!

Ready to contribute? Here's how to set up `timeoutcontext` for local development.

1. Fork the `timeoutcontext` repo on GitHub.
2. Clone your fork locally::
1. Install `link uv <https://docs.astral.sh/uv/>`
2. Install `link just <https://just.systems/>`
3. Fork the `timeoutcontext` repo on GitHub.
4. Clone your fork locally
5. Install the project in a developement virtualenv::

$ git clone git@github.com:your_name_here/timeoutcontext.git

3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::

$ mkvirtualenv timeoutcontext
$ cd timeoutcontext/
$ pip install -r requirements_test.txt
$ make develop

4. Create a branch for local development::

$ git checkout -b name-of-your-bugfix-or-feature

Now you can make your changes locally.

5. When you're done making changes, check that your changes pass flake8 doctest and the tests, including testing other Python versions with tox::

$ make lint
$ make test
$ make doctest
$ make test-all
$ just install

6. Commit your changes and push your branch to GitHub::
6. Make your changes.
6. Check your changes::

$ git add .
$ git commit -m "Your detailed description of your changes."
$ git push origin name-of-your-bugfix-or-feature
$ just check-all
$ just test

7. Commit your changes and push your branch to GitHub.
7. Submit a pull request through the GitHub website.

Pull Request Guidelines
Expand All @@ -99,6 +84,3 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.7 and 3.x. Check
https://travis-ci.org/AntoineCezar/timeoutcontext/pull_requests
and make sure that the tests pass for all supported Python versions.
14 changes: 14 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
History
-------

2.0.0 (2025-11-14)
------------------

* Require python >= 3.9
* Use uv instead of setuptools
* Use pytest as test launcher
* use ruff instead of flake8
* Use just instead of make
* Drop tox
* Add typing
* Fix `link "ImportError: No module named contextdecorator" <https://github.com/AntoineCezar/timeoutcontext/issues/8>`
* Fix `link "ModuleNotFoundError: No module named 'pkg_resources'" <https://github.com/AntoineCezar/timeoutcontext/issues/11>`
* Use github action instead of travis

1.2.0 (2018-03-11)
------------------

Expand Down
84 changes: 0 additions & 84 deletions Makefile

This file was deleted.

6 changes: 1 addition & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ As a context manager:

import sys
from time import sleep
from timeoutcontext import timeout
if sys.version_info < (3, 3):
from timeoutcontext._timeout import TimeoutError
rom timeoutcontext import timeout

try:
with timeout(1):
Expand All @@ -47,8 +45,6 @@ As a decorator:
import sys
from time import sleep
from timeoutcontext import timeout
if sys.version_info < (3, 3):
from timeoutcontext._timeout import TimeoutError

@timeout(1)
def wait():
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ help:
@echo " doctest to run all doctests embedded in the documentation (if enabled)"

clean:
rm -rf $(BUILDDIR)/*
rm -rf $(BUILDDIR)/* api/

html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
Expand Down
Loading