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
33 changes: 27 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,25 @@ permissions:
contents: read

jobs:
test:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.version }}
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Run tests
run: uv run pytest

linux:
runs-on: ${{ matrix.platform.runner }}
needs: [ test ]
strategy:
matrix:
platform:
Expand Down Expand Up @@ -62,6 +79,7 @@ jobs:

musllinux:
runs-on: ${{ matrix.platform.runner }}
needs: [ test ]
strategy:
matrix:
platform:
Expand Down Expand Up @@ -100,6 +118,7 @@ jobs:

windows:
runs-on: ${{ matrix.platform.runner }}
needs: [ test ]
strategy:
matrix:
platform:
Expand All @@ -119,12 +138,13 @@ jobs:
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.13t
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
# TODO: fix this for Windows
# - name: Build free-threaded wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.platform.target }}
# args: --release --out dist -i python3.13t
# sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -133,6 +153,7 @@ jobs:

macos:
runs-on: ${{ matrix.platform.runner }}
needs: [ test ]
strategy:
matrix:
platform:
Expand Down
144 changes: 142 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,149 @@ target/
# Contains mutation testing data
**/mutants.out*/

# RustRover
# PyCharm/RustRover
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
.idea/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
.vscode/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc
2 changes: 1 addition & 1 deletion src/singledispatch/builtins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl Builtins {
) -> PyResult<bool> {
let args = PyTuple::new(py, [cls, typ]);
match self.issubclass_func.call1(py, args?) {
Ok(result) => Ok(result.downcast_bound::<PyBool>(py).unwrap().is_true()),
Ok(result) => Ok(result.downcast_bound::<PyBool>(py)?.is_true()),
Err(e) => Err(e),
}
}
Expand Down
Loading