Update to 3.1.1 (#1783776)
This commit is contained in:
parent
95033b7db0
commit
e4c8578188
1
.gitignore
vendored
1
.gitignore
vendored
@ -22,3 +22,4 @@
|
||||
/Sphinx-2.1.2.tar.gz
|
||||
/Sphinx-2.2.0.tar.gz
|
||||
/Sphinx-2.2.2.tar.gz
|
||||
/Sphinx-3.1.1.tar.gz
|
||||
|
@ -1,41 +0,0 @@
|
||||
From f236cd03e4853fd8b07a307e334c5110a78c1335 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Wieser <wieser.eric@gmail.com>
|
||||
Date: Mon, 27 Apr 2020 14:44:37 +0100
|
||||
Subject: [PATCH] Do not emit type arguments twice
|
||||
|
||||
Fixes gh-7567
|
||||
---
|
||||
sphinx/util/inspect.py | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py
|
||||
index 20af75628..4977af07f 100644
|
||||
--- a/sphinx/util/inspect.py
|
||||
+++ b/sphinx/util/inspect.py
|
||||
@@ -505,8 +505,13 @@ class Signature:
|
||||
qualname = self.format_annotation(annotation.__origin__) # ex. Union
|
||||
elif hasattr(annotation, '__qualname__'):
|
||||
qualname = '%s.%s' % (module, annotation.__qualname__)
|
||||
+ elif hasattr(annotation, '__origin__'):
|
||||
+ # instantiated generic provided by a user
|
||||
+ qualname = self.format_annotation(annotation.__origin__)
|
||||
else:
|
||||
- qualname = repr(annotation)
|
||||
+ # we weren't able to extract the base type, appending arguments would
|
||||
+ # only make them appear twice
|
||||
+ return repr(annotation)
|
||||
|
||||
if getattr(annotation, '__args__', None):
|
||||
if qualname == 'Union':
|
||||
@@ -519,7 +524,7 @@ class Signature:
|
||||
args = ', '.join(self.format_annotation(a) for a in annotation.__args__[:-1])
|
||||
returns = self.format_annotation(annotation.__args__[-1])
|
||||
return '%s[[%s], %s]' % (qualname, args, returns)
|
||||
- elif annotation._special:
|
||||
+ elif getattr(annotation, '_special', False):
|
||||
return qualname
|
||||
else:
|
||||
args = ', '.join(self.format_annotation(a) for a in annotation.__args__)
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,22 +0,0 @@
|
||||
From ffb1ca3aaafe86b6bc44fe28e4000477e97ba3e8 Mon Sep 17 00:00:00 2001
|
||||
From: Takeshi KOMIYA <i.tkomiya@gmail.com>
|
||||
Date: Sat, 18 Apr 2020 19:53:18 +0900
|
||||
Subject: [PATCH] test: Add a docstring to avoid an error on py39a5+
|
||||
|
||||
---
|
||||
tests/roots/test-ext-autodoc/target/__init__.py | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/tests/roots/test-ext-autodoc/target/__init__.py b/tests/roots/test-ext-autodoc/target/__init__.py
|
||||
index e28eeef8a6..b6684ee85b 100644
|
||||
--- a/tests/roots/test-ext-autodoc/target/__init__.py
|
||||
+++ b/tests/roots/test-ext-autodoc/target/__init__.py
|
||||
@@ -145,6 +145,8 @@ def prop2(self):
|
||||
|
||||
|
||||
class StrRepr(str):
|
||||
+ """docstring"""
|
||||
+
|
||||
def __repr__(self):
|
||||
return self
|
||||
|
@ -21,11 +21,11 @@
|
||||
%global upstream_name Sphinx
|
||||
|
||||
Name: python-sphinx
|
||||
%global general_version 2.2.2
|
||||
%global general_version 3.1.1
|
||||
#global prerel ...
|
||||
%global upstream_version %{general_version}%{?prerel}
|
||||
Version: %{general_version}%{?prerel:~%{prerel}}
|
||||
Release: 4%{?dist}
|
||||
Release: 1%{?dist}
|
||||
Epoch: 1
|
||||
Summary: Python documentation generator
|
||||
|
||||
@ -42,13 +42,6 @@ Source0: %{pypi_source %{upstream_name} %{upstream_version}}
|
||||
# which causes that test to fail.
|
||||
Patch1: sphinx-test_theming.diff
|
||||
|
||||
# Backport: test: Add a docstring to avoid an error on py39a5+
|
||||
Patch2: https://github.com/sphinx-doc/sphinx/commit/ffb1ca3a.patch
|
||||
|
||||
# Backport: Do not emit type arguments twice (needed for Python 3.9)
|
||||
# Rebased from https://github.com/sphinx-doc/sphinx/commit/46372726
|
||||
Patch3: 46372726.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
@ -396,6 +389,9 @@ export PATH=%{buildroot}%{_bindir}:$PATH
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Jun 30 2020 Charalampos Stratakis <mhroncok@redhat.com> - 1:3.1.1-1
|
||||
- Update to 3.1.1 (#1783776)
|
||||
|
||||
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1:2.2.2-4
|
||||
- Rebuilt for Python 3.9
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (Sphinx-2.2.2.tar.gz) = 2aaed5980c6fb3bf1a8b2911bbf5d7b8a2d9356e2e9faad58e9ac93e76f76e0c5f40243774553a719dfe982e5e683821545db56142cd8e3db914e97e363124f1
|
||||
SHA512 (Sphinx-3.1.1.tar.gz) = 0c97cab085b1d8152cefde73a7e2116e83426a1ff071c8be9b37ae8e8cf82e9abefacad2cb37a86e1754fbdf57a8dc05ee3041d7dde506fa103babb82c380293
|
||||
|
Loading…
Reference in New Issue
Block a user