[issue35101] inspect.findsource breaks on class frame objects

2019-01-25 Thread Aivar Annamaa
Change by Aivar Annamaa : -- nosy: +Aivar.Annamaa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue35101] inspect.findsource breaks on class frame objects

2018-10-31 Thread orlnub123
orlnub123 added the comment: Added the requested test cases. They aren't an exact match but they should serve the same purpose. -- ___ Python tracker ___

[issue35101] inspect.findsource breaks on class frame objects

2018-10-29 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Seems there is a related open issue with a similar regex based solution proposed for another class definition related issue : https://bugs.python.org/issue22355#msg226538 . I think it's worth converting the example code reported in issue22355 as un

[issue35101] inspect.findsource breaks on class frame objects

2018-10-29 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue35101] inspect.findsource breaks on class frame objects

2018-10-28 Thread orlnub123
Change by orlnub123 : -- keywords: +patch pull_requests: +9527 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list m

[issue35101] inspect.findsource breaks on class frame objects

2018-10-28 Thread orlnub123
New submission from orlnub123 : If you pass a frame object belonging to a class into findsource, it'll incorrectly give you the starting line number of the first function above it or 0 if no functions are defined. Here's some code to reproduce the issue: import inspect def test_func():