David Hewitt
469d72a001
Merge pull request #2022 from PyO3/pyo3_path
...
Hygiene: offer a way to set path to pyo3 crate
2021-12-09 20:27:48 +00:00
Juniper Parsons
47cf13239f
Disallow positional args after optional args
2021-12-09 10:01:59 -05:00
Georg Brandl
a5b76bc365
pyo3_path, part 4: rename to crate
to keep consistent with serde
2021-12-09 07:36:48 +01:00
Georg Brandl
e4f608f605
pyo3_path, part 2: add pyo3_path options and use them.
2021-12-09 07:24:18 +01:00
David Hewitt
4c8abd1426
rust: support 1.57
2021-12-08 07:10:16 +00:00
b05902132
d339cd0dc9
Let #[pyclass] reject empty enums.
2021-11-23 01:15:07 +08:00
b05902132
b7419b5278
Refactor #[pyclass] and now it supports enum.
...
There's no functionality since it does not generate __richcmp__.
Also it only works on enums with only variants, and does not support
C-like enums.
2021-11-21 20:05:53 +08:00
David Hewitt
c9a4cd1f87
deprecations: remove items deprecated in PyO3 0.14
2021-11-19 16:33:29 +00:00
David Hewitt
6a65f98bd2
msrv: bump to 1.48
2021-11-19 10:10:59 +00:00
Bruno Kolenbrander
7b9ae8e663
Clean up Python
documentation ( #1963 )
...
* Clean up `Python` documentation
* Apply suggestion
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
* Fix some things
* Fix PyPy link
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-11-02 23:05:44 +00:00
David Hewitt
3ab32ff01f
guide: magic methods in pymethods
2021-10-24 15:59:22 +01:00
David Hewitt
0e0e6f8bf5
pymethods: support protocols with multiple-pymethods
feature
2021-10-23 00:07:35 +01:00
David Hewitt
4b2345fe80
pymethods: support __call__ proto
2021-10-23 00:06:46 +01:00
messense
d6401966f9
Update UI tests output
2021-10-22 16:40:57 +08:00
Ashley Anderson
bf26daec2d
Positional-only args ( #1925 )
...
* Add support for positional-only args
* Update changelog. Add a few more tests. Run rust-fmt.
* Fix test.
* Fix tests again.
* Update CHANGELOG.md to link PR instead of issue
* Update guide to mention positional-only params
* Add unreachable!() per code review
* Update and expand tests for pos args.
* Fix tests, lint, add UI tests.
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-10-19 23:13:27 +01:00
David Hewitt
5a1660f7c8
Merge pull request #1924 from davidhewitt/rtruediv-rfloordiv
...
pymethods: support __rtruediv__ and __rfloordiv__
2021-10-17 10:00:11 +01:00
David Hewitt
212404bc23
pymethods: support __rtruediv__ and __rfloordiv__
2021-10-17 08:33:46 +01:00
laurent
2042906832
pycfunction: add PyCFunction::new_closure rust defined closures
2021-10-17 07:59:50 +01:00
Ashley Anderson
a21e57a9d3
Fix additional tests after trybuild update
2021-10-11 20:52:24 -04:00
Bruno Kolenbrander
49570db3fc
chore: pin trybuild version ( #1906 )
...
chore: pin trybuild version to 1.0.49
2021-10-10 17:22:29 +02:00
mejrs
4cd9f4b570
import FromPyObject into crate root
2021-09-14 14:07:23 +02:00
mejrs
68cba78a44
chore: update rust 1.55 ( #1865 )
...
* chore: update rust 1.55
* move test to 1.55 only
* make ci happy
* make ci happy
* make ci happy
* make ci happy
* make clippy happy
* make ci happy
* formatting
2021-09-12 18:07:24 +01:00
David Hewitt
ebada76ae3
pyany: add PyAny::py()
2021-08-13 08:00:13 +01:00
David Hewitt
ee9a1678d5
rust: updates for rust & clippy 1.54
2021-07-31 08:19:38 +01:00
mejrs
c07c5a4c93
Add full path for PyCell
2021-07-03 07:51:18 +01:00
messense
b5b9a480cd
Add wrap_pyfunction
macro to prelude
2021-06-24 22:34:55 +08:00
mejrs
445f5163d4
update error message for rust 1.53
2021-06-19 16:11:03 +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
David Hewitt
d011467e63
pyclass: allow #[pyo3(get, set, name = "foo")]
2021-06-04 11:30:40 +01:00
David Hewitt
9f74336bc9
pyfunction: better error message with async fn
2021-05-25 11:32:52 +01:00
David Hewitt
a109640850
pyfn: deprecate name argument
2021-05-20 08:54:29 +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
defd09c166
rust: updates for rust 1.52
2021-05-06 23:18:34 +01:00
David Hewitt
7536554ceb
type_object: remove layout and base type from PyTypeInfo
2021-05-04 21:39:42 +01:00
Yuji Kanagawa
f0763f069e
Merge pull request #1507 from scalexm/getter-name
...
Allow `#[name]` with `#[getter]` and `#[setter]`
2021-03-20 16:23:07 +09:00
messense
2cec240b0e
Ban pyo3(get, set) on tuple struct field
2021-03-19 10:17:06 +08:00
scalexm
b27ee3fd64
Allow #[name]
with #[getter]
and #[setter]
2021-03-18 19:35:17 +01:00
David Hewitt
9613228a0c
pyfunction: reject generic functions
2021-03-09 23:47:47 +00:00
konstin
f97c3a9479
Convert callback_body_without_convert function to handle_panic function
2021-03-01 12:42:19 +01:00
Daniil Konovalenko
554cffd60d
add #[pyo3(from_py_with="...")] attribute ( #1411 )
...
* allow from_py_with inside #[derive(FromPyObject)]
* split up FnSpec::parse
2021-02-21 00:15:20 +09:00
David Hewitt
7b99e391fa
pyclass-impl: merge implementation traits
2021-02-18 08:19:07 +00:00
David Hewitt
88872eba4f
macros-backend: improve error handling ergonomics
2021-01-10 10:25:43 +00:00
David Hewitt
22de3b4f44
pyclass: add !Send compile_error test
2021-01-05 23:25:28 +00:00
David Hewitt
b1012ebb68
build: update for Rust 1.49
2020-12-31 18:16:02 +00:00
David Hewitt
5133f81e6d
deprecate pyclass name without quotes
2020-12-12 11:11:11 +00:00
scalexm
649b439463
Allow #[pyclass(name = "string literal")]
...
This is also more in line with the `#[name = "..."]` attribute on
methods.
2020-11-27 18:45:07 +01:00
David Hewitt
8a8c098a2e
rust-1.48: fix tests and warnings
2020-11-19 12:49:29 +00:00