-
-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #30225: Fix deprecation warnings when unpickling pynac objects w…
…ith Python 3.8 With Python 3.8, unpickling pynac objects gives a deprecation warning {{{ DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats }}} These are fixed in this ticket by defining PY_SSIZE_T_CLEAN where appropriate Upstream pull request: pynac/pynac#354 URL: https://trac.sagemath.org/30225 Reported by: arojas Ticket author(s): Antonio Rojas Reviewer(s): Matthias Koeppe
- Loading branch information
Showing
2 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.7.26.sage-2020-04-03 | ||
0.7.26.sage-2020-04-03.p0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
From 37f3233e7eead521c25f798cab1df5746b9e8708 Mon Sep 17 00:00:00 2001 | ||
From: Antonio Rojas <arojas@archlinux.org> | ||
Date: Sun, 26 Jul 2020 20:04:35 +0200 | ||
Subject: [PATCH 1/2] define PY_SSIZE_T_CLEAN | ||
|
||
As required by python 3.8 | ||
--- | ||
ginac/function.cpp | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/ginac/function.cpp b/ginac/function.cpp | ||
index c158723..689e2b8 100644 | ||
--- a/ginac/function.cpp | ||
+++ b/ginac/function.cpp | ||
@@ -21,6 +21,7 @@ | ||
*/ | ||
|
||
#define register | ||
+#define PY_SSIZE_T_CLEAN | ||
#include <Python.h> | ||
#include "py_funcs.h" | ||
#include "function.h" | ||
|
||
From 0869189faf3899d6aeb07501e16719159f13cb2f Mon Sep 17 00:00:00 2001 | ||
From: Antonio Rojas <arojas@archlinux.org> | ||
Date: Sun, 26 Jul 2020 20:05:19 +0200 | ||
Subject: [PATCH 2/2] define PY_SSIZE_T_CLEAN | ||
|
||
As required by Python 3.8 | ||
--- | ||
ginac/numeric.cpp | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/ginac/numeric.cpp b/ginac/numeric.cpp | ||
index 276d86c..b463806 100644 | ||
--- a/ginac/numeric.cpp | ||
+++ b/ginac/numeric.cpp | ||
@@ -50,6 +50,7 @@ | ||
*/ | ||
|
||
#define register | ||
+#define PY_SSIZE_T_CLEAN | ||
#include <Python.h> | ||
#include <longintrepr.h> | ||
#include "flint/fmpz.h" |