File: python3-sphinx

package info (click to toggle)
pypy3 7.3.11%2Bdfsg-2%2Bdeb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 201,024 kB
  • sloc: python: 1,950,308; ansic: 517,580; sh: 21,417; asm: 14,419; cpp: 4,263; makefile: 4,228; objc: 761; xml: 530; exp: 499; javascript: 314; pascal: 244; lisp: 45; csh: 11; awk: 4
file content (106 lines) | stat: -rw-r--r-- 3,759 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
From: Stefano Rivera <stefanor@debian.org>
Date: Mon, 23 Mar 2020 15:13:49 -0700
Subject: Debian: Disable some extensions to support Python 3 Sphinx

Stop building any autodoc and configuration sections, that require
parsing the Python 2 source code.

This supports building the Sphinx docs with Python 3.
---
 pypy/doc/conf.py                 | 11 +++--------
 pypy/doc/config/index.rst        | 11 +++++------
 pypy/doc/cpython_differences.rst |  2 +-
 pypy/doc/objspace.rst            | 12 ++++++++++--
 4 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/pypy/doc/conf.py b/pypy/doc/conf.py
index 8665429..dd56de1 100644
--- a/pypy/doc/conf.py
+++ b/pypy/doc/conf.py
@@ -13,12 +13,6 @@
 
 import sys, os
 
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path.append(os.path.abspath('.'))
-sys.path.append(os.path.abspath('../../'))
-
 
 # -- Read The Docs theme config ------------------------------------------------
 
@@ -40,14 +34,15 @@ else:
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc',
+
+extensions = [# 'sphinx.ext.autodoc',
               'sphinx.ext.doctest',
               'sphinx.ext.extlinks',
               'sphinx.ext.intersphinx',
               'sphinx.ext.todo',
               'sphinx.ext.ifconfig',
               'sphinx.ext.graphviz',
-              'pypyconfig',
+              # 'pypyconfig',
               # 'sphinx_affiliates',
              ]
 
diff --git a/pypy/doc/config/index.rst b/pypy/doc/config/index.rst
index 6282f80..eb482f1 100644
--- a/pypy/doc/config/index.rst
+++ b/pypy/doc/config/index.rst
@@ -52,10 +52,9 @@ with which other PyPy features:
 .. _`What PyPy can do for your objects`: ../objspace-proxies.html
 
 
-.. toctree::
-    :maxdepth: 2
+.. note::
 
-    commandline
-    translation
-    objspace
-    opt
+   Parts of this document are not included in the Debian package.
+   See the missing sections `online`_.
+
+.. _`online`: https://doc.pypy.org/en/latest/config/index.html
diff --git a/pypy/doc/cpython_differences.rst b/pypy/doc/cpython_differences.rst
index bda63eb..896917b 100644
--- a/pypy/doc/cpython_differences.rst
+++ b/pypy/doc/cpython_differences.rst
@@ -575,7 +575,7 @@ List of extension modules that we support:
     _locale
     _lsprof
     _md5
-    :doc:`_minimal_curses <config/objspace.usemodules._minimal_curses>`
+    `_minimal_curses <https://doc.pypy.org/en/latest/config/objspace.usemodules._minimal_curses>`
     _multiprocessing
     _random
     :doc:`_rawffi <discussion/ctypes-implementation>`
diff --git a/pypy/doc/objspace.rst b/pypy/doc/objspace.rst
index 94bcfc0..4c24a72 100644
--- a/pypy/doc/objspace.rst
+++ b/pypy/doc/objspace.rst
@@ -291,8 +291,16 @@ Conversions from Application Level to Interpreter Level
    If :py:obj:`w_x` is an application-level integer or long, return an interpreter-level
    :py:class:`rbigint`. Otherwise raise :py:exc:`TypeError`.
 
-.. automethod:: pypy.interpreter.baseobjspace.ObjSpace.bytes_w(w_x)
-.. automethod:: pypy.interpreter.baseobjspace.ObjSpace.text_w(w_x)
+.. py:function:: bytes_w(w_x)
+
+   Takes an application level :py:class:`bytes` (on PyPy2 this equals
+   `str`) and returns a rpython byte string.
+
+.. py:function:: text_w(w_x)
+
+   PyPy2 takes either a :py:class:`str` and returns a rpython byte
+   string, or it takes an :py:class:`unicode` and uses the systems
+   default encoding to return a rpython byte string.
 
 .. py:function:: str_w(w_x)