The default bug view has changed. See this FAQ.

Require python >= 2.4 to build Mozilla (and >=2.5 on Windows hosts)

RESOLVED FIXED in mozilla1.9.2a1

Status

()

Core
Build Config
RESOLVED FIXED
9 years ago
6 years ago

People

(Reporter: Waldo, Assigned: ted)

Tracking

Trunk
mozilla1.9.2a1
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(status1.9.1 .9-fixed)

Details

Attachments

(4 attachments)

Among other things, this would give us subprocess, which would simplify the matter of creating new processes in Python.  (We'd still need killableprocess for adding the crucial API for killing processes, but that's a minor hurdle compared to writing process code using at least two different process abstractions.)  Bug 418009's patch, followup fix, and followup followup fix are examples of the problems this causes.
Can we require 2.4 on linux/mac and 2.5 on Windows? MozillaBuild already comes with 2.5, but linux distros have all kinds of python and I don't particularly want to require 2.5 there.

I'm pretty sure we can have a standard API based on subprocess/killableprocess that works with 2.5/win 2.4/maclinux
Don't distros usually dump python2.5 in a separate package if that's necessary?  MacPorts does that, certainly, and requiring someone to put something in their mozconfigs isn't that big a deal.

It's not just the libraries that make Python 2.5 desirable, it's being able to use the same language and same features everywhere -- array comprehensions come to mind as one such feature that you have to actively remember not to use if we're going to split our requirements this way.  I'd very much prefer the exact same version of the language everywhere, and I'm sure people writing Python scripts in the tree who happen to be on systems with 2.5 would agree that it's more pain to remember to test with a version that's not the default on their system in addition to whatever the default is.
(Assignee)

Comment 3

9 years ago
Per IRC discussion, we're comfortable requiring 2.4, and 2.5 on Windows. Scratchbox ships with 2.3 by default, but ships 2.4 as python2.4. OS X 10.4 ships with 2.3 by default, but 2.4/2.5 are easily installable via darwinports (which you need to use to get other build dependencies anyway). We only officially support MozillaBuild on Windows, which ships with 2.5, and Waldo thinks 2.5-isms have crept into the Windows paths of our Python code anyway, so we might as well make that requirement explicit.

We could make life slightly easier for the scratchbox folks by changing the check to be something like:
AC_PATH_PROGS(PYTHON, $PYTHON python2.5 python2.4 python)

but it's not a requirement.
Assignee: nobody → ted.mielczarek
Summary: Require python >= 2.5 to build Mozilla → Require python >= 2.4 to build Mozilla (and >=2.5 on Windows)
(Assignee)

Comment 4

8 years ago
Created attachment 349753 [details] [diff] [review]
require Python 2.4, 2.5 on Windows
[Checkin: Comment 11]

Pretty simple test.
Attachment #349753 - Flags: review?(benjamin)
Attachment #349753 - Flags: review?(benjamin) → review+
(In reply to comment #3)
> We could make life slightly easier for the scratchbox folks by changing the
> check to be something like:
> AC_PATH_PROGS(PYTHON, $PYTHON python2.5 python2.4 python)

Mind throwing that in to the current patch? Would save us some trouble...
(Assignee)

Comment 6

8 years ago
Will do, I forgot about that.
(Assignee)

Comment 7

8 years ago
Pushed (with the scratchbox-assistance change):
http://hg.mozilla.org/mozilla-central/rev/96956634349c
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: mozilla2.0 → mozilla1.9.2a1

Updated

8 years ago
Depends on: 467526
(Assignee)

Comment 8

8 years ago
I backed this out because it broke the Mobile build, because Scratchbox in fact only ships 2.3 by default. I'm going to file a RelEng bug to get the Mobile tinderbox updated, and we'll just have to put it in the build setup documentation.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Updated

8 years ago
Depends on: 467595
Blocks: 464191
(Assignee)

Updated

8 years ago
No longer depends on: 467526
Duplicate of this bug: 467526
(Assignee)

Updated

8 years ago
Status: REOPENED → ASSIGNED
Summary: Require python >= 2.4 to build Mozilla (and >=2.5 on Windows) → Require python >= 2.4 to build Mozilla (and >=2.5 on Windows hosts)
(Assignee)

Comment 10

8 years ago
I'll check this back in soon, since the tinderboxes all got updated.
(Assignee)

Comment 11

8 years ago
Re-pushed to m-c:
http://hg.mozilla.org/mozilla-central/rev/ad1cb31760d0
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago8 years ago
Resolution: --- → FIXED
I don't know what the situation was a year ago,
but current python releases are:
{
http://www.python.org/download/releases/

2.3.5-2.3.7: security-fix-only mode
2.4.4-2.4.6: same
2.5.4-(fut): same
2.6.1      : bugfix-only mode
3.0.1      : same
3.1        : current version
}

Thus, moving away from 2.3 (and earlier) is good :-)

Then, what about a plan for followups ?
To 2.5: to have the same on all platforms, as written in some previous comments.
To 2.6: later?
Why do we need further plans? 2.4+ solves our current problems.
(In reply to comment #13)

I was referring to comment 2 then using a supported version just seems good.
Created attachment 371499 [details] [diff] [review]
require Python 2.4, 2.5 on Windows HOST
[Checkin: Comment 25]
Attachment #371499 - Flags: review?(ted.mielczarek)
Comment on attachment 371499 [details] [diff] [review]
require Python 2.4, 2.5 on Windows HOST
[Checkin: Comment 25]

>-        HOST_AR_FLAGS='-NOLOGO -OUT:"$@"'
>+        HOST_AR_FLAGS='-NOLOGO -OUT:$@'
Whoops. Sorry about that. Remind me not to check it in ;-)

Comment 17

8 years ago
this breaks scratchbox builds...
(Assignee)

Comment 18

8 years ago
So update the docs. RelEng updated Python in Scratchbox on all the build machines.
(Assignee)

Updated

8 years ago
Attachment #371499 - Flags: review?(ted.mielczarek) → review+
(Assignee)

Comment 19

8 years ago
Comment on attachment 371499 [details] [diff] [review]
require Python 2.4, 2.5 on Windows HOST
[Checkin: Comment 25]

-        HOST_AR_FLAGS='-NOLOGO -OUT:"$@"'
+        HOST_AR_FLAGS='-NOLOGO -OUT:$@'

Unrelated change?

r=me otherwise.
Comment on attachment 371499 [details] [diff] [review]
require Python 2.4, 2.5 on Windows HOST
[Checkin: Comment 25]

Pushed changeset 3e3a7373a3d0 to mozilla-central.
Can this patch also be landed on mozilla-1.9.1? It would let us simplify some mobile fennec unittest work, see details in bug#462889 (comment#21).
Flags: wanted1.9.1?
Why do you need it? It just sets the minimum version, and shouldn't affect the release systems at all.
(In reply to comment #21)
> Can this patch also be landed on mozilla-1.9.1? It would let us simplify some
> mobile fennec unittest work, see details in bug#462889 (comment#21).

(In reply to comment #22)
> Why do you need it? It just sets the minimum version, and shouldn't affect the
> release systems at all.

Inside scratchbox, /usr/bin/python is 2.3, so we want to look for 2.5 first. If this patch is landed on the 1.9.1 branch, then it will simplify a little what aki has to do in bug#462889... see attachment and recent comments there for more details.

Does that help clarify?
The patches here don't include it, but Ted changed MOZ_PATH_PROGS to check for python2.5 when he pushed them:

http://hg.mozilla.org/mozilla-central/rev/ad1cb31760d0#l24
Blocks: 504994
(In reply to comment #20)
> (From update of attachment 371499 [details] [diff] [review])
> Pushed changeset 3e3a7373a3d0 to mozilla-central.

Correct changeset is:
http://hg.mozilla.org/mozilla-central/rev/0611a19fee9d
Followup to bug 427750 to check for Python 2.5 only when building on Windows as a host
Created attachment 427024 [details] [diff] [review]
(Cv1-CC) Port (the useful part of) it to comm-central
[Checkin: Comment 28 & 37]

PYTHON_VERSION check in m-c should be enough.
Attachment #427024 - Flags: review?(bugspam.Callek)
Flags: in-testsuite-
Comment on attachment 427024 [details] [diff] [review]
(Cv1-CC) Port (the useful part of) it to comm-central
[Checkin: Comment 28 & 37]

I am partial to having the ver check here; but its not a requirement; I'll check with KaiRo if its worthwhile [later] no need to do it on my preference.
Attachment #427024 - Flags: review?(bugspam.Callek) → review+
Comment on attachment 427024 [details] [diff] [review]
(Cv1-CC) Port (the useful part of) it to comm-central
[Checkin: Comment 28 & 37]


http://hg.mozilla.org/comm-central/rev/4e74b1e6e94c
Attachment #427024 - Attachment description: (Cv1-CC) Port (the useful part of) it to comm-central → (Cv1-CC) Port (the useful part of) it to comm-central [Checkin: Comment 28]
Attachment #349753 - Attachment description: require Python 2.4, 2.5 on Windows → require Python 2.4, 2.5 on Windows [Checkin: Comment 11]
Attachment #371499 - Attachment description: require Python 2.4, 2.5 on Windows HOST → require Python 2.4, 2.5 on Windows HOST [Checkin: Comment 25]
(Assignee)

Comment 29

7 years ago
In the future, please file new bugs instead of adding patches to bugs that have been closed for many months.
Blocks: 506493
Blocks: 548670
Created attachment 429080 [details] [diff] [review]
(Dv1-191) Copy it to m-1.9.1 too
[Checkin: Comment 33]

"approval1.9.1.9=?":
Zero risk, build config only.
To fix bug 548670.
Attachment #429080 - Flags: approval1.9.1.9?
Comment on attachment 429080 [details] [diff] [review]
(Dv1-191) Copy it to m-1.9.1 too
[Checkin: Comment 33]

a1919=beltzner, but please do as Ted suggests next time
Attachment #429080 - Flags: approval1.9.1.9? → approval1.9.1.9+
Comment on attachment 427024 [details] [diff] [review]
(Cv1-CC) Port (the useful part of) it to comm-central
[Checkin: Comment 28 & 37]


Looking for "approval-seamonkey2.0.4=?" actually.
Attachment #427024 - Flags: review?(kairo)
Comment on attachment 429080 [details] [diff] [review]
(Dv1-191) Copy it to m-1.9.1 too
[Checkin: Comment 33]


http://hg.mozilla.org/releases/mozilla-1.9.1/rev/5b9590ed573d

Sorry, I pushed with my name...
Attachment #429080 - Attachment description: (Dv1-191) Copy it to m-1.9.1 too → (Dv1-191) Copy it to m-1.9.1 too [Checkin: Comment 33]
(In reply to comment #31)
> please do as Ted suggests next time

I'd be happy to use the hundreds of bugs that someone would file to deal with
http://dev.seamonkey.at/?d=x&i=mozilla&m=c
... :-|
status1.9.1: --- → .9-fixed
Flags: wanted1.9.1?
(Assignee)

Comment 35

7 years ago
Just because someone isn't going to file your bugs for you doesn't mean you can co-opt mine. I'm fine with you reusing my bugs when they're still open, but please don't dredge up bugs that have been closed for a long time. Feel free to file one big bug for all your work, I don't care.

Comment 36

7 years ago
Comment on attachment 427024 [details] [diff] [review]
(Cv1-CC) Port (the useful part of) it to comm-central
[Checkin: Comment 28 & 37]

a-sm2.0.4=me
Attachment #427024 - Flags: review?(kairo) → review+
Comment on attachment 427024 [details] [diff] [review]
(Cv1-CC) Port (the useful part of) it to comm-central
[Checkin: Comment 28 & 37]


http://hg.mozilla.org/releases/comm-1.9.1/rev/24075bb298ee
Attachment #427024 - Attachment description: (Cv1-CC) Port (the useful part of) it to comm-central [Checkin: Comment 28] → (Cv1-CC) Port (the useful part of) it to comm-central [Checkin: Comment 28 & 37]
(In reply to comment #35)
> Feel free to file one big bug for all your work, I don't care.

I'll do ... and just get complains about that again :-[
Blocks: 613811
You need to log in before you can comment on or make changes to this bug.