Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-typed-ast for
openSUSE:Factory checked in at 2021-11-21 23:51:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-typed-ast (Old)
and /work/SRC/openSUSE:Factory/.python-typed-ast.new.1895 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-typed-ast"
Sun Nov 21 23:51:45 2021 rev:16 rq:932053 version:1.5.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-typed-ast/python-typed-ast.changes
2021-11-15 15:28:00.121850411 +0100
+++
/work/SRC/openSUSE:Factory/.python-typed-ast.new.1895/python-typed-ast.changes
2021-11-21 23:52:08.302261393 +0100
@@ -1,0 +2,6 @@
+Thu Nov 18 07:30:17 UTC 2021 - Steve Kowalik <[email protected]>
+
+- Add patch use-PyUnicode_DecodeUnicodeEscape.patch:
+ * Use PyUnicode_DecodeUnicodeEscape directly, rather than wrapping it.
+
+-------------------------------------------------------------------
New:
----
use-PyUnicode_DecodeUnicodeEscape.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-typed-ast.spec ++++++
--- /var/tmp/diff_new_pack.3mbJ86/_old 2021-11-21 23:52:08.762259910 +0100
+++ /var/tmp/diff_new_pack.3mbJ86/_new 2021-11-21 23:52:08.762259910 +0100
@@ -26,6 +26,7 @@
Group: Development/Languages/Python
URL: https://github.com/python/typed_ast
Source0:
https://files.pythonhosted.org/packages/source/t/typed_ast/typed_ast-%{version}.tar.gz
+Patch0: use-PyUnicode_DecodeUnicodeEscape.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
@@ -45,6 +46,7 @@
%prep
%setup -q -n typed_ast-%{version}
+%autopatch -p1
%build
export CFLAGS="%{optflags}"
++++++ use-PyUnicode_DecodeUnicodeEscape.patch ++++++
>From 3ba83b4933dcebc886e67aa40d51c0a1678c93e9 Mon Sep 17 00:00:00 2001
From: Sebastian Rittau <[email protected]>
Date: Wed, 10 Nov 2021 19:19:14 +0100
Subject: [PATCH] Use PyUnicode_DecodeUnicodeEscape directly
---
ast3/Python/ast.c | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/ast3/Python/ast.c b/ast3/Python/ast.c
index 60b8fdd..eb7d764 100644
--- a/ast3/Python/ast.c
+++ b/ast3/Python/ast.c
@@ -58,16 +58,6 @@ _PyBytes_DecodeEscape(const char *s,
#endif
-PyObject *
-_PyUnicode_DecodeUnicodeEscape(const char *s,
- Py_ssize_t size,
- const char *errors,
- const char **first_invalid_escape)
-{
- *first_invalid_escape = NULL;
- return PyUnicode_DecodeUnicodeEscape(s, size, errors);
-}
-
static int validate_stmts(asdl_seq *);
static int validate_exprs(asdl_seq *, expr_context_ty, int);
static int validate_nonempty_seq(asdl_seq *, const char *, const char *);
@@ -4461,7 +4451,6 @@ decode_unicode_with_escapes(struct compiling *c, const
node *n, const char *s,
char *buf;
char *p;
const char *end;
- const char *first_invalid_escape;
/* check for integer overflow */
if (len > SIZE_MAX / 6)
@@ -4511,17 +4500,8 @@ decode_unicode_with_escapes(struct compiling *c, const
node *n, const char *s,
len = p - buf;
s = buf;
- v = _PyUnicode_DecodeUnicodeEscape(s, len, NULL, &first_invalid_escape);
+ v = PyUnicode_DecodeUnicodeEscape(s, len, NULL);
- if (v != NULL && first_invalid_escape != NULL) {
- if (warn_invalid_escape_sequence(c, n, *first_invalid_escape) < 0) {
- /* We have not decref u before because first_invalid_escape points
- inside u. */
- Py_XDECREF(u);
- Py_DECREF(v);
- return NULL;
- }
- }
Py_XDECREF(u);
return v;
}