Skip to content

Commit 1f6e9a8

Browse files
committed
Merge branch 'master' into sh_merge_master
2 parents 8f31c19 + 29f4940 commit 1f6e9a8

20 files changed

+65
-48
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ jobs:
912912
- name: Configure C++11
913913
# LTO leads to many undefined reference like
914914
# `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&)
915-
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DDOWNLOAD_CATCH=ON -S . -B build
915+
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DCMAKE_VERBOSE_MAKEFILE=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -S . -B build
916916

917917
- name: Build C++11
918918
run: cmake --build build -j 2
@@ -930,7 +930,7 @@ jobs:
930930
run: git clean -fdx
931931

932932
- name: Configure C++14
933-
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DDOWNLOAD_CATCH=ON -S . -B build2
933+
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DCMAKE_VERBOSE_MAKEFILE=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -S . -B build2
934934

935935
- name: Build C++14
936936
run: cmake --build build2 -j 2
@@ -948,7 +948,7 @@ jobs:
948948
run: git clean -fdx
949949

950950
- name: Configure C++17
951-
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DDOWNLOAD_CATCH=ON -S . -B build3
951+
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DCMAKE_VERBOSE_MAKEFILE=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -S . -B build3
952952

953953
- name: Build C++17
954954
run: cmake --build build3 -j 2

.github/workflows/ci_sh_def.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ jobs:
938938
- name: Configure C++11
939939
# LTO leads to many undefined reference like
940940
# `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&)
941-
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build
941+
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DCMAKE_VERBOSE_MAKEFILE=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build
942942

943943
- name: Build C++11
944944
run: cmake --build build -j 2
@@ -956,7 +956,7 @@ jobs:
956956
run: git clean -fdx
957957

958958
- name: Configure C++14
959-
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DDOWNLOAD_CATCH=O -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build2
959+
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DCMAKE_VERBOSE_MAKEFILE=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build2
960960

961961
- name: Build C++14
962962
run: cmake --build build2 -j 2
@@ -974,7 +974,7 @@ jobs:
974974
run: git clean -fdx
975975

976976
- name: Configure C++17
977-
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DDOWNLOAD_CATCH=O -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build3
977+
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DCMAKE_VERBOSE_MAKEFILE=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build3
978978

979979
- name: Build C++17
980980
run: cmake --build build3 -j 2

.github/workflows/pip.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ jobs:
9999
- uses: actions/download-artifact@v3
100100

101101
- name: Publish standard package
102-
uses: pypa/gh-action-pypi-publish@v1.5.0
102+
uses: pypa/gh-action-pypi-publish@v1.5.1
103103
with:
104104
password: ${{ secrets.pypi_password }}
105105
packages_dir: standard/
106106

107107
- name: Publish global package
108-
uses: pypa/gh-action-pypi-publish@v1.5.0
108+
uses: pypa/gh-action-pypi-publish@v1.5.1
109109
with:
110110
password: ${{ secrets.pypi_password_global }}
111111
packages_dir: global/

.github/workflows/upstream.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
run: cmake --build build3 --target pytest
105105

106106
- name: Interface test
107-
run: cmake --build build2 --target test_cmake_build
107+
run: cmake --build build3 --target test_cmake_build
108108

109109
# This makes sure the setup_helpers module can build packages using
110110
# setuptools

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ repos:
3333

3434
# Upgrade old Python syntax
3535
- repo: https://github.com/asottile/pyupgrade
36-
rev: "v2.37.1"
36+
rev: "v2.37.3"
3737
hooks:
3838
- id: pyupgrade
3939
args: [--py36-plus]
@@ -73,7 +73,7 @@ repos:
7373

7474
# Autoremoves unused imports
7575
- repo: https://github.com/hadialqattan/pycln
76-
rev: "v2.0.4"
76+
rev: "v2.1.1"
7777
hooks:
7878
- id: pycln
7979
stages: [manual]
@@ -102,7 +102,7 @@ repos:
102102

103103
# Flake8 also supports pre-commit natively (same author)
104104
- repo: https://github.com/PyCQA/flake8
105-
rev: "4.0.1"
105+
rev: "5.0.2"
106106
hooks:
107107
- id: flake8
108108
exclude: ^(docs/.*|tools/.*|ubench/.*)$
@@ -126,7 +126,7 @@ repos:
126126

127127
# Check static types with mypy
128128
- repo: https://github.com/pre-commit/mirrors-mypy
129-
rev: "v0.961"
129+
rev: "v0.971"
130130
hooks:
131131
- id: mypy
132132
args: []

docs/advanced/cast/custom.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type is explicitly allowed.
3838

3939
.. code-block:: cpp
4040
41-
namespace pybind11 { namespace detail {
41+
namespace PYBIND11_NAMESPACE { namespace detail {
4242
template <> struct type_caster<inty> {
4343
public:
4444
/**
@@ -78,7 +78,7 @@ type is explicitly allowed.
7878
return PyLong_FromLong(src.long_value);
7979
}
8080
};
81-
}} // namespace pybind11::detail
81+
}} // namespace PYBIND11_NAMESPACE::detail
8282
8383
.. note::
8484

docs/advanced/cast/stl.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ types:
4242
.. code-block:: cpp
4343
4444
// `boost::optional` as an example -- can be any `std::optional`-like container
45-
namespace pybind11 { namespace detail {
45+
namespace PYBIND11_NAMESPACE { namespace detail {
4646
template <typename T>
4747
struct type_caster<boost::optional<T>> : optional_caster<boost::optional<T>> {};
4848
}}
@@ -54,7 +54,7 @@ for custom variant types:
5454
.. code-block:: cpp
5555
5656
// `boost::variant` as an example -- can be any `std::variant`-like container
57-
namespace pybind11 { namespace detail {
57+
namespace PYBIND11_NAMESPACE { namespace detail {
5858
template <typename... Ts>
5959
struct type_caster<boost::variant<Ts...>> : variant_caster<boost::variant<Ts...>> {};
6060
@@ -66,7 +66,7 @@ for custom variant types:
6666
return boost::apply_visitor(args...);
6767
}
6868
};
69-
}} // namespace pybind11::detail
69+
}} // namespace PYBIND11_NAMESPACE::detail
7070
7171
The ``visit_helper`` specialization is not required if your ``name::variant`` provides
7272
a ``name::visit()`` function. For any other function name, the specialization must be

docs/advanced/classes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ whether a downcast is safe, you can proceed by specializing the
12281228
std::string bark() const { return sound; }
12291229
};
12301230
1231-
namespace pybind11 {
1231+
namespace PYBIND11_NAMESPACE {
12321232
template<> struct polymorphic_type_hook<Pet> {
12331233
static const void *get(const Pet *src, const std::type_info*& type) {
12341234
// note that src may be nullptr
@@ -1239,7 +1239,7 @@ whether a downcast is safe, you can proceed by specializing the
12391239
return src;
12401240
}
12411241
};
1242-
} // namespace pybind11
1242+
} // namespace PYBIND11_NAMESPACE
12431243
12441244
When pybind11 wants to convert a C++ pointer of type ``Base*`` to a
12451245
Python object, it calls ``polymorphic_type_hook<Base>::get()`` to

docs/advanced/pycpp/numpy.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ following:
433433
{ 2, 4 }, // shape (rows, cols)
434434
{ sizeof(uint8_t) * 4, sizeof(uint8_t) } // strides in bytes
435435
);
436-
})
436+
});
437437
438438
This approach is meant for providing a ``memoryview`` for a C/C++ buffer not
439439
managed by Python. The user is responsible for managing the lifetime of the
@@ -449,7 +449,7 @@ We can also use ``memoryview::from_memory`` for a simple 1D contiguous buffer:
449449
buffer, // buffer pointer
450450
sizeof(uint8_t) * 8 // buffer size
451451
);
452-
})
452+
});
453453
454454
.. versionchanged:: 2.6
455455
``memoryview::from_memory`` added.

docs/advanced/smart_ptrs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ specialized:
164164
PYBIND11_DECLARE_HOLDER_TYPE(T, SmartPtr<T>);
165165
166166
// Only needed if the type's `.get()` goes by another name
167-
namespace pybind11 { namespace detail {
167+
namespace PYBIND11_NAMESPACE { namespace detail {
168168
template <typename T>
169169
struct holder_helper<SmartPtr<T>> { // <-- specialization
170170
static const T *get(const SmartPtr<T> &p) { return p.getPointer(); }

0 commit comments

Comments
 (0)