Commit graph

326 commits

Author SHA1 Message Date
David Hewitt 031d7bd094 makefile: fix test_py job, add list_all_additive_features 2021-10-24 08:03:55 +01:00
David Hewitt fd9b0cab1b
Merge pull request #1938 from mejrs/issues
Update issue templates
2021-10-21 18:17:37 +01:00
mejrs 702597afda Update issue templates 2021-10-21 04:35:29 +02: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
David Hewitt 99f95a2eaf ci: pin parking_lot to 0.11.1 on MSRV 2021-08-28 08:17:28 +01:00
David Hewitt b1abe03984 ci: update cargo-llvm-cov 2021-08-15 23:54:43 +01:00
messense 2a7c4f495b
Merge pull request #1784 from davidhewitt/gh-actions-pages-v3
guide: allow using newer gh-actions-pages version
2021-08-12 10:32:35 +08:00
David Hewitt 4eee9009db ci: pin bitflags for MSRV job 2021-08-12 00:27:49 +01:00
David Hewitt 72f3f1131b guide: allow using newer gh-actions-pages version 2021-08-11 23:50:58 +01:00
David Hewitt 1722e3a2ea ci: try cargo-llvm-cov 2021-08-07 23:49:29 +01:00
David Hewitt b66f539473 docs: sync README and lib.rs examples 2021-08-02 23:03:25 +01:00
David Hewitt 243e5eea13
Merge pull request #1734 from davidhewitt/latest-tag
guide: add latest symlink
2021-07-24 08:38:07 +01:00
Ivan Carvalho bd0e0d808f
Add optional support for conversion from indexmap::IndexMap (#1728)
* Add support to IndexMap

* Fix indexmap version to 1.6.2

* Remove code duplication by mistake

* Fix ambiguity in test

* Minor change for doc.rs

* Add to lib.rs docstring

* Add indexmap to conversion table

* Add indexmap flag in docs.rs action

* Add indexmap feature to CI

* Add note in changelog

* Use with_gil in tests

* Move code to src/conversions/indexmap.rs

* Add PR number to CHANGELOG

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>

* Add round trip test

* Fix issue in MSRV Ubuntu build

* Fix Github workflow syntax

* Yet Another Attempt to Fix MSRV Ubuntu build

* Specify hashbrown to avoid ambiguity in CI

* Add suggestions

* More flexible version for indexmap

* Add documentation

* Address PR comments

* Export indexmap for docs

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-07-22 08:15:26 +01:00
David Hewitt fccea9ff7c guide: add latest symlink 2021-07-22 08:08:50 +01:00
David Hewitt 6e0fb9e3a1 guide: bump mdbook to 0.4.10 2021-07-20 08:54:21 +01:00
David Hewitt acede283e1 bench: don't alert on CI benchmark changes 2021-07-19 20:56:43 +01:00
messense 3e851bb5e6 Add cross compilation test in CI 2021-06-27 15:08:41 +08:00
David Hewitt 5cc1e0f6dd pyo3-build-config: increased test coverage 2021-06-26 19:30:26 +01:00
David Hewitt c342af7138 ci: use latest Python 3.10 beta 2021-06-05 18:58:52 +01:00
messense 9bc77400eb Run pytest pyo3-benchmarks on CI 2021-06-04 23:10:48 +08:00
messense c4c5324a73 Add automated continuous benchmarking 2021-06-04 20:46:31 +08:00
David Hewitt 926b2a7325 guide: update CI job names 2021-05-07 08:30:49 +01:00
messense 136b7d400f Also run gh-pages deploy on release 2021-05-05 16:39:46 +08:00
messense 8a89d04ee9 Remove docs job from CI workflow 2021-05-05 16:35:18 +08:00
messense 3402e72427 Run guide workflow on pull request 2021-05-05 11:27:12 +08:00
messense 620c2730f5 Build docs of main branch with docsrs feature 2021-05-05 11:26:34 +08:00
mejrs 5f51520559
Merge branch 'main' into docsrs 2021-05-04 12:34:38 +02:00
mejrs 1c740ecbdc
Update .github/workflows/ci.yml
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-05-03 19:50:19 +02:00
mejrs 51ad0d2e0a do not use actions/cache 2021-05-02 22:51:41 +02:00
mejrs 78c2d40cb8 install doc_cfg feature and workflow 2021-05-02 21:10:53 +02:00
David Hewitt 1bcbc7aeae pypy: use x64 windows in CI for pypy 3.7 2021-04-29 23:00:20 +01:00
David Hewitt 75c23eca5f ci: pin Python 3.10.0-alpha.7 2021-04-19 23:49:12 +01:00
David Hewitt 2e7eb09ac1 ci: allow coverage cache to fail 2021-04-19 09:50:25 +01:00
David Hewitt 6acbeecf8d ci: allow failure on cache errors 2021-04-18 07:08:16 +01:00
David Hewitt 261ba692a4 ci: fix macOS cache (try 2) 2021-04-11 23:23:57 +01:00
David Hewitt 2c23da74b7 ci: fix macOS cache 2021-04-11 18:39:20 +01:00
David Hewitt 990bbb5f70
Merge pull request #1537 from davidhewitt/maturin-examples-v2
examples: maturin and setuptools_rust examples
2021-04-07 08:05:18 +01:00
Yuji Kanagawa 7eb3aa3fd2
Merge pull request #1545 from davidhewitt/instrument-coverage
coverage: use source-based coverage
2021-04-04 20:40:50 +09:00
David Hewitt 6702bd062c actions: cache rust builds 2021-04-04 09:44:41 +01:00
David Hewitt e66231ae5d coverage: use source-based coverage 2021-04-04 09:41:10 +01:00
David Hewitt 370652eba8 examples: maturin and setuptools_rust examples 2021-04-03 11:59:41 +01:00
David Hewitt f953059880 guide: fixups to build 2021-04-03 10:50:57 +01:00
Yuji Kanagawa 6c577962bb
Merge pull request #1540 from davidhewitt/guide-auto-versions
guide: automatically set pyo3 version in links and cargo toml
2021-04-03 18:18:25 +09:00
David Hewitt 31eeb86e98 guide: automatically set pyo3 version in links and cargo toml 2021-04-03 07:05:10 +01:00
David Hewitt 410f61934a pypy: support PyPy 3.7 2021-04-02 12:11:14 +01:00
David Hewitt 93696889d3
Merge pull request #1496 from PyO3/dependabot/cargo/hashbrown-0.11
build(deps): update hashbrown requirement from 0.9 to 0.11
2021-03-25 08:01:31 +00:00
David Hewitt a2788b052d hashbrown: support 0.9 or 0.11 2021-03-24 22:35:37 +00:00
David Hewitt 4d2913dc06 main: tweaks from rename 2021-03-16 22:14:57 +00:00
David Hewitt a45f520ec1
Merge pull request #1457 from davidhewitt/multiple-pymethods
pymethods: make inventory optional
2021-03-06 23:09:02 +00:00
David Hewitt 977735db20 pymethods: make inventory optional 2021-03-04 19:52:58 +00:00
David Hewitt 1dcda8809d docs: deny warnings in ci 2021-03-04 19:41:11 +00:00
David Hewitt 85c7ecb36e ci: simplify workflow 2021-03-04 11:53:27 +00:00
Georg Brandl fa8d7518ca Restore compatibility with Rust 1.41.
This version is currently supported by Debian stable and Alpine Linux.

Fixes #1420
2021-02-11 10:14:25 +01:00
Daniil Konovalenko abb5829e9c implement Serialize, Deserialize for Py<T> 2021-01-11 22:19:10 +00:00
kngwyu ab020f2a86 Update mdbook version 2021-01-05 12:32:23 +09:00
David Hewitt 59707f0b81 auto-initialize: new feature to control initializing Python 2021-01-02 16:08:10 +00:00
David Hewitt b1012ebb68 build: update for Rust 1.49 2020-12-31 18:16:02 +00:00
David Hewitt 51d1996218 ci: deny warnings using RUSTFLAGS 2020-12-26 08:27:08 +00:00
David Hewitt db74cc85fa pypy: final fix 2020-12-20 13:50:39 +00:00
kngwyu 164c41e610 Add a test for abi3-py36 2020-12-20 12:20:35 +00:00
David Hewitt a689ab42c6 macros: rename crates for consistency 2020-12-20 06:39:28 +00:00
David Hewitt 3d6356223e docs: fix warnings 2020-12-18 23:11:10 +00:00
David Hewitt 90a1221008 ci: use explicit pypy syntax 2020-12-17 08:51:00 +00:00
David Hewitt e155562cd5 ci: add Python 3.10-dev 2020-12-17 03:05:54 +00:00
AleksaC f54769cd2a Reintroduce pypy for Windows in CI 2020-11-21 02:51:23 +01:00
David Hewitt 9617edfca9 msrv: bump to 1.45 2020-11-12 11:33:08 +00:00
David Hewitt 33b8aba3bb examples: simplify tox instructions 2020-11-10 12:50:41 +00:00
Alex Gaynor 90a825d0c2 Merge branch 'master' into abi3-merge-master 2020-10-19 14:32:49 -04:00
David Hewitt afd9b823d2 Drop support for Python 3.5 2020-10-18 19:02:27 +01:00
Alex Gaynor 9e34835b76 Merge branch 'master' into abi3-merge-master 2020-10-12 18:03:14 -04:00
David Hewitt 7b3dd68bfb Fix support for MSRV
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2020-10-12 15:46:40 +01:00
Alex Gaynor f855daf7e2
Update environment setting for Github Actions API updates 2020-10-12 16:19:34 -04:00
Alex Gaynor 140790b15f Merge branch 'master' into abi3-merge-master 2020-10-10 10:11:49 -04:00
David Hewitt bac1771de8 Update Python versions on CI 2020-10-10 10:40:21 +01:00
kngwyu 2e22066feb Do not test PyPy on Windows 2020-10-08 16:29:50 +09:00
Alex Gaynor 2a85c17f11
Run abi3 tests in CI 2020-09-19 11:27:06 -04:00
kngwyu c07e1aa40a Use abi3 feature, instead of unstable-api 2020-09-20 00:06:14 +09:00
David Hewitt fcf1d0ca9a
Tidy up guide release 2020-09-16 22:25:43 +01:00
David Hewitt ba360bc3cf
Fix doc update on release
Sorry for the noise, there were some errors in #1197 which github did not show until after I merged 😞
2020-09-16 21:11:31 +01:00
David Hewitt 2213ab37b0 Fix doc redirect on release 2020-09-16 20:43:44 +01:00
kngwyu 7a4c5e2960 Merge branch 'master' into abi3 2020-09-10 00:48:20 +09:00
kngwyu 1941f4daef Rename all-apis with unstable-api 2020-09-06 17:37:55 +09:00
Matthew Treinish c830a7cc57
Add dependabot config (#1148)
* Add dependabot config

This commit adds a dependabot config to automatically open pull requests
with version bumps for dependencies. This will configure dependabot to
check daily if any pyo3 dependency versions are out of date and if they
are it will open a PR for each dependency. You can find more details on
the dependabot configuration and usage in in the github
documentation. [1]

[1] https://docs.github.com/en/github/administering-a-repository/enabling-and-disabling-version-updates

* Switch to weekly update interval
2020-09-06 13:49:36 +09:00
Yuji Kanagawa 9ecd9892aa
Merge pull request #1138 from davidhewitt/ci-no-fail-fast
Disable fail-fast in CI test
2020-09-03 00:04:17 +09:00
David Hewitt 025f365cbe Enable colored cargo output in CI 2020-09-01 22:49:02 +01:00
David Hewitt 1255848e3e Disable fail-fast in CI test 2020-09-01 20:56:13 +01:00
kngwyu 5a098cfd13 Test MSRV on github actions 2020-08-17 22:10:27 +09:00
David Hewitt d6b5ca4632 Fix layout of gh-pages guide build 2020-08-13 20:46:31 +01:00
David Hewitt 51111dc861 Migrate from Travis CI to Github Actions 2020-08-12 08:09:30 +01:00
David Hewitt 7fe989693c Move fmt and clippy to actions 2020-08-09 12:15:54 +01:00
David Hewitt e0376d24aa Experimental support for PyPy 3.6
Co-authored-by: Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>
2020-08-08 14:54:34 +01:00
David Hewitt 7b36f3a44b Apply suggestions from kngwyu
Co-authored-by: Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>
2020-08-02 02:08:47 +01:00
David Hewitt 52f7429748 Update PR template 2020-08-02 01:09:52 +01:00
konstin 3180e5cc06 POC stable rust (2 tests failing) 2020-06-18 17:21:09 +09:00
Yuji Kanagawa da22eecb5f
Merge pull request #897 from fusion-engineering-forks/macros-feature
Move macros into separate feature.
2020-05-11 11:01:46 +09:00
David Hewitt 0550db7622 Clarify pyo3 version on issue template 2020-05-10 09:48:10 +01:00
Mara Bos dab8c2e4e7 Move macros into separate feature.
It's enabled by default to avoid breakage, but this allows compiling
pyo3 with a lot less dependencies in case the macros are not needed.
2020-05-09 11:27:30 +02:00
Yuji Kanagawa 139a1e6e6b Use checkout@v2 2020-03-25 11:30:33 -04:00
kngwyu 4796a13b76 Enable mac x64 and Win x86 tests on github Actions 2020-03-24 15:38:06 +09:00
Alexander Niederbühl b604061106 Add Python 3.8 to CI 2020-02-01 15:08:41 +01:00
Alexander Niederbühl 0fcb19bfe6 Set RUST_BACKTRACE=1 windows tests 2020-01-12 15:33:34 +01:00
Alexander Niederbühl 1d5cc89deb Revert "Add Python 3.8 to github actions tests"
This reverts commit 5a3f903745.
2019-12-28 13:02:31 +01:00
Alexander Niederbühl 5c1cb34c4a gh-actions: Set max-parallel to 4 2019-12-28 12:45:45 +01:00
Alexander Niederbühl 5a3f903745 Add Python 3.8 to github actions tests 2019-12-28 12:37:47 +01:00
Alexander Niederbühl 2ce8a0b8b7 Trigger github action tests also on pull requests 2019-12-28 12:36:20 +01:00
kngwyu dadeb17c3a Fix Windows test 2019-11-17 16:34:55 +09:00
kngwyu c0386f3d00 Delete appveyor.yml 2019-11-17 12:16:36 +09:00
Yuji Kanagawa 8204bd08a0
Enable Github Actions for Windows CI 2019-11-16 21:39:59 +09:00
konstin 73947d84b4
Format examples with black (#590) 2019-09-06 01:16:09 +02:00
konstin b60b3395f7
Create pull_request_template.md 2019-03-10 22:16:49 +01:00
konstin 0bd5d9d4c3
Update issue_template.md 2018-09-13 19:34:06 +02:00
konstin 97688cb586
Update issue_template.md 2018-06-05 11:53:04 +02:00
konstin 319afe1f76 Small documentation improvements 2018-05-17 23:59:38 +02:00
konstin 19ba972964 Add issue template
I hope you don't mind the emoji
2018-05-14 23:23:20 +02:00