Skip to content

Commit

Permalink
Drop support for codehack which was in fact never declared.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Feb 2, 2021
1 parent 62c6c38 commit 1240c38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

- Drop support for Python 3.4.

- Drop support for ``codehack`` which was in fact never declared.


4.0.0 (2017-05-08)
==================
Expand Down
11 changes: 4 additions & 7 deletions src/zope/app/debug/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ def do_ob(self, arg):
return dbg


def getlineno(code):
return code.co_firstlineno


def fbreak(db, meth):
try:
meth = meth.__func__
Expand All @@ -199,10 +203,3 @@ def fbreak(db, meth):
lineno = getlineno(code)
filename = code.co_filename
db.set_break(filename, lineno)


try:
from codehack import getlineno
except ImportError:
def getlineno(code):
return code.co_firstlineno

0 comments on commit 1240c38

Please sign in to comment.