python3-freezegun: Fix ptests with python 3.13
PATCH 1/3 python3-freezegun: Fix ptests with python 3.13
backport a patch with the needed fix
Signed-off-by Khem Raj <[email protected]>
--- ...174bb97c0b514033a09b820078b0d117f4a8.patch | 37 +++++++++++++++++++ .../python/python3-freezegun_1.5.1.bb | 1 + 2 files changed, 38 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-freezegun/1777174bb97c0b514033a09b820078b0d117f4a8.patch
meta-python/recipes-devtools/python/python3-freezegun/1777174bb97c0b514033a09b820078b0d117f4a8.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 1777174bb97c0b514033a09b820078b0d117f4a8 Mon Sep 17 00:00:00 2001 +From: Bert Blommers <[email protected]> +Date: Fri, 28 Jun 2024 19:21:04 +0000 +Subject: [PATCH] Admin: Support Python 3.13 + +Upstream-Status: Backport [https://github.com/spulec/freezegun/pull/550] +Signed-off-by: Khem Raj <[email protected]> +--- + .github/workflows/ci.yaml | 9 ++++++--- + tests/test_datetimes.py | 6 +++--- + 2 files changed, 9 insertions(+), 6 deletions(-) + +diff --git a/tests/test_datetimes.py b/tests/test_datetimes.py +index a6f1989..b75ad3b 100644 +--- a/tests/test_datetimes.py ++++ b/tests/test_datetimes.py +@@ -534,17 +534,17 @@ def test_method_decorator_works_on_unittest(self) -> None: + @freeze_time('2013-04-09', as_kwarg='frozen_time') + def test_method_decorator_works_on_unittest_kwarg_frozen_time(self, frozen_time: Any) -> None: + self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today()) +- self.assertEqual(datetime.date(2013, 4, 9), frozen_time.time_to_freeze.today()) ++ assert frozen_time.time_to_freeze.today().strftime('%Y-%m-%d') == "2013-04-09" + + @freeze_time('2013-04-09', as_kwarg='hello') + def test_method_decorator_works_on_unittest_kwarg_hello(self, **kwargs: Any) -> None: + self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today()) +- self.assertEqual(datetime.date(2013, 4, 9), kwargs.get('hello').time_to_freeze.today()) # type: ignore ++ assert kwargs.get("hello").time_to_freeze.today().strftime('%Y-%m-%d') == "2013-04-09" # type: ignore + + @freeze_time(lambda: datetime.date(year=2013, month=4, day=9), as_kwarg='frozen_time') + def test_method_decorator_works_on_unittest_kwarg_frozen_time_with_func(self, frozen_time: Any) -> None: + self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today()) +- self.assertEqual(datetime.date(2013, 4, 9), frozen_time.time_to_freeze.today()) ++ assert frozen_time.time_to_freeze.today().strftime('%Y-%m-%d') == "2013-04-09" + + + @freeze_time('2013-04-09')
meta-python/recipes-devtools/python/python3-freezegun_1.5.1.bb +1 -0
@@ -9,6 +9,7 @@ inherit pypi python_setuptools_build_meta ptest SRC_URI += " \ file://run-ptest \ + file://1777174bb97c0b514033a09b820078b0d117f4a8.patch \ " RDEPENDS:${PN}-ptest += " \
PATCH 2/3 python3-betamax: Use tip of trunk to support python 3.13
There are several fixes need to get going with python 3.13, therefore switch to git SRC_URI until next release is made
Signed-off-by Khem Raj <[email protected]>
--- .../recipes-devtools/python/python3-betamax_0.9.0.bb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
meta-python/recipes-devtools/python/python3-betamax_0.9.0.bb +7 -2
@@ -3,13 +3,18 @@ HOMEPAGE = "https://github.com/betamaxpy/betamax" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=61c15f0c146c5fb1a8ce8ba2f310d73c" +PV .= "+git" + +SRCREV = "8f3d284103676a43d1481b5cffae96f3a601e0be" SRC_URI += " \ file://run-ptest \ + git://github.com/betamaxpy/betamax;protocol=https;branch=main \ file://0001-Drop-ptests-fixtures-and-recorde_modes.patch \ " -SRC_URI[sha256sum] = "82316e1679bc6879e3c83318d016b54b7c9225ff08c4462de4813e22038d5f94" -inherit pypi setuptools3 ptest +S = "${WORKDIR}/git" + +inherit setuptools3 ptest RDEPENDS:${PN} += " \ python3-requests \
PATCH 3/3 python3-wrapt: Upgrade to 1.17 RC1
In reply to Khem RajIt has all the python 3.13 fixes
Signed-off-by Khem Raj <[email protected]>
---
...{python3-wrapt_1.16.0.bb => python3-wrapt_1.17.0rc1.bb} | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
rename meta-python/recipes-devtools/python/{python3-wrapt_1.16.0.bb => python3-wrapt_1.17.0rc1.bb} (79%)meta-python/recipes-devtools/python/python3-wrapt_1.17.0rc1.bb renamed from meta-python/recipes-devtools/python/python3-wrapt_1.16.0.bb +5 -2
@@ -6,12 +6,15 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=dc34cbad60bc961452eb7ade801d25f7" SRC_URI[sha256sum] = "5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d" -inherit pypi setuptools3 ptest +inherit setuptools3 ptest -SRC_URI += " \ +SRCREV = "75f291f8bf1fe6535b13b0b3dfedca012ca6c8a5" +SRC_URI += "git://github.com/GrahamDumpleton/wrapt;protocol=https;branch=develop \ file://run-ptest \ " +S = "${WORKDIR}/git" + # python3-misc for 'this' module RDEPENDS:${PN}-ptest += " \ python3-misc \