Commit graph

20 commits

Author SHA1 Message Date
David Hewitt ab8f940e46 docs: require docs on all public APIs 2022-09-07 07:42:23 +01:00
David Hewitt 261c0c5f56 macros: simpler expansion for intern! 2022-06-02 09:57:58 +01:00
David Hewitt 7a9e70e2c7 wrap_x: change macros back to macro_rules! 2022-05-14 20:42:07 +01:00
Adam Reichold 89577a27d9 Isolate interned strings from their dynamic environment to avoid calling multiple times them with different text values yielding inconsistent results. 2022-04-04 22:04:46 +02:00
Adam Reichold 7b99af9b34 Execute the example for intern macro to ensure it is correct. 2022-04-04 20:25:47 +02:00
Adam Reichold 30d414fd49 Add intern macro to hygiene tests and ensure it can handle stringified identifiers. 2022-04-04 18:53:31 +02:00
Adam Reichold f777372eed Limit the intern! macro to strings and intern the string contents in addition to the reference. 2022-04-04 10:11:52 +02:00
Adam Reichold 125bf416a2 Separate the fast and slow path of GILOnceCell::get_or_init. 2022-04-03 21:18:09 +02:00
Adam Reichold db109867d3 Add intern! macro which can be used to amortize the cost of creating Python objects by storing them inside a GILOnceCell. 2022-04-03 21:16:42 +02:00
mejrs 6f1cf1b662 Add more lints 2022-03-23 08:07:28 +01:00
mejrs e569e5074a Remove useless allow(lint)'s 2022-01-21 01:08:36 +01: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 3794aab11f docs: use pyo3.rs/latest instead of pyo3.rs/main 2021-07-24 08:47:02 +01:00
Nicholas Sim d0b54666a1 simple module doc 2021-06-30 18:03:53 +08:00
messense 90c5ffbd04 Fix clippy warnings in Rust 1.51.0 2021-03-26 13:21:38 +08:00
kngwyu aedd6352e3 Use with_gil instead of acquire_gil in examples 2021-03-20 19:02:50 +09:00
kngwyu e31fb70399 Correct # Examples in documents 2021-03-20 16:45:56 +09:00
David Hewitt 4d2913dc06 main: tweaks from rename 2021-03-16 22:14:57 +00:00
scalexm f49478619f Re-enable recursive class attributes
Use some kind of two-stage initialization as described in #975, by
being very cautious about when to allow the GIL to be released.
2020-06-23 22:40:29 +02:00
David Hewitt a1dbfa8c8c Add pyo3::once_cell::GILOnceCell 2020-06-18 18:53:32 +01:00