Inherit ptest-python-pytest and include tests for PikePDF. Extend
runtime dependencies and add new 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 a recipe for release 2.1.0 of python-xmp-toolkit:
- Add support for python 3.14
- Make exempi a run-time dependency
- Add missing error codes
- Remove tox
- Use flit for build
- Remove travis
- Remove packaging dependency requirement
- Remove support for python <= 3.6 (All python2 code removed)
- fix exempi returns char-size bool, not int
- homebrew path fixup
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>
Upgrade to release 10.11.0:
- Extended PDF outline (bookmark) support to cover more of the spec
- Fixed 1-bit /Indexed images losing their palette when extracted.
{meth}pikepdf.PdfImage.as_pil_image and
{meth}pikepdf.PdfImage.extract_to previously ignored the palette
of a 1-bit indexed image over a /DeviceCMYK base (returning a
bilevel grayscale image) and of a single-colour palette (hival 0).
Both now decode correctly, matching the existing behavior for
2/4/8-bit indexed images.
- A 1-bit /Indexed image whose base colour space is unsupported (for
example /DeviceN or /Separation) now raises NotImplementedError
instead of silently returning an unpalettized image, matching the
2/4/8-bit path.
- Image extraction now verifies that the image stream holds enough\
data for the declared /Width and /Height before allocating, raising
{exc}~pikepdf.exceptions.ImageDecompressionError when it does not.
This closes the remaining decompression-bomb gaps left by the
{attr}pikepdf.PdfImage.MAX_IMAGE_PIXELS limit added in v10.10.0:
that limit bounds the declared size, but said nothing about whether
the declared size was consistent with the data present, so a 4-bit
image declaring 12000x12000 -- well under the default 500M pixel
budget -- still allocated ~300 MB from a single byte of stream
data, and setting the limit to None restored the unbounded case
entirely. The 2-bit and 4-bit unpack path and the 1-bit path
(where Pillow allocates a byte per pixel before it notices the
data is short) are both covered; 8-bit and 16-bit images already
failed cleanly. The check applies regardless of MAX_IMAGE_PIXELS.
- The 2-bit and 4-bit unpack buffer is no longer over-allocated by
a factor of the packing ratio, reducing peak memory for those
images by 4x and 2x respectively.
- Extracting a 1-, 2-, or 4-bit image whose stream is shorter than
its declared dimensions require now raises
- {exc}~pikepdf.exceptions.ImageDecompressionError rather than
returning a partially decoded image with a black tail. This
matches what 8-bit and 16-bit images have always done for the
same defect.
- An image with a non-positive /Width or /Height raises
{exc}~pikepdf.exceptions.InvalidPdfImageError instead of failing
further down with an obscure error from Pillow.
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>
The 9.1.0 pyproject.toml sets build-backend = "uv_build" and lists only
uv_build in its build-system requires, but the recipe inherited
python_setuptools_build_meta and added python3-uv-build-native to DEPENDS
by hand. Inherit python_uv_build instead, which drops the unused
setuptools, wheel and setuptools-scm dependencies and the setuptools
specific do_configure[cleandirs] workaround that came with the old class.
The patch capped uv_build at <0.12.0, which the 0.11.32 -> 0.12.1
upgrade in oe-core invalidated. This bound has now broken twice, and
there is only ever one uv-build in the sysroot, so drop the upper bound
rather than raise it again.
Verified on aarch64 for qemuarm64: do_compile and do_package succeed.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
bleak's build backend is uv_build, but the recipe inherited
python_poetry_core and then added python3-uv-build-native to DEPENDS by
hand. Both classes are thin wrappers over python_pep517 that differ only
in the native backend they pull in, and python_pep517 takes the backend
from pyproject.toml, so inherit python_uv_build instead and drop the
manual DEPENDS along with the unused poetry-core dependency.
The patch capped uv_build at <0.12.0, which the 0.11.32 -> 0.12.1
upgrade in oe-core invalidated:
ERROR Unmet dependencies (checked against .../nativepython3):
uv_build<0.12.0,>=0.10.9
This bound has now broken twice, and there is only ever one uv-build in
the sysroot, so drop the upper bound rather than raise it again.
Verified on aarch64 for qemuarm64: do_compile fails before the change
with the error above and both do_compile and do_package succeed after.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
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>