|Summary:||webkitpy __init__.py (webkit-patch) should detect python < 2.5 and show a nice error message|
|Product:||WebKit||Reporter:||Eric Seidel (no email) <eric>|
|Component:||Tools / Tests||Assignee:||Chris Jerdonek <cjerdonek>|
|Severity:||Normal||CC:||abarth, cjerdonek, ddkilzer, dglazkov, fishd, levin, tony|
|Version:||528+ (Nightly build)|
|OS:||OS X 10.5|
|Bug Depends on:||35788, 35828|
Description Eric Seidel (no email) 2009-11-16 01:31:34 PST
Comment 1 Tony Chang 2009-11-16 10:04:26 PST
Would it be hard to just support python2.4? I don't really like python's ternary syntax anyway. If you want to detect version, you can use sys.version_info.
Comment 2 Mark Rowe (bdash) 2009-11-16 11:37:07 PST
Solution 1 isn’t a good idea since it’ll break for folks that only have Python > 2.5.
Comment 3 Eric Seidel (no email) 2009-11-16 14:44:48 PST
I'm not sure how difficult it would be support 2.4. I'd have to check what other features we depend on.
Comment 4 Chris Jerdonek 2010-01-26 20:45:22 PST
For future reference, here is a case of code breaking with Python 2.5: https://bugs.webkit.org/show_bug.cgi?id=33365#c9 Maybe test-webkitpy should issue a warning if run using Python 2.6+.
Comment 5 Chris Jerdonek 2010-03-07 17:07:35 PST
Created attachment 50180 [details] Proposed patch I didn't add any information about how to upgrade. Perhaps we can simply include a link to this wiki page, and include instructions there: http://trac.webkit.org/wiki/PythonGuidelines Let me know your preference. Also, note that pending patches in the following two reports are required for this patch to work: https://bugs.webkit.org/show_bug.cgi?id=35828 https://bugs.webkit.org/show_bug.cgi?id=35788 So the style bot may not work. Also marking cq- for that reason.
Comment 6 Adam Barth 2010-03-13 02:23:11 PST
Comment on attachment 50180 [details] Proposed patch I'm not wild about the name "patcher.py". We've discussed the issue of python version requirements a bunch. I'm not 100% sure what the final resolution was, but this patch is just making the code print a nicer error message. If we want to support older versions of Python, we can still do that.
Comment 7 Chris Jerdonek 2010-03-13 16:05:14 PST
(In reply to comment #6) > (From update of attachment 50180 [details]) > I'm not wild about the name "patcher.py". Agreed. We can rename in a later patch. I mainly wanted to choose something without "webkit" in the name since it's redundant with being in webkitpy. Naming the main lead-in file for a package main.py might be a good way to go. But that didn't quite seem to fit here since the module does more than expose a main method -- it defines a substantive class. > We've discussed the issue of python version requirements a bunch. I'm not 100% > sure what the final resolution was, but this patch is just making the code > print a nicer error message. If we want to support older versions of Python, > we can still do that. Exactly. Hopefully we'll get clarification on that soon. I might prod the list again on Monday -- this time with an attempted summary.
Comment 8 Chris Jerdonek 2010-03-13 16:24:35 PST
Manually committed (via git svn dcommit): http://trac.webkit.org/changeset/55972