From 8809e4a2e7c7590e46d21379944257a955847367 Mon Sep 17 00:00:00 2001 From: icp Date: Wed, 14 Sep 2022 20:53:19 +0530 Subject: [PATCH] python3-freezegun: update to 1.2.2. --- .../patches/fix-upstream-issue-396.patch | 30 +++++++++++++++++++ srcpkgs/python3-freezegun/template | 11 +++---- 2 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/python3-freezegun/patches/fix-upstream-issue-396.patch diff --git a/srcpkgs/python3-freezegun/patches/fix-upstream-issue-396.patch b/srcpkgs/python3-freezegun/patches/fix-upstream-issue-396.patch new file mode 100644 index 000000000000..42642d5a84d2 --- /dev/null +++ b/srcpkgs/python3-freezegun/patches/fix-upstream-issue-396.patch @@ -0,0 +1,30 @@ +From 57d024e4ce2516c55c715448296b9099db68343c Mon Sep 17 00:00:00 2001 +From: Karthikeyan Singaravelan +Date: Fri, 7 May 2021 15:51:33 +0000 +Subject: [PATCH] Fix decorate_class for Python 3.10 where staticmethod is + callable. + +https://github.com/spulec/freezegun/pull/397 (edited by mgorny for more readable indent) +--- + freezegun/api.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/freezegun/api.py b/freezegun/api.py +index cab9ebe..eb3a931 100644 +--- a/freezegun/api.py ++++ b/freezegun/api.py +@@ -598,7 +598,10 @@ class _freeze_time(object): + continue + seen.add(attr) + +- if not callable(attr_value) or inspect.isclass(attr_value): ++ # staticmethods are callable from Python 3.10 . Hence skip them from decoration ++ if (not callable(attr_value) ++ or inspect.isclass(attr_value) ++ or isinstance(attr_value, staticmethod)): + continue + + try: +-- +2.31.1 + diff --git a/srcpkgs/python3-freezegun/template b/srcpkgs/python3-freezegun/template index 1b414a7860d3..7e4d988794de 100644 --- a/srcpkgs/python3-freezegun/template +++ b/srcpkgs/python3-freezegun/template @@ -1,18 +1,19 @@ # Template file for 'python3-freezegun' pkgname=python3-freezegun -version=0.3.15 -revision=3 +version=1.2.2 +revision=1 wrksrc="freezegun-${version}" build_style=python3-module hostmakedepends="python3-setuptools" -depends="python3-six python3-dateutil" -checkdepends="${depends} python3-nose python3-pytest" +depends="python3-dateutil" +checkdepends="${depends} python3-pytest-xdist" short_desc="Let your Python tests travel through time" maintainer="Aluísio Augusto Silva Gonçalves " license="Apache-2.0" homepage="https://github.com/spulec/freezegun" +changelog="https://raw.githubusercontent.com/spulec/freezegun/master/CHANGELOG" distfiles="${PYPI_SITE}/f/freezegun/freezegun-${version}.tar.gz" -checksum=e2062f2c7f95cc276a834c22f1a17179467176b624cc6f936e8bc3be5535ad1b +checksum=cd22d1ba06941384410cd967d8a99d5ae2442f57dfafeff2fda5de8dc5c05446 do_check() { # Timezone needs to be fixed due to