This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author arigo
Recipients arigo
Date 2016-12-06.11:51:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1481025113.14.0.88132106313.issue28883@psf.upfronthosting.co.za>
In-reply-to
Content
(C5) setting f_lineno didn't evolve when the rest of the bytecodes evolved,
  which means it is not safe any more::

    import sys

    def f():
        try:
            raise ValueError    # line 5
        except ValueError:
            print(42)           # line 7

    def my_trace(*args):
        print(args)
        if args[1] == 'line':
            f = args[0]
            if f.f_lineno == 5:
                f.f_lineno = 7
        return my_trace

    sys.settrace(my_trace)
    f()
    sys.settrace(None)
History
Date User Action Args
2016-12-06 11:51:53arigosetrecipients: + arigo
2016-12-06 11:51:53arigosetmessageid: <1481025113.14.0.88132106313.issue28883@psf.upfronthosting.co.za>
2016-12-06 11:51:53arigolinkissue28883 messages
2016-12-06 11:51:52arigocreate