Skip to content

Commit 4f43a01

Browse files
committed
Get ready for release 1.2.9
1 parent 360f243 commit 4f43a01

39 files changed

+116
-84
lines changed

NEWS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
1.2.9 2023-05-27
2+
================
3+
4+
Commands that are useful in remote envionments and docker:
5+
6+
* Add "set tempdir" to set location of TEMPDIR (useful docker)
7+
* Add "set/show substitute"
8+
9+
Other changes:
10+
11+
* Blacken, and isort, codespell, and lint many files
12+
* ignore ignored signal
13+
* specialize decompiler to decompyle for 3.7 and 3.8
14+
* fix incorrect tagging in install doc and update decompilation info
15+
* Squelch traceback on break in unparsable file
16+
117
1.2.8 2021-11-05
218
================
319

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
|TravisCI| |CircleCI| |Pypi Installs| |license| |Supported Python Versions|
1+
|CircleCI| |Pypi Installs| |license| |Supported Python Versions|
22

33
|packagestatus|
44

__pkginfo__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Copyright (C) 2013, 2015-2018, 2020-2021 Rocky Bernstein <rocky@gnu.org>
1+
# Copyright (C) 2013, 2015-2018, 2020-2021, 2023 Rocky Bernstein
2+
# <rocky@gnu.org>
23
#
34
# This program is free software: you can redistribute it and/or modify
45
# it under the terms of the GNU General Public License as published by
@@ -21,6 +22,7 @@
2122
# less elegant than having it here with reduced code, albeit there
2223
# still is some room for improvement.
2324

25+
import os.path as osp
2426
import sys
2527

2628
decompiler = "uncompyle6 >= 3.8.0"
@@ -42,7 +44,7 @@
4244
# 3.4 | pip | 19.1.1 |
4345

4446
# Things that change more often go here.
45-
copyright = """Copyright (C) 2013, 2015-2021 Rocky Bernstein <rocky@gnu.org>."""
47+
copyright = """Copyright (C) 2013, 2015-2021, 2023 Rocky Bernstein <rocky@gnu.org>."""
4648
classifiers = [
4749
"Development Status :: 5 - Production/Stable",
4850
"Environment :: Console",
@@ -93,8 +95,6 @@
9395
py_modules = []
9496
short_desc = "GDB-like Python Debugger in the Trepan family"
9597

96-
import os.path as osp
97-
9898

9999
def get_srcdir():
100100
filename = osp.normcase(osp.dirname(osp.abspath(__file__)))

admin-tools/check-newer-versions.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ for version in $PYVERSIONS; do
1919
if ! pyenv local $version ; then
2020
exit $?
2121
fi
22+
python --version
2223
make clean && pip install -e .
2324
if ! make check; then
2425
exit $?

admin-tools/pyenv-newer-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
77
exit 1
88
fi
99

10-
export PYVERSIONS='3.6.15 pypy3.6-7.3.1 3.7.16 pypy3.7-7.3.9 pypy3.8-7.3.10 pypy3.9-7.3.10 pyston-2.3.5 3.8.16 3.9.16 3.10.9'
10+
export PYVERSIONS='3.6.15 pypy3.6-7.3.1 3.7.16 pypy3.7-7.3.9 pypy3.8-7.3.10 pypy3.9-7.3.10 pyston-2.3.5 3.8.16 3.9.16 3.10.10'

admin-tools/setup-python-3.2.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ if [[ $0 == $bs ]] ; then
2525
fi
2626

2727
mydir=$(dirname $bs)
28+
fulldir=$(readlink -f $mydir)
2829
(cd $fulldir/.. && checkout_version python-spark master && checkout_version python-uncompyle6)
2930
cd $owd
3031
rm -v */.python-version || true

trepan/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@
3737
import sys
3838

3939
from trepan import debugger as Mdebugger
40-
from trepan.post_mortem import post_mortem_excepthook, uncaught_exception
4140
from trepan.debugger import Trepan
41+
from trepan.post_mortem import post_mortem_excepthook, uncaught_exception
4242

4343

4444
def debugger_on_post_mortem():
45-
"""Call debugger on an exeception that terminates a program"""
45+
"""Call debugger on an exception that terminates a program"""
4646
sys.excepthook = post_mortem_excepthook
4747
return
4848

trepan/bwcli.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,20 @@
1717
""" The hairy command-line interface to the debugger.
1818
"""
1919
import os.path as osp
20-
import pyficache
2120
import sys
22-
2321
from optparse import OptionParser
2422

23+
import pyficache
24+
2525
# Our local modules
26-
from trepan import clifns as Mclifns
27-
from trepan import debugger as Mdebugger, exception as Mexcept, misc as Mmisc
28-
from trepan.lib.file import readable
26+
from trepan import (
27+
clifns as Mclifns,
28+
debugger as Mdebugger,
29+
exception as Mexcept,
30+
misc as Mmisc,
31+
)
2932
from trepan.interfaces.bullwinkle import BWInterface
33+
from trepan.lib.file import readable
3034

3135
# The name of the debugger we are currently going by.
3236
__title__ = "trepan"
@@ -40,7 +44,7 @@ def process_options(debugger_name, pkg_version, sys_argv, option_list=None):
4044
another main program and want to extend the existing set of debugger
4145
options.
4246
43-
The options dicionary from opt_parser is return. sys_argv is
47+
The options dictionary from opt_parser is return. sys_argv is
4448
also updated."""
4549
usage_str = """%prog [debugger-options] [python-script [script-options...]]
4650

trepan/bwprocessor/command/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright (C) 2008, 2009, 2013 Rocky Bernstein <rocky@gnu.org>
12
# This program is free software: you can redistribute it and/or modify
23
# it under the terms of the GNU General Public License as published by
34
# the Free Software Foundation, either version 3 of the License, or
@@ -10,12 +11,11 @@
1011
#
1112
# You should have received a copy of the GNU General Public License
1213
# along with this program. If not, see <http://www.gnu.org/licenses/>.
13-
# """ Copyright (C) 2008, 2009, 2013 Rocky Bernstein <rocky@gnu.org> """
14-
__import__("pkg_resources").declare_namespace(__name__)
15-
1614
import glob
1715
import os
1816

17+
__import__("pkg_resources").declare_namespace(__name__)
18+
1919
# FIXME: Is it really helpful to "privatize" variable names below?
2020
# The below names are not part of the standard pre-defined names like
2121
# __name__ or __file__ are.
@@ -27,7 +27,7 @@
2727
__py_files__ = glob.glob(os.path.join(__command_dir__, "[a-z]*.py"))
2828

2929
# Take the basename of the filename and drop off '.py'. That minus the
30-
# files in exclude_files and tha becomes the list of modules that
30+
# files in exclude_files and that becomes the list of modules that
3131
# commands.py will use to import
3232
exclude_files = ["mock.py"]
3333
__modules__ = [

trepan/bwprocessor/command/base_cmd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright (C) 2009-2010, 2012-2013, 2015 Rocky Bernstein
2+
# Copyright (C) 2009-2010, 2012-2013, 2015, 2013 Rocky Bernstein
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
2020
and storing it as a list of known debugger commands.
2121
"""
2222

23-
NotImplementedMessage = "This method must be overriden in a subclass"
23+
NotImplementedMessage = "This method must be overridden in a subclass"
2424

2525
__all__ = ["DebuggerCommand"]
2626

@@ -54,7 +54,7 @@ def __init__(self, proc):
5454
# an assignment of method names like self.msg = self.debugger.intf.msg,
5555
# because we want to allow the interface (intf) to change
5656
# dynamically. That is, the value of self.debugger may change
57-
# in the course of the program and if we made such an method assignemnt
57+
# in the course of the program and if we made such an method assignment
5858
# we wouldn't pick up that change in our self.msg
5959
def errmsg(self, msg, opts={}):
6060
"""Convenience short-hand for self.debugger.intf.errmsg"""

trepan/bwprocessor/msg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright (C) 2015 Rocky Bernstein <rocky@gnu.org>
2+
# Copyright (C) 2015, 2023 Rocky Bernstein <rocky@gnu.org>
33
""" Common I/O routines"""
44

55

66
# Note for errmsg, msg, and msg_nocr we don't want to simply make
77
# an assignment of method names like self.msg = self.debugger.intf.msg,
88
# because we want to allow the interface (intf) to change
99
# dynamically. That is, the value of self.debugger may change
10-
# in the course of the program and if we made such an method assignemnt
10+
# in the course of the program and if we made such an method assignment
1111
# we wouldn't pick up that change in our self.msg
1212
def errmsg(proc_obj, message, opts={}):
1313
response = proc_obj.response

trepan/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def process_options(pkg_version, sys_argv, option_list=None):
3232
another main program and want to extend the existing set of debugger
3333
options.
3434
35-
The options dicionary from opt_parser is return. sys_argv is
35+
The options dictionary from opt_parser is return. sys_argv is
3636
also updated."""
3737
usage_str = """%prog [debugger-options]]
3838

trepan/debugger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def run_call(self, func, start_opts=None, *args, **kwds):
144144
145145
See also `run_eval' if what you want to run is an eval'able
146146
expression have that result returned and `run' if you want to
147-
debug a statment via exec.
147+
debug a statement via exec.
148148
"""
149149
res = None
150150
self.core.start(opts=start_opts)

trepan/inout/base.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright (C) 2009, 2014-2015, 2020 Rocky Bernstein <rocky@gnu.org>
2+
#
3+
# Copyright (C) 2009, 2014-2015, 2020, 2023 Rocky Bernstein
4+
# <rocky@gnu.org>
35
#
46
# This program is free software: you can redistribute it and/or modify
57
# it under the terms of the GNU General Public License as published by
@@ -14,14 +16,14 @@
1416
# You should have received a copy of the GNU General Public License
1517
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1618
"""classes to support communication to and from the debugger. This
17-
communcation might be to/from another process or another computer.
19+
communication might be to/from another process or another computer.
1820
And reading may be from a debugger command script.
1921
2022
For example, we'd like to support Sockets, and serial lines and file
2123
reading, as well a readline-type input. Encryption and Authentication
2224
methods might decorate some of the communication channels.
2325
24-
Some ideas originiated as part of Matt Fleming's 2006 Google Summer of
26+
Some ideas originated as part of Matt Fleming's 2006 Google Summer of
2527
Code project.
2628
"""
2729

trepan/inout/input.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def readline_importable() -> bool:
3737
class DebuggerUserInput(Mbase.DebuggerInputBase):
3838
"""Debugger input connected to what we think of as a end-user input
3939
as opposed to a relay mechanism to another process. Input could be
40-
interative terminal, but it might be file input."""
40+
interactive terminal, but it might be file input."""
4141

4242
def __init__(self, inp=None, opts=None):
4343
self.input = inp or sys.stdin

trepan/inout/output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
class DebuggerUserOutput(DebuggerInOutBase):
2626
"""Debugger output shown directly to what we think of as end-user
27-
ouptut as opposed to a relay mechanism to another process. Output
27+
output as opposed to a relay mechanism to another process. Output
2828
could be an interactive terminal, but it might also be file output"""
2929

3030
def __init__(self, out=None, opts=None):

trepan/inout/stringarray.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright (C) 2009, 2013-2014 Rocky Bernstein <rocky@gnu.org>
2+
#
3+
# Copyright (C) 2009, 2013-2014, 2023 Rocky Bernstein
4+
# <rocky@gnu.org>
35
#
46
# This program is free software: you can redistribute it and/or modify
57
# it under the terms of the GNU General Public License as published by
@@ -22,7 +24,7 @@
2224

2325
class StringArrayInput(Mbase.DebuggerInputBase):
2426
"""Simulate I/O using an array of strings. Sort of like StringIO, but
25-
even simplier."""
27+
even simpler."""
2628

2729
def __init__(self, inp=[], opts=None):
2830
self.input = inp
@@ -60,7 +62,7 @@ def readline(self, use_raw=None, prompt=""):
6062

6163
class StringArrayOutput(Mbase.DebuggerInOutBase):
6264
"""Simulate I/O using an array of strings. Sort of like StringIO, but
63-
even simplier."""
65+
even simpler."""
6466

6567
def __init__(self, out=[], opts=None):
6668
self.flush_after_write = False # For compatibility

trepan/interface.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright (C) 2010, 2013, 2015, 2018 Rocky Bernstein <rocky@gnu.org>
2+
#
3+
# Copyright (C) 2010, 2013, 2015, 2018, 2023 Rocky Bernstein
4+
# <rocky@gnu.org>
35
#
46
# This program is free software: you can redistribute it and/or modify
57
# it under the terms of the GNU General Public License as published by
@@ -17,7 +19,7 @@
1719

1820
import sys
1921

20-
NotImplementedMessage = "This method must be overriden in a subclass"
22+
NotImplementedMessage = "This method must be overridden in a subclass"
2123

2224
__all__ = ["TrepanInterface"]
2325

trepan/interfaces/client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright (C) 2009, 2013-2014, 2017 Rocky Bernstein <rocky@gnu.org>
2+
#
3+
# Copyright (C) 2009, 2013-2014, 2017, 2023 Rocky Bernstein
4+
# <rocky@gnu.org>
35
#
46
# This program is free software: you can redistribute it and/or modify
57
# it under the terms of the GNU General Public License as published by
@@ -14,12 +16,12 @@
1416
# You should have received a copy of the GNU General Public License
1517
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1618
"""Module for client (i.e. user to communication-device) interaction.
17-
The debugged program is at the other end of the communcation."""
19+
The debugged program is at the other end of the communication."""
20+
21+
from trepan.inout import fifoclient as Mfifoclient, tcpclient as Mtcpclient
1822

1923
# Our local modules
2024
from trepan.interfaces import user as Muser
21-
from trepan.inout import tcpclient as Mtcpclient, fifoclient as Mfifoclient
22-
2325

2426
DEFAULT_INIT_CONNECTION_OPTS = {"IO": "TCP"}
2527

trepan/interfaces/script.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
# Our local modules
2020
from trepan import interface as Minterface, misc as Mmisc
21-
from trepan.inout import scriptin as Mscriptin, output as Moutput
21+
from trepan.inout import output as Moutput, scriptin as Mscriptin
2222

2323

2424
class ScriptInterface(Minterface.TrepanInterface):
@@ -82,7 +82,7 @@ def finalize(self, last_wishes=None):
8282

8383
def read_command(self, prompt=""):
8484
"""Script interface to read a command. `prompt' is a parameter for
85-
compatibilty and is ignored."""
85+
compatibility and is ignored."""
8686
self.input_lineno += 1
8787
line = self.readline()
8888
if self.verbose:
@@ -95,7 +95,7 @@ def read_command(self, prompt=""):
9595
# Could decide make this look for interactive input?
9696
def readline(self, prompt=""):
9797
"""Script interface to read a line. `prompt' is a parameter for
98-
compatibilty and is ignored."""
98+
compatibility and is ignored."""
9999
return self.input.readline()
100100

101101

trepan/interfaces/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
# Our local modules
2020
from trepan import interface as Minterface
21-
from trepan.inout import tcpserver as Mtcpserver, fifoserver as Mfifoserver
21+
from trepan.inout import fifoserver as Mfifoserver, tcpserver as Mtcpserver
2222
from trepan.interfaces import comcodes as Mcomcodes
2323

2424
DEFAULT_INIT_CONNECTION_OPTS = {"IO": "TCP", "PORT": 1955}
@@ -45,7 +45,7 @@ def __init__(self, inout=None, out=None, connection_opts={}):
4545
self.inout = Mtcpserver.TCPServer(opts=opts)
4646
pass
4747
pass
48-
# For Compatability
48+
# For Compatibility
4949
self.output = self.inout
5050
self.input = self.inout
5151
self.interactive = True # Or at least so we think initially

0 commit comments

Comments
 (0)