diff mbox series

[meta-python] python3-marshmallow: upgrade 3.20.2 -> 3.21.1 and add ptest

Message ID 20240306063051.127428-1-alperyasinak1@gmail.com
State Accepted
Headers show
Series [meta-python] python3-marshmallow: upgrade 3.20.2 -> 3.21.1 and add ptest | expand

Commit Message

Alper Ak March 6, 2024, 6:30 a.m. UTC
* Upstream provides a pyproject.toml which declares a flit_core.buildapi build backend instead of setuptools.

* Updated runtime dependencies.

* Ptest and library example tested on qemux86-64 and qemuarm64

* Add ptest into PTESTS_SLOW_META_PYTHON

* Upstream, excluded test/mypy_test_cases in the pyproject.toml file. More descriptively,
norecursedirs tells pytest where not to look and tests/mypy_test_cases already defined in it so has been removed from runtime.

	https://github.com/marshmallow-code/marshmallow/blob/df23ad0048b5443346fe47810cda052641558257/pyproject.toml#L89C61-L89C76

License-Update: Removed license year

Ptest result:
==============
qemux86-64:

Testsuite summary
TOTAL: 1228
PASS: 1228
SKIP: 0
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0
DURATION: 56
END: /usr/lib/python3-marshmallow/ptest
2024-03-06T05:33
STOP: ptest-runner
TOTAL: 1 FAIL: 0

qemuarm64:

Testsuite summary
TOTAL: 1228
PASS: 1228
SKIP: 0
XFAIL: 0
FAIL: 0
XPASS: 0
ERROR: 0
DURATION: 51
END: /usr/lib/python3-marshmallow/ptest
2024-03-06T05:28
STOP: ptest-runner
TOTAL: 1 FAIL: 0

=============
Changelog:

3.21.1 (2024-03-04)

Bug fixes:

    Fix error message when field is declared as a class and not an instance (#2245). Thanks @travnick for reporting.

3.21.0 (2024-02-26)

Bug fixes:

    Fix validation of URL fields to allow missing user field, per NWG RFC 3986 (#2232). Thanks @ddennerline3 for reporting and @deckar01 for the PR.

Other changes:

    Backwards-incompatible: __version__, __parsed_version__, and __version_info__ attributes are deprecated (#2227). Use feature detection or importlib.metadata.version("marshmallow") instead.

Signed-off-by: alperak <alperyasinak1@gmail.com>
---
 .../ptest-packagelists-meta-python.inc        |  1 +
 .../python/python3-marshmallow/run-ptest      |  3 ++
 ....20.2.bb => python3-marshmallow_3.21.1.bb} | 37 ++++++++++++++-----
 3 files changed, 31 insertions(+), 10 deletions(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-marshmallow/run-ptest
 rename meta-python/recipes-devtools/python/{python3-marshmallow_3.20.2.bb => python3-marshmallow_3.21.1.bb} (38%)
diff mbox series

Patch

diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc
index 99cae21b2..5d9eb0fa1 100644
--- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
+++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
@@ -77,6 +77,7 @@  PTESTS_FAST_META_PYTHON = "\
 PTESTS_SLOW_META_PYTHON = "\
     python3-arrow \
     python3-lz4 \
+    python3-marshmallow \
     python3-yappi \
 "
 
diff --git a/meta-python/recipes-devtools/python/python3-marshmallow/run-ptest b/meta-python/recipes-devtools/python/python3-marshmallow/run-ptest
new file mode 100644
index 000000000..8d2017d39
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-marshmallow/run-ptest
@@ -0,0 +1,3 @@ 
+#!/bin/sh
+
+pytest --automake
diff --git a/meta-python/recipes-devtools/python/python3-marshmallow_3.20.2.bb b/meta-python/recipes-devtools/python/python3-marshmallow_3.21.1.bb
similarity index 38%
rename from meta-python/recipes-devtools/python/python3-marshmallow_3.20.2.bb
rename to meta-python/recipes-devtools/python/python3-marshmallow_3.21.1.bb
index c08aec5be..5a0a79a54 100644
--- a/meta-python/recipes-devtools/python/python3-marshmallow_3.20.2.bb
+++ b/meta-python/recipes-devtools/python/python3-marshmallow_3.21.1.bb
@@ -3,21 +3,38 @@  DESCRIPTION = "Marshmallow is an ORM/ODM/framework-agnostic library for converti
 HOMEPAGE = "https://github.com/marshmallow-code/marshmallow"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "\
-                    file://LICENSE;md5=653847350fed2e0e7b02791a35b98d59 \
+                    file://LICENSE;md5=27586b20700d7544c06933afe56f7df4 \
                     file://docs/license.rst;md5=13da439ad060419fb7cf364523017cfb"
 
-SRC_URI[sha256sum] = "4c1daff273513dc5eb24b219a8035559dc573c8f322558ef85f5438ddd1236dd"
+SRC_URI[sha256sum] = "4e65e9e0d80fc9e609574b9983cf32579f305c718afb30d7233ab818571768c3"
 
-inherit setuptools3 pypi
+inherit python_flit_core pypi ptest
 
 PIP_INSTALL_PACKAGE = "marshmallow"
 
+SRC_URI += " \
+        file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+        python3-pytest \
+        python3-pytz \
+        python3-simplejson \
+        python3-unittest-automake-output \
+"
+
+do_install_ptest() {
+        install -d ${D}${PTEST_PATH}/tests
+        rm -rf ${S}/tests/mypy_test_cases
+        cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
+
 RDEPENDS:${PN} += " \
-	python3-core \
-	python3-datetime \
-	python3-netclient \
-	python3-numbers \
-	python3-json \
-	python3-pprint \
-	python3-packaging \
+        python3-compression \
+        python3-datetime \
+        python3-email \
+        python3-json \
+        python3-numbers \
+        python3-pprint \
+        python3-packaging \
 "