Commit Graph

3501 Commits

Author SHA1 Message Date
David Hewitt 48e98818cf [review] kngwyu 2021-05-07 22:35:52 +01:00
David Hewitt 4d46abde73 macros: support `#[pyo3(name = "...")]` 2021-05-07 22:35:52 +01:00
David Hewitt 4613b3dd7e
Merge pull request #1596 from davidhewitt/remove-pytypeinfo-layout
type_object: remove layout and base type from PyTypeInfo
2021-05-07 22:32:24 +01:00
David Hewitt eb251a2f22
Merge pull request #1599 from PyO3/davidhewitt-patch-1-1
guide: update CI job names
2021-05-07 22:28:18 +01:00
David Hewitt 926b2a7325 guide: update CI job names 2021-05-07 08:30:49 +01:00
messense 272d014518
Merge pull request #1598 from davidhewitt/rust-1.52
rust: updates for rust 1.52
2021-05-07 09:01:38 +08:00
David Hewitt defd09c166 rust: updates for rust 1.52 2021-05-06 23:18:34 +01:00
David Hewitt 4edc7c6dc5
Merge pull request #1597 from m-ou-se/wrap-pyfunction-as-closure
Expand wrap_pyfunction!() to a closure to improve deduction.
2021-05-06 22:57:55 +01:00
Mara Bos d33c5010c7 Add test for wrap_pyfunction!() deduction. 2021-05-06 16:05:17 +02:00
Mara Bos 5289ce0eda Expand wrap_pyfunction!() to a closure.
The change to wrap_pyfunction!() in #1143 makes it impossible to
implement `context.add_wrapped(wrap_pyfunction!(something))` in
`inline-python`.
`context` does not carry the GIL lifetime, which causes type deduction
trouble now that `wrap_pyfunction` results in a generic function.

```
error[E0308]: mismatched types
  --> examples/rust-fn.rs:12:4
   |
12 |     c.add_wrapped(wrap_pyfunction!(rust_print));
   |       ^^^^^^^^^^^ one type is more general than the other
   |
   = note: expected enum `Result<&pyo3::types::PyCFunction, _>`
              found enum `Result<&pyo3::types::PyCFunction, _>`
```

By re-wrapping the function as a closure, we trigger 'closure signature
deduction' when passing `wrap_pyfunction!()` as an argument to a
function: Rustc will deduce the signature of the closure from the
function that closure is passed to. This way, the generic arguments can
be deduced in more contexts, fixing the problem.
2021-05-06 16:03:05 +02:00
messense dfee3474f8
Merge pull request #1590 from mejrs/docsrs
docsrs feature
2021-05-05 20:42:49 +08: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
David Hewitt 350e7b2be7
Merge pull request #1591 from davidhewitt/inherit-exceptions
pyclass: support extending Exception types
2021-05-04 23:04:10 +01:00
mejrs dd26566d0c added package.metadata.docs.rs information 2021-05-04 23:25:09 +02:00
David Hewitt d81abe8344 pyclass: support extending Exception types 2021-05-04 22:00:22 +01:00
David Hewitt 7536554ceb type_object: remove layout and base type from PyTypeInfo 2021-05-04 21:39:42 +01:00
mejrs ce03fb4e71 fixed whitespace 2021-05-04 12:38:22 +02:00
mejrs 5f51520559
Merge branch 'main' into docsrs 2021-05-04 12:34:38 +02:00
mejrs 40dd618c46 added doc alias for intopy 2021-05-03 20:31:53 +02:00
mejrs 4c3cbcdde2 impl docsrs for lib.rs 2021-05-03 20:04:13 +02:00
mejrs d11de0e15d impl docsrs for gil 2021-05-03 20:03:56 +02:00
mejrs f4b11f61d5 impl docs for conversions 2021-05-03 20:03:41 +02:00
mejrs 624921a83e impl docsrs in /types 2021-05-03 20:03:27 +02:00
mejrs 9a74c7fc65 impl docsrs in mod.rs 2021-05-03 20:03:03 +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
David Hewitt 05db24ce33
Merge pull request #1594 from davidhewitt/nowrap
docs: use white-space style instead of &nbsp; blob
2021-05-03 18:15:44 +01:00
David Hewitt 20e10b3693
Merge pull request #1592 from davidhewitt/tidy-types-macros
types: clean up types macros
2021-05-03 17:35:59 +01:00
David Hewitt ea9cf5b58a docs: use white-space style instead of &nbsp; blob 2021-05-03 16:38:57 +01:00
David Hewitt 81ad5b3544
Merge pull request #1585 from mejrs/proc_macro_docs
Proc macro documentation
2021-05-03 16:33:44 +01:00
David Hewitt 5f9b764011 types: clean up types macros 2021-05-03 14:24:06 +01:00
mejrs aa6a236362 added suggested changes 2021-05-03 00:58:00 +02:00
mejrs 51ad0d2e0a do not use actions/cache 2021-05-02 22:51:41 +02:00
mejrs 800584cfd5 added some docsrs tags 2021-05-02 21:19:30 +02:00
mejrs 78c2d40cb8 install doc_cfg feature and workflow 2021-05-02 21:10:53 +02:00
David Hewitt 3ee84a3c26
Merge pull request #1128 from c410-f3r/array
Add support for arbitrary arrays
2021-05-01 16:02:22 +01:00
David Hewitt 29dbd9911c array: rearrange file for fewer `#[cfg]`s 2021-05-01 07:48:40 +01:00
mejrs dc99707756 duplicated docs to *_with_inventory macros 2021-04-30 17:21:46 +02:00
messense 1937e21a9d
Merge pull request #1584 from davidhewitt/pypy-windows-x64
pypy: use x64 windows in CI for pypy 3.7
2021-04-30 10:35:14 +08:00
mejrs 2c7670e124 fixed extra whitespace 2021-04-30 01:23:20 +02:00
mejrs 49ebc7b9cd fixed doc typo 2021-04-30 00:43:07 +02:00
mejrs 90dfb0e5ae relax wording a bit 2021-04-30 00:31:09 +02:00
mejrs 4144a098bc proc_macro_docs 2021-04-30 00:13:19 +02:00
David Hewitt 7ebd322cf3
Merge pull request #1582 from davidhewitt/pip-21.1
examples: use pip 21.1
2021-04-29 23:01:01 +01:00
David Hewitt 1bcbc7aeae pypy: use x64 windows in CI for pypy 3.7 2021-04-29 23:00:20 +01:00
David Hewitt c0ff97e525
Merge pull request #1573 from davidhewitt/utc
ffi: support PyDateTime_TimeZone_UTC
2021-04-29 22:55:35 +01:00
David Hewitt fc6a20f63d
Merge pull request #1578 from mejrs/main
documentation for IntoPy
2021-04-29 09:03:25 +01:00
David Hewitt f1dd1380a5 examples: use pip 21.1 2021-04-29 08:52:01 +01:00