Commit Graph

3948 Commits

Author SHA1 Message Date
David Hewitt 8a03778ca3
Merge pull request #2014 from b05902132/default_impl
Support default method implementation
2021-11-29 23:21:11 +00:00
b05902132 aac0e566b0 Allow default implementation of slots. Add default __repr__ for enums. 2021-11-29 17:35:18 +08:00
David Hewitt 745551841e
Merge pull request #2031 from davidhewitt/resurrect-type-is-instance
pytype: resurrect (deprecated) PyType::is_instance
2021-11-29 07:31:06 +00:00
David Hewitt b56d492c3b pytype: resurrect (deprecated) PyType::is_instance 2021-11-27 09:05:58 +00:00
David Hewitt 770c02e93c
Merge pull request #2026 from davidhewitt/err-method-names
err: tweak names, inlining and docs
2021-11-27 09:00:26 +00:00
David Hewitt 2ac30ec411 err: tweak names, inlining and docs 2021-11-27 08:26:04 +00:00
David Hewitt b2bbf972d0
Merge pull request #2025 from ghuls/pypy_hasattr
Pypy hasattr
2021-11-25 19:54:33 +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 fc7a03ea7c
Merge pull request #2023 from PyO3/warnings
Fix some clippy and dead code warnings.
2021-11-24 08:35:45 +00:00
Georg Brandl 9990bf9d31 Fix some clippy and dead code warnings. 2021-11-24 09:11:39 +01:00
Georg Brandl f5f47bebcb
hygiene: normal macros should generate `$crate` (#2021) 2021-11-23 20:00:28 +01: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 af27fd373b
Merge pull request #2018 from b05902132/derive-enum
Let #[pyclass] reject empty enums.
2021-11-22 18:58:31 +00:00
b05902132 d339cd0dc9 Let #[pyclass] reject empty enums. 2021-11-23 01:15:07 +08:00
messense 491923afb3
Merge pull request #2015 from davidhewitt/setuptools-rust-1.0.0
examples: use setuptools-rust 1.0.0
2021-11-22 11:01:47 +08:00
David Hewitt 8495d77722 examples: use setuptools-rust 1.0.0 2021-11-21 20:39:52 +00:00
David Hewitt b329f1bdee
Merge pull request #2002 from b05902132/derive-enum
Derive enum
2021-11-21 14:00:57 +00:00
b05902132 b7419b5278 Refactor #[pyclass] and now it supports enum.
There's no functionality since it does not generate __richcmp__.

Also it only works on enums with only variants, and does not support
C-like enums.
2021-11-21 20:05:53 +08: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 3271b90320
Merge pull request #2009 from vxgmichel/pyobject-setattr
Add Py<T>.setattr method
2021-11-19 17:23:05 +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 b0d957bc35
Merge pull request #2004 from davidhewitt/bump-msrv
msrv: bump to 1.48
2021-11-19 11:16:42 +00:00
David Hewitt 6a65f98bd2 msrv: bump to 1.48 2021-11-19 10:10:59 +00:00
David Hewitt f29a8e1b91
Merge pull request #2003 from PyO3/release-0.15.1
release: 0.15.1
2021-11-19 10:08:00 +00:00
saidvandeklundert fc3478c75e
Add link to article in readme (#2005)
* add Article

* Update README.md

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>

Co-authored-by: Said van de Klundert <said.van.de.klundert@ibm.com>
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-11-19 08:20:25 +00:00
David Hewitt eb5059acc7 release: 0.15.1 2021-11-18 07:34:22 +00:00
David Hewitt 2f6ea2f96c
Merge pull request #1999 from dansvo/guide-link-repair
Fix broken relative markdown link in guide
2021-11-15 23:40:41 +00:00
Dan Svoboda d9a3f67287
Fix broken relative markdown link in guide
This link needs to point up one dir to the location of class.md
2021-11-15 14:04:53 -05:00
David Hewitt e790d55304
Merge pull request #1997 from davidhewitt/get-panic
macros: fix panic in __get__ implementation
2021-11-15 16:42:06 +00:00
David Hewitt 26ccc1ab37 macros: fix panic in __get__ implementation 2021-11-15 16:02:59 +00:00
David Hewitt 45059cbdb8
Merge pull request #1990 from davidhewitt/allow-threads-unwind
allow_threads: switch from `catch_unwind` to guard pattern
2021-11-15 13:03:43 +00:00
David Hewitt 1df68e852e allow_threads: switch from `catch_unwind` to guard pattern 2021-11-15 12:25:53 +00:00
David Hewitt 3e16a2a453
Merge pull request #1995 from gertjanvanzwieten/fix-pycounter
add missing annotation to PyCounter.__call__
2021-11-15 10:42:30 +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
Gertjan van Zwieten 0e40277112 add missing annotation to PyCounter.__call__
This patch annotates the `__call__` method of `PyCounter` in example: callable
objects with `#[args(args="*", kwargs="**")]`. Without it (at least in PyO3
0.15.0) the example fails with `TypeError: counter.__call__() missing 1
required positional argument: 'args'`.
2021-11-15 09:01:05 +01:00
messense f01595163c Don't link to python3.lib for PyPy on Windows 2021-11-15 15:40:29 +08:00
messense e16024fc95 Test PyPy abi3 build on CI 2021-11-15 15:40:29 +08:00
messense 73c3911748 Don't emit `Py_LIMITED_API` cfg for PyPy 2021-11-15 15:40:27 +08:00
David Hewitt 543f4c1792
Merge pull request #1993 from messense/mingw
Fix mingw platform detection
2021-11-15 07:38:24 +00:00