Commit graph

454 commits

Author SHA1 Message Date
Andrew J Westlake bf23f8bda7 Shortened the async/await guide 2021-08-08 14:58:46 -05:00
Andrew J Westlake 9037697bed
Update guide/src/ecosystem/async-await.md
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-08-08 10:15:01 -05:00
Andrew J Westlake d578f37f70
Removed "auto-initialize" feature from uvloop example
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-08-08 10:13:47 -05:00
Andrew J Westlake 92c3af5088
Forgot to bump another pyo3 version
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-08-08 09:59:17 -05:00
Andrew J Westlake dbb956fd4c
Forgot to bump pyo3 version
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-08-08 09:59:01 -05:00
Andrew J Westlake 5c5a406ce4 Updated async-await guide for pyo3-asyncio 0.14 2021-08-07 22:53:26 -05:00
David Hewitt 2cf2c2fef9 pyo3-build-config: improve test coverage
[review] birkenfeld

Co-authored-by: Georg Brandl <georg@python.org>
2021-08-06 12:55:03 +01:00
David Hewitt 49387e9a70 pyo3-build-config: many tidy ups 2021-08-05 23:19:43 +01:00
David Hewitt c2d6a50b35 build: revert usage of cargo:rustc-cdylib-link-arg 2021-08-03 20:04:56 +01:00
David Hewitt 582d9c530f build: move print-config into environment variable 2021-08-01 17:26:27 +01:00
David Hewitt 3d3dacf2ac guide: rewrite "Building and Distribution" chapter 2021-08-01 16:59:47 +01:00
David Hewitt 13f8953d1a readme: slightly improve getting started notes 2021-07-31 16:18:49 +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
Eric Arellano 9ab7b1fad1
Rewrite module.md for clarity and add tip on code organization (#1693)
* Rewrite `module.md` for clarity and add tip on code organization

* Add section on how to build the guide + add workaround proposed by David

* Make more clear references to #1709
2021-07-22 08:10:32 +01:00
David Hewitt 6e0fb9e3a1 guide: bump mdbook to 0.4.10 2021-07-20 08:54:21 +01:00
messense b5b9a480cd Add wrap_pyfunction macro to prelude 2021-06-24 22:34:55 +08:00
Aviram Hassan 13cd092c4e
Update class.md - add example of new returning a PyResult (#1688)
* Update class.md - add example of `new` returning a `PyResult`

* Update class.md
2021-06-23 17:40:01 +08:00
David Hewitt f916867375 pyclass: refactor initialization, call native type dealloc 2021-06-23 07:45:51 +01:00
mejrs d5d2cf9fda document + refactor numcomplex/bigint dependencies 2021-06-07 22:16:23 +02:00
David Hewitt 18e0aa17e0 pymodule: accept #[pyo3(name = "...")] option 2021-06-06 08:41:20 +01:00
David Hewitt 9b8b133905 pyfunction: document #[pyo3(pass_module)] 2021-06-05 17:36:50 +01:00
David Hewitt cec4c2d2e9 text_signature: move to #[pyo3(text_signature = "...")] 2021-06-05 16:33:03 +01:00
Georg Brandl 3e8d003faf Implement METH_FASTCALL for pyfunctions and pymethods. 2021-06-05 12:57:22 +02:00
David Hewitt d011467e63 pyclass: allow #[pyo3(get, set, name = "foo")] 2021-06-04 11:30:40 +01:00
mejrs dbf9a91a8b mark toml field as toml 2021-05-31 21:05:52 +02:00
mejrs e2cb176f6c mark non-rust code as text fields 2021-05-31 20:58:38 +02:00
mejrs 161f1bd678 faq: add section about pyo3(get) cloning fields 2021-05-31 17:16:25 +02:00
Georg Brandl d680fbee0a
Merge pull request #1643 from mejrs/main 2021-05-31 15:14:31 +02:00
mejrs d86559b163 move manual builds to its own header 2021-05-31 12:39:00 +02:00
mejrs ce3b0d1dc0 add renaming method to guide 2021-05-30 14:13:24 +02:00
Tim Robinson 1ba32178dd Method and slot visitors accept slices instead of individual items 2021-05-29 09:38:15 +01:00
David Hewitt 9a4e7b5877
Merge pull request #1622 from davidhewitt/pyo3-build-config
pyo3-build-config: new crate to re-use build.rs across crates
2021-05-25 07:11:24 +01:00
David Hewitt 1e1605f0db pyo3-build-config: finish docs 2021-05-24 08:44:20 +01:00
David Hewitt 825ec08681 pyo3-build-config: docs wip 2021-05-21 08:34:51 +01:00
David Hewitt a109640850 pyfn: deprecate name argument 2021-05-20 08:54:29 +01:00
Tim Robinson 735a9a1156 Update for_each_proto_slot for consistency 2021-05-13 17:32:59 +01:00
Tim Robinson c3b935f06c Reduce size of compiled code for class initialization 2021-05-13 13:08:58 +01:00
David Hewitt 4d46abde73 macros: support #[pyo3(name = "...")] 2021-05-07 22:35:52 +01:00
David Hewitt 7536554ceb type_object: remove layout and base type from PyTypeInfo 2021-05-04 21:39:42 +01:00
David Hewitt 48823e22d6 pyproto: deprecate py_methods 2021-04-20 00:21:19 +01:00
David Hewitt 2b9085abdb build: avoid rebuilds when using clippy in a virtualenv 2021-04-19 09:45:01 +01:00
David Hewitt 355df5a37f auto-initialize: better error messages and embedding docs 2021-04-12 01:29:03 +01:00
Sergey Kvachonok e8a277e1ff
Apply suggestions from code review
- Style

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-04-07 08:23:43 +03:00
Sergey Kvachonok 88849bd96b Add PyMappingProtocol description to the guide
References:

[1]: https://docs.python.org/3/reference/datamodel.html#emulating-container-types
[2]: https://docs.python.org/3/c-api/mapping.html
[3]: https://docs.python.org/3/c-api/typeobj.html#c.PyMappingMethods
2021-04-05 14:19:18 +03:00
Sergey Kvachonok b1aae93645 Add PySequenceProtocol description to the guide
References:

[1]: https://docs.python.org/3/reference/datamodel.html#emulating-container-types
[2]: https://docs.python.org/3/c-api/sequence.html
[3]: https://docs.python.org/3/c-api/typeobj.html#c.PySequenceMethods
2021-04-05 14:18:48 +03:00
Sergey Kvachonok 4b675cc364 Insert missing impl keywords
Updates the class customization guide.
2021-04-05 12:02:46 +03:00
Sergey Kvachonok 0c0214690f Remove issue #844 mention from the guide
Supposedly resolved by https://github.com/PyO3/pyo3/pull/1107

Fix a typo in the subsection header.
2021-04-05 08:35:02 +03:00
David Hewitt f953059880 guide: fixups to build 2021-04-03 10:50:57 +01:00
David Hewitt 31eeb86e98 guide: automatically set pyo3 version in links and cargo toml 2021-04-03 07:05:10 +01:00
Sergey Kvachonok 80c747d2c0 Remove pyconfig.h header parsing
The config header parsing code was supposed to be only invoked when
cross-compiling for Windows, but in reality it fails to correctly parse
the config header files shipped with the upstream Python for Windows.

Given that there are now better options for reliable cross-compiling
for Windows such as `PYO3_CROSS_PYTHON_VERSION` or the `abi3-py3*` features,
it should be OK to remove this config for v0.14.

Update the cross-compilation instructions section of the user guide.

Fixes https://github.com/PyO3/pyo3/issues/1337
2021-03-26 09:57:18 +03:00