View | Details | Raw Unified | Return to bug 257116 | Differences between
and this patch

Collapse All | Expand All

(-)b/biology/py-orange3-single-cell/files/patch-doc_conf.py (+10 lines)
Added Link Here
1
# add_stylesheet() deprecated on Sphinx 4.0
2
# https://www.sphinx-doc.org/en/master/extdev/deprecated.html
3
--- doc/conf.py.orig	2018-10-15 08:43:14 UTC
4
+++ doc/conf.py
5
@@ -288,4 +288,4 @@ texinfo_documents = [
6
 #texinfo_no_detailmenu = False
7
 
8
 def setup(app):
9
-    app.add_stylesheet('style.css')
10
+    app.add_css_file('style.css')
(-)b/deskutils/py-paperless/files/patch-docs_conf.py (+13 lines)
Added Link Here
1
# add_stylesheet() deprecated on Sphinx 4.0
2
# https://www.sphinx-doc.org/en/master/extdev/deprecated.html
3
--- docs/conf.py.orig	2019-01-27 13:48:05 UTC
4
+++ docs/conf.py
5
@@ -21,7 +21,7 @@ exec(open("../src/paperless/version.py").read())
6
 
7
 # Believe it or not, this is the officially sanctioned way to add custom CSS.
8
 def setup(app):
9
-    app.add_stylesheet("custom.css")
10
+    app.add_css_file("custom.css")
11
 
12
 # If extensions (or modules to document with autodoc) are in another directory,
13
 # add these directories to sys.path here. If the directory is relative to the
(-)b/lang/asis/files/patch-doc_share_conf.py (+40 lines)
Added Link Here
1
--- doc/share/conf.py.orig	2016-03-31 12:55:10 UTC
2
+++ doc/share/conf.py
3
@@ -40,17 +40,17 @@ def get_gnat_version():
4
             line = (vinfo.readline()).strip()
5
             return line
6
     except:
7
-        print 'Error opening or reading version_information file'
8
+        print('Error opening or reading version_information file')
9
         sys.exit(1)
10
 
11
 # First retrieve the name of the documentation we are building
12
 doc_name = os.environ.get('DOC_NAME', None)
13
 if doc_name is None:
14
-    print 'DOC_NAME environment variable should be set'
15
+    print('DOC_NAME environment variable should be set')
16
     sys.exit(1)
17
 
18
 if doc_name not in DOCS:
19
-    print '%s is not a valid documentation name' % doc_name
20
+    print(f'{doc_name} is not a valid documentation name')
21
     sys.exit(1)
22
 
23
 
24
@@ -59,7 +59,7 @@ exclude_patterns = []
25
 for d in os.listdir(root_source_dir):
26
     if d not in ('share', doc_name, doc_name + '.rst'):
27
         exclude_patterns.append(d)
28
-        print 'ignoring %s' % d
29
+        print(f'ignoring {d}')
30
 
31
 extensions = []
32
 templates_path = ['_templates']
33
@@ -101,5 +101,5 @@ texinfo_documents = [
34
 
35
 
36
 def setup(app):
37
-    app.add_lexer('ada', ada_pygments.AdaLexer())
38
-    app.add_lexer('gpr', ada_pygments.GNATProjectLexer())
39
+    app.add_lexer('ada', ada_pygments.AdaLexer)
40
+    app.add_lexer('gpr', ada_pygments.GNATProjectLexer)
(-)b/math/sage/Makefile (-1 / +1 lines)
Lines 96-102 BUILD_DEPENDS= bash:shells/bash \ Link Here
96
		${PYTHON_PKGNAMEPREFIX}simplegeneric>0:devel/py-simplegeneric@${PY_FLAVOR}\
96
		${PYTHON_PKGNAMEPREFIX}simplegeneric>0:devel/py-simplegeneric@${PY_FLAVOR}\
97
		${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR}\
97
		${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR}\
98
		${PYTHON_PKGNAMEPREFIX}snowballstemmer>0:textproc/py-snowballstemmer@${PY_FLAVOR}\
98
		${PYTHON_PKGNAMEPREFIX}snowballstemmer>0:textproc/py-snowballstemmer@${PY_FLAVOR}\
99
		${PYTHON_PKGNAMEPREFIX}sphinx>0:textproc/py-sphinx@${PY_FLAVOR}\
99
		${PYTHON_PKGNAMEPREFIX}sphinx3>0:textproc/py-sphinx3@${PY_FLAVOR}\
100
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-applehelp>0:textproc/py-sphinxcontrib-applehelp@${PY_FLAVOR}\
100
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-applehelp>0:textproc/py-sphinxcontrib-applehelp@${PY_FLAVOR}\
101
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-devhelp>0:textproc/py-sphinxcontrib-devhelp@${PY_FLAVOR}\
101
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-devhelp>0:textproc/py-sphinxcontrib-devhelp@${PY_FLAVOR}\
102
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-htmlhelp>0:textproc/py-sphinxcontrib-htmlhelp@${PY_FLAVOR}\
102
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-htmlhelp>0:textproc/py-sphinxcontrib-htmlhelp@${PY_FLAVOR}\
(-)b/textproc/Makefile (+1 lines)
Lines 1460-1465 Link Here
1460
    SUBDIR += py-sphinx-markdown-tables
1460
    SUBDIR += py-sphinx-markdown-tables
1461
    SUBDIR += py-sphinx-me
1461
    SUBDIR += py-sphinx-me
1462
    SUBDIR += py-sphinx-tabs
1462
    SUBDIR += py-sphinx-tabs
1463
    SUBDIR += py-sphinx3
1463
    SUBDIR += py-sphinx_press_theme
1464
    SUBDIR += py-sphinx_press_theme
1464
    SUBDIR += py-sphinx_rtd_theme
1465
    SUBDIR += py-sphinx_rtd_theme
1465
    SUBDIR += py-sphinx_wikipedia
1466
    SUBDIR += py-sphinx_wikipedia
(-)b/textproc/castxml/files/patch-doc_conf.py.in (+11 lines)
Added Link Here
1
--- doc/conf.py.in.orig	2018-11-15 20:05:42 UTC
2
+++ doc/conf.py.in
3
@@ -52,7 +52,7 @@ for fpath in castxml_manuals:
4
                               name, desc, [], int(sec)))
5
         else:
6
             sys.stderr.write("ERROR: No castxml-manual-description in '%s'\n" % fpath)
7
-    except Exception, e:
8
+    except Exception as e:
9
         sys.stderr.write("ERROR: %s\n" % str(e))
10
 man_show_urls = False
11
 
(-)b/textproc/py-rstfmt/Makefile (+2 lines)
Lines 10-15 LICENSE= MIT Link Here
10
LICENSE_FILE=	${WRKSRC}/LICENSE
10
LICENSE_FILE=	${WRKSRC}/LICENSE
11
11
12
# Sphinix should be < 4.0 for now: https://github.com/dzhu/rstfmt/issues/12
12
# Sphinix should be < 4.0 for now: https://github.com/dzhu/rstfmt/issues/12
13
BROKEN=	Doesn't work with Sphinx 4 or greater
14
13
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}aiohttp>=3.3.2:www/py-aiohttp@${PY_FLAVOR} \
15
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}aiohttp>=3.3.2:www/py-aiohttp@${PY_FLAVOR} \
14
		${PYTHON_PKGNAMEPREFIX}black>=19.10b0:devel/py-black@${PY_FLAVOR} \
16
		${PYTHON_PKGNAMEPREFIX}black>=19.10b0:devel/py-black@${PY_FLAVOR} \
15
		${PYTHON_PKGNAMEPREFIX}sphinx>=2.4.0,1<4.0,1:textproc/py-sphinx@${PY_FLAVOR}
17
		${PYTHON_PKGNAMEPREFIX}sphinx>=2.4.0,1<4.0,1:textproc/py-sphinx@${PY_FLAVOR}
(-)b/textproc/py-sphinx/Makefile (-7 / +6 lines)
Lines 1-8 Link Here
1
# Created by: Li-Wen Hsu <lwhsu@FreeBSD.org>
1
# Created by: Li-Wen Hsu <lwhsu@FreeBSD.org>
2
2
3
PORTNAME=	sphinx
3
PORTNAME=	sphinx
4
PORTVERSION=	3.5.2
4
PORTVERSION=	4.3.1
5
PORTREVISION=	1
6
PORTEPOCH=	1
5
PORTEPOCH=	1
7
CATEGORIES=	textproc python
6
CATEGORIES=	textproc python
8
MASTER_SITES=	CHEESESHOP
7
MASTER_SITES=	CHEESESHOP
Lines 22-33 LICENSE_FILE= ${WRKSRC}/LICENSE Link Here
22
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sphinxcontrib-applehelp>=0:textproc/py-sphinxcontrib-applehelp@${PY_FLAVOR} \
21
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sphinxcontrib-applehelp>=0:textproc/py-sphinxcontrib-applehelp@${PY_FLAVOR} \
23
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-devhelp>=0:textproc/py-sphinxcontrib-devhelp@${PY_FLAVOR} \
22
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-devhelp>=0:textproc/py-sphinxcontrib-devhelp@${PY_FLAVOR} \
24
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-jsmath>=0:textproc/py-sphinxcontrib-jsmath@${PY_FLAVOR} \
23
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-jsmath>=0:textproc/py-sphinxcontrib-jsmath@${PY_FLAVOR} \
25
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-htmlhelp>=0:textproc/py-sphinxcontrib-htmlhelp@${PY_FLAVOR} \
24
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-htmlhelp>=2.0.0:textproc/py-sphinxcontrib-htmlhelp@${PY_FLAVOR} \
26
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-serializinghtml>=0:textproc/py-sphinxcontrib-serializinghtml@${PY_FLAVOR} \
25
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-serializinghtml>=1.1.5:textproc/py-sphinxcontrib-serializinghtml@${PY_FLAVOR} \
27
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-qthelp>=0:textproc/py-sphinxcontrib-qthelp@${PY_FLAVOR} \
26
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-qthelp>=0:textproc/py-sphinxcontrib-qthelp@${PY_FLAVOR} \
28
		${PYTHON_PKGNAMEPREFIX}Jinja2>=2.3:devel/py-Jinja2@${PY_FLAVOR} \
27
		${PYTHON_PKGNAMEPREFIX}Jinja2>=2.3:devel/py-Jinja2@${PY_FLAVOR} \
29
		${PYTHON_PKGNAMEPREFIX}pygments>=2.0:textproc/py-pygments@${PY_FLAVOR} \
28
		${PYTHON_PKGNAMEPREFIX}pygments>=2.0:textproc/py-pygments@${PY_FLAVOR} \
30
		${PYTHON_PKGNAMEPREFIX}docutils>=0.12:textproc/py-docutils@${PY_FLAVOR} \
29
		${PYTHON_PKGNAMEPREFIX}docutils>=0.14<0.18,1:textproc/py-docutils@${PY_FLAVOR} \
31
		${PYTHON_PKGNAMEPREFIX}snowballstemmer>=1.1:textproc/py-snowballstemmer@${PY_FLAVOR} \
30
		${PYTHON_PKGNAMEPREFIX}snowballstemmer>=1.1:textproc/py-snowballstemmer@${PY_FLAVOR} \
32
		${PYTHON_PKGNAMEPREFIX}Babel>=1.3:devel/py-babel@${PY_FLAVOR} \
31
		${PYTHON_PKGNAMEPREFIX}Babel>=1.3:devel/py-babel@${PY_FLAVOR} \
33
		${PYTHON_PKGNAMEPREFIX}alabaster>=0.7<0.8:textproc/py-alabaster@${PY_FLAVOR} \
32
		${PYTHON_PKGNAMEPREFIX}alabaster>=0.7<0.8:textproc/py-alabaster@${PY_FLAVOR} \
Lines 45-51 TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest-cov>=0:devel/py-pytest-cov@${PY_FLAV Link Here
45
USES=		python:3.5+
44
USES=		python:3.5+
46
USE_PYTHON=	autoplist distutils concurrent
45
USE_PYTHON=	autoplist distutils concurrent
47
46
48
CONFLICTS_INSTALL=	py*-sphinx18
47
CONFLICTS_INSTALL=	py*-sphinx3
49
48
50
NO_ARCH=	yes
49
NO_ARCH=	yes
51
50
Lines 53-58 NO_ARCH= yes Link Here
53
EXTRACT_CMD=	${SETENV} LC_ALL=en_US.UTF-8 /usr/bin/bsdtar
52
EXTRACT_CMD=	${SETENV} LC_ALL=en_US.UTF-8 /usr/bin/bsdtar
54
53
55
do-test:
54
do-test:
56
	@cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs -o addopts=
55
	@cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs -o addopts= -k 'not test_ext_imgconverter'
57
56
58
.include <bsd.port.mk>
57
.include <bsd.port.mk>
(-)b/textproc/py-sphinx/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1615136512
1
TIMESTAMP = 1639451734
2
SHA256 (python/Sphinx-3.5.2.tar.gz) = 672cfcc24b6b69235c97c750cb190a44ecd72696b4452acaf75c2d9cc78ca5ff
2
SHA256 (python/Sphinx-4.3.1.tar.gz) = 32a5b3e9a1b176cc25ed048557d4d3d01af635e6b76c5bc7a43b0a34447fbd45
3
SIZE (python/Sphinx-3.5.2.tar.gz) = 5907358
3
SIZE (python/Sphinx-4.3.1.tar.gz) = 6655951
(-)a/textproc/py-sphinx/files/patch-sphinx_util_typing.py (-58 lines)
Removed Link Here
1
From 8b2031c747e7c7e6b845ee2e3db47de617d33cc6 Mon Sep 17 00:00:00 2001
2
From: Takeshi KOMIYA <i.tkomiya@gmail.com>
3
Date: Fri, 30 Jul 2021 01:27:38 +0900
4
Subject: [PATCH] Fix #9512: sphinx-build: crashed with the HEAD of Python 3.10
5
6
Recently, `types.Union` was renamed to `types.UnionType` on the HEAD
7
of 3.10 (refs: python/cpython#27342). After this change, sphinx-build
8
has been crashed because of ImportError.
9
--- CHANGES.orig	2021-03-06 11:59:38 UTC
10
+++ CHANGES
11
@@ -419,6 +419,8 @@ Bugs fixed
12
 * #6914: figure numbers are unexpectedly assigned to uncaptioned items
13
 * #8320: make "inline" line numbers un-selectable
14
 
15
+* #9512: sphinx-build: crashed with the HEAD of Python 3.10
16
+
17
 Testing
18
 --------
19
 
20
 CHANGES               |  2 ++
21
 sphinx/util/typing.py | 12 ++++++------
22
 2 files changed, 8 insertions(+), 6 deletions(-)
23
24
--- sphinx/util/typing.py.orig	2021-03-06 11:58:24 UTC
25
+++ sphinx/util/typing.py
26
@@ -30,10 +30,10 @@ else:
27
             ref = _ForwardRef(self.arg)
28
             return ref._eval_type(globalns, localns)
29
 
30
-if sys.version_info > (3, 10):
31
-    from types import Union as types_Union
32
-else:
33
-    types_Union = None
34
+try:
35
+    from types import UnionType  # type: ignore  # python 3.10 or above
36
+except ImportError:
37
+    UnionType = None
38
 
39
 if False:
40
     # For type annotation
41
@@ -107,7 +107,7 @@ def restify(cls: Optional["Type"]) -> str:
42
         return ':class:`struct.Struct`'
43
     elif inspect.isNewType(cls):
44
         return ':class:`%s`' % cls.__name__
45
-    elif types_Union and isinstance(cls, types_Union):
46
+    elif UnionType and isinstance(cls, UnionType):
47
         if len(cls.__args__) > 1 and None in cls.__args__:
48
             args = ' | '.join(restify(a) for a in cls.__args__ if a)
49
             return 'Optional[%s]' % args
50
@@ -349,7 +349,7 @@ def _stringify_py37(annotation: Any) -> str:
51
     elif hasattr(annotation, '__origin__'):
52
         # instantiated generic provided by a user
53
         qualname = stringify(annotation.__origin__)
54
-    elif types_Union and isinstance(annotation, types_Union):  # types.Union (for py3.10+)
55
+    elif UnionType and isinstance(annotation, UnionType):  # types.Union (for py3.10+)
56
         qualname = 'types.Union'
57
     else:
58
         # we weren't able to extract the base type, appending arguments would
(-)b/textproc/py-sphinx3/Makefile (+60 lines)
Added Link Here
1
# Created by: Li-Wen Hsu <lwhsu@FreeBSD.org>
2
3
PORTNAME=	sphinx
4
PORTVERSION=	3.5.2
5
PORTEPOCH=	1
6
CATEGORIES=	textproc python
7
MASTER_SITES=	CHEESESHOP
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
9
PKGNAMESUFFIX=	3
10
DISTNAME=	Sphinx-${PORTVERSION}
11
DIST_SUBDIR=	python
12
13
# NOTE: before committing to this port, contact portmgr to arrange for an
14
# experimental ports run.  Untested commits may be backed out at portmgr's
15
# discretion.
16
MAINTAINER=	python@FreeBSD.org
17
COMMENT=	Python documentation generator
18
19
LICENSE=	BSD2CLAUSE
20
LICENSE_FILE=	${WRKSRC}/LICENSE
21
22
DEPRECATED=	Sphinx 3 is deprecated, consider using textproc/py-sphinx
23
24
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sphinxcontrib-applehelp>=0:textproc/py-sphinxcontrib-applehelp@${PY_FLAVOR} \
25
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-devhelp>=0:textproc/py-sphinxcontrib-devhelp@${PY_FLAVOR} \
26
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-jsmath>=0:textproc/py-sphinxcontrib-jsmath@${PY_FLAVOR} \
27
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-htmlhelp>=0:textproc/py-sphinxcontrib-htmlhelp@${PY_FLAVOR} \
28
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-serializinghtml>=0:textproc/py-sphinxcontrib-serializinghtml@${PY_FLAVOR} \
29
		${PYTHON_PKGNAMEPREFIX}sphinxcontrib-qthelp>=0:textproc/py-sphinxcontrib-qthelp@${PY_FLAVOR} \
30
		${PYTHON_PKGNAMEPREFIX}Jinja2>=2.3:devel/py-Jinja2@${PY_FLAVOR} \
31
		${PYTHON_PKGNAMEPREFIX}pygments>=2.0:textproc/py-pygments@${PY_FLAVOR} \
32
		${PYTHON_PKGNAMEPREFIX}docutils>=0.12:textproc/py-docutils@${PY_FLAVOR} \
33
		${PYTHON_PKGNAMEPREFIX}snowballstemmer>=1.1:textproc/py-snowballstemmer@${PY_FLAVOR} \
34
		${PYTHON_PKGNAMEPREFIX}Babel>=1.3:devel/py-babel@${PY_FLAVOR} \
35
		${PYTHON_PKGNAMEPREFIX}alabaster>=0.7<0.8:textproc/py-alabaster@${PY_FLAVOR} \
36
		${PYTHON_PKGNAMEPREFIX}imagesize>=0:graphics/py-imagesize@${PY_FLAVOR} \
37
		${PYTHON_PKGNAMEPREFIX}requests>=2.5.0:www/py-requests@${PY_FLAVOR} \
38
		${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
39
		${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR} \
40
		${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
41
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest-cov>=0:devel/py-pytest-cov@${PY_FLAVOR} \
42
		${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} \
43
		${PYTHON_PKGNAMEPREFIX}html5lib>=0:www/py-html5lib@${PY_FLAVOR} \
44
		${PYTHON_PKGNAMEPREFIX}typed-ast>=0:devel/py-typed-ast@${PY_FLAVOR} \
45
		cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR}
46
47
USES=		python:3.5+
48
USE_PYTHON=	autoplist distutils concurrent
49
50
CONFLICTS_INSTALL=	py*-sphinx
51
52
NO_ARCH=	yes
53
54
# Upstream archive contains files with UTF-8 names (#246618)
55
EXTRACT_CMD=	${SETENV} LC_ALL=en_US.UTF-8 /usr/bin/bsdtar
56
57
do-test:
58
	@cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs -o addopts=
59
60
.include <bsd.port.mk>
(-)b/textproc/py-sphinx3/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1615136512
2
SHA256 (python/Sphinx-3.5.2.tar.gz) = 672cfcc24b6b69235c97c750cb190a44ecd72696b4452acaf75c2d9cc78ca5ff
3
SIZE (python/Sphinx-3.5.2.tar.gz) = 5907358
(-)b/textproc/py-sphinx3/pkg-descr (-1 / +5 lines)
Added Link Here
0
- 
1
Sphinx is a tool that makes it easy to create intelligent and beautiful
2
documentation for Python projects, written by Georg Brandl and licensed
3
under the BSD license.
4
5
WWW: https://www.sphinx-doc.org/

Return to bug 257116