Skip to content

Commit

Permalink
First classes in rust extension
Browse files Browse the repository at this point in the history
  • Loading branch information
ariebovenberg committed Apr 25, 2024
1 parent 7f64c32 commit f2cfa93
Show file tree
Hide file tree
Showing 52 changed files with 7,918 additions and 3,258 deletions.
15 changes: 15 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[build]
rustflags = []

# see https://pyo3.rs/v0.21.2/building-and-distribution.html?highlight=macos#manual-builds
[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]

[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
5 changes: 4 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[flake8]
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist,.tox
extend-ignore =
extend-ignore =
# let black handle line length
E501
per-file-ignores =
__init__.py: F401,F403

6 changes: 4 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# Note: pypy/pytest fails sometimes (https://github.com/pypy/pypy/issues/3959)
python-version: ["3.9", "3.10", "3.11", "3.12", "pypy3.8", "pypy3.9", "pypy3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12", "pypy3.9", "pypy3.10"]
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -54,7 +56,7 @@ jobs:
- run: |
pip install .
pip install -r requirements/test.txt
pytest tests/ --ignore tests/test_extension_demo.py
pytest tests/
env:
WHENEVER_NO_BUILD_RUST_EXT: "1"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,6 @@ docs/_build/
.python-version

.hypothesis
.benchmarks

benchmarks/comparison/*.json
3 changes: 2 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ build:
os: ubuntu-22.04
tools:
python: "3.11"
rust: "1.75"
# rust shouldn't be needed as we disable building the extension
# in the readthedocs configuration

python:
install:
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
🚀 Changelog
============

0.6.0 (2024-??-??)
------------------

- Implement as a Rust extension module

**Breaking changes**

- Removed weakref support. The overhead of weakrefs was too high for
such primitive objects, and the use case was not clear.

0.5.1 (2024-04-02)
------------------

Expand Down
Loading

0 comments on commit f2cfa93

Please sign in to comment.