Inherit ptest-python-pytest and include tests for invoke.
Use -s because some tests read from stdin while output is
captured. Skip tests that require a real terminal.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Add recipe for pytest-relaxed, a relaxed test discovery/organization
for pytest, release 2.0.2:
- Fix dangling compatibility issues with pytest version 8.x.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Upgrade to release 3.0.3:
- Reverted the @task return value type hint change; it actually
just makes things worse. Taking this one back to the drawing
table for later.
From 3.0.2:
- Define a custom __repr__ for Promise so it can be displayed in
interactive sessions or other debug contexts, without running
afoul of AttributeError. Thanks to Leonid Shvechikov for the
original bug report.
- Make the return value type hint for @task more specific; as-is it
would trigger typecheck errors when handing regular, decorated
task functions as inputs to add_task and similar methods.
From 3.0.1:
- Minor tweaks to documentation and type hints/inheritance (mostly
around Promise).
From 3.0.0:
- Add access to the core CLI parser's remainder value, via
Context.remainder - this allows for more elegant wrapper tasks.
- Update the return value, and type hint, of run and friends to be
Result instead of Optional[Result].
- run now includes local subprocess PIDs in Result objects (as
.pid), via the new Runner.get_pid method. This may be generally
useful for auditing or similar tasks, but is primarily intended
for users of disown=True who want to perform their own subprocess
management.
- Fix a grab bag's worth of Sphinx doc render problems, among which
were some class attributes (eg Context.command_cwds) that had
silently disappeared from the class' autodoc output after our
2.0 release.
- Expanded mypy type hint checking to more of the codebase &
generally touched up some type hints here and there. More of
this is planned to occur as we go.
- Dropped support for Python versions <3.9. That's right, we've
caught up to Python's own EOL regime... as of late 2024! As part
of this change, we also switched over to using pyproject.toml for
packaging metadata.
Fixes:
WARNING: python3-invoke-3.0.3-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 26.7.1:
- Fix WebSocket maxMessagePayloadSize being enforced against the
compressed on-the-wire frame length instead of the uncompressed
reassembled message size when permessage-compress
(deflate/bzip2/snappy/brotli) is negotiated. A small compressed
frame could inflate far beyond the configured limit and be
delivered to the application (a decompression-bomb style
denial-of-service; security advisory GHSA-hxp9-w8x3-p566, same
class as CVE-2016-10544). The limit is now re-checked at the
inflation site against the running uncompressed message size,
and the connection is failed with close code 1009 (message too
big) before delivery - for both the whole-message and streaming
receive APIs and every compression backend. Behaviour change:
a compressed message that inflates past maxMessagePayloadSize
is now rejected where it previously passed; uncompressed traffic
and the per-frame maxFramePayloadSize wire guard are unaffected
- Fix the permessage-deflate max_message_size receive cap silently
truncating an over-limit message and raising a zlib error instead
of cleanly rejecting it: the bounded decompress(..., max_length)
left the remaining input in unconsumed_tail undrained, so the
message was corrupted rather than reported. Decompression is now
bounded cumulatively across frames and raises
PayloadExceededError as soon as the uncompressed size would
exceed the cap
- Make bounded decompression backend-agnostic:
decompress_message_data() gains an optional max_output_len
argument (documented on the PerMessageCompress base class) and
every permessage-compress backend now honours it. deflate and
bzip2 stop inflating once the limit is reached (native
incremental cap); snappy and brotli, whose libraries expose no
output-length argument, inflate the frame (already bounded on
the wire by maxFramePayloadSize) and then reject - a weaker but
still clean per-frame guarantee. The WebSocket receive path
passes the remaining maxMessagePayloadSize budget so a
compressed frame no longer expands unbounded into memory before
the size check; the previous post-inflation check remains as a
backstop. Previously only deflate had any decompressed-output
cap, so a snappy/bzip2/brotli frame could inflate fully into
memory first
- Make the asyncio RawSocket receive size limit configurable, at
parity with the Twisted backend. The asyncio
WampRawSocketFactory now exposes
setProtocolOptions(maxMessagePayloadSize=...) /
resetProtocolOptions() (bounds [512, 2**24], default 16 MB), and
the configured value drives both the advertised handshake length
exponent and the enforced receive cap (rounded up to the next
power of two), matching the Twisted factory. Previously the
asyncio receive limit was hardwired to 16 MB (a dead
max_size=None branch), so an asyncio WAMP peer could not tighten
its RawSocket receive limit for DoS hardening and Crossbar's
RawSocket max_message_size had no effect on the asyncio path
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Upgrade to release 2.37.4:
- Set filename parameter of FileNotFoundError exception
- Fix typos in docstrings and comments
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:
- Add Android JNI Analyzer
- The DWARF import plugin now supports comments
- Add support for generating DWARF from firmware or binaries
without a precise format or architecture
- Add support for accessing the bit size of bit-field declarations
- Add support for accessing Enum entries:
lief.dwarf.types.Enum.entries()
- Add support for reading from or assigning a register to a function
parameter
- Add support for reading from or assigning a description
(DW_AT_description) to a lief.dwarf.Function, lief.dwarf.Variable,
or lief.dwarf.LexicalBlock:
lief.dwarf.Function.description()
lief.dwarf.Variable.description()
lief.dwarf.LexicalBlock.description()
- Enable the creation of nested lief.dwarf.editor.Function.LexicalBlock
- Add support for generating a C/C++ definition for a whole
lief.dwarf.CompilationUnit ( lief.dwarf.CompilationUnit.to_decl()).
The output of the following to_decl() functions can now be
configured through the new lief.DeclOpt structure:
lief.dwarf.Function.to_decl()
lief.dwarf.Variable.to_decl()
lief.dwarf.Type.to_decl()
lief.dwarf.CompilationUnit.to_decl()
- Improve support and the API for LF_ENUM: lief.pdb.types.Enum
- Improve support and the API for LF_PROCEDURE: lief.pdb.types.Function
- Improve support and the API for LF_ARRAY: lief.pdb.types.Array
- Improve support and the API for simple types: lief.pdb.types.Simple
- Improve support and the API for LF_ONEMETHOD: lief.pdb.types.Method
- Add support for generating a C/C++ definition for a lief.pdb.Function
( lief.pdb.Function.to_decl()) and a lief.pdb.CompilationUnit
( lief.pdb.CompilationUnit.to_decl()), configurable with the new
lief.DeclOpt structure.
- Add support for DT_AUXILIARY tag: lief.ELF.DynamicEntryAuxiliary
- Add support for DT_FILTER tag: lief.ELF.DynamicEntryFilter
- Add lief.ELF.parse_from_dump() to parse an ELF binary from a
memory dump
- Add lief.COFF.Section.coff_string for accessing the full section
name when this name does not fit in 8 bytes.
- Add support for writing big-endian Mach-O binaries
- Introduce an API for selecting a specific Mach-O binary by
architecture from a FAT binary
- Add lief.MachO.FatBinary.create() to create a FAT binary from a
list of lief.MachO.Binary objects targeting different architectures
- Add support for lief.MachO.ThreadLocalVariables
- Fix an extra byte being written after the thread state of an
LC_UNIXTHREAD/LC_THREAD command, which shifted the following load
commands by one byte
- Add support for editing the runtime tables of the
LC_FUNCTION_VARIANTS command and committing the changes on write:
lief.MachO.FunctionVariants
- Add a structured parser, editing API and writer for the
LC_FUNCTION_VARIANT_FIXUPS command:
lief.MachO.FunctionVariantFixups
- Add support for the LC_LAZY_LOAD_DYLIB_INFO command:
lief.MachO.LazyLoadDylibInfo
- Add lief.MachO.parse_from_dump() to parse a Mach-O binary from a
memory dump
- Add setters for lief.PE.ImportEntry.iat_value and
lief.PE.ImportEntry.ilt_value
- Add lief.PE.Binary.offset_to_rva() to convert a raw offset into a RVA
- Add lief.PE.parse_from_dump() to parse a PE binary from a memory dump
- Update lief.Binary.offset_to_virtual_address() for PE binaries
to return an absolute virtual address instead of a RVA
- Add support for adding an lief.PE.Import at a specific position:
lief.PE.Binary.add_import()
- Improve support for EFI binaries, such as bzImage
- Add support for Objective-C categories: lief.ObjC.Category,
accessible through lief.ObjC.Metadata.categories
- Add support for iterating over the operands of MIPS, PowerPC,
eBPF and RISC-V instructions (Register, Immediate, Memory and
PCRelative):
lief.assembly.mips.Instruction.operands()
lief.assembly.powerpc.Instruction.operands()
lief.assembly.ebpf.Instruction.operands()
lief.assembly.riscv.Instruction.operands()
- The Rust FFI no longer relies on autocxx and bindgen. It is now
built on top of plain cxx, which simplifies the bindings and
reduces the iteration time
- The Rust bindings directory has been renamed from api/rust/cargo/
to api/rust/crates/
- Add support for the aarch64-linux-android and x86_64-linux-android
targets
- Add LIEF_LIFETIMEBOUND annotations wrapping [[clang::lifetimebound]]
to leverage Clang's lifetime analysis. This helps detect dangling
references at compile time for methods that return references or
iterators tied to an object's lifetime
This work was sponsored by GOVCERT.LU.
License-Update: Update years
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Upgrade to release 1.0.3:
Fixes:
- Complete the setuptools SubCommand protocol
- Thread config_settings to the build command
- Keep source tree clean in strict editable mode
Documentation:
- Put uv first in installer tabs and add it to config-settings
- List choices for Literal options in the README table
- Touch up README options tables, setuptools docs
- Show the projects list as a card grid with language/binding badges
- Add high-star projects to the known projects list
CI and testing:
- Make linkcheck retry timeouts from slow hosts
- Forward -C config-settings in downstream editable install
Include a patch to rename directory name from ${module} __module__
to avoid error due to an unexpanded bitbake variable.
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>
Use the newer setuptools build class to avoid an AttributeError thrown
after warnings about setuptools and related build modules:
|/home/tgamblin/workspace/ypbuilds/oe-nodistro-master-patchtest/build/tmp/work/x86-64-v3-oe-linux/python3-ukkonen/1.1.0/recipe-sysroot-native/usr/lib/python3.14/site-packages/setuptools/__init__.py:92: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
|!!
|
| ********************************************************************************
| Requirements should be satisfied by a PEP 517 installer.
| If you are using pip, you can try `pip install --use-pep517`.
|
| This deprecation is overdue, please update your project and remove deprecated
| calls to avoid build errors in the future.
| ********************************************************************************
|
|!!
...
| File "/home/tgamblin/workspace/ypbuilds/oe-nodistro-master-patchtest/build/tmp/work/x86-64-v3-oe-linux/python3-ukkonen/1.1.0/recipe-sysroot-native/usr/lib/python3.14/site-packages/packaging/utils.py", line 96, in canonicalize_name
| value = name.lower().replace("_", "-").replace(".", "-")
| ^^^^^^^^^^
|AttributeError: 'NoneType' object has no attribute 'lower'
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Upgrade to release 2.13.4:
- Bump libc from 0.2.155 to 0.2.185
- Adapt pydantic-core linker flags on macOS
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 pydantic-core to version 2.46.4 as it required for newer
Pydantic versions.
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>
Changelog:
=============
- Register the "benchmark" pytest mark to avoid PytestUnknownMarkWarning
- Update C extension docstrings and remove stale comments
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Changelog:
===========
- trim to ncols even when '{bar}' not in bar_format
- fix tqdm.write when stdout=None
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Changelog:
==========
- Remove self signed certificate from production.
- Correct inequality in validation error message
- Fix non-deterministic convert_from_registers
- Fix swapped SimDevice in ModbusDeviceContext
- Update CI actions and pyproject.
- Add ruff format check to ci.yml
- Remove 'useless-suppression' pylint
- Format test_client.py with ruff
- Update clean_workflows CI (node@20 problem).
- Ruff format (due to ruff upgrade).
- Fix ModbusServerContext initialization with dict devices parameter
- Support configured ASCII input delimiter
- Fix default no-response behavior for force listen only
- Use correct format character for DataType.REGISTERS 'h' -> 'H'
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Changelog:
==========
- asyncio: detect cross-instance reentrant deadlocks before the poll loop
- fix(soft_rw): evict non-regular write marker without reading it
- _util: drop the dead st_mtime=0 short-circuit in raise_on_not_writable_file
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Changelog:
===========
* add '.rotate()' method, rotate bitarray in-place by 'k' positions
* expose the 'decodeiterator' class, and add '.skipbits()' method
as well as '.index' data descriptor, see #252
* fix 'random_p()' silently producing all-zero bitarrays for small 'n'
when 'p=float("nan")'
* improve integer argument handling in 'util.random_k()',
'util.gen_primes()', 'util.pprint()' and 'util.int2ba()'
* add 'python_requires >= 3.7' to package metadata
* improve testing - use more of 'unittest''s functionality
* add [Rule 90 example](../examples/rule90.py)
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Changelog:
===========
- Changed ByteReceiveStream.receive() implementations to raise a ValueError
when max_bytes is not a positive integer
- Fixed CapacityLimiter.total_tokens rejecting float("inf") when the limiter
was instantiated outside of an event loop. The adapter setter checked for
infinity by identity (value is math.inf), so only the exact math.inf singleton
was accepted, while every backend setter (using math.isinf()) accepts any
positive infinity
- Fixed to_process.run_sync() deadlocking when the worker function writes
enough data to sys.stderr to fill the (undrained) pipe buffer. The worker
process now redirects sys.stderr to os.devnull as well, matching the documented
behavior
- Fixed TLSStream.wrap() matching an internationalized (unicode) host name
against the peer certificate using IDNA 2003 (via the standard library)
instead of IDNA 2008, which could cause the host name to be matched against the
wrong certificate
- Fixed anyio.open_process() (and run_process()) ignoring the extra_groups
argument, as it mistakenly passed the value of the group argument instead
- Fixed CapacityLimiter.acquire_nowait() and
CapacityLimiter.acquire_nowait_on_behalf_of() raising trio.WouldBlock instead
of anyio.WouldBlock on the trio backend when there are no tokens available
- Fixed CapacityLimiter on the asyncio backend over-granting tokens
(borrowed_tokens exceeding total_tokens and available_tokens going negative)
when a non-blocking acquire was made in the window between a token being
released and the notified waiter resuming. The freed token is now reserved for
the woken waiter right away, so the non-blocking acquire correctly raises
WouldBlock
- Fixed unnecessary CPU spin when delivering cancellation from CancelScope on
asyncio under certain conditions, including improper cancel scope nesting
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Upgrade to release 3.12.1:
- Restored the previous SyncToAsync.__call__ internal code shape,
which was relied on by some APM services.
From 3.12.0:
- AsyncToSync no longer captures the running event loop on
instantiation
- Fixed an event loop deadlock when exiting ThreadSensitiveContext
while its executor thread was still blocked waiting on the event
loop.
- Dropped support for EOL Python 3.9.
- Fixed StatelessServer.run() failing on Python 3.14, where
asyncio.get_event_loop() no longer creates an event loop if none
exists. It now uses asyncio.run().
- Fixed Local leaking data between unrelated sync threads when
sys.flags.thread_inherit_context is enabled (Python 3.14+), so a
newly started thread inherits a copy of the spawning thread's
context. This flag is on by default on free-threaded builds and
opt-in on the regular GIL build. Local storage is now tagged with
its owning thread and re-homed only when asgiref intentionally
moves work across threads (in async_to_sync / sync_to_async),
restoring the documented thread-local behaviour in sync threads.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Upgrade to release 3.0.2:
- Modernize type annotations
- Fix pypy CI by skipping redundant mypy runs on it
- Fix IndexError on source mixing lone CR with LF line endings
- Release modernization, and publish to PyPI from CI via trusted
publishing
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
do_compile failed with:
AttributeError: 'NoneType' object has no attribute 'lower'
A non-empty setup_requires makes setuptools run fetch_build_eggs(),
which enumerates every distribution in the native sysroot and calls
packaging.utils.canonicalize_name(dist.name). Under the setuptools/
Python 3.14 in the sysroot one distribution exposes a None name, so
canonicalize_name() crashes on None.lower() and aborts the build.
Extend the existing patch to drop the whole setup_requires block
instead of only setuptools_git. sphinx is only used by the build_sphinx
command (not run during do_compile) and is already provided via
DEPENDS, so removing it is safe and keeps setuptools out of the
fetch_build_eggs() path.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Inherit ptest, include tests for wand and run the relevant
test cases. Add imagemagick as a runtime dependency.
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>
Inherit ptest, include tests for rarfile and run the relevant
test cases.
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>
- Disallow extraction outside extraction path, in case of existing
symlink.
- Disallow creating symlinks to outside of extraction path.
- Apply length limit to passwords, so too long password give same
result as for unrar.
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>
Inherit ptest and include tests for pyppmd.
Add a patch to fix SIGABRT OutputBuffer_Grow() from
src/ext/_ppmdmodule.c which was detected with 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>
Inherit ptest and include tests for jsbeautifier.
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>
do_compile failed to find ninja, and after providing it CMake's C++20
module dependency scanning (clang-scan-deps) failed in the cross
environment with "'cstddef' file not found".
Add ninja-native and python3-scikit-build-core-native to DEPENDS so the
--no-isolation build finds its build tools, and disable C++20 module
scanning via CMAKE_ARGS since pikepdf uses the C++20 language but no
named modules.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
The upstream pyproject.toml caps setuptools at <83.0, but OE builds with
--no-isolation against the native setuptools (now 83.0.0), so the build
fails with "Missing dependencies: setuptools<83.0,>=65.6". Drop the
spurious upper bound.
Fold this into the existing wheel-version relaxation so pyproject.toml is
adjusted by a single patch.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>