Closed Bug 793061 Opened 12 years ago Closed 12 years ago

Proper string type assertions in pymake

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla18

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(1 file)

The Python in bug 780329 is Python 3 compatible, which means string literals are unicode not str in Python 2.x. Pymake as it is currently coded does not like this. This patch allows pymake to accept unicode strings for variable names. This was the minimal amount of work necessary to get the patches in bug 780329 to work while still running in Python 3 "all strings are Unicode" mode.

Technically, the only change needed is to convert 'str' to 'basestring'. But, I went ahead and gave it the dual Python 2 and 3 compatibility treatment, as I figure pymake will be ported to Python 3 eventually.
Attachment #663238 - Flags: review?(mh+mozilla)
Blocks: 780329
Comment on attachment 663238 [details] [diff] [review]
Allow unicode through on Python 2, v1

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

::: build/pymake/pymake/data.py
@@ +330,2 @@
>                  fd.write(e)
>                      

Can you remove the whitespaces on this line while you're here?
Attachment #663238 - Flags: review?(mh+mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/531cc108ec41
Assignee: nobody → gps
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: