mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-30 00:47:12 +00:00
Merge branch 'pybind:master' into master
This commit is contained in:
commit
e9306bdf67
40
.github/workflows/ci.yml
vendored
40
.github/workflows/ci.yml
vendored
@ -69,7 +69,7 @@ jobs:
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python ${{ matrix.python }}
|
||||
uses: actions/setup-python@v4
|
||||
@ -205,7 +205,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python ${{ matrix.python-version }} (deadsnakes)
|
||||
uses: deadsnakes/action@v3.0.1
|
||||
@ -310,7 +310,7 @@ jobs:
|
||||
container: "silkeh/clang:${{ matrix.clang }}${{ matrix.container_suffix }}"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Add wget and python3
|
||||
run: apt-get update && apt-get install -y python3-dev python3-numpy python3-pytest libeigen3-dev
|
||||
@ -344,7 +344,7 @@ jobs:
|
||||
container: nvidia/cuda:12.2.0-devel-ubuntu22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND
|
||||
- name: Install 🐍 3
|
||||
@ -368,7 +368,7 @@ jobs:
|
||||
# container: centos:8
|
||||
#
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# - uses: actions/checkout@v4
|
||||
#
|
||||
# - name: Add Python 3 and a few requirements
|
||||
# run: yum update -y && yum install -y git python3-devel python3-numpy python3-pytest make environment-modules
|
||||
@ -413,7 +413,7 @@ jobs:
|
||||
# tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND
|
||||
DEBIAN_FRONTEND: 'noninteractive'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Add NVHPC Repo
|
||||
run: |
|
||||
@ -475,7 +475,7 @@ jobs:
|
||||
container: "gcc:${{ matrix.gcc }}"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Add Python 3
|
||||
run: apt-get update; apt-get install -y python3-dev python3-numpy python3-pytest python3-pip libeigen3-dev
|
||||
@ -535,7 +535,7 @@ jobs:
|
||||
name: "🐍 3 • ICC latest • x64"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Add apt repo
|
||||
run: |
|
||||
@ -639,7 +639,13 @@ jobs:
|
||||
container: "${{ matrix.container }}"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Latest actions/checkout
|
||||
uses: actions/checkout@v4
|
||||
if: matrix.container != 'centos:7'
|
||||
|
||||
- name: Pin actions/checkout as required for centos:7
|
||||
uses: actions/checkout@v3
|
||||
if: matrix.container == 'centos:7'
|
||||
|
||||
- name: Add Python 3 (RHEL 7)
|
||||
if: matrix.container == 'centos:7'
|
||||
@ -687,7 +693,7 @@ jobs:
|
||||
container: i386/debian:buster
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1 # Required to run inside docker
|
||||
- uses: actions/checkout@v1 # v1 is required to run inside docker
|
||||
|
||||
- name: Install requirements
|
||||
run: |
|
||||
@ -730,7 +736,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
@ -782,7 +788,7 @@ jobs:
|
||||
runs-on: windows-2019
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python ${{ matrix.python }}
|
||||
uses: actions/setup-python@v4
|
||||
@ -835,7 +841,7 @@ jobs:
|
||||
runs-on: windows-2019
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python ${{ matrix.python }}
|
||||
uses: actions/setup-python@v4
|
||||
@ -883,7 +889,7 @@ jobs:
|
||||
runs-on: windows-2022
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python ${{ matrix.python }}
|
||||
uses: actions/setup-python@v4
|
||||
@ -961,7 +967,7 @@ jobs:
|
||||
mingw-w64-${{matrix.env}}-boost
|
||||
mingw-w64-${{matrix.env}}-catch
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Configure C++11
|
||||
# LTO leads to many undefined reference like
|
||||
@ -1032,7 +1038,7 @@ jobs:
|
||||
run: env
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Clang
|
||||
uses: egor-tensin/setup-clang@v1
|
||||
@ -1101,7 +1107,7 @@ jobs:
|
||||
run: env
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Show Clang++ version before brew install llvm
|
||||
run: clang++ --version
|
||||
|
2
.github/workflows/configure.yml
vendored
2
.github/workflows/configure.yml
vendored
@ -49,7 +49,7 @@ jobs:
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python 3.7
|
||||
uses: actions/setup-python@v4
|
||||
|
4
.github/workflows/format.yml
vendored
4
.github/workflows/format.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
name: Format
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.x"
|
||||
@ -43,7 +43,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
container: silkeh/clang:15-bullseye
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install requirements
|
||||
run: apt-get update && apt-get install -y git python3-dev python3-pytest
|
||||
|
4
.github/workflows/pip.yml
vendored
4
.github/workflows/pip.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup 🐍 3.6
|
||||
uses: actions/setup-python@v4
|
||||
@ -50,7 +50,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup 🐍 3.8
|
||||
uses: actions/setup-python@v4
|
||||
|
2
.github/workflows/upstream.yml
vendored
2
.github/workflows/upstream.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
if: "contains(github.event.pull_request.labels.*.name, 'python dev')"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python 3.12
|
||||
uses: actions/setup-python@v4
|
||||
|
@ -38,14 +38,14 @@ repos:
|
||||
|
||||
# Ruff, the Python auto-correcting linter written in Rust
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.0.281
|
||||
rev: v0.0.287
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: ["--fix", "--show-fixes"]
|
||||
|
||||
# Check static types with mypy
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: "v1.4.1"
|
||||
rev: "v1.5.1"
|
||||
hooks:
|
||||
- id: mypy
|
||||
args: []
|
||||
@ -84,7 +84,7 @@ repos:
|
||||
|
||||
# Also code format the docs
|
||||
- repo: https://github.com/asottile/blacken-docs
|
||||
rev: "1.15.0"
|
||||
rev: "1.16.0"
|
||||
hooks:
|
||||
- id: blacken-docs
|
||||
additional_dependencies:
|
||||
@ -92,7 +92,7 @@ repos:
|
||||
|
||||
# Changes tabs to spaces
|
||||
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
||||
rev: "v1.5.1"
|
||||
rev: "v1.5.4"
|
||||
hooks:
|
||||
- id: remove-tabs
|
||||
|
||||
@ -147,7 +147,7 @@ repos:
|
||||
|
||||
# PyLint has native support - not always usable, but works for us
|
||||
- repo: https://github.com/PyCQA/pylint
|
||||
rev: "v3.0.0a6"
|
||||
rev: "v3.0.0a7"
|
||||
hooks:
|
||||
- id: pylint
|
||||
files: ^pybind11
|
||||
|
@ -70,7 +70,7 @@ def generate_dummy_code_boost(nclasses=10):
|
||||
|
||||
for codegen in [generate_dummy_code_pybind11, generate_dummy_code_boost]:
|
||||
print("{")
|
||||
for i in range(0, 10):
|
||||
for i in range(10):
|
||||
nclasses = 2**i
|
||||
with open("test.cpp", "w") as f:
|
||||
f.write(codegen(nclasses))
|
||||
|
@ -94,5 +94,5 @@ line-length = 120
|
||||
isort.known-first-party = ["env", "pybind11_cross_module_tests", "pybind11_tests"]
|
||||
|
||||
[tool.ruff.per-file-ignores]
|
||||
"tests/**" = ["EM", "N"]
|
||||
"tests/**" = ["EM", "N", "E721"]
|
||||
"tests/test_call_policies.py" = ["PLC1901"]
|
||||
|
@ -209,7 +209,7 @@ def test_map_string_double_const():
|
||||
def test_noncopyable_containers():
|
||||
# std::vector
|
||||
vnc = m.get_vnc(5)
|
||||
for i in range(0, 5):
|
||||
for i in range(5):
|
||||
assert vnc[i].value == i + 1
|
||||
|
||||
for i, j in enumerate(vnc, start=1):
|
||||
@ -217,7 +217,7 @@ def test_noncopyable_containers():
|
||||
|
||||
# std::deque
|
||||
dnc = m.get_dnc(5)
|
||||
for i in range(0, 5):
|
||||
for i in range(5):
|
||||
assert dnc[i].value == i + 1
|
||||
|
||||
i = 1
|
||||
@ -252,7 +252,7 @@ def test_noncopyable_containers():
|
||||
# nested std::map<std::vector>
|
||||
nvnc = m.get_nvnc(5)
|
||||
for i in range(1, 6):
|
||||
for j in range(0, 5):
|
||||
for j in range(5):
|
||||
assert nvnc[i][j].value == j + 1
|
||||
|
||||
# Note: maps do not have .values()
|
||||
|
Loading…
Reference in New Issue
Block a user