Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9b004ca

Browse files
committed
configure.ac: require pytest ≥ 7.0.0; vendor pytest 7.0.1 for Python 3.6
Now that the minimum required Python version is 3.6 (commit e89caf1), the pytest 6.1.x releases are no longer the lowest pytest line we need to support [1]. The pytest 7.0.x releases are the most recent to support Python 3.6, so bump the minimum required pytest version to 7.0.0 and replace the in-tree pytest-6.1.2 vendor tree with pytest-7.0.1. The pytest-7.0.1 tree was obtained with: $ docker run --rm -v "$PWD/pytest-7.0.1":/pkg python:3.6 \ python3 -m pip install --no-compile \ --target=/pkg pytest==7.0.1 When `--enable-vendor-pytest` is used, `tests/utils/env.sh.in` now picks `pytest-7.0.1` for Python 3.6 and keeps `pytest-7.4.3` for Python 3.7+. Update the dependency lists accordingly: `configure.ac`: Bump the pytest version check from 6.1.0 to 7.0.0 and update the Python error message to reflect the new 3.6 minimum. `tests/utils/env.sh.in`: Use `pytest-7.0.1` instead of `pytest-6.1.2` for Python 3.6. `LICENSE` and `tests/utils/python/vendor/REUSE.toml`: Replace all `pytest-6.1.2/*` paths with the corresponding `pytest-7.0.1/*` ones, using the actual `.dist-info` versions in the new tree (`attrs-22.2.0`, `importlib_metadata-4.8.3`, `packaging-21.3`, `pluggy-1.0.0`, `pyparsing-3.1.4`, `tomli-1.2.3`, `typing_extensions-4.1.1`, and `zipp-3.6.0`). Drop the now-unused `toml`, `pathlib2`, and `six.py` annotations; PyParsing is now a package rather than a single file; add `tomli` and `typing_extensions.py` entries for the 7.0.1 tree. `README.adoc`: pytest ≥ 6.1.0 → pytest ≥ 7.0.0. `CONTRIBUTING.adoc`: Refer to `pytest-7.0.1` instead of `pytest-6.1.2` as the in-tree pytest used with Python 3.6. [1]: https://docs.pytest.org/en/stable/backwards-compatibility.html Change-Id: I504f10c8a58f1b4f08bf2525e03e6fcac04c8e06 Signed-off-by: Philippe Proulx <[email protected]>
1 parent d9bdb42 commit 9b004ca

320 files changed

Lines changed: 26193 additions & 19419 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ endif::env-github[]
2020

2121
= Babeltrace{nbsp}2 contributor's guide
2222
Jérémie Galarneau, Simon Marchi, Philippe Proulx
23-
23 Janary 2026
23+
27 April 2026
2424
:toclevels: 3
2525
:icons: font
2626
:nofooter:
@@ -1297,7 +1297,7 @@ backtrace when Valgrind shows errors.
12971297
All {bt2} tests use https://docs.pytest.org/[pytest].
12981298

12991299
With `--enable-vendor-pytest` at project configuration time, the tests
1300-
use `tests/utils/python/vendor/pytest-6.1.2` for Python{nbsp}3.6 or
1300+
use `tests/utils/python/vendor/pytest-7.0.1` for Python{nbsp}3.6 or
13011301
`tests/utils/python/vendor/pytest-7.4.3` for Python{nbsp}3.7+.
13021302

13031303
Running the {bt2} tests requires Python, the `bt2` Python bindings, and

LICENSE

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,16 @@ According with:
101101
They are only used when running the tests in the source tree. This applies
102102
to:
103103

104-
tests/utils/python/vendor/pytest-6.1.2/pytest/*
105-
tests/utils/python/vendor/pytest-6.1.2/_pytest/*
106-
tests/utils/python/vendor/pytest-6.1.2/attr/*
107-
tests/utils/python/vendor/pytest-6.1.2/attrs/*
108-
tests/utils/python/vendor/pytest-6.1.2/iniconfig/*
109-
tests/utils/python/vendor/pytest-6.1.2/pluggy/*
110-
tests/utils/python/vendor/pytest-6.1.2/py/*
111-
tests/utils/python/vendor/pytest-6.1.2/toml/*
112-
tests/utils/python/vendor/pytest-6.1.2/pathlib2/*
113-
tests/utils/python/vendor/pytest-6.1.2/pyparsing.py
114-
tests/utils/python/vendor/pytest-6.1.2/six.py
115-
tests/utils/python/vendor/pytest-6.1.2/zipp.py
104+
tests/utils/python/vendor/pytest-7.0.1/pytest/*
105+
tests/utils/python/vendor/pytest-7.0.1/_pytest/*
106+
tests/utils/python/vendor/pytest-7.0.1/attr/*
107+
tests/utils/python/vendor/pytest-7.0.1/attrs/*
108+
tests/utils/python/vendor/pytest-7.0.1/iniconfig/*
109+
tests/utils/python/vendor/pytest-7.0.1/pluggy/*
110+
tests/utils/python/vendor/pytest-7.0.1/py/*
111+
tests/utils/python/vendor/pytest-7.0.1/pyparsing/*
112+
tests/utils/python/vendor/pytest-7.0.1/tomli/*
113+
tests/utils/python/vendor/pytest-7.0.1/zipp.py
116114
tests/utils/python/vendor/pytest-7.4.3/pytest/*
117115
tests/utils/python/vendor/pytest-7.4.3/_pytest/*
118116
tests/utils/python/vendor/pytest-7.4.3/exceptiongroup/*
@@ -134,7 +132,7 @@ According with:
134132

135133
It's only used when running the tests in the source tree. This applies to:
136134

137-
tests/utils/python/vendor/pytest-6.1.2/importlib_metadata/*
135+
tests/utils/python/vendor/pytest-7.0.1/importlib_metadata/*
138136
tests/utils/python/vendor/pytest-7.4.3/importlib_metadata/*
139137

140138

@@ -150,7 +148,7 @@ According with:
150148

151149
It's only used when running the tests in the source tree. This applies to:
152150

153-
tests/utils/python/vendor/pytest-6.1.2/packaging/*
151+
tests/utils/python/vendor/pytest-7.0.1/packaging/*
154152
tests/utils/python/vendor/pytest-7.4.3/packaging/*
155153

156154

@@ -165,6 +163,7 @@ According with:
165163

166164
It's only used when running the tests in the source tree. This applies to:
167165

166+
tests/utils/python/vendor/pytest-7.0.1/typing_extensions.py
168167
tests/utils/python/vendor/pytest-7.4.3/typing_extensions.py
169168

170169

README.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Render with Asciidoctor
66

77
= Babeltrace 2
8-
16 April 2026
8+
27 April 2026
99
:btversion: 2.1
1010
:bt2: Babeltrace{nbsp}2
1111
ifdef::env-github[]
@@ -142,7 +142,7 @@ _**If you need to build and run the tests**_:: {empty}
142142
libraries and `python3-config`)
143143
(Debian/Ubuntu: `python3-dev`; Fedora: `python3-devel`)
144144

145-
* https://docs.pytest.org/[pytest]{nbsp}≥{nbsp}6.1.0
145+
* https://docs.pytest.org/[pytest]{nbsp}≥{nbsp}7.0.0
146146
(Debian/Ubuntu/Fedora: `python3-pytest`)
147147
+
148148
Use an in-tree pytest with `--enable-vendor-pytest` if you can't

configure.ac

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -598,10 +598,10 @@ AS_IF([test "x$have_python" = xyes], [
598598

599599
AM_CONDITIONAL([HAVE_PYTHON_312_OR_GREATER], [test "x$have_python_312_or_greater" = xyes])
600600

601-
# Tests require Python bindings and pytest >= 6.1.0
601+
# Tests require Python bindings and pytest >= 7.0.0
602602
AE_IF_FEATURE_ENABLED([tests], [
603603
AS_IF([test "x$have_python" = "xno"], [
604-
AC_MSG_ERROR([Python >= 3.5 is required to build tests. Use ‘--disable-tests’ to disable building tests.])
604+
AC_MSG_ERROR([Python >= 3.6 is required to build tests. Use ‘--disable-tests’ to disable building tests.])
605605
])
606606
607607
AE_IF_FEATURE_ENABLED([vendor-pytest], [
@@ -610,14 +610,14 @@ AE_IF_FEATURE_ENABLED([tests], [
610610
HAVE_VENDOR_PYTEST=1
611611
], [
612612
HAVE_VENDOR_PYTEST=0
613-
# Check for pytest >= 6.1.0
614-
AC_MSG_CHECKING([for pytest >= 6.1.0])
615-
AS_IF(["$PYTHON" -c "import pytest; assert tuple(map(int, pytest.__version__.split('.'))) >= (6, 1, 0)" 2>/dev/null], [
613+
# Check for pytest >= 7.0.0
614+
AC_MSG_CHECKING([for pytest >= 7.0.0])
615+
AS_IF(["$PYTHON" -c "import pytest; assert tuple(map(int, pytest.__version__.split('.'))) >= (7, 0, 0)" 2>/dev/null], [
616616
pytest_version=`"$PYTHON" -c "import pytest; print(pytest.__version__)" 2>/dev/null`
617617
AC_MSG_RESULT([yes ($pytest_version)])
618618
], [
619619
AC_MSG_RESULT([no])
620-
AC_MSG_ERROR([pytest >= 6.1.0 is required to build tests. Use ‘--disable-tests’ to disable building tests or use ‘--enable-vendor-pytest’ to use the in-tree pytest.])
620+
AC_MSG_ERROR([pytest >= 7.0.0 is required to build tests. Use ‘--disable-tests’ to disable building tests or use ‘--enable-vendor-pytest’ to use the in-tree pytest.])
621621
])
622622
])
623623

tests/utils/env.sh.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ _bt_tests_set_vendor_pytest() {
147147
if ((_bt_tests_py_minor_version >= 7)); then
148148
pytest_dir=pytest-7.4.3
149149
else
150-
pytest_dir=pytest-6.1.2
150+
pytest_dir=pytest-7.0.1
151151
fi
152152

153153
export PYTHONPATH=$BT_TESTS_SRCDIR/utils/python/vendor/$pytest_dir${PYTHONPATH:+:}${PYTHONPATH:-}
Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,43 @@
11
version = 1
22

33
[[annotations]]
4-
path = ["pytest-6.1.2/pytest/**", "pytest-6.1.2/_pytest/**", "pytest-6.1.2/pytest-6.1.2.dist-info/**", "pytest-7.4.3/pytest/**", "pytest-7.4.3/_pytest/**", "pytest-7.4.3/pytest-7.4.3.dist-info/**"]
4+
path = ["pytest-7.0.1/pytest/**", "pytest-7.0.1/_pytest/**", "pytest-7.0.1/pytest-7.0.1.dist-info/**", "pytest-7.4.3/pytest/**", "pytest-7.4.3/_pytest/**", "pytest-7.4.3/pytest-7.4.3.dist-info/**"]
55
precedence = "closest"
66
SPDX-FileCopyrightText = "2004 - present, Holger Krekel and others"
77
SPDX-License-Identifier = "MIT"
88

99
[[annotations]]
10-
path = ["pytest-6.1.2/attr/**", "pytest-6.1.2/attrs/**", "pytest-6.1.2/attrs-22.1.0.dist-info/**"]
10+
path = ["pytest-7.0.1/attr/**", "pytest-7.0.1/attrs/**", "pytest-7.0.1/attrs-22.2.0.dist-info/**"]
1111
precedence = "closest"
1212
SPDX-FileCopyrightText = "2015 - present, Hynek Schlawack and contributors"
1313
SPDX-License-Identifier = "MIT"
1414

1515
[[annotations]]
16-
path = ["pytest-6.1.2/iniconfig/**", "pytest-6.1.2/iniconfig-1.1.1.dist-info/**", "pytest-7.4.3/iniconfig/**", "pytest-7.4.3/iniconfig-2.0.0.dist-info/**"]
16+
path = ["pytest-7.0.1/iniconfig/**", "pytest-7.0.1/iniconfig-1.1.1.dist-info/**", "pytest-7.4.3/iniconfig/**", "pytest-7.4.3/iniconfig-2.0.0.dist-info/**"]
1717
precedence = "closest"
1818
SPDX-FileCopyrightText = "2010 - present, Ronny Pfannschmidt and Holger Krekel"
1919
SPDX-License-Identifier = "MIT"
2020

2121
[[annotations]]
22-
path = ["pytest-6.1.2/pluggy/**", "pytest-6.1.2/pluggy-0.13.1.dist-info/**", "pytest-7.4.3/pluggy/**", "pytest-7.4.3/pluggy-1.2.0.dist-info/**"]
22+
path = ["pytest-7.0.1/pluggy/**", "pytest-7.0.1/pluggy-1.0.0.dist-info/**", "pytest-7.4.3/pluggy/**", "pytest-7.4.3/pluggy-1.2.0.dist-info/**"]
2323
precedence = "closest"
2424
SPDX-FileCopyrightText = "2015 - present, Holger Krekel and contributors"
2525
SPDX-License-Identifier = "MIT"
2626

2727
[[annotations]]
28-
path = ["pytest-6.1.2/py/**", "pytest-6.1.2/py-1.11.0.dist-info/**"]
28+
path = ["pytest-7.0.1/py/**", "pytest-7.0.1/py-1.11.0.dist-info/**", "pytest-7.4.3/py.py"]
2929
precedence = "closest"
3030
SPDX-FileCopyrightText = "2004 - present, Holger Krekel and others"
3131
SPDX-License-Identifier = "MIT"
3232

3333
[[annotations]]
34-
path = "pytest-6.1.2/toml/**"
35-
precedence = "closest"
36-
SPDX-FileCopyrightText = "2013 - present, William Pearson and contributors"
37-
SPDX-License-Identifier = "MIT"
38-
39-
[[annotations]]
40-
path = "pytest-6.1.2/pathlib2/**"
41-
precedence = "closest"
42-
SPDX-FileCopyrightText = "2014 - present, Matthias C. M. Troffaes and contributors"
43-
SPDX-License-Identifier = "MIT"
44-
45-
[[annotations]]
46-
path = "pytest-6.1.2/pyparsing.py"
34+
path = ["pytest-7.0.1/pyparsing/**", "pytest-7.0.1/pyparsing-3.1.4.dist-info/**"]
4735
precedence = "closest"
4836
SPDX-FileCopyrightText = "2003 - present, Paul McGuire"
4937
SPDX-License-Identifier = "MIT"
5038

5139
[[annotations]]
52-
path = "pytest-6.1.2/six.py"
53-
precedence = "closest"
54-
SPDX-FileCopyrightText = "2010 - present, Benjamin Peterson"
55-
SPDX-License-Identifier = "MIT"
56-
57-
[[annotations]]
58-
path = ["pytest-6.1.2/zipp.py", "pytest-6.1.2/zipp-1.2.0.dist-info/**", "pytest-7.4.3/zipp/**", "pytest-7.4.3/zipp-3.15.0.dist-info/**"]
40+
path = ["pytest-7.0.1/zipp.py", "pytest-7.0.1/zipp-3.6.0.dist-info/**", "pytest-7.4.3/zipp/**", "pytest-7.4.3/zipp-3.15.0.dist-info/**"]
5941
precedence = "closest"
6042
SPDX-FileCopyrightText = "2017 - present, Jason R. Coombs"
6143
SPDX-License-Identifier = "MIT"
@@ -67,31 +49,25 @@ SPDX-FileCopyrightText = "2021 - present, Alex Grönholm"
6749
SPDX-License-Identifier = "MIT"
6850

6951
[[annotations]]
70-
path = ["pytest-7.4.3/tomli/**", "pytest-7.4.3/tomli-2.0.1.dist-info/**"]
52+
path = ["pytest-7.0.1/tomli/**", "pytest-7.0.1/tomli-1.2.3.dist-info/**", "pytest-7.4.3/tomli/**", "pytest-7.4.3/tomli-2.0.1.dist-info/**"]
7153
precedence = "closest"
7254
SPDX-FileCopyrightText = "2021 - present, Taneli Hukkinen"
7355
SPDX-License-Identifier = "MIT"
7456

7557
[[annotations]]
76-
path = "pytest-7.4.3/py.py"
77-
precedence = "closest"
78-
SPDX-FileCopyrightText = "2004 - present, Holger Krekel and others"
79-
SPDX-License-Identifier = "MIT"
80-
81-
[[annotations]]
82-
path = ["pytest-6.1.2/importlib_metadata/**", "pytest-6.1.2/importlib_metadata-2.1.3.dist-info/**", "pytest-7.4.3/importlib_metadata/**", "pytest-7.4.3/importlib_metadata-6.7.0.dist-info/**"]
58+
path = ["pytest-7.0.1/importlib_metadata/**", "pytest-7.0.1/importlib_metadata-4.8.3.dist-info/**", "pytest-7.4.3/importlib_metadata/**", "pytest-7.4.3/importlib_metadata-6.7.0.dist-info/**"]
8359
precedence = "closest"
8460
SPDX-FileCopyrightText = "2017 - present, Jason R. Coombs"
8561
SPDX-License-Identifier = "Apache-2.0"
8662

8763
[[annotations]]
88-
path = ["pytest-6.1.2/packaging/**", "pytest-6.1.2/packaging-20.9.dist-info/**", "pytest-7.4.3/packaging/**", "pytest-7.4.3/packaging-24.0.dist-info/**"]
64+
path = ["pytest-7.0.1/packaging/**", "pytest-7.0.1/packaging-21.3.dist-info/**", "pytest-7.4.3/packaging/**", "pytest-7.4.3/packaging-24.0.dist-info/**"]
8965
precedence = "closest"
9066
SPDX-FileCopyrightText = "2014 - present, Donald Stufft and contributors"
9167
SPDX-License-Identifier = "BSD-2-Clause OR Apache-2.0"
9268

9369
[[annotations]]
94-
path = ["pytest-7.4.3/typing_extensions.py", "pytest-7.4.3/typing_extensions-4.7.1.dist-info/**"]
70+
path = ["pytest-7.0.1/typing_extensions.py", "pytest-7.0.1/typing_extensions-4.1.1.dist-info/**", "pytest-7.4.3/typing_extensions.py", "pytest-7.4.3/typing_extensions-4.7.1.dist-info/**"]
9571
precedence = "closest"
9672
SPDX-FileCopyrightText = "2001 - present, Python Software Foundation"
9773
SPDX-License-Identifier = "PSF-2.0"

tests/utils/python/vendor/pytest-6.1.2/_pytest/__init__.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/utils/python/vendor/pytest-6.1.2/_pytest/deprecated.py

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)