Commit Graph

200 Commits

Author SHA1 Message Date
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
messense 1276068891
Add `generate-abi3-import-lib` feature to `pyo3-ffi` 2022-04-19 13:17:43 +08:00
Adam Reichold d2caa056e9 release: 0.16.4 2022-04-14 07:56:42 +01:00
David Hewitt cb48557601
Merge pull request #2296 from davidhewitt/print-config-note
build: add hint when PYO3_PRINT_CONFIG is set
2022-04-12 08:27:49 +01:00
David Hewitt b35fed00d7 build: add hint when PYO3_PRINT_CONFIG is set 2022-04-12 07:54:23 +01:00
David Hewitt 391a375bae ffi: add BaseDateTime and BaseTime definitions 2022-04-12 07:46:38 +01:00
David Hewitt 1d9d60a766 ffi: fix segfault in _GET_TZINFO methods 2022-04-10 10:27:50 +01:00
David Hewitt 1ae0971a09 release: 0.16.3 2022-04-05 04:05:57 +01:00
David Hewitt c16cc35b30 pyclass: mapping flag 2022-04-02 16:15:44 +01:00
Sergey Kvachonok 9b45a19161 pyo3-build-config: Replace `TargetInfo` with `target_lexicon::Triple`
Add a new public crate function `cross_compile_from_to()` using
`target_lexicon::Triple` arguments instead of plain strings
used in `cross_compile()`.

Deprecate `pyo3_build_config::cross_compile()` since v0.17.

Attempt to extract common code patterns into methods and standalone
helper functions. Add docstrings to the new private items.
Make some of the new helper functions public within the PyO3 crate
and reuse them in the build scripts.

Add PYO3_CROSS_PYTHON_VERSION parsing unit test.

Add a ChangeLog entry mentioning the new `pyo3-build-config` API.
2022-04-01 09:36:49 +03:00
messense 23e220985a
Mark `METH_FASTCALL` as limited API on Python 3.10+
0b9c4c6fcf (diff-adb492ab0eb13648d50d0d79e4b6e5517b27f983ab3b21b63e77f54132c98e9dR76)
2022-03-26 21:27:49 +08:00
messense f3f0a612d8
Add FFI definition for `PyModule_AddType` 2022-03-26 21:27:49 +08:00
messense 92c132569f
Add FFI definitions for PEP 573 functions 2022-03-26 21:27:44 +08:00
David Hewitt 16ee22c7cc
Merge pull request #2244 from mejrs/lint-more
Add more lints
2022-03-23 13:40:35 +00:00
mejrs 00ea040834 Feedback 2022-03-23 13:30:32 +01:00
Ashley Anderson 4a62a62cae Improvements based on code review: API and documentation. 2022-03-21 12:55:39 -04:00
Ashley Anderson bbe7a493d6 Refactor to serialize the whole InterpreterConfig into DEP_PYTHON_PYO3_CONFIG 2022-03-17 12:10:38 -04:00
Adam Reichold 922bbfc92d release: 0.16.2 2022-03-15 19:20:00 +01:00
Adam Reichold 1e7275c924 Move links key from pyo3 to pyo3-ffi
Instead of a fake build dependency, move the links key from pyo3 to pyo3-ffi
which according to [1] is a prerequisite for build scripts to emit meta-data
that can be used by other build scripts which would incidentally ensure the
ordering between the build script of pyo3 and pyo3-ffi that we need.

[1] https://doc.rust-lang.org/cargo/reference/build-script-examples.html#using-another-sys-crate
2022-03-15 12:42:54 +01:00
David Hewitt 88cd9152b2 pypy: support 7.3.8 2022-03-08 21:09:16 +00:00
David Hewitt 7056bae21f release: 0.16.1 2022-03-05 16:21:44 +00:00
David Hewitt ddf13ea98f clippy: enable some more lints 2022-03-03 07:23:28 +00:00
David Hewitt 4c434a21bd release: 0.16.0 2022-02-27 20:28:51 +00:00
David Hewitt b84309b67d ffi: add missing definition PyCMethod_New 2022-02-25 07:28:52 +00:00
David Hewitt 089fea1f3c ci: add pypy 3.9 dev 2022-02-25 07:28:22 +00:00
Bruno Kolenbrander 01788b7220
Merge pull request #2172 from mejrs/addr
Use addr_of_mut in pyo3-ffi
2022-02-19 17:56:09 +01:00
mejrs f346d1c86f Move emitting cfgs to pyo3-build-config 2022-02-18 19:20:32 +01:00
mejrs c40bd98825 Use addr_of_mut where possible 2022-02-16 15:14:10 +01:00
David Hewitt 7851e865ae
Merge pull request #2166 from mejrs/union
Implement ml_meth as an union.
2022-02-15 07:55:24 +00:00
mejrs 718b0fd02f Remove options and rename struct 2022-02-14 15:14:49 +01:00
mejrs dadbc22b2e Implement nl_meth as an union. 2022-02-14 00:03:33 +01:00
Jacob Zhong d99a001b7d Fix the signature of _PyLong_NumBits 2022-02-12 13:27:40 -05:00
David Hewitt f75579a489 python-3.11: support buffer API on abi3 2022-02-06 22:46:45 +00:00
David Hewitt 71e5a12fa2 pypy: support fast long conversion 2022-02-05 10:14:14 +00:00
DSPOM 004fa2a68d
fix: remove excess argument for `_PyCFunctionFast` 2022-01-31 13:27:32 +01:00
DSPOM 6a9a9ba38a
move ffi module to separate crate 2022-01-31 13:27:16 +01:00