Commit graph

85 commits

Author SHA1 Message Date
David Hewitt 97487ffbb5 add abi3-py311 feature 2022-11-23 08:08:12 +00:00
Georg Brandl 4a2e6bd51a ffi: fixup bytesobject/dictobject on PyPy
Fixes #2758
2022-11-20 11:31:24 +01:00
Georg Brandl 68e82ec962 ffi: link to _PyPyBytes_Resize
Fixes #2737
2022-11-19 12:25:11 +01:00
Georg Brandl 1d20f2a531
Export warning classes and add PyErr::warn_explicit() (#2742) 2022-11-17 19:30:48 +01:00
Adam Reichold 694ef1ea39 Make Clippy happy again by removing supposedly unnecessary casts. 2022-11-15 21:50:29 +01:00
Itamar Turner-Trauring 6746ff8216
Python 3.7 support for PyCodeObject. (#2726)
* Python 3.7 support for PyCodeObject.

Co-authored-by: Itamar Turner-Trauring <itamar@pythonspeed.com>
2022-11-08 21:06:05 +00:00
David Hewitt 548e90fcec release: 0.17.3 2022-11-01 20:47:46 +00:00
messense 736e97556d
Disable PyModule::filename on PyPy 2022-10-31 15:45:50 +08:00
David Hewitt bd40011e93 release: 0.17.2 2022-10-04 08:13:53 +01:00
David Hewitt 8102ad1a1b rust: updates for 1.64 2022-09-22 21:03:34 +02:00
David Hewitt caaf7bbda7 release: 0.17.1 2022-08-28 08:27:56 +01:00
David Hewitt 04c1ac87f1 release: 0.17.0 2022-08-23 21:21:19 +01:00
mejrs 26fe75e9b5 Also update the readme 2022-08-23 13:54:11 +02:00
mejrs 5b845d3b1a Improve pyo3-ffi example 2022-08-22 22:27:05 +02:00
mejrs 3845e3fe33 Make a way to make const zeroed PyMethodDef 2022-08-22 22:25:02 +02:00
David Hewitt 88ad288345 ffi: swap field order in PyCodeObject for 3.11 2022-08-19 09:28:57 +01:00
David Hewitt 218ef6cd83 ffi: more fixes for Python 3.11 rc1 2022-08-16 18:17:50 +01:00
David Hewitt 1e73ef67f2 ffi: fixes to 3.11 bindings 2022-08-14 14:23:24 +01:00
David Hewitt c58ff7758c pypy: disable PyFunction 2022-08-13 17:51:10 +01:00
messense 3c0520da83
Add FFI definitions for Py_EnterRecursiveCall and Py_LeaveRecursiveCall (#2511)
* Add FFI definitions for `Py_EnterRecursiveCall` and
`Py_LeaveRecursiveCall`

* Update pyo3-ffi/src/ceval.rs

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2022-07-15 15:45:15 +08:00
David Hewitt 7babd13830 datetime: support timezone bindings 2022-07-13 22:05:17 +01: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 866ddaca8a ffi: tidy descrobject.rs 2022-06-07 19:45:36 +01:00
Alex Gaynor 9cfbdeca78 ffi: fixes for field names/presence
pyo3-ffi-check now passes for me on 3.9
2022-06-05 07:39:17 -04:00
David Hewitt 6f4e84f25f ffi: more pypy fixes 2022-06-05 09:24:46 +01:00
David Hewitt 9300bff551 ffi: field fixes from pyo3-ffi-check 2022-06-05 08:17:14 +01:00
Alex Gaynor e1c8bda4ee
fixed name of initfunc field on _inittab 2022-06-04 22:15:51 -04:00
Alex Gaynor 485994fa90
ob_shash is available on CPython
This struct is opaque on PyPy anyways, so the conditional didn't make sense.
2022-06-04 15:01:54 -04:00
David Hewitt 9777faddc6
Merge pull request #2429 from alex/pyopccache-py311
_PyOpcache does not exist on Python 3.11
2022-06-04 18:22:42 +01:00
Bruno Kolenbrander 728d35aa7d
Expand on the C api definitions (#2409)
* Expand on the C api

* Fix Ci

* Fix PyCodeObject structure

* Add descrobjects

* Add None and NotImplemented type objects

* Update pyo3-ffi/src/cpython/object.rs

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>

* Fix PyPy definitions

* Fix CI

* Fix CI

* Fix CI

* Fix CI

* Fix CI

* Fix CI

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2022-06-04 18:22:18 +01:00
Alex Gaynor 12d38dbcf8 _PyOpcache does not exist on Python 3.11
NB: the definition of PyCodeObject is still quite wrong. This is the minimal change to get pyo3-ffi-check to compile at all!
2022-06-04 10:46:05 -04:00
David Hewitt cdf86482d8 ffi: many fixes to pypy definitions 2022-06-04 12:47:40 +01:00
David Hewitt 0d78e88b14 ffi: fix PyTypeObject definition on Python 3.8 2022-06-04 08:12:27 +01:00
David Hewitt f8a9837c3a ffi: fix PyFrameObject definition 2022-06-02 17:47:23 +01:00
David Hewitt 78cdc6d6ad ffi: many fixes caught by pyo3-ffi-check 2022-06-02 16:32:07 +01:00
David Hewitt 6a9f5fd705 ffi: remove PyArena on 3.10 and up 2022-06-02 09:35:35 +01:00
David Hewitt 6741104762 ffi: fix names of _Base datetime structs 2022-06-02 09:35:35 +01:00
David Hewitt 1d50ffd500
Merge pull request #2407 from alex/patch-2
Make Py_tracefunc an unsafe func
2022-06-02 08:55:07 +01:00
Alex Gaynor 7a7926c0ff
Update pyframe.rs 2022-05-28 22:45:50 -04:00
Alex Gaynor c2faef4b64
Make Py_tracefunc an unsafe func
There's basically no way to safely write a function with raw pointers for parameters.
2022-05-28 22:28:19 -04:00
Alex Gaynor b651502c11
Expose PyFrame_GetCode 2022-05-28 15:47:47 -04:00
herquan 2ec477344d Add macro append_to_inittab
Sometimes we need to debug in a real environment with our module installed. `append_to_inittab` will be a wrapper for PyImport_AppendInittab (https://docs.python.org/3/c-api/import.html#c.PyImport_AppendInittab) and help us to do this
2022-05-24 07:42:15 +01:00
David Hewitt 3dcbcb7a95 update main to reflect 0.16.5 release 2022-05-15 20:31:00 +01:00
David Hewitt 8636db67f5 add regression test for PEP 587 2022-05-15 16:08:21 +01:00
Gregory Szorc f1c477b536 ffi: add new 3.11 fields to PyConfig
These are the new fields in 3.11 so far. 3.11 is supposedly feature
frozen, so hopefully we don't need to revisit this struct before 3.11
final.
2022-05-13 17:52:31 -07:00
Gregory Szorc 03cb561d41 ffi: add PyConfig::warn_default_encoding to 3.10+
This field was added in 3.10 but we missed it. This was causing
offsets of subsequent fields to be wrong. This could lead to
unexpected behavior or even crashes.
2022-05-13 17:49:58 -07:00
messense c477718fe7
Add support for generating non-abi3 python import libraries for Windows
targets
2022-05-12 14:32:20 +08:00
David Hewitt 10b09297b1 ffi: remove eval.rs 2022-05-11 03:44:27 +01:00
David Hewitt 5d8fd4d30e ffi: remove with_thread cfg 2022-05-05 07:26:05 +01:00
messense 97a9121025
pyo3-ffi: forward extension-module feature to pyo3-build-config 2022-04-19 13:17:47 +08:00