[Patches] [ python-Patches-1159931 ] inspect.py fix for bug #1143895

SourceForge.net noreply at sourceforge.net
Sat Mar 12 17:42:40 CET 2005


Patches item #1159931, was opened at 2005-03-09 15:33
Message generated for change (Comment added) made by arigo
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1159931&group_id=5470

Category: Library (Lib)
Group: Python 2.4
>Status: Open
>Resolution: None
Priority: 5
Submitted By: Simon Percivall (percivall)
Assigned to: Johannes Gijsbers (jlgijsbers)
Summary: inspect.py fix for bug #1143895

Initial Comment:
inspect.getsource in CVS and coming python2.4.1 failed when 
functions, etc., had a comments after the colon, and some other 
cases. Look at bug #1143895 for more.

This patch fixes this problem.

----------------------------------------------------------------------

>Comment By: Armin Rigo (arigo)
Date: 2005-03-12 16:42

Message:
Logged In: YES 
user_id=4771

2.4.1c2 is due in one week, this should go in I guess.  As far as I can see, the status is:

For CVS HEAD, the test patch attached with bug #1143895 applies cleanly.  The patch attached here applies ok (with an offset of one line) and fixes the new test cases just fine.

For 2.4 CVS, the test patch doesn't apply at all (test_inspect.py was reorganized in 2.5).  I attach a smaller test patch for 2.4 below.  The inspect.py patch applies cleanly and fixes this new test.

This should go in before 2.4.1c2 (planned in one week)...

----------------------------------------------------------------------

Comment By: Johannes Gijsbers (jlgijsbers)
Date: 2005-03-12 16:39

Message:
Logged In: YES 
user_id=469548

Checked in on maint24 and HEAD.

----------------------------------------------------------------------

Comment By: Johannes Gijsbers (jlgijsbers)
Date: 2005-03-10 07:30

Message:
Logged In: YES 
user_id=469548

Testcase patch is in bug #1143895. (glad I could reach you,
by the way)

----------------------------------------------------------------------

Comment By: Anthony Baxter (anthonybaxter)
Date: 2005-03-10 04:44

Message:
Logged In: YES 
user_id=29957

This needs a new testcase to exercise the failing behaviour.


----------------------------------------------------------------------

Comment By: Simon Percivall (percivall)
Date: 2005-03-09 22:33

Message:
Logged In: YES 
user_id=329382

The comment was actually for the first patch I submitted here to fix the 
bugs. Then I realized the approach was stupid and made a new patch.

----------------------------------------------------------------------

Comment By: Johannes Gijsbers (jlgijsbers)
Date: 2005-03-09 22:20

Message:
Logged In: YES 
user_id=469548

I believe this could still go in between 2.4.1rc1 and 2.4.1
final, and I'm going to sleep after this message, so it'll
have to. ;)

Sorry for being anal-retentive, but what do you mean by
"it's easy to construct failing cases"? Do you believe
there's any regressions from 2.4.0? Or is it just that
inspect.getsource() isn't perfect and won't be either? If
the latter, I agree that it should be checked in.

Thanks for responding so quickly, by the way.

----------------------------------------------------------------------

Comment By: Simon Percivall (percivall)
Date: 2005-03-09 19:09

Message:
Logged In: YES 
user_id=329382

The patch together with Armin's new tests seems ready to be checked 
in (of course, that's really not my call). If possible, of course do it before 
the 2.4.1 freeze in 5 hours.

----------------------------------------------------------------------

Comment By: Johannes Gijsbers (jlgijsbers)
Date: 2005-03-09 18:27

Message:
Logged In: YES 
user_id=469548

Python 2.4 maint is most important right now. I suspect it
would apply to the trunk cleanly as well.

----------------------------------------------------------------------

Comment By: Simon Percivall (percivall)
Date: 2005-03-09 16:26

Message:
Logged In: YES 
user_id=329382

Which inspect.py rev should the patch be made against? Python 2.4.0, 
Python 2.4 maint or Python CVS?

----------------------------------------------------------------------

Comment By: Simon Percivall (percivall)
Date: 2005-03-09 15:39

Message:
Logged In: YES 
user_id=329382

... It fixes the comment thing, all tests pass, but it's easy to construct 
failing cases.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1159931&group_id=5470


More information about the Patches mailing list