diff options
| author | Zhang Xiao <xiao.zhang@windriver.com> | 2026-04-27 07:00:57 +0000 |
|---|---|---|
| committer | Khem Raj <khem.raj@oss.qualcomm.com> | 2026-05-07 10:45:36 -0700 |
| commit | d389ed9e3342aadcca29a18340b4fe07924ad69e (patch) | |
| tree | afa3195416ce3a051cf8863b327fd9a8321d0b92 /meta-python/recipes-devtools/python/python3-aspectlib | |
| parent | 39e99ad532807f99eecb8f80fc3415ec5a9d773e (diff) | |
| download | meta-openembedded-d389ed9e3342aadcca29a18340b4fe07924ad69e.tar.gz | |
python3-aspectlib: Fix pytest compatibility
Partially backport upstream commit to fix pytest compatibility issue.
Fixes pytest errors e.g.
| pytest.PytestRemovedIn9Warning: The (path: py.path.local) argument is deprecated, please use (collection_path: pathlib.Path)
| see https://docs.pytest.org/en/latest/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path
| ERROR: Exit status is 1
Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-aspectlib')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-aspectlib/0001-python3-aspectlib-backport-fix-for-selftest.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-aspectlib/0001-python3-aspectlib-backport-fix-for-selftest.patch b/meta-python/recipes-devtools/python/python3-aspectlib/0001-python3-aspectlib-backport-fix-for-selftest.patch new file mode 100644 index 0000000000..05d7b63126 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-aspectlib/0001-python3-aspectlib-backport-fix-for-selftest.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | From 2e007c5c3ed048491c29e37991e6788f41728b31 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ionel Cristian Mărieș <contact@ionelmc.ro> | ||
| 3 | Date: Fri, 24 Apr 2026 13:17:54 +0000 | ||
| 4 | Subject: [PATCH] python3-aspectlib: backport fix for selftest | ||
| 5 | |||
| 6 | Partial backport of upstream commit b85abdb056("Fix some cleanup regressions") | ||
| 7 | |||
| 8 | Changes excluded: | ||
| 9 | The stacklevel assertion updates in test_aspectlib.py and | ||
| 10 | test_integrations.py are omitted. These are specific to upstream's | ||
| 11 | test suite configuration and cause failures in this environment | ||
| 12 | without providing functional value to the core library. | ||
| 13 | |||
| 14 | Upstream-Status: Backport [https://github.com/ionelmc/python-aspectlib/commit/b85abdb0565d1598ce56bd49d49dc709d4e16081] | ||
| 15 | |||
| 16 | Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com> | ||
| 17 | --- | ||
| 18 | tests/conftest.py | 7 ++++--- | ||
| 19 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
| 20 | |||
| 21 | diff --git a/tests/conftest.py b/tests/conftest.py | ||
| 22 | index ee54d9d..29caa50 100644 | ||
| 23 | --- a/tests/conftest.py | ||
| 24 | +++ b/tests/conftest.py | ||
| 25 | @@ -1,5 +1,6 @@ | ||
| 26 | -def pytest_ignore_collect(path, config): | ||
| 27 | - basename = path.basename | ||
| 28 | +from pathlib import Path | ||
| 29 | |||
| 30 | - if 'pytestsupport' in basename: | ||
| 31 | + | ||
| 32 | +def pytest_ignore_collect(collection_path: Path, config): | ||
| 33 | + if 'pytestsupport' in collection_path.__fspath__(): | ||
| 34 | return True | ||
| 35 | -- | ||
| 36 | 2.53.0 | ||
| 37 | |||
