Commit Graph

688 Commits

Author SHA1 Message Date
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
David Hewitt 7e638e233f
Merge pull request #2371 from indygreg/initconfig-311
ffi: add new 3.11 fields to PyConfig
2022-05-15 06:20:16 +01:00
David Hewitt 7a9e70e2c7 wrap_x: change macros back to `macro_rules!` 2022-05-14 20:42:07 +01: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 5508de8925
Update changelog for #2364 2022-05-12 14:32:55 +08:00
David Hewitt 1482b526de
types: add dict views (#2358) 2022-05-11 20:34:22 +01:00
David Hewitt 10b09297b1 ffi: remove eval.rs 2022-05-11 03:44:27 +01:00
Bruno Kolenbrander c57e5098b8
Fix IntoPyCallbackOutput paper cuts (#2326)
* Implement IntoPy for arrays of IntoPy

* Improve `IntoPyCallbackOutput` compile error
2022-05-09 18:15:43 +01:00
David Hewitt 5d8fd4d30e ffi: remove with_thread cfg 2022-05-05 07:26:05 +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 8692b9b54b
Update CHANGELOG.md 2022-04-26 08:09:34 +01:00
David Hewitt 1596ab8a4b
Merge pull request #2333 from davidhewitt/remove-toborrowedobject
remove `ToBorrowedObject` trait
2022-04-26 06:23:35 +01:00
David Hewitt 71f9f18d54 remove toborrowedobject trait 2022-04-26 05:48:34 +01:00
cuishuang 19e32a0621 fix some typos
Signed-off-by: cuishuang <imcusg@gmail.com>
2022-04-24 22:06:32 +08:00
David Hewitt 7e2d3117ce cleanup: deprecate PyTypeObject trait 2022-04-23 13:36:32 +01:00
David Hewitt 0787b670e8 pyproto: make deprecated feature opt-in 2022-04-21 20:19:14 +01:00
pigeon dea9eb7af6
Implement ToPyObject for [T; N] (#2313) 2022-04-19 15:09:54 +02:00
David Hewitt ac56be4e23
Merge pull request #2307 from davidhewitt/0.15.2-changelog
changelog: add notes from 0.15.2
2022-04-14 19:50:59 +01:00
David Hewitt 3fe38307b8 changelog: add notes from 0.15.2 2022-04-14 19:16:57 +01:00
Adam Reichold d2caa056e9 release: 0.16.4 2022-04-14 07:56:42 +01:00
David Hewitt 8cd551fdfc
Merge pull request #2293 from ravenexp/abi3-no-python
pyo3-build-config: Build "abi3" extensions without an interpreter
2022-04-14 07:55:53 +01:00
Adam Reichold c2d44ac7e3
Merge pull request #2263 from pickfire/pytzinfoaccess
Add PyTzInfoAccess
2022-04-13 11:16:53 +02:00
Adam Reichold 0d0089ea29 Remove redundant use statements and add missing calls to add_function in datetime test. 2022-04-13 09:40:16 +02:00
Sergey Kvachonok ae7e1f5ee9 pyo3-build-config: Build "abi3" extensions without an interpreter
Support compiling portable "abi3" extension modules even when
the build host Python interpreter configuration is not available
or the discovered Python interpreter version is not supported.

Maturin already implements this by building "abi3" extension wheels
with `PYO3_NO_PYTHON` environment veriable set for cargo when
an `abi3-py3*` feature is detected.

Closes #2292
2022-04-13 10:40:08 +03:00
Adam Reichold 58b7081274 Use more robust hexadecimal escaping of interpreter configuration. 2022-04-12 20:53:03 +02:00
Ivan Tham a1f97f164d Add PyTzInfoAccess 2022-04-13 00:00:08 +08:00
David Hewitt 391a375bae ffi: add BaseDateTime and BaseTime definitions 2022-04-12 07:46:38 +01:00
David Hewitt 3b45170824
Merge pull request #2282 from ravenexp/python3-dll-a
pyo3-build-config: Add `python3-dll-a` crate support
2022-04-11 18:54:54 +01:00
Adam Reichold 551db72b55
Merge pull request #2279 from PyO3/extract-error-is-slow
Add benchmark highlighting the costs of failed calls to FromPyObject::extract.
2022-04-10 17:10:50 +02:00
Sergey Kvachonok c84cecc1f7 Add a ChangeLog entry for `generate-abi3-import-lib` 2022-04-10 16:47:18 +03:00
Adam Reichold 10c285b283 Add PyDowncastErrorArguments to delay formatting downcast errors. 2022-04-10 13:13:03 +02:00
David Hewitt 1d9d60a766 ffi: fix segfault in _GET_TZINFO methods 2022-04-10 10:27:50 +01:00
Sergey Kvachonok 8f9976ad33 pyo3-build-config: Use "m" ABI tag for libpython-3.7 by default
According to https://bugs.python.org/issue36707, this tag is useless
since version 3.4, but also the default until version 3.8.

For example, Debian 10 ships `libpython3.7m.so`.
2022-04-09 13:28:44 +03:00
David Hewitt 1ae0971a09 release: 0.16.3 2022-04-05 04:05:57 +01:00
David Hewitt d3ac71a42b
Merge pull request #2269 from PyO3/intern-macro
RFC: Add intern! macro which can be used to amortize the cost of creating Python objects by storing them inside a GILOnceCell.
2022-04-05 00:34:37 +01:00
David Hewitt 981eb2d90e
Merge pull request #2265 from davidhewitt/pyclass-mapping
pyclass: mapping flag
2022-04-04 19:54:37 +01:00
Sergey Kvachonok 80675361f4 pyo3-build-config: Add `PYO3_CROSS_PYTHON_IMPLEMENTATION` env var
Adds a new cross-compile target interpreter configuration
environment variable.

This feature allows PyO3 to target PyPy on both Windows and Unix
cross compile targets.
2022-04-04 15:23:11 +03:00
Adam Reichold f777372eed Limit the intern! macro to strings and intern the string contents in addition to the reference. 2022-04-04 10:11:52 +02:00
Adam Reichold db109867d3 Add intern! macro which can be used to amortize the cost of creating Python objects by storing them inside a GILOnceCell. 2022-04-03 21:16:42 +02:00
Adam Reichold d3dcbd72ba
Add PyString::intern to enable access to Python's built-in string interning. (#2268) 2022-04-03 21:07:58 +02:00
David Hewitt c16cc35b30 pyclass: mapping flag 2022-04-02 16:15:44 +01:00
Sergey Kvachonok 2d2b9f5c33 Update the user guide and add a ChangeLog entry
Update Architecture.md to reflect the current cross compilation
support state.
2022-04-01 11:32:46 +03: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 733a2c68f5
Update changelog entry 2022-03-26 21:27:49 +08:00
David Hewitt 2813c87eaf
Merge pull request #2092 from aganders3/export-conf
Add export-config feature to pyo3-build-config
2022-03-23 11:16:04 +00:00
Sergey Kvachonok 5237000317 pyo3-build-config: Fix `abi3-py310` feature
Fix `abi3-py310` feature: use Python 3.10 ABI when available
instead of silently falling back to the 3.9 ABI.
2022-03-23 09:45:25 +03:00
Ashley Anderson 272d2bc0e6
Merge branch 'main' into export-conf 2022-03-22 12:59:54 -04:00
David Hewitt 87c79c0319
Merge pull request #2234 from davidhewitt/pyclass-args-refactor
pyclass: unify pyclass with its pyo3 arguments
2022-03-22 11:38:05 +00:00
David Hewitt 49c1d22606 docs: for #2234 2022-03-22 10:38:36 +00:00