Icxolu
c359f5ca1d
deprecate PyDict::new
constructor ( #3823 )
...
* deprecate `PyDict::new`
* update benchmarks
* convert `test_frompyobject`
2024-02-11 23:55:56 +00:00
David Hewitt
55488d3880
Merge pull request #3818 from davidhewitt/datetime-segv
...
fix segmentation fault when `datetime` module is invalid
2024-02-11 09:04:32 +00:00
David Hewitt
5b1104131f
fix segmentation fault when datetime
module is invalid
2024-02-11 02:44:31 +00:00
Icxolu
e45fbe493c
port IntoPyDict
to Bound
API
2024-02-10 15:47:26 +01:00
Icxolu
4d423b0c67
port Python::run
to Bound
API
2024-02-09 22:09:16 +01:00
Icxolu
33dc33ecec
port Python::eval
to Bound
API
2024-02-09 17:52:00 +01:00
David Hewitt
bcb7b88c23
ci: updates for rust 1.76
2024-02-08 21:13:58 +00:00
David Hewitt
030a618e0d
Merge pull request #3800 from snuderl/PyCFunction-bound-api
...
PyCFunction bound api
2024-02-06 18:28:40 +00:00
Blaž Šnuderl
aa3c938b5e
PyCFunction bound api
2024-02-06 18:44:53 +01:00
David Hewitt
de93d15eeb
ci: fix beta clippy map_clone
warning
2024-02-05 07:57:27 +00:00
David Hewitt
76d1b34cd5
Revert "Merge pull request #3578 from davidhewitt/typed-helpers"
...
This reverts commit 7b07d6d21b
, reversing
changes made to 99858236bd
.
2024-02-03 20:56:23 +00:00
David Hewitt
d8c5e7943c
Merge pull request #3790 from Icxolu/bool
...
add `Bound` constructor for `PyBool`
2024-02-03 13:10:30 +00:00
Icxolu
af21a9dc74
add Bound
constructor for PyBool
2024-02-03 12:06:50 +01:00
David Hewitt
8f8d4d33fa
Merge pull request #3776 from davidhewitt/bound-extract
...
migrate `FromPyObject` for `Bound` and `Py` to new APIs
2024-02-02 23:10:47 +00:00
David Hewitt
a60c1821af
implement PyFunctionArgument
for &Bound<T>
2024-02-01 13:22:53 +00:00
David Hewitt
4c94be51a7
add PyBytes::new_bound
2024-02-01 08:52:28 +00:00
David Hewitt
c47565666d
add PyString::new_bound
2024-01-29 13:14:00 +00:00
David Hewitt
eb8d11f42f
Merge pull request #3769 from davidhewitt/remove-test-pep-587
...
remove `test_pep_587`
2024-01-27 22:33:35 +00:00
David Hewitt
5ccc46e459
remove test_pep_587
2024-01-27 21:57:43 +00:00
David Hewitt
eed196329d
add list bound constructors
2024-01-27 21:12:55 +00:00
David Hewitt
5f320d7a04
Merge pull request #3765 from davidhewitt/remove-py-newref
...
remove internal uses of `_Py_NewRef`
2024-01-27 13:35:29 +00:00
David Hewitt
87e0610b58
remove internal uses of _Py_NewRef
2024-01-27 12:07:46 +00:00
Icxolu
7fddd983b4
update test_compile_error
ui test output
2024-01-27 12:37:26 +01:00
Mate Kovacs
3ed5ddb0ec
feat: support pyclass on complex enums
2024-01-18 22:04:42 +09:00
David Hewitt
4504a7c96e
fix some nightly lints 2024-01-12
2024-01-12 13:34:17 +00:00
David Hewitt
50e33d86c7
add call_bound
and call_method_bound
2024-01-03 13:24:14 +00:00
David Hewitt
823b5feed3
improve tuple methods test coverage
2023-12-30 21:37:46 +00:00
David Hewitt
53d25f7ff2
add new PyTuple
constructors
2023-12-30 21:37:46 +00:00
David Hewitt
375e3d4eee
implement PyTupleMethods
2023-12-30 21:37:46 +00:00
Alex Gaynor
54390bc50b
Merge pull request #3712 from alex/binops
...
add PyAnyMethods for binary operators
2023-12-30 13:56:45 +00:00
Alex Gaynor
339660c117
add PyAnyMethods for binary operators
...
also pow
fixes #3709
2023-12-29 18:45:18 -05:00
David Hewitt
e852a4b502
be more lax with ordering in invalid_result_conversion
ui test
2023-12-29 22:06:33 +00:00
David Hewitt
3da1aac2dd
add gil-refs
feature to aid migration
2023-12-29 14:42:31 +00:00
David Hewitt
e42d8cf612
ci: updates for Rust 1.75
2023-12-29 13:36:46 +00:00
Adam Reichold
f37c682f8c
Merge pull request #3700 from davidhewitt/super-bound
...
introduce `PySuper::new_bound`
2023-12-25 09:48:39 +00:00
David Hewitt
d9cc0c0f24
introduce PySuper::new_bound
2023-12-24 20:04:15 +00:00
David Hewitt
877e34ac86
implement PyErr::write_unraisable_bound
2023-12-24 19:35:29 +00:00
Adam Reichold
4dc6c1643e
Turn calls of __traverse__ into no-ops for unsendable pyclass if on the wrong thread
...
Adds a "threadsafe" variant of `PyCell::try_borrow` which will fail instead of
panicking if called on the wrong thread and use it in `call_traverse` to turn GC
traversals of unsendable pyclasses into no-ops if on the wrong thread.
This can imply leaking the underlying resource if the originator thread has
already exited so that the GC will never run there again, but it does avoid hard
aborts as we cannot raise an exception from within `call_traverse`.
2023-12-23 15:01:08 +01:00
David Hewitt
0f242c399d
make DowncastError
and DowncastIntoError
public
2023-12-21 13:03:59 +00:00
Adam Reichold
ca7d90dcf3
Replace IterNextOutput by autoref-based specialization to allow returning arbitrary values
2023-12-20 09:56:16 +01:00
David Hewitt
1451418ee4
Add Py2
variants of PyDowncastError
2023-12-19 20:59:57 +00:00
Adam Reichold
416d3c488f
Rename name to qualname and full_name to name to better match Python
2023-12-19 16:51:24 +01:00
Adam Reichold
ced97f80d1
Transition is_true to is_truthy to clarify that the test is not based on identity with or equality to the True singleton.
2023-12-16 14:04:37 +01:00
David Hewitt
07726aefc4
Merge pull request #3609 from wyfo/async_receiver
...
feat: allow async methods to accept `&self`/`&mut self`
2023-12-07 07:38:25 +00:00
Joseph Perez
f34c70c2da
feat: allow async methods to accept &self
/&mut self
2023-12-07 07:42:10 +01:00
David Hewitt
ed87637ebb
replace PyTryFrom
by splitting PyTypeInfo
2023-12-05 08:01:30 +03:00
Joseph Perez
2ca9f59d6f
refactor: drop futures_util dependency
2023-12-04 18:56:34 +01:00
Joseph Perez
8a674c2bd3
feat: add coroutine::CancelHandle
2023-12-04 07:46:51 +01:00
David Hewitt
81ad2e8bab
Merge pull request #3598 from davidhewitt/clippy-beta
...
ci: run beta clippy as an allowed-to-fail job
2023-11-29 06:47:21 +00:00
David Hewitt
cf67c2ce46
fix test-serde beta clippy warning
2023-11-28 07:29:45 +00:00