Closed Bug 804005 Opened 9 years ago Closed 9 years ago

Update dom/imptests python to be py3k-compatible

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla19

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Details

Attachments

(1 file)

Attached patch Patch v1Splinter Review
No description provided.
Attachment #673717 - Flags: review?(jhammel)
So I'm unfamiliar with 't' in python file modes, nor does casual googling tell me anything about it.  Does this mean 't' == 'text'?  I thought this was the default if 'b' wasn't specified. (I'm also not sure why any of the files here were using the binary mode anyway, but that's another story.)

Looks good. Assuming this is tested and works on python 2.6 (or whatever we require these days), r+
Attachment #673717 - Flags: review?(jhammel) → review+
(In reply to Jeff Hammel [:jhammel] from comment #1)
> So I'm unfamiliar with 't' in python file modes, nor does casual googling
> tell me anything about it.  Does this mean 't' == 'text'?  I thought this
> was the default if 'b' wasn't specified.

Yep: <http://docs.python.org/release/3.0.1/library/functions.html#open>. I can drop the t's if you prefer.

> (I'm also not sure why any of the
> files here were using the binary mode anyway, but that's another story.)

I picked up the habit of using binary mode at some point, I don't remember why.

> Looks good. Assuming this is tested and works on python 2.6 (or whatever we
> require these days), r+

This code already requires 2.7 for collections.OrderedDict, and it works there.
(In reply to :Ms2ger from comment #2)
> (In reply to Jeff Hammel [:jhammel] from comment #1)
> > So I'm unfamiliar with 't' in python file modes, nor does casual googling
> > tell me anything about it.  Does this mean 't' == 'text'?  I thought this
> > was the default if 'b' wasn't specified.
> 
> Yep: <http://docs.python.org/release/3.0.1/library/functions.html#open>. I
> can drop the t's if you prefer.

I'd prefer removing them but have no strong opinion.

> > (I'm also not sure why any of the
> > files here were using the binary mode anyway, but that's another story.)
> 
> I picked up the habit of using binary mode at some point, I don't remember
> why.
> 
> > Looks good. Assuming this is tested and works on python 2.6 (or whatever we
> > require these days), r+
> 
> This code already requires 2.7 for collections.OrderedDict, and it works
> there.

:( Then I guess this train has sailed
https://hg.mozilla.org/mozilla-central/rev/20965bd69e28
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.