Commit Graph

568 Commits

Author SHA1 Message Date
David Hewitt 7e2d3117ce cleanup: deprecate PyTypeObject trait 2022-04-23 13:36:32 +01:00
David Hewitt 76bc2a6a4a
Merge pull request #2322 from davidhewitt/opt-in-pyproto
pyproto: make deprecated feature opt-in
2022-04-23 13:34:21 +01:00
David Hewitt e9bd41efb2 better mutability inheritance rules 2022-04-21 20:51:28 +01:00
David Hewitt 0787b670e8 pyproto: make deprecated feature opt-in 2022-04-21 20:19:14 +01:00
David Hewitt 7118e94947 Merge branch 'main' into immutable 2022-04-19 19:00:33 +01:00
Sergey Kvachonok ae7e1f5ee9 pyo3-build-config: Build "abi3" extensions without an interpreter
Support compiling portable "abi3" extension modules even when
the build host Python interpreter configuration is not available
or the discovered Python interpreter version is not supported.

Maturin already implements this by building "abi3" extension wheels
with `PYO3_NO_PYTHON` environment veriable set for cargo when
an `abi3-py3*` feature is detected.

Closes #2292
2022-04-13 10:40:08 +03:00
Bruno Kolenbrander bc6bd6099c
Merge branch 'main' into immutable 2022-04-12 14:22:33 +02:00
Sergey Kvachonok 4347624bd3 Mention `generate-abi3-import-lib` in the features guide
Update the feature list section of the user guide
to include `generate-abi3-import-lib` description.
2022-04-11 09:56:52 +03:00
Sergey Kvachonok a7c0de3628 Document `generate-abi3-import-lib` crate feature
Update the user guide to describe its applicability to the native
and cross-compilation build scenarios.
2022-04-10 16:45:32 +03:00
David Hewitt 981eb2d90e
Merge pull request #2265 from davidhewitt/pyclass-mapping
pyclass: mapping flag
2022-04-04 19:54:37 +01:00
David Hewitt 9f3ccff8c9 guide: improve documentation for `#[pyclass(mapping)]` 2022-04-04 15:51:01 +01:00
Sergey Kvachonok 80675361f4 pyo3-build-config: Add `PYO3_CROSS_PYTHON_IMPLEMENTATION` env var
Adds a new cross-compile target interpreter configuration
environment variable.

This feature allows PyO3 to target PyPy on both Windows and Unix
cross compile targets.
2022-04-04 15:23:11 +03:00
David Hewitt c16cc35b30 pyclass: mapping flag 2022-04-02 16:15:44 +01:00
mejrs 086424b88c Merge branch 'main' of https://github.com/mejrs/pyo3 into immutable 2022-04-01 23:11:02 +02:00
Sergey Kvachonok 2d2b9f5c33 Update the user guide and add a ChangeLog entry
Update Architecture.md to reflect the current cross compilation
support state.
2022-04-01 11:32:46 +03:00
Bruno Kolenbrander fb689340b4
Merge branch 'main' into lint-more 2022-03-23 09:34:31 +01:00
mejrs 6f1cf1b662 Add more lints 2022-03-23 08:07:28 +01:00
David Hewitt 87c79c0319
Merge pull request #2234 from davidhewitt/pyclass-args-refactor
pyclass: unify pyclass with its pyo3 arguments
2022-03-22 11:38:05 +00:00
David Hewitt 49c1d22606 docs: for #2234 2022-03-22 10:38:36 +00:00
Mo Mirza 143b7d368f
Replace nbsp with space (#2237)
This fixes markdown heading rendering
2022-03-20 16:45:33 +01:00
Georg Brandl f084ceb9b1 guide: fix duplicated example for #[new]
The second one was probably intended to show a fallible `#[new]`.

Also show that the method does not need to be named `new()`, which
is nice because `new()` can be used for a Rust-level constructor
if they differ.
2022-03-06 10:57:49 +01:00
David Hewitt 0f1b8dd43f
Merge pull request #2207 from davidhewitt/tidy-doctests
guide: tidy up doctests
2022-03-05 16:18:43 +00:00
Alex Gaynor 01d8f1e696
added missing proc-macro invocation to migration guide (#2209) 2022-03-05 15:46:36 +00:00
David Hewitt 2bd64c4962 guide: tidy up doctests 2022-03-04 22:50:12 +00:00
Jerzy Spendel eaa82b2856 Remove typying 2022-03-04 16:24:49 +01:00
Georg Brandl 6bc8943df5 changelog/guide: visibility is also important for wrap_pyfunction! now
Fixes #2202
2022-03-04 07:48:41 +01:00
David Hewitt b59ee9b54b misc: tidy ups pre 0.16 2022-02-27 10:02:28 +00:00
Georg Brandl 0678f11266 Protocols: implement __getattribute__
converting tp_getattro to a shared slot

Fixes #2186
2022-02-26 20:05:50 +01:00
Georg Brandl 03dc96bff1
Py/PyAny: remove PartialEq impl and add is() (#2183) 2022-02-25 19:39:45 +00:00
David Hewitt 7c865fcc25
Merge pull request #2173 from davidhewitt/deprecate-pyproto
pyproto: deprecate protocol traits
2022-02-24 23:54:40 +00:00
David Hewitt 424644181b pymethods: add support for inplace concat & repeat 2022-02-24 23:07:24 +00:00
Rico Hageman ed698c4b43 Add documentation related to from_py_with for the FromPyObject trait 2022-02-24 22:54:30 +01:00
Bruno Kolenbrander af0cef0e59
Merge branch 'main' into object 2022-02-23 10:13:29 +01:00
mejrs be84e0fbb9 Add numeric and object protocol examples 2022-02-23 10:09:45 +01:00
David Hewitt 253507b5dd migration: add note on pymethods -> pyproto 2022-02-23 07:50:55 +00:00
Georg Brandl a21cf677e3 docs: remove/deprecate pyproto 2022-02-23 07:50:55 +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 9e29c1058c Gut specialization and implement auto trait
Implement auto trait

Implement auto trait

Undo oopsie

Fix versions

Fix CI errors

Fix CI

Remove more specialization remnants
2022-02-22 22:43:23 +01:00
David Hewitt 79123b396c pyclass: deprecate gc option 2022-02-15 08:01:46 +00:00
David Hewitt 676295b8de pymethods: support gc protocol 2022-02-15 08:01:23 +00:00
David Hewitt f5b2a88a70 refactor: include __new__ as slot 2022-02-09 08:07:14 +00:00
David Hewitt 75e44585de refactor: pass tp_alloc and tp_free via slots 2022-02-09 08:07:14 +00:00
mejrs 7520b49ac1 Implement opt-in immutable pyclasses 2022-02-08 18:08:18 +00:00
b05902132 78f5afc82e Finish implementation for pyclass enums 2022-02-07 22:17:11 +00:00
David Hewitt 4fd01c3cd6
fix: guide example for pyclass expansion 2022-02-07 07:46:12 +00:00
David Hewitt 9def53317f
Merge pull request #2153 from davidhewitt/simplify-intrinsic-items
refactor: inline pyclass_intrinsic_items
2022-02-07 00:05:30 +00:00
David Hewitt e39881c208 refactor: inline pyclass_intrinsic_items 2022-02-06 23:26:57 +00:00
David Hewitt f75579a489 python-3.11: support buffer API on abi3 2022-02-06 22:46:45 +00:00
David Hewitt ecfd2c2434 pyclass: simplify generated code for PyClassImpl 2022-02-05 16:58:01 +00:00
David Hewitt 558549e1c2 pyproto: split into new feature 2022-02-05 16:51:31 +00:00