Commit Graph

3724 Commits

Author SHA1 Message Date
David Hewitt 955a65532b readme: tidy badges 2021-03-28 21:56:10 +01:00
David Hewitt 8ad3827341
Merge pull request #1514 from jameshilliard/cross-env-detection
Ensure we are cross compiling when any cross env variables are set.
2021-03-28 12:46:59 +01:00
David Hewitt ce851ad7d9 1506: fixes to macro hygiene 2021-03-28 11:01:51 +01:00
Yuji Kanagawa 24b00004c6
Merge pull request #1521 from ravenexp/remove-header-parsing
Remove `pyconfig.h` header parsing
2021-03-28 10:32:23 +09:00
kngwyu eca20fe09a Merge branch 'main' into remove-header-parsing 2021-03-27 22:36:58 +09:00
David Hewitt 3bc5caaa9e
Merge pull request #1523 from kngwyu/refactor-doctest
Refactor doctest
2021-03-27 11:48:50 +00:00
kngwyu 46de29b4d9 Refactor doctest 2021-03-26 22:04:41 +09:00
messense d9fe4ec6cc
Merge pull request #1520 from messense/clippy
Fix clippy warnings in Rust 1.51.0
2021-03-26 16:45:59 +08:00
messense e134769b1b Remove bogus link_name 2021-03-26 16:12:37 +08:00
Sergey Kvachonok 80c747d2c0 Remove `pyconfig.h` header parsing
The config header parsing code was supposed to be only invoked when
cross-compiling for Windows, but in reality it fails to correctly parse
the config header files shipped with the upstream Python for Windows.

Given that there are now better options for reliable cross-compiling
for Windows such as `PYO3_CROSS_PYTHON_VERSION` or the `abi3-py3*` features,
it should be OK to remove this config for v0.14.

Update the cross-compilation instructions section of the user guide.

Fixes https://github.com/PyO3/pyo3/issues/1337
2021-03-26 09:57:18 +03:00
messense 90c5ffbd04 Fix clippy warnings in Rust 1.51.0 2021-03-26 13:21:38 +08:00
David Hewitt c4b7a44622
Merge pull request #1518 from ravenexp/main
Always use correct abi3 Python DLL name for MinGW
2021-03-25 18:17:19 +00:00
Yuji Kanagawa eaf516d19a
Merge pull request #1519 from ravenexp/fix-windows-shared
Always set `Py_SHARED` when building for Windows
2021-03-26 01:39:17 +09:00
Sergey Kvachonok a0d1c5509d Always set `Py_SHARED` when building for Windows
Setting `PYO3_NO_PYTHON` results in an extension module built with
a different config feature set (on Windows).
Specifically, `Py_SHARED` config option gets omitted in this code path.

Maturin always sets `PYO3_NO_PYTHON` when cross-compiling abi3 extensions,
which creates a subtle configuration mismatch between `cargo build`
and `maturin build` artifacts.

Always set `Py_SHARED` when compiling abi3 extensions for Windows.
2021-03-25 11:51:15 +03:00
David Hewitt 93696889d3
Merge pull request #1496 from PyO3/dependabot/cargo/hashbrown-0.11
build(deps): update hashbrown requirement from 0.9 to 0.11
2021-03-25 08:01:31 +00:00
Sergey Kvachonok 2503e61c65 Always use correct abi3 Python DLL name for MinGW
Compiling an abi3 extension module for `x86_64-pc-windows-gnu` target
links to `python3.dll` import library when `PYO3_NO_PYTHON` is set
and to `python3.Y.dll` import library when `PYO3_NO_PYTHON` is not set.

All abi3 extensions should link to `python3.dll` on Windows,
as required by

https://www.python.org/dev/peps/pep-0384/#linkage

Update the code path for the case when `PYO3_NO_PYTHON` is not set
to yield the same Python DLL import library name.
2021-03-25 08:40:36 +03:00
David Hewitt a2788b052d hashbrown: support 0.9 or 0.11 2021-03-24 22:35:37 +00:00
messense ffce9f3505
Merge pull request #1516 from PyO3/davidhewitt-patch-1
build.rs: adjust pypy warning wording
2021-03-24 11:53:40 +08:00
David Hewitt 38c8355f91
build.rs: adjust pypy warning wording 2021-03-23 21:56:22 +00:00
James Hilliard 2c3e8b1c50 Ensure we are cross compiling when any cross env variables are set. 2021-03-23 05:13:52 -06:00
David Hewitt 6e49ba3212
Merge pull request #1512 from PyO3/use-with-gil-in-docs
Revert the accidently changed file mode
2021-03-20 21:21:22 +00:00
David Hewitt 246335bee2
Merge pull request #1505 from scalexm/macro
Ignore `syn::Type::Group` in `is_python`
2021-03-20 11:09:04 +00:00
kngwyu 590836db27 Revert the accidently changed file mode 2021-03-20 19:50:50 +09:00
messense f909e66b92
Merge pull request #1511 from PyO3/use-with-gil-in-docs
Use with_gil instead of acquire_gil in examples
2021-03-20 18:35:54 +08:00
kngwyu aedd6352e3 Use with_gil instead of acquire_gil in examples 2021-03-20 19:02:50 +09:00
David Hewitt 3fa10a38d3
Merge pull request #1510 from kngwyu/doc-examples
Correct `# Examples` in documents
2021-03-20 09:12:01 +00:00
David Hewitt e34e87ad4a 1505: add CHANGELOG and test 2021-03-20 08:36:19 +00:00
kngwyu e31fb70399 Correct `# Examples` in documents 2021-03-20 16:45:56 +09:00
Yuji Kanagawa f0763f069e
Merge pull request #1507 from scalexm/getter-name
Allow `#[name]` with `#[getter]` and `#[setter]`
2021-03-20 16:23:07 +09:00
Yuji Kanagawa acff3b1f3e
Merge pull request #1504 from PyO3/pyclass
Add tuple and unit struct support for pyclass macro
2021-03-20 16:14:15 +09:00
Yuji Kanagawa 873a275ead
Merge pull request #1509 from PyO3/issue-1508
Remove __doc__ from module's __all__
2021-03-20 14:55:29 +09:00
messense acd4601d2f Remove __doc__ from module's __all__ 2021-03-20 11:25:36 +08:00
messense 1c57294214 Use Python::with_gil and py_assert
Co-authored-by: Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>
2021-03-19 10:17:06 +08:00
messense 2cec240b0e Ban pyo3(get, set) on tuple struct field 2021-03-19 10:17:06 +08:00
messense 773a371ba5 Add tuple and unit struct support for pyclass macro 2021-03-19 10:17:06 +08:00
scalexm b27ee3fd64 Allow `#[name]` with `#[getter]` and `#[setter]` 2021-03-18 19:35:17 +01:00
scalexm adc6e6fe4e Ignore `syn::Type::Group` in `is_python` 2021-03-18 18:56:53 +01:00
Yuji Kanagawa 20452a7c09
Merge pull request #1471 from kngwyu/architecture
Architecture.md: Initial draft
2021-03-18 17:12:17 +09:00
Yuji Kanagawa dacdc68b26
Merge branch 'main' into architecture 2021-03-18 15:54:52 +09:00
David Hewitt f22fb423cb
Merge pull request #1503 from davidhewitt/main-tweaks
main: tweaks from rename
2021-03-17 21:07:58 +00:00
David Hewitt 971b48f091
Update guide/src/parallelism.md
Co-authored-by: Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>
2021-03-17 07:02:29 +00:00
Yuji Kanagawa acf7271879
Merge pull request #1494 from PyO3/enhance-py-run
Extend py_run! to take locals dict and refactor tests using it
2021-03-17 12:52:33 +09:00
Yuji Kanagawa 6137e3a726
Merge pull request #1456 from davidhewitt/pyclass-impl-flags
pyclass: move flags to PyClassImpl
2021-03-17 12:50:49 +09:00
David Hewitt 4d2913dc06 main: tweaks from rename 2021-03-16 22:14:57 +00:00
messense c0d49052b5
Merge pull request #1502 from messense/check-buffer
Check buffer protocol support before getting buffer in sequence protocol specialization
2021-03-16 16:17:37 +08:00
David Hewitt dab62a5835
Merge pull request #1495 from davidhewitt/macros-wrapper-expressions
macros-backend: make __wrap fns expressions
2021-03-16 07:26:15 +00:00
messense ba7644849d Check buffer protocol support before getting buffer in sequence protocol specialization
This avoids calling a expensive `PyErr_Format` inside of
`PyObject_GetBuffer` when buffer protocol is unsupported
2021-03-16 13:32:14 +08:00
kngwyu 603d81f9ef Python C/API -> Python/C API 2021-03-15 22:20:22 +09:00
messense b7376da739
Merge pull request #1498 from messense/func-name
Fix wrong class name in function call error message
2021-03-15 17:21:28 +08:00
messense e6374240b1 Get rid of _LOCATION 2021-03-15 16:47:25 +08:00