Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 2 and 3 #37

Closed
wants to merge 17 commits into from
Closed

Python 2 and 3 #37

wants to merge 17 commits into from

Conversation

moyogo
Copy link
Collaborator

@moyogo moyogo commented Nov 22, 2013

Changes to work in Python 2 and 3. Added some changes from Andrew Miller’s https://bitbucket.org/Milla/fonttools
Todo: bytes, strings and unicode strings.

@khaledhosny
Copy link
Collaborator

@moyogo I suggest you use git rebase -i to cleanup the commits (dropping all the “Merge branch” ones) and then git push -f to force pushing the rewritten history to your fork (and you should try git rebase for merging with upstream commits in the future, quite handy in maintaining “clean” commit history).

@behdad
Copy link
Member

behdad commented Nov 25, 2013

I will be doing a clean pickup of this eventually...

@behdad behdad mentioned this pull request Nov 25, 2013
* replaced <> by !=
* replace `a` by repr(a)
* replace IntType, TupleType, etc. by int, tuple in type testing
* replace string.strip(a) by a.strip(),
  same for string.split() and string.join()
* replace def function(arg1, (arg2a, arg2b), arg3) by
  def function(arg1, args, arg3) followed by arg2a, arg2b = args
* replace print a by print(a)
* replace map() by list comprehension when necessary
* looked at https://bitbucket.org/Milla/fonttools
* import print and division from __future__ as Milla
* changed some print and / to // as Milla
* use argument named element for xml functions as Milla
# The first commit's message is:

* element instead args

# This is the 2nd commit message:

Initial Python 2 and 3 modifications:
* replaced <> by !=
* replace `a` by repr(a)
* replace IntType, TupleType, etc. by int, tuple in type testing
* replace string.strip(a) by a.strip(),
  same for string.split() and string.join()
* replace def function(arg1, (arg2a, arg2b), arg3) by
  def function(arg1, args, arg3) followed by arg2a, arg2b = args
* replace print a by print(a)
* replace map() by list comprehension when necessary
* looked at https://bitbucket.org/Milla/fonttools
* import print and division from __future__ as Milla
* changed some print and / to // as Milla
* use argument named element for xml functions as Milla
* replaced <> by !=
* replace `a` by repr(a)
* replace IntType, TupleType, etc. by int, tuple in type testing
* replace string.strip(a) by a.strip(),
  same for string.split() and string.join()
* replace def function(arg1, (arg2a, arg2b), arg3) by
  def function(arg1, args, arg3) followed by arg2a, arg2b = args
* replace print a by print(a)
* replace map() by list comprehension when necessary
* looked at https://bitbucket.org/Milla/fonttools
* import print and division from __future__ as Milla
* changed some print and / to // as Milla
* use argument named element for xml functions as Milla
@moyogo
Copy link
Collaborator Author

moyogo commented Nov 26, 2013

Yeah, sorry about that. I keep having issue with rebasing, I'll avoid it
for a while now.

On Mon, Nov 25, 2013 at 10:07 AM, Behdad Esfahbod
notifications@github.comwrote:

I will be doing a clean pickup of this eventually...


Reply to this email directly or view it on GitHubhttps://github.com//pull/37#issuecomment-29189525
.

@behdad
Copy link
Member

behdad commented Nov 27, 2013

I'm started working on this myself. Doing one micro commit per fix.

@behdad
Copy link
Member

behdad commented Nov 27, 2013

I pushed my own rework here:

https://github.com/behdad/fonttools/commits/2and3

Haven't figured out unicode vs bytestring :(.

@behdad
Copy link
Member

behdad commented Nov 27, 2013

@moyogo mind reviewing my changes? I'm trying to sort out the last str/unicode bits.

@behdad
Copy link
Member

behdad commented Nov 28, 2013

I have a finished branch here now:

#50

Will merge tomorrow.

@moyogo
Copy link
Collaborator Author

moyogo commented Nov 29, 2013

Thanks Behdad,

I’ll put what I find in https://github.com/moyogo/fonttools/tree/2and3

@moyogo
Copy link
Collaborator Author

moyogo commented Nov 29, 2013

Python 3.3.2 was also complaining about some things. It’s fine now.

@behdad
Copy link
Member

behdad commented Nov 29, 2013

Fixed in master. b3b21fb

@behdad behdad closed this Nov 29, 2013
@moyogo moyogo deleted the py2and3 branch December 2, 2013 08:57
anthrotype pushed a commit to anthrotype/fonttools that referenced this pull request Oct 18, 2018
glifLib: don't write empty 'lib' element in layerinfo.plist
anthrotype pushed a commit to anthrotype/fonttools that referenced this pull request Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants