David Hewitt
b2675b11fe
rust 1.50: clippy and lint fixes
2021-02-11 22:03:34 +00:00
Georg Brandl
fa8d7518ca
Restore compatibility with Rust 1.41.
...
This version is currently supported by Debian stable and Alpine Linux.
Fixes #1420
2021-02-11 10:14:25 +01:00
David Hewitt
9807ef8ed4
macros-backend: fix raw idents in pymethods
2021-01-12 22:01:11 +00:00
David Hewitt
0729fb1e03
Merge pull request #1374 from davidhewitt/macros-error-handling
...
macros-backend: improve error handling ergonomics
2021-01-12 08:05:30 +00:00
Daniil Konovalenko
abb5829e9c
implement Serialize, Deserialize for Py<T>
2021-01-11 22:19:10 +00:00
David Hewitt
88872eba4f
macros-backend: improve error handling ergonomics
2021-01-10 10:25:43 +00:00
David Hewitt
b92441cd7c
pyclass: fix reference count issue in subclass new
2021-01-08 00:13:49 +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
7572962828
abi3: add support for dict and weakref from Python 3.9
2020-12-28 10:22:46 +00:00
David Hewitt
db74cc85fa
pypy: final fix
2020-12-20 13:50:39 +00:00
kngwyu
dc2dbd6c19
Use #[cfg(not(Py_LIMITED_API))] for datetime API
2020-12-20 12:20:35 +00:00
David Hewitt
fa8c93cfd1
pyclass #[new]: allow using custom error type
2020-12-13 23:50:03 +00:00
David Hewitt
5133f81e6d
deprecate pyclass name without quotes
2020-12-12 11:11:11 +00:00
scalexm
7dadf59fde
Do not include the double quotes in #[pyclass(name = "literal")]
2020-11-30 22:04:07 +01: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
roblabla
d479b54b94
Fix #1285 , text_signature and raw ident interaction
2020-11-19 17:21:02 +00:00
David Hewitt
8a8c098a2e
rust-1.48: fix tests and warnings
2020-11-19 12:49:29 +00:00
David Hewitt
45599620b5
pyerr: improve debug & display impls
2020-11-15 16:22:45 +00:00
David Hewitt
9617edfca9
msrv: bump to 1.45
2020-11-12 11:33:08 +00:00
Alex Gaynor
90a825d0c2
Merge branch 'master' into abi3-merge-master
2020-10-19 14:32:49 -04:00
David Hewitt
afd9b823d2
Drop support for Python 3.5
2020-10-18 19:02:27 +01:00
Alex Gaynor
ba6f0ecdfa
Merge branch 'master' into abi3-merge-master
2020-10-18 10:47:06 -04:00
Askaholic
6724783395
Change wording of PyDowncastError display implementation
...
Displays type(obj) instead of repr(obj) and uses `cannot` instead of
`can't`
to be more consistent with existing python error messages.
See discussion at #1212 .
2020-10-14 17:32:00 -08:00
Askaholic
19889bc6b9
Add argument name to TypeError messages caused during argument conversion
2020-10-14 17:32:00 -08:00
Askaholic
007bfb7ab0
Refactor py_expect_exception to also verify error string representation
2020-10-13 14:02:14 -08:00
Alex Gaynor
9e34835b76
Merge branch 'master' into abi3-merge-master
2020-10-12 18:03:14 -04:00
David Hewitt
7b3dd68bfb
Fix support for MSRV
...
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2020-10-12 15:46:40 +01:00
Alex Gaynor
aabad7cf7f
Assorted updates to the abi3 branch from review
2020-10-11 19:51:27 -04:00
Alex Gaynor
140790b15f
Merge branch 'master' into abi3-merge-master
2020-10-10 10:11:49 -04:00
kngwyu
e7092fe630
Make PyCFunction more backward-compatible
2020-10-09 01:35:55 +09:00
kngwyu
b42886a38a
Change PyCFunction to take &'static str as a function name
2020-10-08 17:26:55 +09:00
dvermd
df984ec8df
Keyword only arguments ( #1209 )
...
* allow keyword arguments without default value
* allow keyword-only arguments
2020-10-01 13:34:54 +09:00
Alex Gaynor
c22dd6c54c
Remove symbols not available in abi3
2020-09-23 22:30:07 -04:00
Yuji Kanagawa
e33e58fc72
Merge pull request #1201 from alex/abi3-text-signature
...
Hack __text_signature__ back to working with abi3
2020-09-20 16:46:04 +09:00
kngwyu
869a5e2f20
Fix an abi3 ui test for the latest Rustc
2020-09-20 15:33:55 +09:00
Alex Gaynor
9d8559158b
Hack __text_signature__ back to working with abi3
2020-09-19 11:43:57 -04:00
kngwyu
7644d67ad8
Inhibit subclassing native types with ABI3 set
2020-09-20 00:42:55 +09:00
Alex Gaynor
ba1056006a
Get all the tests building, everythign except doctests passes!
2020-09-16 08:42:22 -04:00
Alex Gaynor
5bfb4674b1
Merge branch 'master' into abi3-merge-master
2020-09-10 17:01:13 -04:00
David Hewitt
151af7a0b7
Merge pull request #1115 from davidhewitt/std-py-err
...
Implement std::error::Error for PyErr
2020-09-10 21:17:11 +01:00
David Hewitt
b9e95dc7c9
Implement std::error::Error for PyErr
2020-09-10 19:04:24 +01:00
kngwyu
7a4c5e2960
Merge branch 'master' into abi3
2020-09-10 00:48:20 +09:00
Sebastian Pütz
22881a3c2f
Change add_function, ensure static docstrings.
...
Change add_function to take `&PyCFunction` instead of a wrapper
fn and ensure that dostrings of functions are `&'static str`.
2020-09-09 12:37:37 +02:00
Alex Gaynor
117f60bed0
Make PyType::name abi3 compatible
...
The implementation is more complex, because there's no equivalent to tp_name in the limited API
2020-09-08 12:22:59 -04:00
Sebastian Pütz
be877d133f
Add constructor for PyCFunction.
2020-09-08 14:26:08 +02:00
Sebastian Pütz
2e8010b5df
Add native Function native types.
...
Add bindings for PyCFunction, PyFunction, PyClassMethod and
PyStaticMethod.
2020-09-08 09:51:31 +02:00
Sebastian Pütz
64b06ea9ec
Change add_submodule()
to take &PyModule
.
...
The C-exported wrapper generated through `#[pymodule]` is only
required for the top-level module.
2020-09-05 15:54:57 +02:00
Sebastian Pütz
e65b849ab6
Doc fixes, changelog and rename.
2020-09-05 10:20:22 +02:00
Sebastian Pütz
795c054511
Possible to pass PyModule as first arg.
...
This commit makes it possible to access the module of a function
by passing the `need_module` argument to the pyfn and pyfunction
macros.
2020-09-04 09:01:21 +02:00