Alex Gaynor
df5aa77800
fixes #3325 -- mark AsPyPointer
as unsafe trait
2023-08-18 10:16:34 -04:00
Alex Gaynor
9f1b56b659
Remove usage of AsPyPointer
in IntoPy<PyObject>
trait implementation
2023-08-17 07:05:52 -04:00
Alex Gaynor
c259e77ca2
Remove usage of AsPyPointer
in traits for convergint to PyObject
...
Refs #3358
2023-08-16 07:03:57 -04:00
Alex Gaynor
5061b501a9
Remove IntoPyPointer
...
it wasn't used in any public APIs following #3359
2023-08-14 16:28:20 -04:00
David Hewitt
64adab1a76
add as_ptr and into_ptr inherent methods
2023-08-11 10:49:42 +01:00
David Hewitt
a15614844d
add PyErr::display
2023-07-24 22:14:55 +01:00
David Hewitt
76f3a395ef
move unsafe
block inside error_on_minusone
calls
2023-07-04 21:03:24 +01:00
David Hewitt
4f3fcdbf0f
remove all functionality deprecated in PyO3 0.18
2023-06-13 22:27:43 +01:00
David Hewitt
45b5ede26a
remove copyright headers from source files
2023-06-03 22:38:54 +01:00
Adam Reichold
b9766cfa11
Add PyClass::get and Py::get for GIL-independent access to frozen classes.
2023-05-18 08:57:55 +02:00
Enyium
d700754917
Correct documentation for Py::borrow_mut()
.
2023-02-19 21:12:06 +01:00
bors[bot]
165062e6bd
Merge #2907
...
2907: Update `downcast` documentation r=adamreichold a=mejrs
This was outdated (!)
Co-authored-by: mejrs <59372212+mejrs@users.noreply.github.com>
Co-authored-by: Adam Reichold <adam.reichold@t-online.de>
2023-01-28 17:46:34 +00:00
mejrs
cadcabaf04
Feedback
2023-01-28 15:35:31 +01:00
Samuel Colvin
3c9ace03d8
add Ellipsis() and is_ellipsis() methods, fix #2906
2023-01-27 06:40:02 +00:00
mejrs
fe7b1eed04
Update downcast
documentation
2023-01-24 19:15:32 +01:00
Georg Brandl
21fd1a91d0
Make downcast()
methods inline
2022-11-20 13:14:54 +01:00
Georg Brandl
249c0209fd
Add {Py,PyAny}::downcast_unchecked to replace try_from_unchecked calls
2022-11-18 07:00:40 +01:00
Georg Brandl
d6ac4d51b7
Replace explicit try_from
usage by downcast
2022-11-18 07:00:40 +01:00
Georg Brandl
7d4dfc32b3
PyAny::downcast(): relax lifetime bounds
2022-11-18 07:00:40 +01:00
Georg Brandl
c489809938
Py/PyAny: deprecate cast_as() in favor of downcast()
...
They are (practically) identical on PyAny, and `downcast()` is the more
useful name.
2022-11-18 07:00:40 +01:00
Adam Reichold
9847530cc8
Fix code blocks containing HTML-related characters missing backticks.
2022-10-13 07:33:11 +02:00
Andrew Burkett
3fd0c0e142
Fix PyObject_CallNoArgs python version cfg ( #2476 )
...
* Fix PyObject_CallNoArgs python version cfg
PyObject_CallNoArgs was added to python 3.9 but not to limited api until 3.10 per https://docs.python.org/3/c-api/call.html#c.PyObject_CallNoArgs
* Update change log
* Fix uses of PyObject_CallNoArgs
Co-authored-by: Andrew Burkett <andrew.burkett@crowdstrike.com>
2022-06-23 21:31:44 +01:00
David Hewitt
2fd5364646
pycell: add more test coverage
2022-06-19 21:18:15 +01:00
David Hewitt
7725f17c46
pyclass: switch from immutable to frozen
2022-06-19 21:18:15 +01:00
David Hewitt
570107d103
docs: fix nightly build
2022-05-17 19:48:40 +01:00
Bruno Kolenbrander
dce4377eb4
Allow more methods to take interned arguments ( #2312 )
...
* Allow more methods to take interned arguments
* Changelog
* Unify name bounds
* Resolve merge conflict
* reduce use of py_decref
* Add some attr tests
* Update migration
2022-05-02 11:13:15 +02:00
David Hewitt
71f9f18d54
remove toborrowedobject trait
2022-04-26 05:48:34 +01:00
Bruno Kolenbrander
bc6bd6099c
Merge branch 'main' into immutable
2022-04-12 14:22:33 +02:00
Adam Reichold
f02a060a3d
Add a hint on using intern! to Py{,Any}::{set,get}attr.
2022-04-04 23:11:38 +02:00
mejrs
086424b88c
Merge branch 'main' of https://github.com/mejrs/pyo3 into immutable
2022-04-01 23:11:02 +02:00
Bruno Kolenbrander
78efebd993
Expand some documentation ( #2256 )
...
* use `is` where appropriate
* Rework safety docs
2022-03-30 12:56:14 +02:00
mejrs
6f1cf1b662
Add more lints
2022-03-23 08:07:28 +01:00
Georg Brandl
03dc96bff1
Py/PyAny: remove PartialEq impl and add is() ( #2183 )
2022-02-25 19:39:45 +00:00
David Hewitt
f98f116131
pypy: support released 3.9
2022-02-25 07:28:22 +00:00
mejrs
9e29c1058c
Gut specialization and implement auto trait
...
Implement auto trait
Implement auto trait
Undo oopsie
Fix versions
Fix CI errors
Fix CI
Remove more specialization remnants
2022-02-22 22:43:23 +01:00
mejrs
7520b49ac1
Implement opt-in immutable pyclasses
2022-02-08 18:08:18 +00:00
David Hewitt
3a70406448
chore: cleanup old todo
2022-02-05 09:00:00 +00:00
David Hewitt
4c8abd1426
rust: support 1.57
2021-12-08 07:10:16 +00:00
Vincent Michel
91caa814d0
Add Py::setattr
method
2021-11-19 16:59:54 +01:00
David Hewitt
f801c19efe
err: add PyErr::take
2021-11-02 23:12:36 +00:00
Bruno Kolenbrander
8a57fe2d20
Clean up doctests, deny some lints ( #1900 )
...
* Clean up doctests, deny some lints
* Apply suggestions from review.
* replace \" with '
* Fix some more doc examples
* Fix formatting
* Fix some more things
* Remove unused parentheses
* Only test class sig on supported abi/platforms
* Only test class signature on correct versions
* Fix tests to compile on msrv
* msrv strikes yet again
* Add feedback
* Pin `half` to 1.7.1 on msrv
2021-10-14 22:15:25 +01:00
Benjamin Kay
ac4613eb9f
Improve documentation about when we free memory, resolves #311 ( #1807 )
...
* Improve API docs regarding when we free memory, resolves #311
* Add chapter to guide about when we free memory, resolves #311
* Fix typos in documentation
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
* Add links from guide to docs.rs
* Update guide/src/memory.md
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-08-21 09:23:10 +01:00
David Hewitt
37d39aa83a
Merge pull request #1751 from davidhewitt/pyany-py
...
pyany: add PyAny::py()
2021-08-17 14:10:16 +01:00
David Hewitt
388c2552f8
Merge pull request #1786 from mejrs/with_gil2
...
tests: switch to python_with_gil
2021-08-13 12:39:17 +01:00
David Hewitt
ebada76ae3
pyany: add PyAny::py()
2021-08-13 08:00:13 +01:00
mejrs
596c3ff4b7
remove now unused imports
2021-08-12 12:08:54 +02:00
mejrs
9fe3e2b2b8
Apply suggestions from code review
...
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-08-12 11:52:56 +02:00
mejrs
f55a9c8ab0
tests: switch to python_with_gil
2021-08-12 02:47:41 +02:00
messense
93b25edba1
Use errror_on_minusone
more often
2021-08-11 23:44:40 +01:00
messense
9d0b92bf32
Change PyErr::fetch
to return an Option<PyErr>
2021-08-11 23:44:40 +01:00