Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2)

Side by Side Diff: Doc/tools/extensions/pyspecific.py

Issue 22695: open() declared deprecated in python 3 docs
Patch Set: Created 5 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # -*- coding: utf-8 -*- 1 # -*- coding: utf-8 -*-
2 """ 2 """
3 pyspecific.py 3 pyspecific.py
4 ~~~~~~~~~~~~~ 4 ~~~~~~~~~~~~~
5 5
6 Sphinx extension with Python doc-specific markup. 6 Sphinx extension with Python doc-specific markup.
7 7
8 :copyright: 2008-2014 by Georg Brandl. 8 :copyright: 2008-2014 by Georg Brandl.
9 :license: Python license. 9 :license: Python license.
10 """ 10 """
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 text = self._label % version 165 text = self._label % version
166 if len(self.arguments) == 3: 166 if len(self.arguments) == 3:
167 inodes, messages = self.state.inline_text(self.arguments[2], 167 inodes, messages = self.state.inline_text(self.arguments[2],
168 self.lineno+1) 168 self.lineno+1)
169 para = nodes.paragraph(self.arguments[2], '', *inodes) 169 para = nodes.paragraph(self.arguments[2], '', *inodes)
170 node.append(para) 170 node.append(para)
171 else: 171 else:
172 messages = [] 172 messages = []
173 if self.content: 173 if self.content:
174 self.state.nested_parse(self.content, self.content_offset, node) 174 self.state.nested_parse(self.content, self.content_offset, node)
175 if len(node):
175 if isinstance(node[0], nodes.paragraph) and node[0].rawsource: 176 if isinstance(node[0], nodes.paragraph) and node[0].rawsource:
176 content = nodes.inline(node[0].rawsource, translatable=True) 177 content = nodes.inline(node[0].rawsource, translatable=True)
177 content.source = node[0].source 178 content.source = node[0].source
178 content.line = node[0].line 179 content.line = node[0].line
179 content += node[0].children 180 content += node[0].children
180 node[0].replace_self(nodes.paragraph('', '', content)) 181 node[0].replace_self(nodes.paragraph('', '', content))
181 node[0].insert(0, nodes.inline('', '%s: ' % text, 182 node[0].insert(0, nodes.inline('', '%s: ' % text,
182 classes=['versionmodified'])) 183 classes=['versionmodified']))
183 else: 184 else:
184 para = nodes.paragraph('', '', 185 para = nodes.paragraph('', '',
185 nodes.inline('', '%s.' % text, 186 nodes.inline('', '%s.' % text,
186 classes=['versionmodified'])) 187 classes=['versionmodified']))
187 if len(node): 188 node.append(para)
188 node.insert(0, para)
189 else:
190 node.append(para)
191 env = self.state.document.settings.env 189 env = self.state.document.settings.env
192 env.note_versionchange('deprecated', version[0], node, self.lineno) 190 env.note_versionchange('deprecated', version[0], node, self.lineno)
193 return [node] + messages 191 return [node] + messages
194 192
195 193
196 # Support for including Misc/NEWS 194 # Support for including Misc/NEWS
197 195
198 issue_re = re.compile('([Ii])ssue #([0-9]+)') 196 issue_re = re.compile('([Ii])ssue #([0-9]+)')
199 whatsnew_re = re.compile(r"(?im)^what's new in (.*?)\??$") 197 whatsnew_re = re.compile(r"(?im)^what's new in (.*?)\??$")
200 198
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 app.add_builder(suspicious.CheckSuspiciousMarkupBuilder) 342 app.add_builder(suspicious.CheckSuspiciousMarkupBuilder)
345 app.add_description_unit('opcode', 'opcode', '%s (opcode)', 343 app.add_description_unit('opcode', 'opcode', '%s (opcode)',
346 parse_opcode_signature) 344 parse_opcode_signature)
347 app.add_description_unit('pdbcommand', 'pdbcmd', '%s (pdb command)', 345 app.add_description_unit('pdbcommand', 'pdbcmd', '%s (pdb command)',
348 parse_pdb_command) 346 parse_pdb_command)
349 app.add_description_unit('2to3fixer', '2to3fixer', '%s (2to3 fixer)') 347 app.add_description_unit('2to3fixer', '2to3fixer', '%s (2to3 fixer)')
350 app.add_directive_to_domain('py', 'decorator', PyDecoratorFunction) 348 app.add_directive_to_domain('py', 'decorator', PyDecoratorFunction)
351 app.add_directive_to_domain('py', 'decoratormethod', PyDecoratorMethod) 349 app.add_directive_to_domain('py', 'decoratormethod', PyDecoratorMethod)
352 app.add_directive('miscnews', MiscNews) 350 app.add_directive('miscnews', MiscNews)
353 return {'version': '1.0', 'parallel_read_safe': True} 351 return {'version': '1.0', 'parallel_read_safe': True}
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+