David Hewitt
e33b3e6a5b
opt: don't emit T::dict_offset and T::weakref_offset without attributes
2021-12-30 14:57:27 +00:00
David Hewitt
ff37f24625
macros: accept paths in wrap_x macros
2021-12-30 12:46:57 +00:00
David Hewitt
90479ddae4
opt: make argument extraction code smaller
2021-12-24 01:52:15 +00:00
David Hewitt
33a618914f
opt: reduce class creation generated code
2021-12-24 01:12:59 +00:00
David Hewitt
5be5d77589
opt: improve handle_panic generated code
2021-12-24 00:17:04 +00:00
David Hewitt
492b7e4c0f
macros: optimize generated code for #[derive(FromPyObject)]
2021-12-22 08:34:05 +00:00
Amanieu d'Antras
ed0a6b710a
Add changelog entry
2021-12-20 18:34:14 +01:00
Ashley Anderson
a6c70164cd
Move changelog entry for #1996 .
2021-12-16 13:12:03 -05:00
Ashley Anderson
c30ca03b60
Expose cross compiling configuration from pyo3-build-config ( #1996 )
...
* Initial refactor - expose cross-compiling functions and add necessary fields to InterpreterConfig
* Refactor cross_compiling to take arch/vendor/os separately.
* Address review comments.
* Update changelog with note about pyo3-build-config APIs.
* Fix panic when parsing ABI tag on Windows.
* Update parse_sysconfigdata test to best-guess values for linux.
* Revert added fields in InterpreterConfig.
* Refactor parse_sysconfigdata to return Sysconfigdata (HashMap). Add InterpreterConfig::from_sysconfigdata.
* Update BuildFlags test to use from_sysconfigdata.
* Add tests for from_sysconfigdata. Refactor Sysconfigdata API to be more open.
* Add basic tests for not cross compiling. Add some error handling.
* Address review comments.
* Update search_lib_dir to recurse into lib and pypy dirs.
* Look even harder for sysconfigdata.
* Add skip-build-config feature.
* Revert skip-build-config feature.
* Suppress cargo:rerun-if-env-changed without resolve-config feature.
2021-12-16 00:18:37 +00:00
mejrs
bbe478db81
Update changelog
2021-12-14 19:19:31 +01:00
David Hewitt
469d72a001
Merge pull request #2022 from PyO3/pyo3_path
...
Hygiene: offer a way to set path to pyo3 crate
2021-12-09 20:27:48 +00:00
Juniper Parsons
47cf13239f
Disallow positional args after optional args
2021-12-09 10:01:59 -05:00
Georg Brandl
a5b76bc365
pyo3_path, part 4: rename to `crate` to keep consistent with serde
2021-12-09 07:36:48 +01:00
Georg Brandl
e4f608f605
pyo3_path, part 2: add pyo3_path options and use them.
2021-12-09 07:24:18 +01:00
David Hewitt
4c8abd1426
rust: support 1.57
2021-12-08 07:10:16 +00:00
David Hewitt
b56d492c3b
pytype: resurrect (deprecated) PyType::is_instance
2021-11-27 09:05:58 +00:00
David Hewitt
2ac30ec411
err: tweak names, inlining and docs
2021-11-27 08:26:04 +00:00
Gert Hulselmans
5ecc715d10
Map "PyPyObject_HasAttr" to "PyObject_HasAttr" so hasattr works with PyPy.
...
Map "PyPyObject_HasAttr" to "PyObject_HasAttr" so hasattr works
with PyPy. Solves: "undefined symbol: PyObject_HasAttr" when
importing the library.
2021-11-25 19:32:24 +00:00
David Hewitt
a0d3ab0de1
Merge pull request #2019 from davidhewitt/inventory-0.2.0
...
inventory: update to 0.2
2021-11-23 07:39:05 +00:00
Miles Granger
c4147cdde4
Add PyCapsule API ( #1980 )
...
Co-authored-by: Georg Brandl <georg@python.org>
2021-11-23 06:57:37 +01:00
David Hewitt
f17e0d35cd
inventory: update to 0.2
2021-11-22 22:57:58 +00:00
David Hewitt
e9b46f76da
Merge pull request #1985 from PyO3/is_instance_of
...
add PyType::is_subclass_of and PyAny::is_instance_of
2021-11-20 14:56:36 +00:00
David Hewitt
ded44eebfb
Merge pull request #2006 from davidhewitt/drop-py36
...
python: drop support for 3.6
2021-11-20 14:04:31 +00:00
Georg Brandl
43893158b1
switch is_instance/is_instance_of, is_subclass/is_subclass_of
2021-11-20 13:18:43 +00:00
Georg Brandl
a83c31a3af
add PyType::is_subclass_of and PyAny::is_instance_of
...
which get the type to check against as an arguments,
as opposed to a compile-time generic type.
2021-11-20 13:16:15 +00:00
David Hewitt
cc91a7c574
Merge pull request #2007 from davidhewitt/remove-0.14-deprecations
...
deprecations: remove items deprecated in PyO3 0.14
2021-11-20 13:09:04 +00:00
David Hewitt
70030f130d
python: drop support for 3.6
2021-11-20 13:02:42 +00:00
David Hewitt
0dfe6b0274
Merge pull request #2008 from davidhewitt/build-config-no-resolve-default
...
pyo3-build-config: don't enable resolve-config by default
2021-11-20 12:56:31 +00:00
David Hewitt
c9a4cd1f87
deprecations: remove items deprecated in PyO3 0.14
2021-11-19 16:33:29 +00:00
Vincent Michel
91caa814d0
Add `Py::setattr` method
2021-11-19 16:59:54 +01:00
David Hewitt
b9cc10f3fb
pyo3-build-config: don't enable resolve-config by default
2021-11-19 14:19:24 +00:00
David Hewitt
6a65f98bd2
msrv: bump to 1.48
2021-11-19 10:10:59 +00:00
David Hewitt
eb5059acc7
release: 0.15.1
2021-11-18 07:34:22 +00:00
David Hewitt
26ccc1ab37
macros: fix panic in __get__ implementation
2021-11-15 16:02:59 +00:00
David Hewitt
1df68e852e
allow_threads: switch from `catch_unwind` to guard pattern
2021-11-15 12:25:53 +00:00
David Hewitt
8e41483bad
Merge pull request #1991 from messense/pypy-abi3
...
Don't emit `Py_LIMITED_API` cfg for PyPy
2021-11-15 10:13:23 +00:00
David Hewitt
9ae7e31e9c
Merge pull request #1977 from davidhewitt/traceback-type
...
types: add PyTraceback
2021-11-15 09:04:15 +00:00
messense
73c3911748
Don't emit `Py_LIMITED_API` cfg for PyPy
2021-11-15 15:40:27 +08:00
David Hewitt
88ca6bbbab
types: add PyTraceback
2021-11-15 07:25:57 +00:00
messense
2325c283b0
Fix mingw platform detection
2021-11-15 15:15:16 +08:00
Moriyoshi Koizumi
ae05020b13
Support Py::as_ref() and Py::into_ref() for PySequence, PyIterator and PyMapping.
2021-11-13 08:23:40 +00:00
David Hewitt
23778f5386
pymethods: test and document opt-out of protos
2021-11-10 23:28:01 +00:00
David Hewitt
47747444c7
release: 0.15.0
2021-11-03 23:00:38 +00:00
David Hewitt
f801c19efe
err: add `PyErr::take`
2021-11-02 23:12:36 +00:00
David Hewitt
6b1afa4040
pypy: support 3.8
2021-10-27 22:17:45 +01:00
Gregory Szorc
a5f804e817
ffi: restore _PyImport_FindExtensionObject on Python 3.10
...
This symbol was initially removed from 3.10. But it was restored
late in the 3.10 development cycle in time for 3.10.0. See
https://bugs.python.org/issue45307 . It is slated for removal in
3.11.
2021-10-23 15:24:52 -07:00
David Hewitt
4b2345fe80
pymethods: support __call__ proto
2021-10-23 00:06:46 +01:00
Azat Ibrakov
7349513f5b
Add fallback for `__mod__` magic method ( #1934 )
...
* Add fallback for `__mod__` magic method
* Add 'CHANGELOG' entry
* Complete tests
2021-10-19 23:14:26 +01:00
Ashley Anderson
bf26daec2d
Positional-only args ( #1925 )
...
* Add support for positional-only args
* Update changelog. Add a few more tests. Run rust-fmt.
* Fix test.
* Fix tests again.
* Update CHANGELOG.md to link PR instead of issue
* Update guide to mention positional-only params
* Add unreachable!() per code review
* Update and expand tests for pos args.
* Fix tests, lint, add UI tests.
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-10-19 23:13:27 +01:00
laurent
2042906832
pycfunction: add PyCFunction::new_closure rust defined closures
2021-10-17 07:59:50 +01:00