summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-12-21 10:16:09 +0100
committerMichał Górny <mgorny@gentoo.org>2020-12-21 10:29:35 +0100
commit8ca3b6b71e0fee3c037ee436f541995726ea6bae (patch)
treecfd481ede4f416c5f8d20581a6a61799597dc885 /dev-python/backports-zoneinfo
parentdev-python/denonavr: Bump to 0.9.9 (diff)
downloadgentoo-8ca3b6b71e0fee3c037ee436f541995726ea6bae.tar.gz
gentoo-8ca3b6b71e0fee3c037ee436f541995726ea6bae.tar.bz2
gentoo-8ca3b6b71e0fee3c037ee436f541995726ea6bae.zip
dev-python/backports-zoneinfo: Backport segv fix for py3.8.7rc1+
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/backports-zoneinfo')
-rw-r--r--dev-python/backports-zoneinfo/backports-zoneinfo-0.2.1-r1.ebuild (renamed from dev-python/backports-zoneinfo/backports-zoneinfo-0.2.1.ebuild)6
-rw-r--r--dev-python/backports-zoneinfo/files/backports-zoneinfo-0.2.1-py38.patch22
2 files changed, 28 insertions, 0 deletions
diff --git a/dev-python/backports-zoneinfo/backports-zoneinfo-0.2.1.ebuild b/dev-python/backports-zoneinfo/backports-zoneinfo-0.2.1-r1.ebuild
index 29e10ab9d793..77b7ae5c51dc 100644
--- a/dev-python/backports-zoneinfo/backports-zoneinfo-0.2.1.ebuild
+++ b/dev-python/backports-zoneinfo/backports-zoneinfo-0.2.1-r1.ebuild
@@ -38,6 +38,12 @@ BDEPEND="
# pytest-subtests
distutils_enable_tests unittest
+PATCHES=(
+ # fix segv in py3.8.7rc1+
+ # https://github.com/pganssle/zoneinfo/pull/97
+ "${FILESDIR}"/${P}-py38.patch
+)
+
python_test() {
if [[ ${EPYTHON} == pypy3 ]]; then
# pypy3.6 does not support dataclasses, and the backport
diff --git a/dev-python/backports-zoneinfo/files/backports-zoneinfo-0.2.1-py38.patch b/dev-python/backports-zoneinfo/files/backports-zoneinfo-0.2.1-py38.patch
new file mode 100644
index 000000000000..dbe9695a9a53
--- /dev/null
+++ b/dev-python/backports-zoneinfo/files/backports-zoneinfo-0.2.1-py38.patch
@@ -0,0 +1,22 @@
+From 0e42cc3999b4e3833b5f3f41857b8c1e3c9143f3 Mon Sep 17 00:00:00 2001
+From: Pablo Galindo <pablogsal@gmail.com>
+Date: Mon, 21 Dec 2020 02:02:34 +0000
+Subject: [PATCH] Decrement the refcount of _PyLong_One in the correct branch
+
+---
+ lib/zoneinfo_module.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/zoneinfo_module.c b/lib/zoneinfo_module.c
+index e0c72d3..07ef603 100644
+--- a/lib/zoneinfo_module.c
++++ b/lib/zoneinfo_module.c
+@@ -616,7 +616,7 @@ zoneinfo_fromutc(PyObject *obj_self, PyObject *dt)
+ Py_DECREF(args);
+ Py_DECREF(kwargs);
+ Py_DECREF(replace);
+-#ifndef ATLEAST_37
++#ifdef ATLEAST_37
+ Py_DECREF(one);
+ #endif
+