forked from pool/python-astunparse
- add fix-formatted-value.patch
- skip tests on 32bit platforms OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-astunparse?expand=0&rev=12
This commit is contained in:
23
fix-formatted-value.patch
Normal file
23
fix-formatted-value.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
From 3c661cb35b62268a553dd548a73178b5d7f708c7 Mon Sep 17 00:00:00 2001
|
||||
From: Vincent Hellendoorn <vhellendoorn@live.nl>
|
||||
Date: Tue, 29 Sep 2020 14:11:11 -0400
|
||||
Subject: [PATCH] Use correct write call for FormattedValue
|
||||
|
||||
The unparser for formatted values incorrectly referred to `_fstring_JoinedStr`, which expects a `values` property that `FormattedValue`s don't have. This PR updates to the correct call.
|
||||
---
|
||||
lib/astunparse/unparser.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/astunparse/unparser.py b/lib/astunparse/unparser.py
|
||||
index 0ef6fd8..7e8c1ca 100644
|
||||
--- a/lib/astunparse/unparser.py
|
||||
+++ b/lib/astunparse/unparser.py
|
||||
@@ -482,7 +482,7 @@ def _FormattedValue(self, t):
|
||||
# FormattedValue(expr value, int? conversion, expr? format_spec)
|
||||
self.write("f")
|
||||
string = StringIO()
|
||||
- self._fstring_JoinedStr(t, string.write)
|
||||
+ self._fstring_FormattedValue(t, string.write)
|
||||
self.write(repr(string.getvalue()))
|
||||
|
||||
def _fstring_JoinedStr(self, t, write):
|
||||
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 16 22:39:53 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add fix-formatted-value.patch
|
||||
- skip tests on 32bit platforms
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 05:23:39 UTC 2021 - pgajdos@suse.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-astunparse
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -27,6 +27,8 @@ URL: https://github.com/simonpercivall/astunparse
|
||||
Source: https://files.pythonhosted.org/packages/source/a/astunparse/astunparse-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM astunparse-pr57-py39.patch -- gh#simonpercivall/astunparse#57
|
||||
Patch0: astunparse-pr57-py39.patch
|
||||
# https://github.com/simonpercivall/astunparse/pull/59
|
||||
Patch1: fix-formatted-value.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module six >= 1.6.1}
|
||||
BuildRequires: %{python_module wheel >= 0.23.0}
|
||||
@@ -61,7 +63,10 @@ Added to this is a pretty-printing dump utility function.
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
# fails to parse the 32bit stdlib
|
||||
%ifnarch %ix86 %arm32
|
||||
%pyunittest discover -v
|
||||
%endif
|
||||
|
||||
%files %{python_files}
|
||||
%doc AUTHORS.rst README.rst HISTORY.rst
|
||||
|
||||
Reference in New Issue
Block a user