Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
09141c47
Kaydet (Commit)
09141c47
authored
Şub 24, 2014
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Closes #20755: port sphinx-1.1 fixes from default
üst
c4f44c02
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
pyspecific.py
Doc/tools/sphinxext/pyspecific.py
+9
-9
No files found.
Doc/tools/sphinxext/pyspecific.py
Dosyayı görüntüle @
09141c47
...
@@ -16,6 +16,7 @@ from docutils import nodes, utils
...
@@ -16,6 +16,7 @@ from docutils import nodes, utils
import
sphinx
import
sphinx
from
sphinx.util.nodes
import
split_explicit_title
from
sphinx.util.nodes
import
split_explicit_title
from
sphinx.util.compat
import
Directive
from
sphinx.writers.html
import
HTMLTranslator
from
sphinx.writers.html
import
HTMLTranslator
from
sphinx.writers.latex
import
LaTeXTranslator
from
sphinx.writers.latex
import
LaTeXTranslator
from
sphinx.locale
import
versionlabels
from
sphinx.locale
import
versionlabels
...
@@ -27,7 +28,9 @@ Body.enum.converters['loweralpha'] = \
...
@@ -27,7 +28,9 @@ Body.enum.converters['loweralpha'] = \
Body
.
enum
.
converters
[
'lowerroman'
]
=
\
Body
.
enum
.
converters
[
'lowerroman'
]
=
\
Body
.
enum
.
converters
[
'upperroman'
]
=
lambda
x
:
None
Body
.
enum
.
converters
[
'upperroman'
]
=
lambda
x
:
None
if
sphinx
.
__version__
[:
3
]
<
'1.2'
:
SPHINX11
=
sphinx
.
__version__
[:
3
]
<
'1.2'
if
SPHINX11
:
# monkey-patch HTML translator to give versionmodified paragraphs a class
# monkey-patch HTML translator to give versionmodified paragraphs a class
def
new_visit_versionmodified
(
self
,
node
):
def
new_visit_versionmodified
(
self
,
node
):
self
.
body
.
append
(
self
.
starttag
(
node
,
'p'
,
CLASS
=
node
[
'type'
]))
self
.
body
.
append
(
self
.
starttag
(
node
,
'p'
,
CLASS
=
node
[
'type'
]))
...
@@ -88,8 +91,6 @@ def source_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
...
@@ -88,8 +91,6 @@ def source_role(typ, rawtext, text, lineno, inliner, options={}, content=[]):
# Support for marking up implementation details
# Support for marking up implementation details
from
sphinx.util.compat
import
Directive
class
ImplementationDetail
(
Directive
):
class
ImplementationDetail
(
Directive
):
has_content
=
True
has_content
=
True
...
@@ -142,10 +143,6 @@ class PyDecoratorMethod(PyDecoratorMixin, PyClassmember):
...
@@ -142,10 +143,6 @@ class PyDecoratorMethod(PyDecoratorMixin, PyClassmember):
# Support for documenting version of removal in deprecations
# Support for documenting version of removal in deprecations
from
sphinx.locale
import
versionlabels
from
sphinx.util.compat
import
Directive
class
DeprecatedRemoved
(
Directive
):
class
DeprecatedRemoved
(
Directive
):
has_content
=
True
has_content
=
True
required_arguments
=
2
required_arguments
=
2
...
@@ -171,16 +168,16 @@ class DeprecatedRemoved(Directive):
...
@@ -171,16 +168,16 @@ class DeprecatedRemoved(Directive):
messages
=
[]
messages
=
[]
if
self
.
content
:
if
self
.
content
:
self
.
state
.
nested_parse
(
self
.
content
,
self
.
content_offset
,
node
)
self
.
state
.
nested_parse
(
self
.
content
,
self
.
content_offset
,
node
)
if
len
(
node
):
if
isinstance
(
node
[
0
],
nodes
.
paragraph
)
and
node
[
0
]
.
rawsource
:
if
isinstance
(
node
[
0
],
nodes
.
paragraph
)
and
node
[
0
]
.
rawsource
:
content
=
nodes
.
inline
(
node
[
0
]
.
rawsource
,
translatable
=
True
)
content
=
nodes
.
inline
(
node
[
0
]
.
rawsource
,
translatable
=
True
)
content
.
source
=
node
[
0
]
.
source
content
.
source
=
node
[
0
]
.
source
content
.
line
=
node
[
0
]
.
line
content
.
line
=
node
[
0
]
.
line
content
+=
node
[
0
]
.
children
content
+=
node
[
0
]
.
children
node
[
0
]
.
replace_self
(
nodes
.
paragraph
(
''
,
''
,
content
))
node
[
0
]
.
replace_self
(
nodes
.
paragraph
(
''
,
''
,
content
))
if
not
SPHINX11
:
node
[
0
]
.
insert
(
0
,
nodes
.
inline
(
''
,
'
%
s: '
%
text
,
node
[
0
]
.
insert
(
0
,
nodes
.
inline
(
''
,
'
%
s: '
%
text
,
classes
=
[
'versionmodified'
]))
classes
=
[
'versionmodified'
]))
el
se
:
el
if
not
SPHINX11
:
para
=
nodes
.
paragraph
(
''
,
''
,
para
=
nodes
.
paragraph
(
''
,
''
,
nodes
.
inline
(
''
,
'
%
s.'
%
text
,
classes
=
[
'versionmodified'
]))
nodes
.
inline
(
''
,
'
%
s.'
%
text
,
classes
=
[
'versionmodified'
]))
node
.
append
(
para
)
node
.
append
(
para
)
...
@@ -188,6 +185,9 @@ class DeprecatedRemoved(Directive):
...
@@ -188,6 +185,9 @@ class DeprecatedRemoved(Directive):
env
.
note_versionchange
(
'deprecated'
,
version
[
0
],
node
,
self
.
lineno
)
env
.
note_versionchange
(
'deprecated'
,
version
[
0
],
node
,
self
.
lineno
)
return
[
node
]
+
messages
return
[
node
]
+
messages
# for Sphinx < 1.2
versionlabels
[
'deprecated-removed'
]
=
DeprecatedRemoved
.
_label
# Support for including Misc/NEWS
# Support for including Misc/NEWS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment