Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#31025 closed Cleanup/optimization (fixed)

HTMLTranslator.highlightlinenothreshold will be removed in Sphinx 3.0.

Reported by: Baptiste Mispelon Owned by: Baptiste Mispelon
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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

Change History (5)

comment:1 by Mariusz Felisiak, 5 years ago

Owner: changed from nobody to Baptiste Mispelon
Status: newassigned
Summary: Deprecation warning when building the docsHTMLTranslator.highlightlinenothreshold will be removed in Sphinx 3.0.
Triage Stage: UnreviewedAccepted

comment:2 by Mariusz Felisiak, 5 years ago

comment:3 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In 89d41cba:

Fixed #31025 -- Fixed highlightlinenothreshold deprecation warning on Sphinx 1.8+.

comment:4 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 641deb4:

[3.0.x] Fixed #31025 -- Fixed highlightlinenothreshold deprecation warning on Sphinx 1.8+.

Backport of 89d41cba392b759732ba9f1db4ff29ed47da6a56 from master

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 28dd536:

[2.2.x] Fixed #31025 -- Fixed highlightlinenothreshold deprecation warning on Sphinx 1.8+.

Backport of 89d41cba392b759732ba9f1db4ff29ed47da6a56 from master

Note: See TracTickets for help on using tickets.
Back to Top