Commit graph

48 commits

Author SHA1 Message Date
David Hewitt 2ac30ec411 err: tweak names, inlining and docs 2021-11-27 08:26:04 +00:00
Georg Brandl 43893158b1 switch is_instance/is_instance_of, is_subclass/is_subclass_of 2021-11-20 13:18:43 +00: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
David Hewitt 31eeb86e98 guide: automatically set pyo3 version in links and cargo toml 2021-04-03 07:05:10 +01:00
kngwyu aedd6352e3 Use with_gil instead of acquire_gil in examples 2021-03-20 19:02:50 +09:00
David Hewitt 3d6356223e docs: fix warnings 2020-12-18 23:11:10 +00:00
David Hewitt fc34e41163 pyany: add is_instance 2020-11-22 19:24:59 +00:00
David Hewitt b9e95dc7c9 Implement std::error::Error for PyErr 2020-09-10 19:04:24 +01:00
Georg Brandl 4467cf51db guide: show exporting create_exception! exceptions in a module 2020-08-10 17:08:52 +02:00
David Hewitt 20959ecc92 Rewrite documentation for FromPy and PyObject changes 2020-08-09 12:29:25 +01:00
David Hewitt 4ed9748b45 Rename exceptions to PyException etc; reintroduce deprecated ones 2020-07-18 06:02:57 +01:00
kngwyu fd739b5879 Refactor links in the guide 2020-03-19 13:47:37 +09:00
Georg Brandl 3f030d46fd
guide: fixes and some minor additions (#802)
* guide: fixes and some minor additions

I went through the guide and fixed some grammar/consistency issues,
and added some wording where I thought it appropriate.

I also reordered the chapters to what I feel is a more natural
flow of concepts.

* Apply suggestions from code review and fix tests

Co-Authored-By: Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>
Co-Authored-By: David Hewitt <1939362+davidhewitt@users.noreply.github.com>

Co-authored-by: Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2020-03-13 22:53:49 +09:00
kngwyu 14d2196ba0 Bump version to 0.8.2 2019-10-26 22:47:19 +09:00
kngwyu d019fe814c Bump version to 0.8.1 2019-10-08 01:52:06 +09:00
konstin a3e41cc819 Release 0.8.0 2019-09-05 13:18:50 +02:00
Alexander Niederbühl 4586702fb7 Fix example in guide
The example was failing with:
`error[E0117]: only traits defined in the current crate can be implemented for arbitrary types`
2019-08-03 22:09:12 +02:00
konstin 0279b3d69f Release 0.7.0 2019-05-26 17:27:14 +09:00
Georg Brandl b289a75c16 Make tons of small fixes in the guide
- spelling/grammar
- update docs.rs links and Cargo.toml examples to 0.6.0
- fix a few factual mistakes I found in the process
2019-05-06 09:46:47 +02:00
Alexander Niederbühl faa3feda3f Merge branch 'master' into doctest 2019-04-23 21:58:09 +02:00
konstin 7149a1fecb
Bump to 0.7.0-alpha.1 (#457) 2019-04-23 18:55:35 +02:00
Alexander Niederbühl f1b0288d3c Remove docmatic and several workarounds for the doctests 2019-04-19 22:47:21 +02:00
Miles Granger 711155d7ad Update tests & docs with IntoPyDict::into_py_dict(py) 2019-03-20 20:04:00 +01:00
Alexander Niederbühl 438bd7f616 Refer to PyO3 in a consistent way 2019-03-13 17:26:48 +01:00
Alexander Niederbühl e2e4733b82 Test examples in user guide with travis
Test could only be activated for Python 3.5 and some tests had to be
ignored, see #381 and #387.
2019-03-09 23:54:28 +01:00
Alexander Niederbühl 2327882dc5 Fix examples 2019-03-01 20:32:55 +01:00
konstin ad590bd158 Some api improvements 2019-02-23 18:01:22 +01:00
konstin 9e53418aad Less feature(specialization) 2019-02-01 18:09:51 +01:00
konstin 936f0153e8 Migrate to rust 2018 2019-02-01 14:23:29 +01:00
konstin 9102f2e364 Refactor the exception macros
* Renamed `py_exception` to `create_exception`
  * The split up of the macros makes it possible to create exception structs with bodies to mimic python exceptions' members
  * Used `Once` to fix a (theoretical) race condition with the is_null check
2018-11-27 23:07:15 +01:00
konstin 302c099a76 Big refactoring to shrink the prelude 2018-09-21 23:34:28 +02:00
konstin 771d59b913 Fix another bunch of clippy lints 2018-08-21 23:51:13 +02:00
konstin 991a8b94d2 More nightly fixes 2018-08-19 20:42:17 +02:00
konstin d59bebcc38 Upgrade from proc_macro to use_extern_macros 2018-07-18 13:08:05 +02:00
Peng Guanwen ce4c217527 Fix broken links
This fixes #182
2018-06-14 08:10:39 +00:00
Martin Larralde 4dccd556b7 Fix conversions.md stubs to work with Py2 as well 2018-05-01 22:59:49 +02:00
Martin Larralde 0963a6052c Add stubs to conversions.md to allow more tests to run 2018-05-01 22:59:49 +02:00
Martin Larralde aed4af9a1e Add documentation tests for guide/exception.md 2018-05-01 22:59:49 +02:00
Vlad Shcherbina 2aedbffcd0 Fix typos 2018-03-15 14:41:16 +03:00
Roy Wellington Ⅳ 24eee46128 Fix typos and other minor touchups to guide
* Fix some typos
* Capitalize Rust, acronyms
* Remove some trailing whitespace
2018-03-15 14:27:45 +03:00
Vlad Shcherbina f8d914cac8 Fix broken links
https://pyo3.github.io/PyO3 -> https://pyo3.github.io/pyo3
in the documentation.
2018-02-14 17:21:17 +03:00
Nikolay Kim fc3ab84bfa better constrain for PyNativeException::new 2017-07-26 14:56:08 -07:00
Nikolay Kim a4fd878cb7 pyerr cleanups 2017-07-26 14:28:04 -07:00
Nikolay Kim a20230e73f Create rust type for exceptions defined in python #45 2017-07-26 12:56:07 -07:00
Nikolay Kim e45eb6e878 rename ToPyErr to PyErrArguments 2017-07-26 10:47:17 -07:00
Nikolay Kim b250ad22ca update guide related to exception 2017-07-26 09:16:26 -07:00
messense d4a5a46338
Write Python Exception chapter for user guide 2017-06-19 13:30:15 +08:00
messense 7466097780 User guide documentaion (#37)
User guide documentaion
2017-06-18 10:02:02 +08:00