Commit Graph

653 Commits

Author SHA1 Message Date
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
messense ad8ffaad2e
Update changelog for parking_lot supported versions 2022-03-22 13:51:58 +08:00
David Hewitt c734b116f9 macros: fix syn patch version 2022-03-21 23:53:08 +00:00
Ashley Anderson 4a62a62cae Improvements based on code review: API and documentation. 2022-03-21 12:55:39 -04:00
Alex Gaynor 69655454c1 Added an as_bytes method for Py<PyBytes>
This allows for obtaining a slice that's not lexically bound to the GIL which can be helpful to avoid copying.
2022-03-19 13:28:06 -04:00
Ashley Anderson 03e11184ed Add changelog entry.
Rebased on main.
2022-03-17 11:20:34 -04:00
Kevin Phillips 13f13e5ee1 pyo3-build-config: Change for from_sysconfigdata to set the shared property based on PYTHONFRAMEWORK in addition to Py_ENABLE_SHARED in order that a macos Framework build is considered shared just like the logic in from_interpreter 2022-03-17 07:42:29 +01:00
David Hewitt 52d2c78ae1 pyo3-build-config: fix windows "cross-compile" panic 2022-03-16 13:22:00 +01:00
Adam Reichold 922bbfc92d release: 0.16.2 2022-03-15 19:20:00 +01:00
Adam Reichold 0c7a13fbe1 Make pyo3-ffi a build dependency of pyo3 to ensure that its build script has finished before pyo3's build script starts. 2022-03-15 12:19:13 +01:00
Alex Gaynor efc18a4139
fixed formatting in changelog (#2218) 2022-03-09 12:59:37 +00: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
messense e4c5698671
Fix up changelog entry for `#2197` 2022-03-04 21:02:55 +08:00
messense ad2c1af9f7
Merge pull request #2201 from messense/aarch64-apple-darwin
Add aarch64-apple-darwin test to CI
2022-03-04 17:48:54 +08:00
Adam Reichold c339550a56
Merge pull request #2197 from PyO3/bump-hashbrown
Extend  optional dependency supported versions to include 0.12.
2022-03-04 10:41:50 +01:00
messense afe5221724
Fix cross compiling to aarch64 macOS 2022-03-04 17:22:50 +08:00
Adam Reichold 2fa91ada40 Extend optional dependency supported versions to include 0.12. 2022-03-04 08:30:15 +01:00
Georg Brandl 6bc8943df5 changelog/guide: visibility is also important for wrap_pyfunction! now
Fixes #2202
2022-03-04 07:48:41 +01:00
David Hewitt 84cb8cdb6e add changelog for 2198 2022-03-03 07:34:01 +00:00
David Hewitt 4c434a21bd release: 0.16.0 2022-02-27 20:28:51 +00:00
Georg Brandl dc4f114d67 Address review comments 2022-02-26 20:10:33 +01:00
Georg Brandl 0678f11266 Protocols: implement __getattribute__
converting tp_getattro to a shared slot

Fixes #2186
2022-02-26 20:05:50 +01:00
Georg Brandl 03dc96bff1
Py/PyAny: remove PartialEq impl and add is() (#2183) 2022-02-25 19:39:45 +00:00
Tommaso Thea Cioni 487345979b
Added `eq`, `ne`, `gt` etc. methods. (#2175) 2022-02-25 18:52:20 +01:00
David Hewitt b84309b67d ffi: add missing definition PyCMethod_New 2022-02-25 07:28:52 +00:00
David Hewitt f98f116131 pypy: support released 3.9 2022-02-25 07:28:22 +00:00
David Hewitt 7c865fcc25
Merge pull request #2173 from davidhewitt/deprecate-pyproto
pyproto: deprecate protocol traits
2022-02-24 23:54:40 +00:00
Rico Hageman 1839fc208b Add CHANGELOG.md entry 2022-02-24 00:23:07 +01:00
David Hewitt 24445df633 pyproto: deprecate protocol traits 2022-02-23 07:50:52 +00:00
Rico Hageman 3fbdc863cb Include the causes when throwing a PyTypeError when argument parsing failed 2022-02-22 09:48:41 +01:00
Rico Hageman 333ebb9872 Add changelog entry 2022-02-21 23:22:56 +01:00
David Hewitt 79123b396c pyclass: deprecate gc option 2022-02-15 08:01:46 +00:00
David Hewitt 676295b8de pymethods: support gc protocol 2022-02-15 08:01:23 +00: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 59412b06e5 Add to changelog 2022-02-14 15:15:05 +01:00