Closed Bug 804865 Opened 7 years ago Closed 7 years ago

Require Python 2.7 to build the tree

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla21

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(1 file, 2 obsolete files)

We just completed the bump to Python 2.6 in bug 800614. I figured I'd file the bug to track bumping up to 2.7 to *build* the tree. Note that this is different from running tests, etc. I'd love to move everything to 2.7 (but that's tracked in bug 724191).

Bumping minimum Python has been discussed previously at https://groups.google.com/d/topic/mozilla.dev.platform/djN02O03APc/discussion.

This will likely be a more contentious transition than 2.5 -> 2.6 because apparently some distros are still lagging behind the times. Never mind that modern distros are switching to Python 3.2+ as the default Python.

I'm not too worried about these concerns. On Windows, MozillaBuild provides Python 2.7.2 (although I'd love to see it provide 2.7.3). On OS X, we have mozboot (python/mozboot in m-c). We also have mozboot for some Linux distros and BSDs. Where we don't have mozboot coverage, there almost certainly exists a Python 2.7 package for every distro.

Long term we need to support Python 3. It's doubtful we're going to perform an atomic/flag day transition. And, Python 2.7 + 3 is much, much, much saner than 2.6 + 3. It would be a lot of extra effort on everybody to continue to support Python 2.6. So, Python 3 via 2.7 is the way we are doing it. This bug tracks our way forward.

https://tbpl.mozilla.org/?tree=Try&rev=7179f7d5713f should hopefully tell us where we stand in RelEng land. On top of Try results, we need to consider SeaMonkey and l10n.
Here's the patch in case I get hit by a bus. I'm not asking for review because we're not ready to move forward yet.
> I'm not too worried about these concerns. On Windows, MozillaBuild provides
> Python 2.7.2 (although I'd love to see it provide 2.7.3).

RyanVM has patches in bug 788911 to update MozillaBuild to 2.7.3.
Depends on: 804873
I approve this message.
AFAICT all of the TBPL builders are on Python 2.7. So, I guess that means we can seriously talk about moving forward!

Where do we stand with SeaMonkey, Thunderbird, and l10n?
Removed bit rot.

I also posted to dev-platform regarding our intent to move forward. https://groups.google.com/d/msg/mozilla.dev.platform/djN02O03APc/4v62AsozlycJ

I figure we wait until final confirmation all builders are on 2.7 and at least Thursday, December 6 to give people the opportunity to weigh in.

Justin: Is SeaMonkey ready for this?
Assignee: nobody → gps
Attachment #674470 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #687455 - Flags: review?(ted)
Flags: needinfo?(bugspam.Callek)
AFAIK SeaMonkey Windows and OS X buildslaves run Python 2.7, Linux buildslaves run Python 2.6. The Thunderbird Windows buildslaves (w64-ix-slave*) seem to run Python 2.6 (got this from the build log).
Depends on: 817345
Comment on attachment 687455 [details] [diff] [review]
Require Python 2.7 to build the tree, v2

Review of attachment 687455 [details] [diff] [review]:
-----------------------------------------------------------------

A++ would review again
Attachment #687455 - Flags: review?(ted) → review+
Kev: I /think/ you have the list of distro maintainers. Could you reach out to them (maybe CC them on this bug) and let them know about this?
(In reply to Gregory Szorc [:gps] from comment #8)
> Kev: I /think/ you have the list of distro maintainers. Could you reach out
> to them (maybe CC them on this bug) and let them know about this?

The linux@distributions.bugs alias should be enough.
(In reply to Mike Hommey [:glandium] from comment #9)
> The linux@distributions.bugs alias should be enough.

Adding the usual suspects anyways
Ubuntu 10.04 has python 2.6 and that's supported on the desktop until April 2013
OpenBSD has python 2.7 as default python since 18 months, that includes 5.1 and 5.2 supported releases.
There are even things like RHEL and CentOS with 2.4 or 2.5 that are supported until 2020 or something equally outrageous. I doubt we'll even be supporting 2.7 by then.

Our main concern for requiring 2.7 is whether it will introduce undue burden on anybody. Given Python is relatively easy to install from source and given that many distros provide a Python 2.7 package in some form, and given we have an in-tree mechanism for bootstrapping systems to build the tree (see below), we don't think it will. But, you never know.

While all the distro people are here, the in-tree system bootstrapping mechanism alluded to lives at https://hg.mozilla.org/mozilla-central/file/e8f0504ccbb9/python/mozboot/mozboot. If you see anything wrong or sub-par, please don't hesitate to file bugs in the Core :: Build Config component.
Blocks: 818646
(In reply to Gregory Szorc [:gps] from comment #5)
> Justin: Is SeaMonkey ready for this?

Ok we did the investigation -- short answer is "no we're not ready" but tldr is no need to block on us.

* We have OSX Machines using py 2.7 already
* We have py2.7 installed [but not used] on Windows machines
 ** TODO here is install pywin32 and flip some paths in buildbot
* Linux has py2.6 and will be our hardest update
 ** We need to double check that Moz does NOT have a 2.7 rpm for where/how we need the install
 ** If not we need to create/update a spec file and generate said rpm for cent5
 ** Deploy it to our linux32 and linux64 slaves, since we don't yet have the Mock-Based slaves

Linux will be our longest delay, but I should be able to get windows done within the next day or two, and we won't lose all coverage because OSX is ready.
Flags: needinfo?(bugspam.Callek)
From Ubuntu's perspective, as we build from source on each release separately, we'd prefer this not to land until mozilla-central is bumped to 21 as 21 will be released after Ubuntu 10.04 (which is the last supported python 2.6 release on the Desktop) is EOL on the Desktop.
Micah: I think we can probably be okay with that. The primary motivator here is that we have a bunch of code that's been written as Python 2.7+  (bug 784841) that we really want to get landed. It's using Python 2.7 features in order to be forward-compatible with Python 3, so we'd rather not have to strip that out.

gps: are you okay with holding this until 21? I think you said that was when you wanted to land bug 784841 anyway.
I'm OK waiting for 21. We'll land this as soon as m-c switches over. Hopefully we can also land bug 784841 at the same time. But if we're not ready to do bug 784841, we can still land this.

lsblakk, akeybl: Any chance I could have this patch added to the "make the tree drinking age" procedure? (I'm not sure how you capture one-off version bump tasks.)
Reviewed patch, ready for check-in.
Attachment #687455 - Attachment is obsolete: true
Attachment #690975 - Flags: review+
https://hg.mozilla.org/projects/build-system/rev/8108ebc84975
Whiteboard: [fixed-in-build-system]
https://hg.mozilla.org/mozilla-central/rev/8108ebc84975
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-build-system]
Target Milestone: --- → mozilla21
Worth modifying the CLOBBER file? (given m-c tip needed a clobber on windows)
This shouldn't require clobber unless paths in buildbot configs were changed recently.

configure has always prioritized python2.7 over python, so my vote would be to not burden individual developers with a silly clobber and instead clobber whatever trees need it.
But in the case where python2.6 is present but python2.7 isn't and python is 2.7, a clobber would legitimately fixed it. Now I'm confusing myself.
Depends on: 833838
Blocks: 870420
Blocks: 1388452
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.