mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-23 05:35:13 +00:00
Merge branch 'pybind:master' into master
This commit is contained in:
commit
a1f63c4097
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -283,8 +283,6 @@ jobs:
|
||||
include:
|
||||
- clang: 5
|
||||
std: 14
|
||||
- clang: 10
|
||||
std: 20
|
||||
- clang: 10
|
||||
std: 17
|
||||
- clang: 11
|
||||
|
@ -41,20 +41,20 @@ repos:
|
||||
|
||||
# Upgrade old Python syntax
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: "v3.3.0"
|
||||
rev: "v3.3.1"
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: [--py36-plus]
|
||||
|
||||
# Nicely sort includes
|
||||
- repo: https://github.com/PyCQA/isort
|
||||
rev: "5.10.1"
|
||||
rev: "5.11.4"
|
||||
hooks:
|
||||
- id: isort
|
||||
|
||||
# Black, the code formatter, natively supports pre-commit
|
||||
- repo: https://github.com/psf/black
|
||||
rev: "22.10.0" # Keep in sync with blacken-docs
|
||||
rev: "22.12.0" # Keep in sync with blacken-docs
|
||||
hooks:
|
||||
- id: black
|
||||
|
||||
@ -116,7 +116,7 @@ repos:
|
||||
|
||||
# PyLint has native support - not always usable, but works for us
|
||||
- repo: https://github.com/PyCQA/pylint
|
||||
rev: "v2.15.8"
|
||||
rev: "v2.15.9"
|
||||
hooks:
|
||||
- id: pylint
|
||||
files: ^pybind11
|
||||
@ -160,7 +160,7 @@ repos:
|
||||
|
||||
# Check for common shell mistakes
|
||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||
rev: "v0.8.0.4"
|
||||
rev: "v0.9.0.2"
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
|
||||
@ -175,7 +175,7 @@ repos:
|
||||
|
||||
# Clang format the codebase automatically
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: "v15.0.4"
|
||||
rev: "v15.0.6"
|
||||
hooks:
|
||||
- id: clang-format
|
||||
types_or: [c++, c, cuda]
|
||||
|
@ -15,6 +15,39 @@ IN DEVELOPMENT
|
||||
|
||||
Changes will be summarized here periodically.
|
||||
|
||||
Changes:
|
||||
|
||||
* ``PyGILState_Check()``'s in ``pybind11::handle``'s ``inc_ref()`` &
|
||||
``dec_ref()`` are now enabled by default again.
|
||||
`#4246 <https://github.com/pybind/pybind11/pull/4246>`_
|
||||
|
||||
Build system improvements:
|
||||
|
||||
* Update clang-tidy to 15 in CI.
|
||||
`#4387 <https://github.com/pybind/pybind11/pull/4387>`_
|
||||
|
||||
|
||||
Version 2.10.3 (Jan 3, 2023)
|
||||
----------------------------
|
||||
|
||||
Changes:
|
||||
|
||||
* Temporarily made our GIL status assertions (added in 2.10.2) disabled by
|
||||
default (re-enable manually by defining
|
||||
``PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF``, will be enabled in 2.11).
|
||||
`#4432 <https://github.com/pybind/pybind11/pull/4432>`_
|
||||
|
||||
* Improved error messages when ``inc_ref``/``dec_ref`` are called with an
|
||||
invalid GIL state.
|
||||
`#4427 <https://github.com/pybind/pybind11/pull/4427>`_
|
||||
`#4436 <https://github.com/pybind/pybind11/pull/4436>`_
|
||||
|
||||
Bug Fixes:
|
||||
|
||||
* Some minor touchups found by static analyzers.
|
||||
`#4440 <https://github.com/pybind/pybind11/pull/4440>`_
|
||||
|
||||
|
||||
Version 2.10.2 (Dec 20, 2022)
|
||||
-----------------------------
|
||||
|
||||
@ -30,7 +63,7 @@ Changes:
|
||||
* ``PyGILState_Check()``'s were integrated to ``pybind11::handle``
|
||||
``inc_ref()`` & ``dec_ref()``. The added GIL checks are guarded by
|
||||
``PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF``, which is the default only if
|
||||
``NDEBUG`` is not defined.
|
||||
``NDEBUG`` is not defined. (Made non-default in 2.10.3, will be active in 2.11)
|
||||
`#4246 <https://github.com/pybind/pybind11/pull/4246>`_
|
||||
|
||||
* Add option for enable/disable enum members in docstring.
|
||||
|
@ -399,7 +399,7 @@ struct process_attribute<doc> : process_attribute_default<doc> {
|
||||
template <>
|
||||
struct process_attribute<const char *> : process_attribute_default<const char *> {
|
||||
static void init(const char *d, function_record *r) { r->doc = const_cast<char *>(d); }
|
||||
static void init(const char *d, type_record *r) { r->doc = const_cast<char *>(d); }
|
||||
static void init(const char *d, type_record *r) { r->doc = d; }
|
||||
};
|
||||
template <>
|
||||
struct process_attribute<char *> : process_attribute<const char *> {};
|
||||
|
@ -10,12 +10,12 @@
|
||||
#pragma once
|
||||
|
||||
#define PYBIND11_VERSION_MAJOR 2
|
||||
#define PYBIND11_VERSION_MINOR 10
|
||||
#define PYBIND11_VERSION_PATCH 2
|
||||
#define PYBIND11_VERSION_MINOR 11
|
||||
#define PYBIND11_VERSION_PATCH 0.dev1
|
||||
|
||||
// Similar to Python's convention: https://docs.python.org/3/c-api/apiabiversion.html
|
||||
// Additional convention: 0xD = dev
|
||||
#define PYBIND11_VERSION_HEX 0x020A0200
|
||||
#define PYBIND11_VERSION_HEX 0x020B00D1
|
||||
|
||||
// Define some generic pybind11 helper macros for warning management.
|
||||
//
|
||||
|
@ -176,7 +176,7 @@ struct type_caster<Type, typename eigen_tensor_helper<Type>::ValidType> {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!convert && !temp.dtype().is(dtype::of<typename Type::Scalar>())) {
|
||||
if (!temp.dtype().is(dtype::of<typename Type::Scalar>())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -501,7 +501,7 @@ struct error_fetch_and_normalize {
|
||||
"active exception.");
|
||||
}
|
||||
const char *exc_type_name_norm = detail::obj_class_name(m_type.ptr());
|
||||
if (exc_type_name_orig == nullptr) {
|
||||
if (exc_type_name_norm == nullptr) {
|
||||
pybind11_fail("Internal error: " + std::string(called)
|
||||
+ " failed to obtain the name "
|
||||
"of the normalized active exception type.");
|
||||
|
@ -8,5 +8,5 @@ def _to_int(s: str) -> Union[int, str]:
|
||||
return s
|
||||
|
||||
|
||||
__version__ = "2.10.2"
|
||||
__version__ = "2.11.0.dev1"
|
||||
version_info = tuple(_to_int(s) for s in __version__.split("."))
|
||||
|
@ -31,8 +31,10 @@ issues = (issue for page in issues_pages for issue in page)
|
||||
missing = []
|
||||
|
||||
for issue in issues:
|
||||
changelog = ENTRY.findall(issue.body)
|
||||
if changelog:
|
||||
changelog = ENTRY.findall(issue.body or "")
|
||||
if not changelog or not changelog[0]:
|
||||
missing.append(issue)
|
||||
else:
|
||||
(msg,) = changelog
|
||||
if not msg.startswith("* "):
|
||||
msg = "* " + msg
|
||||
@ -44,9 +46,6 @@ for issue in issues:
|
||||
print(Syntax(msg, "rst", theme="ansi_light", word_wrap=True))
|
||||
print()
|
||||
|
||||
else:
|
||||
missing.append(issue)
|
||||
|
||||
if missing:
|
||||
print()
|
||||
print("[blue]" + "-" * 30)
|
||||
|
Loading…
Reference in New Issue
Block a user