Last Comment Bug 537571 - client.py should error out early if wrong python version
: client.py should error out early if wrong python version
Status: RESOLVED FIXED
[Bv1 is fixed-thunderbird3.1b1]
: fixed-seamonkey2.0.4
Product: MailNews Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: All All
: -- minor (vote)
: Thunderbird 3.1a1
Assigned To: Justin Wood (:Callek)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-02 22:06 PST by Justin Wood (:Callek)
Modified: 2010-03-17 12:18 PDT (History)
2 users (show)
bugzillamozillaorg_serge_20140323: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
.4-fixed


Attachments
v1 -- check version (691 bytes, patch)
2010-01-02 22:37 PST, Justin Wood (:Callek)
no flags Details | Diff | Review
v2, without typo [Checkin: Comment 6] (691 bytes, patch)
2010-01-13 10:53 PST, Justin Wood (:Callek)
gozer: review+
Details | Diff | Review
(Bv1) Detect v1- and (future) v4+ too [Checkin: Comment 9] (978 bytes, patch)
2010-01-16 07:54 PST, Serge Gautherie (:sgautherie)
gozer: review+
standard8: approval‑thunderbird3.0.4+
kairo: approval‑seamonkey2.0.3-
kairo: approval‑seamonkey2.0.4+
Details | Diff | Review

Description Justin Wood (:Callek) 2010-01-02 22:06:57 PST
Our client.py requires at least py 2.4 (for subprocess use) and does not [yet] work with python 3.0+

We should abort early with a meaningful error message about this.
Comment 1 Justin Wood (:Callek) 2010-01-02 22:37:11 PST
Created attachment 419803 [details] [diff] [review]
v1 -- check version

this should probably get added to 1.9.1 branch too...
Comment 2 Robert Kaiser (not working on stability any more) 2010-01-10 14:30:50 PST
Comment on attachment 419803 [details] [diff] [review]
v1 -- check version

Actually, I'm gonna forward this to gozer due my bad knowledge of Python, but I'm OK with the general idea of what this is doing.
Comment 3 Serge Gautherie (:sgautherie) 2010-01-12 05:24:31 PST
As well error out for version < 2 too...
Comment 4 Serge Gautherie (:sgautherie) 2010-01-12 05:27:56 PST
Comment on attachment 419803 [details] [diff] [review]
v1 -- check version

sys.version_info returns |(2, 5, 4, 'final', 0)|, for example.

>+if pyver[0] == 2 and pyver[2] < 4:

s/pyver[2]/pyver[1]/ !
Comment 5 Justin Wood (:Callek) 2010-01-13 10:53:02 PST
Created attachment 421483 [details] [diff] [review]
v2, without typo
[Checkin: Comment 6]
Comment 6 Justin Wood (:Callek) 2010-01-13 12:58:35 PST
Comment on attachment 421483 [details] [diff] [review]
v2, without typo
[Checkin: Comment 6]

changeset:   4695:2236baab4456
tag:         tip
user:        Justin Wood <Callek@gmail.com>
date:        Wed Jan 13 15:53:10 2010 -0500
files:       client.py
description:
Bug 537571,  client.py should error out early if wrong python version
r+=gozer


pushing to ssh://hg.mozilla.org/comm-central/
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
Comment 7 Serge Gautherie (:sgautherie) 2010-01-16 07:54:39 PST
Created attachment 422006 [details] [diff] [review]
(Bv1) Detect v1- and (future) v4+ too
[Checkin: Comment 9]

My comment 3 suggestion...
Comment 8 Justin Wood (:Callek) 2010-01-16 10:32:49 PST
Comment on attachment 422006 [details] [diff] [review]
(Bv1) Detect v1- and (future) v4+ too
[Checkin: Comment 9]

I'm inclined not to take this... I haven't heard of anyone still using py 1.x, and by the time py 4.x is out I suspect we'll have some updates here anyway.

But leaving the choice up to gozer.
Comment 9 Justin Wood (:Callek) 2010-01-19 19:25:45 PST
$ hg outgoing -v && hg push
running "ssh hg.mozilla.org "hg -R comm-central/ serve --stdio""
comparing with ssh://hg.mozilla.org/comm-central/
searching for changes
changeset:   4715:a7bc632efcd7
user:        Florian Quèze <florian@queze.net>
date:        Tue Jan 19 22:10:55 2010 -0500
files:       Makefile.in
description:
Bug 446690, make distclean does not fully clean a hg src build
r+=KaiRo, [slight] bitrot fixed by Callek


changeset:   4716:ed37438a476a
tag:         tip
user:        Serge Gautherie <sgautherie.bz@free.fr>
date:        Sat Jan 16 07:54:00 2010 -0500
files:       client.py
description:
Bug 537571 - client.py should error out early if wrong python version;
(Bv1) Detect v1- and (future) v4+ too. r+=Gozer


pushing to ssh://hg.mozilla.org/comm-central/
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 2 changesets with 2 changes to 2 files

http://hg.mozilla.org/comm-central/pushloghtml?fromchange=9defd59740d1&tochange=ed37438a476a
Comment 10 Justin Wood (:Callek) 2010-01-19 20:56:14 PST
Comment on attachment 422006 [details] [diff] [review]
(Bv1) Detect v1- and (future) v4+ too
[Checkin: Comment 9]

requesting approval as this cuts down on failure cases for those who would try and build on 1.9.1 branch... 

This request applies to both patches on this bug.

(Would like both SeaMonkey drivers and TB drivers to agree before pushing)
Comment 11 Robert Kaiser (not working on stability any more) 2010-01-20 04:22:49 PST
Comment on attachment 422006 [details] [diff] [review]
(Bv1) Detect v1- and (future) v4+ too
[Checkin: Comment 9]

On shared code, wo usually go with the Thunderbird approval alone, esp. as it's often Standard8 who who the actual approval and he's able to speak for both projects there.
I can accept this from my POV, therefore marking the SeaMonkey side, but I'll leave the actual decision to Mark or someone else of TB drivers.
Comment 12 Mark Banner (:standard8) 2010-02-01 01:55:17 PST
Comment on attachment 422006 [details] [diff] [review]
(Bv1) Detect v1- and (future) v4+ too
[Checkin: Comment 9]

Presumably both these patches are required. So a=Standard8 for both of them.
Comment 13 Robert Kaiser (not working on stability any more) 2010-02-05 14:39:38 PST
Comment on attachment 422006 [details] [diff] [review]
(Bv1) Detect v1- and (future) v4+ too
[Checkin: Comment 9]

We're about to cut SM 2.0.3 builds and this is not really needed for them, but hasn't landed. Please hold off landing until the relbranch is cut and SM branch version bumped to 2.0.4pre.
Comment 14 Serge Gautherie (:sgautherie) 2010-03-02 04:28:42 PST
Callek, could you land this on c-1.9.1?
Comment 15 Justin Wood (:Callek) 2010-03-02 09:51:28 PST
(In reply to comment #14)
> Callek, could you land this on c-1.9.1?

I don't have a 191 tree atm; checkin-needed
Comment 16 Mark Banner (:standard8) 2010-03-11 06:16:48 PST
Comment on attachment 422006 [details] [diff] [review]
(Bv1) Detect v1- and (future) v4+ too
[Checkin: Comment 9]

Obviously this didn't land for 3.0.2, please try and get it in 3.0.4.
Comment 17 Justin Wood (:Callek) 2010-03-12 11:53:07 PST
Comment on attachment 422006 [details] [diff] [review]
(Bv1) Detect v1- and (future) v4+ too
[Checkin: Comment 9]

Pushed both patches as http://hg.mozilla.org/releases/comm-1.9.1/rev/0c2b5eba28e7

Had to account for some (minor) divergence between branch and head.
Comment 18 Philippe M. Chiasson (:gozer) 2010-03-12 13:19:39 PST
Indentation of that change was incorrect, Thunderbird3.0 tree is burning as a result.

  File "client.py", line 33
    if pyver[0] <= 1 or (pyver[0] == 2 and pyver[1] < 4):
     ^
IndentationError: expected an indented block
Comment 19 Philippe M. Chiasson (:gozer) 2010-03-12 13:36:04 PST
changeset:   4766:34ce0fb973f9
tag:         tip
user:        Philippe M. Chiasson <gozer@mozillamessaging.com>
date:        Fri Mar 12 16:35:40 2010 -0500
summary:     Bug 537571. client.py bustage fix from 0c2b5eba28e7. rs=Standard8

diff --git a/client.py b/client.py
--- a/client.py
+++ b/client.py
@@ -29,10 +29,8 @@
 import sys
 # Test Python Version. 2.4 required for `import subprocess`
 pyver = sys.version_info
-if pyver[0] == 2 and pyver[1] < 4:
 if pyver[0] <= 1 or (pyver[0] == 2 and pyver[1] < 4):
   sys.exit("ERROR: Python 2.4 or newer required")
-elif pyver[0] == 3:
 elif pyver[0] >= 3:
   sys.exit("ERROR: Python series 3 is not supported, use series 2 > 2.4")
 del pyver
Comment 20 Mark Banner (:standard8) 2010-03-17 09:39:42 PDT
Verifying fixed 3.0 on the basis that the patch landed and the subsequent bustage fix haven't broken the builds, and no complaints about Python versions.

Note You need to log in before you can comment on or make changes to this bug.