Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove tuple parameters unpacking due to PEP-3113 #1119

Merged
merged 3 commits into from
Mar 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion pwnlib/internal/dochelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions pwnlib/term/term.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down Expand Up @@ -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
Expand Down