Skip to content
Snippets Groups Projects
Commit 56f689af authored by Dima Panov's avatar Dima Panov
Browse files

devel/py-backports.zoneinfo: unbreak build with py310+ (+)

We already have Python 3.7 as minimal supported release, so
force #ifdef's for 3.7+ API as always positive to prevent use deprecated types

While here, port upstream patch for MR#97 (https://github.com/pganssle/zoneinfo/pull/97)
"Decrement the refcount of _PyLong_One in the correct branch"
parent f6233d74
No related branches found
No related tags found
No related merge requests found
PORTNAME= backports.zoneinfo
DISTVERSION= 0.2.1
PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
......@@ -10,7 +11,9 @@ COMMENT= Backport of the standard library module zoneinfo
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= python:3.7-3.9
USES= python:3.7+
USE_PYTHON= autoplist concurrent distutils
# We already have Python 3.7 as minimal supported release, force positive checks
CFLAGS+= -DATLEAST_37
.include <bsd.port.mk>
--- lib/zoneinfo_module.c.orig 2020-06-23 13:47:53 UTC
+++ lib/zoneinfo_module.c
@@ -617,7 +617,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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment