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.

classification
Title: inspect.py fix for bug #1143895
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: jlgijsbers Nosy List: anthonybaxter, arigo, jlgijsbers, simon.percivall
Priority: normal Keywords: patch

Created on 2005-03-09 15:33 by simon.percivall, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
new_inspect2.diff simon.percivall, 2005-03-09 16:23 patch for python CVS and 2.4.1 inspect.py (v2)
inspect_bugs_24.diff arigo, 2005-03-12 16:42 test case for 2.4
Messages (13)
msg47909 - (view) Author: Simon Percivall (simon.percivall) Date: 2005-03-09 15:33
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.
msg47910 - (view) Author: Simon Percivall (simon.percivall) Date: 2005-03-09 15:39
Logged In: YES 
user_id=329382

... It fixes the comment thing, all tests pass, but it's easy to construct 
failing cases.
msg47911 - (view) Author: Simon Percivall (simon.percivall) Date: 2005-03-09 16:26
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?
msg47912 - (view) Author: Johannes Gijsbers (jlgijsbers) * (Python triager) Date: 2005-03-09 18:27
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.
msg47913 - (view) Author: Simon Percivall (simon.percivall) Date: 2005-03-09 19:09
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.
msg47914 - (view) Author: Johannes Gijsbers (jlgijsbers) * (Python triager) Date: 2005-03-09 22:20
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.
msg47915 - (view) Author: Simon Percivall (simon.percivall) Date: 2005-03-09 22:33
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.
msg47916 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2005-03-10 04:44
Logged In: YES 
user_id=29957

This needs a new testcase to exercise the failing behaviour.
msg47917 - (view) Author: Johannes Gijsbers (jlgijsbers) * (Python triager) Date: 2005-03-10 07:30
Logged In: YES 
user_id=469548

Testcase patch is in bug #1143895. (glad I could reach you,
by the way)
msg47918 - (view) Author: Johannes Gijsbers (jlgijsbers) * (Python triager) Date: 2005-03-12 16:39
Logged In: YES 
user_id=469548

Checked in on maint24 and HEAD.
msg47919 - (view) Author: Armin Rigo (arigo) * (Python committer) Date: 2005-03-12 16:42
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)...
msg47920 - (view) Author: Johannes Gijsbers (jlgijsbers) * (Python triager) Date: 2005-03-12 16:49
Logged In: YES 
user_id=469548

Teehee. Well, I've now also checked in your test patch for 2.4.
msg47921 - (view) Author: Armin Rigo (arigo) * (Python committer) Date: 2005-03-13 08:03
Logged In: YES 
user_id=4771

Sorry, we must have written our comment at the same time.  I didn´t see 
yours before I posted mine, and I didn´t intend to reopen the tracker.
History
Date User Action Args
2022-04-11 14:56:10adminsetgithub: 41672
2005-03-09 15:33:14simon.percivallcreate