Inherit ptest-python-pytest and include tests for Pika. Run the
tests that don't require the docker container with RabbitMQ. The
PyPI package omits some files for testing like tests/__init__.py
use the GitHub source for SRC_URI instead.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Add a DESCRIPTION and extend the runtime dependencies of the recipe
for pytest-timeout, a pytest plugin to abort hanging tests.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Move `rich` and `shellingham` from `ptest` to main package as `typer`
depends on them. Remove `click` since it was vendored in 0.26.0 and
`typing-extensions` since it isn't mentioned in pyproject.toml, and the
only use is in module that is loaded when running on Windows.
Add missing `annotated-doc` package rdependency, and missing python3
modules (went through the code to check the imports)
Signed-off-by: iwanicki92 <iwanicki92@gmail.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
python3-mpv RDEPENDS on mpv, which requires ffmpeg (LICENSE_FLAGS =
"commercial"). With "commercial" not in LICENSE_FLAGS_ACCEPTED, parsing
the universe target - which ignores EXCLUDE_FROM_WORLD - reports:
WARNING: Nothing RPROVIDES 'mpv' (but .../python3-mpv_1.0.8.bb
RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'python3-mpv' is unbuildable, removing...
Now that mpv carries LICENSE_FLAGS = "commercial" and is skipped, carry
the same flag here so python3-mpv is likewise skipped cleanly in both
world and universe instead of surfacing as an unbuildable dependency.
The redundant EXCLUDE_FROM_WORLD is dropped.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Upgrade to release 0.141.1:
- Fix support for background tasks and headers from dependencies in
app.frontend().
- Document FASTAPI_ENV in FastAPI CLI guide.
Add DESCRIPTION and SUMMARY variables.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Upgrade to release 1.0.0:
- Minimum supported Python is now 3.9 (Python 2 dropped).
- PatchedFile.path now also strips git mnemonic prefixes (c/ i/ o/
w/ and 1/ 2/), so git diff --cached paths resolve to the plain
filename (c/README.md -> README.md). Standard a//b/ diffs are
unaffected.
- File modes via source_mode/target_mode + an is_symlink property.
- PatchedFile.diff_line_no to locate hunkless/binary entries.
- Accept bytes input directly (decoded with the given encoding,
default UTF-8).
- Real PEP 484 type annotations + generics (typed iteration) and a
py.typed marker.
- Parse difflib empty-filename output and fix a trailing-newline
error on hunkless git format-patch files; includes the
quoted-filename fix missing from 0.7.5
- from_filename/from_string gain metadata_only; python -m unidiff
works; packaging on pyproject.toml with GitHub Actions CI.
Fixes:
WARNING: python3-unidiff-1.0.0-r0 do_check_backend: QA Issue:
inherits setuptools3 but has pyproject.toml with
setuptools.build_meta, use the correct class [pep517-backend]
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Upgrade to release 1.4.2:
- Stop mutating global asyncio event loop policy on import
- Importing pika.adapters can break asyncio subprocesses on Windows
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Upgrade to release 2.3.0:
- The __trunc__(), __floor__() and __ceil__() special methods are
now implemented by object proxies, delegating to math.trunc(),
math.floor() and math.ceil() applied to the wrapped object. As
with other special methods, these are only looked up on the class
type and not the instance, so they cannot rely on the __getattr__()
fallback of the proxy and must be implemented explicitly. Previously
calling math.trunc() on an object proxy raised TypeError. These
special methods sit somewhat outside the core Python object model
in that they are not used by any builtin operators, with the math
module being their only consumer. They are however documented as
part of the Python data model and the math module is a key module
in the standard library, so supporting them is warranted, in the
same way as the existing support for __round__(), which is
consumed by the round() builtin. Note that although math.floor()
and math.ceil() previously appeared to work when used on an object
proxy, they were silently falling back to converting the proxy
using __float__(). If the wrapped object provided its own
__floor__() or __ceil__() special methods these were ignored and
the result could differ from that when the wrapped object was
used directly. These now yield the same result as using the
wrapped object directly. With thanks to Vincent Gao for the PR.
- The __fspath__() special method of the os.PathLike protocol has
been added to the set of dunder methods which AutoObjectProxy
detects on the wrapped object and adds to the class it
generates, so a proxy it creates around a path-like object can
now be used with os.fspath(), the builtin open() and other
standard library functions accepting paths. Note that
__fspath__() is deliberately not implemented by the base
object proxy, since its presence on the proxy type would
cause every proxy to be classified as path-like by code
branching on isinstance(obj, os.PathLike). Also be aware
that AutoObjectProxy creates a new class for every proxy
instance, so it should not be used to wrap path-like
objects in large numbers due to the memory overhead. For
high-frequency use define a custom proxy class which adds an
explicit __fspath__() method instead. See the section on
wrapping path-like objects in the known issues documentation
for more details.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
- Inherit ptest-python-pytest and include tests for py7zr.
- Switch from PyPI to using the source code from GitHub to
download the tests.
- Remove liblzma pre-stripped binaries because they are not
neeed and to avoid the already-stripped QA errors.
- Add python3-pytest-httpserver and other runtime dependencies
for the tests.
This work was sponsored by GOVCERT.LU.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Add recipe for pytest_httpserver, a HTTP server for pytest.
Changelog for release 1.1.5:
- Add bake() method for pre-configured request expectations
This work was sponsored by GOVCERT.LU.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
python3-black RDEPENDS on python3-pytokens, so extending black to native and
nativesdk only moves the "Nothing RPROVIDES" warning one level down unless
pytokens is extended as well.
pytokens has no runtime dependencies of its own and only needs
python3-mypy-native to build, so it is safe to extend.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
python3-pytest-examples is built for native and nativesdk and RDEPENDS on
python3-black, but black itself was never extended, so parsing universe warns:
WARNING: Nothing RPROVIDES 'nativesdk-python3-black' (but
virtual:nativesdk:...python3-pytest-examples_0.0.18.bb RDEPENDS on or
otherwise requires it)
WARNING: Nothing RPROVIDES 'python3-black-native' (but
virtual:native:...python3-pytest-examples_0.0.18.bb RDEPENDS on or
otherwise requires it)
and both python3-pytest-examples-native and nativesdk-python3-pytest-examples
end up unbuildable and get dropped.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
uefi-firmware-parser's pyproject.toml declares setuptools.build_meta as its
build backend, so setuptools3 is the wrong class and do_check_backend warns:
QA Issue: inherits setuptools3 but has pyproject.toml with
setuptools.build_meta, use the correct class [pep517-backend]
Unlike setup.py, pyproject-build honours the declared build requirements, so
the setuptools_scm dependency has to be provided explicitly, otherwise
do_compile fails with:
ERROR Unmet dependencies ...
setuptools-scm>=8.0
wanted: >=8.0
found: not installed
setup.py passes use_scm_version to setup(), which was silently discarded
before ("Unknown distribution option: 'use_scm_version'"), so the package used
to ship its metadata as uefi_firmware-0.0.0.dist-info. Pin the version to
${PV} so the directory is now correctly named uefi_firmware-1.16.dist-info.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
canopen's pyproject.toml declares setuptools.build_meta as its build backend,
so setuptools3 is the wrong class and do_check_backend warns:
QA Issue: inherits setuptools3 but has pyproject.toml with
setuptools.build_meta, use the correct class [pep517-backend]
Unlike setup.py, pyproject-build honours the declared build requirements, so
the setuptools_scm dependency has to be provided explicitly, otherwise
do_compile fails with:
ERROR Unmet dependencies ...
setuptools_scm>=8
wanted: >=8
found: not installed
setuptools_scm was silently ignored before, so the package used to ship its
metadata as canopen-0.0.0.dist-info. Pin the version to ${PV} so the
directory is now correctly named canopen-2.4.1.dist-info.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
We now have Rust 1.71+ version in oe-core so we can build ruff,
add it to the ptest runtime dependencies, install docs and fix
paths in test_docs.py.
There is a known jemallocator issue on aarch64 that affects ruff
and some of the pydantic tests from test_docs.py:
E <jemalloc>: Unsupported system page size E memory allocation of 4 bytes failed
More details about JEMALLOC_SYS_WITH_LG_PAGE:
https://github.com/gnzlbg/jemallocator/issues/170#issuecomment-1503228963
This work was sponsored by GOVCERT.LU.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Add a recipe for devtools, Python's missing debug print command and
more. Release 0.12.2:
- install debug into builtins via DebugProxy
From release 0.12.1:
- Fix docs publish.
From release 0.12.0:
- build docs on CI
- Update usage to reflect the recent addition of the pytest plugin
- Support dataclasses with slots
This work was sponsored by GOVCERT.LU.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Add a recipe for pytest-examples, Pytest plugin for testing examples
in docstrings and markdown files. Release v0.0.18:
- Adapts tests to pytest 8.3.4
- Increases triple quote search
This work was sponsored by GOVCERT.LU.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Ruff is an extremely fast Python linter and code formatter, written
in Rust. Add a recipe for release 0.16.0:
- Ruff now enables a much larger set of rules by default (413, up
from 59). See the blog post for more details and the new Default
Rules page for a full listing of the enabled rules.
- Ruff can now format Python code blocks in Markdown files and will
do this by default. See the documentation for more details.
- Ruff now supports ruff: ignore comments at the ends of lines,
like noqa comments, or on the line preceding a diagnostic. For
example, these both suppress an unused-import (F401) diagnostic.
- Fixes are now shown in check and format --check output.
- format --check now supports the same output formats as the linter,
including the github and gitlab outputs for rendering annotations
in CI
- The filename, location, end_location, fix.edits[].location, and
fix.edits[].end_location fields in the JSON output format may now
be null rather than defaulting to the empty string and row 1,
column 1, respectively.
This work was sponsored by GOVCERT.LU.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
python3-py-serializable is extended to nativesdk and RDEPENDS on
python3-defusedxml, but defusedxml itself was only extended to native, so
the nativesdk variant of the dependency did not exist:
WARNING: Nothing RPROVIDES 'nativesdk-python3-defusedxml' (but virtual:nativesdk:...python3-py-serializable_2.1.0.bb RDEPENDS on or otherwise requires it)
This also made nativesdk-python3-cyclonedx-python-lib unbuildable, since it
RDEPENDS on python3-py-serializable.
nativesdk-python3-xml, the recipe's own runtime dependency, is provided by
nativesdk-python3, so the nativesdk variant resolves cleanly.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>