]> git.pld-linux.org Git - packages/python-django.git/blob - python-django-sphinx.patch
- updated to 1.11.29
[packages/python-django.git] / python-django-sphinx.patch
1 BuildEnvironment.note_versionchange was deprecated in 1.8.0, removed in 2.x
2 HTMLTranslator.highlightlang and .highlightlinenothreshold as well
3 --- Django-1.11.29/docs/_ext/djangodocs.py.orig 2020-03-04 09:46:40.000000000 +0100
4 +++ Django-1.11.29/docs/_ext/djangodocs.py      2021-01-29 20:23:42.880898935 +0100
5 @@ -4,6 +4,7 @@
6  import json
7  import os
8  import re
9 +import sys
10  
11  from docutils import nodes
12  from docutils.parsers.rst import Directive, directives
13 @@ -98,8 +99,8 @@
14      """
15      HTML document generator visit handler
16      """
17 -    lang = self.highlightlang
18 -    linenos = node.rawsource.count('\n') >= self.highlightlinenothreshold - 1
19 +    lang = self.builder.config.highlight_language
20 +    linenos = node.rawsource.count('\n') >= sys.maxsize - 1
21      fname = node['filename']
22      highlight_args = node.get('highlight_args', {})
23      if 'language' in node:
24 @@ -227,7 +228,8 @@
25          node['type'] = self.name
26          if self.content:
27              self.state.nested_parse(self.content, self.content_offset, node)
28 -        env.note_versionchange(node['type'], node['version'], node, self.lineno)
29 +        node.line = self.lineno
30 +        env.get_domain('changeset').note_changeset(node)
31          return ret
32  
33  
This page took 0.03825 seconds and 3 git commands to generate.