[Django] #31025: Deprecation warning when building the docs

4 views
Skip to first unread message

Django

unread,
Nov 22, 2019, 4:31:55 PM11/22/19
to django-...@googlegroups.com
#31025: Deprecation warning when building the docs
------------------------------------------------+------------------------
Reporter: Baptiste Mispelon | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
I noticed a deprecation warning while building the documentation locally
today:
{{{
./django/docs/_ext/djangodocs.py:260: RemovedInSphinx30Warning:
HTMLTranslator.highlightlinenothreshold is deprecated.
linenos = win_text.count('\n') >= self.highlightlinenothreshold - 1
}}}

Looks like the `highlightlinenothreshold` property is going away in Sphinx
3.0.
Luckily it looks like the fix should be straightforward
(`highlightlinenothreshold` was basically an alias for `sys.maxsize`). [1]

PR incoming.

[1] https://github.com/sphinx-
doc/sphinx/commit/61098a0ae2e696a804459d36bd74ca57db76eda5#diff-
9ae39fbf16dabc27af998b9c0a6968a0L977

--
Ticket URL: <https://code.djangoproject.com/ticket/31025>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 23, 2019, 5:28:14 AM11/23/19
to django-...@googlegroups.com
#31025: HTMLTranslator.highlightlinenothreshold will be removed in Sphinx 3.0.
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Baptiste
Type: | Mispelon
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: new => assigned
* owner: nobody => Baptiste Mispelon
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/31025#comment:1>

Django

unread,
Nov 23, 2019, 5:29:25 AM11/23/19
to django-...@googlegroups.com
#31025: HTMLTranslator.highlightlinenothreshold will be removed in Sphinx 3.0.
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Baptiste
Type: | Mispelon
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by felixxm):

[https://github.com/django/django/pull/12127 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/31025#comment:2>

Django

unread,
Nov 25, 2019, 4:34:25 AM11/25/19
to django-...@googlegroups.com
#31025: HTMLTranslator.highlightlinenothreshold will be removed in Sphinx 3.0.
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Baptiste
Type: | Mispelon
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"89d41cba392b759732ba9f1db4ff29ed47da6a56" 89d41cba]:
{{{
#!CommitTicketReference repository=""
revision="89d41cba392b759732ba9f1db4ff29ed47da6a56"
Fixed #31025 -- Fixed highlightlinenothreshold deprecation warning on
Sphinx 1.8+.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31025#comment:3>

Django

unread,
Nov 25, 2019, 4:35:20 AM11/25/19
to django-...@googlegroups.com
#31025: HTMLTranslator.highlightlinenothreshold will be removed in Sphinx 3.0.
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Baptiste
Type: | Mispelon
Cleanup/optimization | Status: closed
Component: Documentation | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"641deb4d50e2ae3c7031739dcf9d1524492dc095" 641deb4]:
{{{
#!CommitTicketReference repository=""
revision="641deb4d50e2ae3c7031739dcf9d1524492dc095"
[3.0.x] Fixed #31025 -- Fixed highlightlinenothreshold deprecation warning
on Sphinx 1.8+.

Backport of 89d41cba392b759732ba9f1db4ff29ed47da6a56 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31025#comment:4>

Django

unread,
Nov 25, 2019, 4:36:33 AM11/25/19
to django-...@googlegroups.com
#31025: HTMLTranslator.highlightlinenothreshold will be removed in Sphinx 3.0.
-------------------------------------+-------------------------------------
Reporter: Baptiste Mispelon | Owner: Baptiste
Type: | Mispelon
Cleanup/optimization | Status: closed
Component: Documentation | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"28dd5362ae17a975c4d273d6019aeb8e890e3576" 28dd536]:
{{{
#!CommitTicketReference repository=""
revision="28dd5362ae17a975c4d273d6019aeb8e890e3576"
[2.2.x] Fixed #31025 -- Fixed highlightlinenothreshold deprecation warning
on Sphinx 1.8+.

Backport of 89d41cba392b759732ba9f1db4ff29ed47da6a56 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31025#comment:5>

Reply all
Reply to author
Forward
0 new messages