Commit Graph

249 Commits

Author SHA1 Message Date
dependabot[bot] 1708998ccd
build(deps): bump actions/setup-python from 3 to 4
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 02:23:10 +00:00
David Hewitt 0e5e39e63d
remove need to build xtask from CI (#2634)
* xtask: move coverage implementation to nox

* move pytests from xtask to nox in ci

* use --package instead of --manifest-path for tests

* write github actions groups to sys.stderr
2022-09-22 11:12:59 +02:00
Adam Reichold df933c53ca Pin once_cell to fix MSRV build. 2022-09-21 10:15:16 +02:00
messense 0008da3b01
Enforce changelog entry for PR 2022-09-20 10:26:22 +08:00
Adam Reichold 370319e80d Fix itertools version to keep MSRV builds working. 2022-09-13 20:06:46 +02:00
David Hewitt 3e15bb963b gh-pages: stop building guide for main 2022-08-27 21:15:12 +01:00
David Hewitt 36ecadd69f ci: unpin serde, fixup nightly ui tests 2022-08-23 08:07:26 +01:00
David Hewitt d2b4c3a324
Merge pull request #2569 from davidhewitt/fix-gh-pages-deploy
gh-pages: don't publish whole target directory
2022-08-20 09:19:58 +01:00
David Hewitt 1c02533641 gh-pages: don't publish whole target directory 2022-08-19 15:54:19 +01:00
David Hewitt e0b75768e4 netlify: add banner back to internal docs 2022-08-19 15:35:53 +01:00
David Hewitt b70318fd1b guide: deployment to netlify 2022-08-19 12:46:56 +01:00
David Hewitt 5ca3001957 examples: update maturin to 0.13 2022-08-18 08:17:53 +01:00
David Hewitt 2ccc034d2f msrv: unpin anyhow, pin bumpalo 2022-08-18 07:48:09 +01:00
David Hewitt 9ab5de1441 ci: pin anyhow for MSRV 2022-08-11 07:58:41 +01:00
David Hewitt af1faea79f ci: downgrade serde to 1.0.142 for MSRV 2022-08-09 19:14:15 +01:00
messense 624565cd81
Pin emscripten test python version to 3.11b4 (#2526)
* Fix emscripten test and pin python version

* Try emscripten 3.1.17

* Try 3.11b4
2022-07-30 00:04:47 +08:00
mejrs 1983671782 Try fix hashbrown version on msrv 2022-07-19 20:17:23 +02:00
messense a00e9d553d
Update Python to 3.11.0b4 in emscripten test (#2507)
* Update Python to 3.11.0b4 in emscripten test

* Print traceback when import exception failed

* Try `ALLOW_MEMORY_GROWTH=1`
2022-07-15 20:39:58 +01:00
David Hewitt dae23ea08d ci: fix build MSRV with hashbrown 0.12.2 release 2022-07-13 06:34:58 +01:00
Ashley Anderson b39871c4ac Use proper method for pinning MSRV minimal package versions 2022-07-06 00:29:58 -04:00
David Hewitt 0391b3b0c1 inventory: update to 0.3 2022-07-03 15:22:25 +01:00
messense 2782a4eb67
Upgrade mdbook to 0.4.19 2022-07-03 10:48:33 +08:00
messense a76764b791
Revert "CI: Add `force_orphan` to `actions-gh-pages`" 2022-06-23 18:58:06 +08:00
messense a7a6118974
CI: Add `force_orphan` to `actions-gh-pages` 2022-06-23 17:29:18 +08:00
David Hewitt 9dfeaa38d4
guide: add contributing page (#2442)
Co-authored-by: messense <messense@icloud.com>
2022-06-08 13:30:11 +00:00
David Hewitt fad5d177f9 ci: unpin 3.11 2022-06-08 08:09:42 +01:00
Hood Chatham da5b9814cc
Set up CI for wasm32-emscripten target (#2436)
* ci: test on emscripten target

This adds CI to build libpython3.11 for wasm32-emscripten and
running tests against it. We need to patch instant to work
around the emscripten_get_now:
https://github.com/sebcrozet/instant/pull/47

We also have to patch emscripten to work aroung the "undefined
symbol gxx_personality_v0" error:
https://github.com/emscripten-core/emscripten/issues/17128

I set up a nox file to download and install emscripten,
download and build cpython, set appropriate environment variables
then run cargo test. The workflow just installs python, rust,
node, and nox and runs the nox session.

I xfailed all the test failures. There are problems with datetime.
iter_dict_nosegv and test_filenotfounderror should probably be
fixable. The tests that involve threads or asyncio probably can't
be fixed.

* Some cleanup

* Remove instant patch

* Add explanations for xfails
2022-06-08 05:59:18 +01:00
David Hewitt 58f4042e4f ci: update more actions 2022-06-02 09:18:35 +01:00
David Hewitt 02e6d486ea ci: update action versions 2022-06-02 07:32:51 +01:00
David Hewitt 1fbde0e4d0 ci: pin to 3.11.0-beta.1 2022-06-01 16:03:48 +01:00
David Hewitt a85c622a3d ci: unpin 3.11-dev 2022-05-15 16:08:21 +01:00
messense 5472fa6917
Add Windows non-abi3 cross compile test 2022-05-12 14:32:20 +08:00
David Hewitt 0162df616e
Fix CI for hashbrown 0.12.1 2022-05-03 06:18:45 +01:00
messense 6f278923da
Add `workflow_dispatch` trigger event to CI
https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
2022-04-19 13:18:02 +08:00
mejrs 5e7e50ec24 Try with previous alpha version 2022-04-18 22:31:58 +02:00
messense 57412f1a29
Install cargo-xwin from PyPI to speedup CI 2022-04-12 17:04:40 +08:00
messense 75ea171927
Use `cargo-xwin` to test windows msvc cross compilation 2022-04-11 00:19:20 +08:00
messense 4ba11f7615
Add a windows msvc cross compilation test 2022-04-10 23:17:21 +08:00
messense 8368c62858
maturin still requires a Python interpreter on Windows for now
Switch from Python 3.10 to Python 3.8 because I don't want to test with Rust 1.48.0
2022-04-10 22:29:52 +08:00
messense c5ca6d040b
Add Windows abi3 wheel cross comiplation test 2022-04-10 22:05:30 +08:00
Rico Hageman c281275a29 Gather test coverage with stable rust 2022-04-08 14:24:10 +02:00
David Hewitt 35a27a8d04 ci: avoid race between bench and guide 2022-03-25 10:10:54 +00:00
messense 0aead58fcd
Fix minimal package version for parking_lot 2022-03-22 13:50:29 +08:00
Bruno Kolenbrander 16ad15e04f
Expand on xtask (#2176)
* Fix Windows OSError

* Ignore .pyd files

* Put things in modules

* Rename functions to `run`

* Expand on cargo xtask

* Try to work around missing installs

* Run all things by default, but not llvm-cov

* Test msrv

* Fix more OSErrors

* Various refinements and docs

* Various refinements

* Various refinements
2022-03-18 22:13:23 +00:00
messense 7f117b5ddc Try to reproduce #2229 2022-03-16 13:32:34 +01:00
messense 0f001960ba
CI: keep going on failure only if `CI-no-fail-fast` label is present 2022-03-15 23:57:51 +08:00
messense ca5066f6d3
Test 32-bit Windows only with the latest Python version 2022-03-15 23:00:43 +08:00
messense 15e9c23fa0
Limit concurrency on GitHub Actions
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
2022-03-15 20:47:39 +08:00
David Hewitt 88cd9152b2 pypy: support 7.3.8 2022-03-08 21:09:16 +00:00
messense ad2c1af9f7
Merge pull request #2201 from messense/aarch64-apple-darwin
Add aarch64-apple-darwin test to CI
2022-03-04 17:48:54 +08:00
messense 4b65ad8d50
Add aarch64-apple-darwin test to CI 2022-03-04 16:23:09 +08:00
Adam Reichold 2fa91ada40 Extend optional dependency supported versions to include 0.12. 2022-03-04 08:30:15 +01:00
David Hewitt f98f116131 pypy: support released 3.9 2022-02-25 07:28:22 +00:00
David Hewitt 089fea1f3c ci: add pypy 3.9 dev 2022-02-25 07:28:22 +00:00
David Hewitt ce7fa7a669 ci: pin to pypy 7.3.7 for Python 3.7 2022-02-23 07:49:08 +00:00
David Hewitt d8ee35e19c
Merge pull request #2165 from mejrs/auto_trait
Implement Auto trait
2022-02-23 07:16:17 +00:00
mejrs 0ca19350f9 Add rust version name to CI job 2022-02-22 22:43:40 +01:00
mejrs 10c3e5b094 Try to add nightly feature to CI
Fix stray "
2022-02-22 22:43:40 +01:00
David Hewitt c2e49a2b4c ci: replace makefile with nox 2022-02-14 07:40:43 +00:00
David Hewitt 8b47f4f120 pytests: merge benchmark and test crates 2022-02-05 10:16:46 +00:00
David Hewitt 6f16f738f9 ci: fix windows job 2022-02-04 08:53:12 +00:00
David Hewitt 0ce9db93f4
ci: unpin nightly for coverage 2022-01-26 08:22:10 +00:00
David Hewitt bc2ea552b2
ci: simplify job steps 2022-01-24 22:58:36 +00:00
David Hewitt 000a903676 ci: build all examples in debug 2022-01-23 08:41:39 +00:00
David Hewitt a3862de682
Merge pull request #2105 from davidhewitt/pytests-coverage
ci: add coverage for pytests
2022-01-22 22:07:42 +00:00
David Hewitt 0991aa9f37 ci: add coverage for pytests 2022-01-22 20:06:57 +00:00
David Hewitt bc0cfd6fc6 ci: add Python 3.11 dev builds 2022-01-20 23:35:07 +00:00
Ashley Anderson d58f143e5b Pin rust nightly to older version to work around bug in coverage. 2022-01-19 04:04:59 -05:00
messense ce80b7e0f3 Switch from tox to nox 2022-01-17 00:24:33 +08:00
Bruno Kolenbrander ac66392068
Merge branch 'PyO3:main' into aliases 2021-12-28 04:50:03 +01:00
David Hewitt d600a8c3a3 xtask: add test-py subcommand & use in CI 2021-12-26 22:39:42 +00:00
Bruno Kolenbrander ff202f4660
Apply suggestions from code review
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-12-24 08:12:04 +01:00
mejrs 6afd80a26f Create full feature and change doc rendering 2021-12-22 12:09:16 +01:00
David Hewitt 8f402f31da ci: try rust-cache action 2021-12-18 09:05:05 +00:00
Bruno Kolenbrander 39cac9075b
Organize examples + add __call__ example (#2043)
* Add decorator example crate and split off chapter

* Move not-examples to their own folder

* Add some readme's

* Make black happy

* Make clippy happy

* Add decorator example crate and split off chapter

* Fix ci

* Add empty workspace key

* Try fix ci

* fix ci

* reuse target dir for examples CI

* add pytests folder to makefile recipes

* fix ci, try 2

* add missing pyproject.toml

* remove TOX_TESTENV_PASSENV from Makefile

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-12-15 00:45:26 +00:00
David Hewitt cbe2b2a361 ci: use makefile for fmt 2021-12-09 08:17:08 +00:00
David Hewitt 6433d884fc dev: remove self dev dependency 2021-12-08 07:48:58 +00:00
David Hewitt 70030f130d python: drop support for 3.6 2021-11-20 13:02:42 +00:00
David Hewitt 6a65f98bd2 msrv: bump to 1.48 2021-11-19 10:10:59 +00:00
messense e16024fc95 Test PyPy abi3 build on CI 2021-11-15 15:40:29 +08:00
David Hewitt 41280c01cd ci: try running coverage for all OSes
Co-authored-by: Taiki Endo <te316e89@gmail.com>
2021-11-13 10:14:56 +00:00
David Hewitt 6b1afa4040 pypy: support 3.8 2021-10-27 22:17:45 +01:00
David Hewitt d15e5ea254 ci: test Python 3.10 in coverage jobs 2021-10-24 11:25:10 +01:00
David Hewitt 4a6149ca40 ci: test MSRV with Python 3.10 2021-10-24 11:21:23 +01:00
David Hewitt fd89c180e4
Merge pull request #1943 from davidhewitt/makefile-tweaks
makefile: fix test_py job, add list_all_additive_features
2021-10-24 09:09:29 +01:00
David Hewitt 4ff9ec7828 ci: bump coverage job package versions 2021-10-24 08:15:20 +01:00
David Hewitt 031d7bd094 makefile: fix test_py job, add list_all_additive_features 2021-10-24 08:03:55 +01:00
David Hewitt eacc70310a ci: use stable Python 3.10 2021-10-20 07:55:48 +01:00
David Hewitt bc0f2bfbeb ci: use suppress_build_script_link_lines config in check jobs 2021-10-17 11:30:25 +01:00
Chris Laplante 3b94f4b70c
Add `anyhow-integration` feature which implements From<anyhow::Error> for PyErr (#1822)
* Add 'anyhow' feature which provides simple From<anyhow::Error> for PyErr impl

This makes it possible to use anyhow::Result<T> as the return type for
methods and functions exposed to Python.

The current implementation just stringifies the anyhow::Error before
shoving it into a PyRuntimeError. Conversion back to the anyhow::Error
is not possible, but it is better than nothing.

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>

* Document `anyhow` feature in the guide

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>

* update changelog to document anyhow feature

* WIP adding tests

* Finish up anyhow feature

* Fix formatting

* Fix tests

* Fix tests

* Apply review suggestions

Co-authored-by: Bruno Kolenbrander <59372212+mejrs@users.noreply.github.com>
Co-authored-by: mejrs <brunokolenbrander@hotmail.com>
2021-10-17 07:54:29 +01:00
mejrs 8ab4cf8d8f Remove redundant cargo update 2021-10-17 00:11:15 +02:00
Bruno Kolenbrander 8a57fe2d20
Clean up doctests, deny some lints (#1900)
* Clean up doctests, deny some lints

* Apply suggestions from review.

* replace \" with '

* Fix some more doc examples

* Fix formatting

* Fix some more things

* Remove unused parentheses

* Only test class sig on supported abi/platforms

* Only test class signature on correct versions

* Fix tests to compile on msrv

* msrv strikes yet again

* Add feedback

* Pin `half` to 1.7.1 on msrv
2021-10-14 22:15:25 +01:00
Bruno Kolenbrander ae873698d4
Implement `eyre` feature (#1893)
* Implement `eyre` feature

* Punctuation

* Add `eyre` entry in changelog

* Add `eyre` feature entry to guide

* Set eyre upper bound and move comment back

* Add eyre feature to docs.rs metadata

* Finish up review suggestions

* Update CHANGELOG.md

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-10-13 22:36:06 +00:00
Ashley Anderson 007c0396d2 Add rust: stable to pypy3.6-macos-10.15 special case build 2021-10-13 11:05:53 -04:00
Ashley Anderson fed90c467e Test PyPy3.6 on macos-10.15 instead of macos-latest (which is now macos-11) 2021-10-13 09:39:03 -04:00
mejrs 68cba78a44
chore: update rust 1.55 (#1865)
* chore: update rust 1.55

* move test to 1.55 only

* make ci happy

* make ci happy

* make ci happy

* make ci happy

* make clippy happy

* make ci happy

* formatting
2021-09-12 18:07:24 +01:00
Gregory Szorc 3957afc9c5 pyo3-build-config: conditionalize symbols on resolve-config feature
PR #1856 was buggy in that the `pyo3-build-config` crate didn't actually
work in library mode because `include_str!()` was attempting to resolve
missing files as part of populating some `const` values.

We could change the logic of these constants to make them lazy if
we wanted to support possibly getting access to the value. But the
simple solution is to conditionalize their presence on the crate
feature.

Test coverage for building and testing the crate in insolation with the
feature disabled has been added.

Various code has been conditionalized to avoid compiler warnings.

Also, it appears `cargo build|test -p pyo3-build-config
--no-default-features` still passes default features. This seems wrong
to me. But it is how my system behaves. Maybe it is an sccache bug?
I coded the new tests to `cd pyo3-build-config` first to work around.
2021-09-02 17:18:55 -07:00
David Hewitt 10039393c1 ci: use cargo-llvm-cov 0.1.5 2021-09-01 20:35:53 +01:00
mejrs 5c4b5979a8
Revert "ci: pin parking_lot to 0.11.1 on MSRV" 2021-09-01 02:45:24 +02:00
David Hewitt a20864a903 ci: test and fix s390x build 2021-08-30 13:50:44 +01:00