diff --git a/docs/source/conf.py b/docs/source/conf.py index 59546d05d..547fd2a53 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -24,29 +24,6 @@ import pwnlib -# -- WORK-AROUNDS FOR DEPRECATION ---------------------------------------------- -# Deprecated -# 1.6b1 -# sphinx.util.compat.Directive class is now deprecated. -# Please use instead docutils.parsers.rst.Directive -# -# Pwntools Note: -# Can't just "do the right thing" since we have dependencies that -# are also affected by this, specifically sphinxcontrib.autoprogram -try: - import sphinx.util.compat -except ImportError: - import sys - import types - import sphinx.util - import docutils.parsers.rst - class compat(types.ModuleType): - Directive = docutils.parsers.rst.Directive - sphinx.util.compat = compat('sphinx.util.compat') - sys.modules['sphinx.util.compat'] = sphinx.util.compat - -# -- General configuration ----------------------------------------------------- - # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' diff --git a/pwnlib/internal/dochelper.py b/pwnlib/internal/dochelper.py index d0f5e09a2..388c31093 100644 --- a/pwnlib/internal/dochelper.py +++ b/pwnlib/internal/dochelper.py @@ -3,7 +3,7 @@ from docutils import nodes from docutils import statemachine -from sphinx.util.compat import Directive +from docutils.parsers.rst import Directive try: from StringIO import StringIO diff --git a/pwnlib/term/term.py b/pwnlib/term/term.py index 8c09daddf..d2e3dd8c9 100644 --- a/pwnlib/term/term.py +++ b/pwnlib/term/term.py @@ -164,7 +164,7 @@ def do(c, *args): if s: put(s) -def goto((r, c)): +def goto(r, c): do('cup', r - scroll + height - 1, c) cells = [] @@ -435,10 +435,10 @@ def render_from(i, force = False, clear_after = False): # check it and just do nothing if something went wrong. if i < 0 or i >= len(cells): return - goto(cells[i].start) + goto(*cells[i].start) for c in cells[i:]: if not force and c.start == e: - goto(cells[-1].end) + goto(*cells[-1].end) break elif e: c.start = e