Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package micropython for openSUSE:Leap:16.0 checked in at 2025-04-07 13:58:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:16.0/micropython (Old) and /work/SRC/openSUSE:Leap:16.0/.micropython.new.1907 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "micropython" Mon Apr 7 13:58:22 2025 rev:2 rq:1267548 version:1.24.1 Changes: -------- --- /work/SRC/openSUSE:Leap:16.0/micropython/micropython.changes 2025-03-19 11:51:19.297285378 +0100 +++ /work/SRC/openSUSE:Leap:16.0/.micropython.new.1907/micropython.changes 2025-04-07 13:58:38.757691988 +0200 @@ -1,0 +2,10 @@ +Mon Mar 17 12:24:36 UTC 2025 - Dominik Heidler <dheid...@suse.de> + +- Add fix_re_sub_test_on_python3.13.patch to fix re_sub test + +------------------------------------------------------------------- +Tue Feb 18 11:48:17 UTC 2025 - Dominik Heidler <dheid...@suse.de> + +- Add subpackage mpy-tools which contains mpy-cross and mpy-tool + +------------------------------------------------------------------- New: ---- fix_re_sub_test_on_python3.13.patch BETA DEBUG BEGIN: New: - Add fix_re_sub_test_on_python3.13.patch to fix re_sub test BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ micropython.spec ++++++ --- /var/tmp/diff_new_pack.JodMXp/_old 2025-04-07 13:58:39.577726339 +0200 +++ /var/tmp/diff_new_pack.JodMXp/_new 2025-04-07 13:58:39.581726507 +0200 @@ -26,6 +26,7 @@ License: MIT URL: https://micropython.org/ Source: https://micropython.org/resources/source/%{name}-%{version}.tar.xz +Patch1: fix_re_sub_test_on_python3.13.patch BuildRequires: openssl BuildRequires: pkgconfig BuildRequires: python3 @@ -47,6 +48,11 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros +%package -n mpy-tools +Summary: Tools for creating and handling precompiled .mpy files for MicroPython +Provides: mpy-cross +Provides: mpy-tool + %description A lean and efficient Python implementation for microcontrollers and constrained systems @@ -54,6 +60,10 @@ This CLI tool provides an integrated set of utilities to remotely interact with and automate a MicroPython device over a serial connection. +%description -n mpy-tools +MicroPython tools like the mpy-cross compiler for compiling.py files to .mpy files. +Also mpy-tool for inspecting .mpy files. + %prep %autosetup -p1 @@ -62,6 +72,7 @@ %define make_flags V=1 MICROPY_PY_BTREE=0 MICROPY_PY_USSL=0 %build +# micropython export CFLAGS="%optflags -Wno-dangling-pointer" %make_build -C mpy-cross %make_build -C ports/unix STRIP=true @@ -75,16 +86,23 @@ popd %install +# micropython install -d %{buildroot}%{_bindir} install -t %{buildroot}%{_bindir} ports/unix/build-standard/micropython + +# mpremote pushd tools/mpremote %pyproject_install popd -%python3_fix_shebang %python_expand %fdupes %{buildroot}%{$python_sitelib} # remove pycache to get rid of rpmlint "W: python-bytecode-inconsistent-mtime" warnings %python_expand rm -rf %{buildroot}%{$python_sitelib}/mpremote/__pycache__ +# mpy-tools +install -m755 -D -v mpy-cross/build/mpy-cross %{buildroot}%{_bindir}/mpy-cross +install -m755 -D -v tools/mpy-tool.py %{buildroot}%{_bindir}/mpy-tool +%python3_fix_shebang + %check %ifnarch x86_64 # 2 tests fail: float_parse float_parse_doubleprec @@ -107,3 +125,9 @@ %{_prefix}/lib/python%{python_version}/site-packages/mpremote-%{version}.dist-info %{_bindir}/mpremote +%files -n mpy-tools +%doc mpy-cross/README.md +%license LICENSE +%{_bindir}/mpy-cross +%{_bindir}/mpy-tool + ++++++ fix_re_sub_test_on_python3.13.patch ++++++ >From e73cf71a246ee456aac0f4d16167e0856846db6b Mon Sep 17 00:00:00 2001 From: Alessandro Gatti <a.ga...@frob.it> Date: Sat, 4 Jan 2025 15:00:28 +0100 Subject: [PATCH] tests/extmod/re_sub.py: Fix test execution on Python 3.13. This commit fixes a test failure for `extmod/re_sub.py` where the code, whilst being correct, would not make the test pass due to a newer Python version than expected. On Python 3.13, running `tests/extmod/re_sub.py` would yield a deprecation warning about `re.sub` not providing the match count as a keyword parameter. This warning would be embedded in the expected test result and thus the test would always fail. Co-authored-by: stijn <st...@ignitron.net> Signed-off-by: Alessandro Gatti <a.ga...@frob.it> --- tests/extmod/re_sub.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/extmod/re_sub.py b/tests/extmod/re_sub.py index 2c7c6c10f1a49..ecaa66d83d8a7 100644 --- a/tests/extmod/re_sub.py +++ b/tests/extmod/re_sub.py @@ -10,6 +10,8 @@ print("SKIP") raise SystemExit +import sys + def multiply(m): return str(int(m.group(0)) * 2) @@ -47,7 +49,11 @@ def A(): print(re.sub("a", "b", "c")) # with maximum substitution count specified -print(re.sub("a", "b", "1a2a3a", 2)) +if sys.implementation.name != "micropython": + # On CPython 3.13 and later the substitution count must be a keyword argument. + print(re.sub("a", "b", "1a2a3a", count=2)) +else: + print(re.sub("a", "b", "1a2a3a", 2)) # invalid group try: