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>
The upstream pyproject.toml caps setuptools at <82.1, but OE builds with
--no-isolation against the native setuptools (now 83.0.0), so the build
fails with "Missing dependencies: setuptools<82.1,>=68". Drop the
spurious upper bound.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
The upstream pyproject.toml caps setuptools at <=82.0.1, but OE builds
with --no-isolation against the native setuptools (now 83.0.0), so the
build fails with "Missing dependencies: setuptools<=82.0.1,>=80.9.0".
Drop the spurious upper bound.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Upgrade to release 10.9.1:
- Fixed a crash (SIGABRT via std::terminate) that could occur when
a file-backed {class}pikepdf.Pdf was deallocated while a Python
exception was already propagating -- for example when
pikepdf.open(filename) appears as a transient element of a
list/tuple literal whose later element raises. Opening from a
filename closes the file in the input source destructor, which
calls back into Python; with an exception already in flight that
call raised an error that escaped the destructor. The in-flight
exception is now preserved and propagates normally. Added a guard
for a likely non-reproducible related case with DecimalPrecision.
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 3.0.4:
- Fixed test builds with installed Eigen 5 by improving Eigen3
CMake package detection.
- Fixed move semantics of scoped_ostream_redirect to preserve
buffered output and avoid crashes when moved redirects restore
stream buffers.
- Fixed py::dynamic_attr() traversal on Python 3.13+ to correctly
propagate PyObject_VisitManagedDict() results.
- Fixed std::shared_ptr<T> fallback casting to avoid unnecessary
copy-constructor instantiation in reference_internal paths.
- Updated setup-uv to the maintained GitHub Action tag scheme.
- Updated pre-commit hooks.
- Updated GitHub Actions dependencies, including actions-setup-cmake
and cibuildwheel.
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:
============
* Default headers (such as "Content-Type", "Date" and "Server") are now stripped
from recorded files regardless of header name case. Previously, responses recorded from
servers that send lowercase header names (for example over HTTP/2) kept these redundant
headers in the generated file.
* Fixed 'query_param_matcher' mutating the caller's params dict when numeric
values are provided.
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Changelog:
============
- Add Latvian language localization
- Add i18n support for naturalsize() and French translation
- Performance improvements: 1.07x - 8.4x
- Lazy imports for Python 3.15+
- Drop experimental Python 3.13 free-threaded
- Refactor: simplify scientific() and extract _SUPERSCRIPT_MAP constant
- Fix naturalsize() rounding rollover at unit boundaries
- Carry metric() to the next SI prefix when rounding reaches 1000
- Stop printing two minus signs in fractional for a negative mixed number
- Return an empty string from natural_list() for an empty list
- Handle tz-aware datetimes in naturalday() and naturaldate()
- Fix Arabic translation
- Fix Spanish large number translations to use long scale
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Changelog:
============
- Ensure we use a safe name for long postgres queue names. PG has a 63 byte
limit on the channel name.
- Ensure recycled worker threads no longer leak their LISTEN connections
w/Postgres.
- Add first-class Postgres support: PostgresHuey. Workers use LISTEN/NOTIFY
when a task is enqueued, giving Redis-like dequeue latency without polling,
and dequeues use select ... for update skip locked so any number of consumers
can share one database (requires psycopg 3.2+).
- The django.tasks backend is now also compatible with the django-tasks
backport package, extending support to pre-6.0 Django.
- Use an explicit fork multiprocessing context for process workers, rather than
setting the global start-method from the consumer entry-points. Fixes -k
process on MacOS 3.8+ / Linux 3.14+ when the consumer is started via the
huey_consumer console-script or a programmatic create_consumer().run().
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Changelog:
===========
- Fix: compute valid ISO 7064 Mod 11,10 check digit for de_DE vat_id
- Add es_MX automotive license plate provider
- Add sr_BA SSN provider
- Update providers job, phone_number, bank and ssn
- Update phone number test regex
- Update outdated Korean locale names
- Fix: prevent infinite recursion in _safe_random_int when both bounds collapse to the same integer
- Add mk_MK (Macedonian) locale
- CI: run PR checks against PR code instead of base branch.
- Fix: raise NotImplementedError in bank() for locales without banks data
- Fix outdated links in README credits section
- Bump actions/cache from 5 to 6
- Bump actions/checkout from 6 to 7
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Changelog:
============
- Fixed the decoder registering 6-byte strings in the string reference
namespace at indices 65536–4294967295 where the encoder does not,
desynchronising the namespace and resolving later string references to the
wrong value
- Fixed the IPv4/IPv6 network decoders (tags 52 and 54) silently truncating an
address byte string that is longer than the address size instead of rejecting
it as malformed
- Fixed quadratic decoding time for indefinite-length and large definite-length
byte and text strings, caused by concatenating each chunk onto the
accumulated result with + instead of building the result once
- Fixed datetime_as_timestamp encoding whole-second datetimes before 1970 or
after 2106 as floats instead of integers, because the timestamp was narrowed
through an unsigned 32-bit integer
- Fixed the encoder measuring text strings by code point count instead of UTF-8
byte length when deciding whether to add them to the string reference
namespace, desynchronising it from the decoder (which counts bytes) and
corrupting later string references for non-ASCII strings
- Fixed the decoder rejecting scoped IPv6 addresses (tag 54) with a
CBORDecodeError reading invalid types in input array; the encoder emits them
as [address, null, zone id] but the decoder only handled the network and
interface array forms, so a scoped ~ipaddress.IPv6Address could not be decoded
back
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Changelog:
===========
- Use defaultdict to help with performance
- Simplify _interleave_addrinfos family grouping
- Collapse collect-then-remove pattern in utils helpers
- Merge identical except blocks in _connect_sock cleanup
- Add python 3.14 support
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Add a new recipe for flaky, plugin for pytest that automatically
reruns flaky tests. It is required by pycurl tests.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Upgrade to release 7.47.0:
- Use dynamic SSL ports in certificate tests
- Harden test_clear_assignment_inside_socket_callback_resets_socketp
test
- Rename index field to idx in HstsIndex to avoid shadowing
- Fix test_callbacks_non_minus_one_return_continues_transfer on macOS
- Use PYCURL_REQUIRE_HANDLE and PYCURL_REQUIRE_NOT_RUNNING instead of
magic numbers
- Convert pycurl to a Python package with the C extension renamed to
pycurl._pycurl
- Fix flaky CONNECT_ONLY send/recv tests by waiting on active socket
readiness instead of sleeping after EAGAIN
- Add PyMutex support on Python 3.13+
- Modernize ssh_key_cb_test and use a local SFTP server
- Use set instead of dict for saving refs to easy objects in multi
- Make closed as property instead a method
- Add free-threaded CPython support
- Add AsyncCurlMulti
- Fix flaky memory_mgmt callback
- Add libcurl strerror wrappers (easy/multi/share/url)
- Modernize write/header tests
- Implement Curl multi notify API
- Pin socket callback tests to IPv4 to handle dual-stack localhost
resolution
- Integrate notify in AsyncCurlMulti
- Review GIL management
- Capture more expected warnings during tests
- Fix/update/remove some examples
- Fix truncated timeout value in multi timer callback
- Fix incorrect argument type in debug callback
- Fix some reference leaks
- Ensure errors are logged in progress/xferinfo callbacks
- Support zero-copy write/header callbacks
- Evolve CurlShare with share()/unshare(), Python-level thread safety,
and CURLSHcode error propagation
- Fix test_default_mode_autopongs_server_ping with libcurl 8.21.0
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Upgrade to release 3.29.6:
- serialise singleton construction in FileLockMeta
- _util: drop the dead st_mtime=0 short-circuit in
raise_on_not_writable_file
- test: silence fork DeprecationWarning on 3.15
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
The upstream tarball fetched from pypi contains `.hash` files like these:
$ cat aiohttp/.hash/hdrs.py.hash
a46ad6c3a2faf8d26a2c6afc1a2210ce379a23f2799fce7b26a01f6ce5a40642 /home/runner/work/aiohttp/aiohttp/aiohttp/hdrs.py
These file trigger the relatively new HOME buildpath check _if_ the recipe
happens to be built by someone with HOME set to /home/runner
(for example someone building in a GitHub workflow):
ERROR: python3-aiohttp-3.14.1-r0 do_package_qa: QA Issue:
File /usr/lib/python3.14/site-packages/aiohttp/.hash/hdrs.py.hash
in package python3-aiohttp contains a reference to the build host HOME directory.
If upstream hardcodes a directory path that matches your home,
you can set OEQA_BUILDPATHS_SKIP = "/home/runner" in the recipe. [buildpaths]
Follow the suggested fix of setting `OEQA_BUILDPATHS_SKIP`.
See also openembedded-core commit ee29a9132a ("oeqa: allow exceptions in
buildpath HOME checks") for an example of `OEQA_BUILDPATHS_SKIP` used.
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
python3-sqlite is required by the NDB code, irrespective of ptest:
File "/usr/lib/python3.14/site-packages/pyroute2/__init__.py", line 31, in <module>
File "/usr/lib/python3.14/site-packages/pyroute2/ipdb/__init__.py", line 16, in <module>
File "/usr/lib/python3.14/site-packages/pyroute2/ndb/main.py", line 317, in <module>
File "/usr/lib/python3.14/site-packages/pyroute2/ndb/task_manager.py", line 9, in <module>
File "/usr/lib/python3.14/site-packages/pyroute2/ndb/schema.py", line 99, in <module>
ModuleNotFoundError: No module named 'sqlite3'
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Inherit ptest and include tests for genson. The PyPI package
omits files for testing so use the GitHub source instead.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Upgrade to release 1.4.0:
- add enum support, activated per node by seed schemas
- Performance: strategy deduplication when defining custom
SchemaBuilder classes is now O(n) instead of O(n2)
- include the complete, runnable test suite in the source
distribution
- Bugfix: fix "noting to do" typo in the CLI error message
and remove dead code
- Docs: document the required-dropping behavior and the
builder-merge gotcha; explain why same-type inputs merge
rather than producing anyOf; add a NoRequiredObject example
for suppressing required
- declare python_requires >= 3.10, matching the tested Python
versions
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Upgrade to release 5.9.0:
- zuul: Use openstack-python3-next-jobs template
- Do not install code to build release notes
- Drop support for Python 3.10
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Upgrade to release 7.15.0:
- Since 7.14.0, reporting commands implicitly combine parallel data
files. Now those commands have a new option --keep-combined to retain
the data files after combining them instead of the default, which is
to delete them.
- Fix: the LCOV report would incorrectly count excluded functions as
uncovered, as described in issue 2205. This is now fixed thanks to
Martin Kuntz Jacobsen.
- When running your program, coverage now correctly sets
yourmodule.__spec__.loader as strongly recommended, avoiding the
deprecation warning.
- Fix: with Python 3.10, running with the -I (isolated mode) option
didn't correctly omit the current directory from the module search
path. That is now fixed thanks to Ilia Sorokin.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>