kmonsoor / pyglet

Automatically exported from code.google.com/p/pyglet
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

[pull] Improving font query on Windows #675

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I've updated lib to list system installed fonts on Windows. Please, pull as I 
don't have commit rights. pyglet also fails to load raster fonts on Windows, so 
I disabled querying for them.

https://code.google.com/r/techtonik-fontquery/source/list

Original issue reported on code.google.com by techtonik@gmail.com on 21 Oct 2013 at 3:41

GoogleCodeExporter commented 9 years ago
Your new testing code doesn't support Python 2 because of the print statements. 
Is it OK if I change them to be python 2 compatible? 2to3 will change them to 
python 3.

Original comment by useboxnet on 21 Oct 2013 at 5:49

GoogleCodeExporter commented 9 years ago
Also, do you want me to change that if?

https://code.google.com/r/techtonik-fontquery/source/browse/pyglet/font/win32que
ry.py#341

Original comment by useboxnet on 21 Oct 2013 at 5:52

GoogleCodeExporter commented 9 years ago
This is the diff ready to merge.

Please let me know if you're happy with it.

Original comment by useboxnet on 21 Oct 2013 at 8:26

Attachments:

GoogleCodeExporter commented 9 years ago
Eh, ignore the change in build.rst.

Original comment by useboxnet on 21 Oct 2013 at 8:27

GoogleCodeExporter commented 9 years ago
I am not sure which print statements are you speaking about. I run 
win32query.py with Python 2.7.3 and it works ok.

That if does nothing. It is useful and active in DEBUG mode only.

I can not review the diff you attached. It is better to see comment on commits 
in Google Code directly. I turned on code reviews for my clone.

Original comment by techtonik@gmail.com on 22 Oct 2013 at 1:05

GoogleCodeExporter commented 9 years ago
I'm working directly on the diff after puling from your repo.

I'm going to commit the code and then you can ask me to change anything you 
want. It's just about code behind the DEBUG flag.

Please review: 
http://code.google.com/p/pyglet/source/detail?r=c698662310e67aff69672c2bf257a465
489ca977

Original comment by useboxnet on 22 Oct 2013 at 1:14

GoogleCodeExporter commented 9 years ago
s/pulig/pulling/

To be honest, google code and hg feel very awkward to me. I'm too used to 
GitHub and git!

Thanks for your patience.

Original comment by useboxnet on 22 Oct 2013 at 1:15

GoogleCodeExporter commented 9 years ago
WIth HG you pull changesets, not branches. Just ask if something is not clear, 
and don't try to apply you Git habits to HG - its different and powerful in its 
own ways.

Original comment by techtonik@gmail.com on 22 Oct 2013 at 1:32

GoogleCodeExporter commented 9 years ago
Sorry about that.

I'll try to revert the last commit and the I'll need your help. Also I used the 
wrong commit, probably because the same mistake.

Original comment by useboxnet on 22 Oct 2013 at 1:34

GoogleCodeExporter commented 9 years ago
No need to apologize. Take your time to learn how it works for the future. ;)

Original comment by techtonik@gmail.com on 22 Oct 2013 at 1:40

GoogleCodeExporter commented 9 years ago
OK, I reverted the change.

Now, can you tell me if the following steps are correct?

- hg pull https://code.google.com/r/techtonik-fontquery/
- hg push

That's it, isn't it? Then I can make my changes (I definitely don't like the 
print statements).

Original comment by useboxnet on 22 Oct 2013 at 1:50

GoogleCodeExporter commented 9 years ago
Yes. The steps are correct. But I do it:

  hg pull -u https://code.google.com/r/techtonik-fontquery/
  # view log (if rebase is needed)
  hg log --graph -l 5
  # test
  hg push

"don't like" is usually a bad argument for a technical discussion. Can you be 
more specific what do you dislike about current print statements?

Original comment by techtonik@gmail.com on 22 Oct 2013 at 1:57

GoogleCodeExporter commented 9 years ago
It's a way of speaking. "I don't like" python 3 code in a python 2 code base, 
even if it is behind a DEBUG flag (meaning it won't be run).

I'm going to change it to be Python 2 compatible and it will be converted by 
2to3 like the rest of the code.

But the merge first... how do I rebase in hg? I can't get it right, when I push 
it complains saying I didn't merge, but If I do... I get local changes. I'll 
find out how to do this.

Original comment by useboxnet on 22 Oct 2013 at 2:57

GoogleCodeExporter commented 9 years ago
Oh, I think I understand what's going on. Your repo has pending changes and 
needs to rebase pyglet's default. That's why I can't get your changes right and 
I get that merge mess.

Can you do that for me?

(unless there's something I don't know, very likely as I'm hg newbie)

Original comment by useboxnet on 22 Oct 2013 at 3:35

GoogleCodeExporter commented 9 years ago
OK! I've done it... but still really confusing :)

I'll make the print changes when I have the time.

Original comment by useboxnet on 22 Oct 2013 at 4:32

GoogleCodeExporter commented 9 years ago

Original comment by useboxnet on 22 Oct 2013 at 4:32

GoogleCodeExporter commented 9 years ago
I don't understand why do you call existing code not Python 2 compatible. I am 
certain that code inside and outside DEBUG section is Python 2 compatible. Have 
you tried to run it with Python 2? What errors did you get?

Can you be more specific about problem that this code causes? Is it 2to3?

Original comment by techtonik@gmail.com on 24 Oct 2013 at 8:41

GoogleCodeExporter commented 9 years ago
You're right, it's just that pyglet code base is not using parenthesis for 
print statements and I got an error somewhere else and I misinterpreted it.

There was no problem with the code.

Original comment by useboxnet on 24 Oct 2013 at 8:44

GoogleCodeExporter commented 9 years ago
Ok. Now I am confident there are no problems with my lib. =)

And congratulations with pulling and merging those changesets properly.

Original comment by techtonik@gmail.com on 24 Oct 2013 at 8:49

GoogleCodeExporter commented 9 years ago
Thanks, I really appreciate your help with this.

Please keep the patches coming :)

Original comment by useboxnet on 24 Oct 2013 at 8:51