google-code-export / pyglet

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

FIX: Pulseaudio / ctypes on Py3k #716

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Two changes are need to be made to make the 'pulse' driver work on Py3k:

https://code.google.com/p/pyglet/source/browse/pyglet/media/drivers/pulse/__init
__.py#211:

str(id(self))  ->  str(id(self)).encode('ASCII')

https://code.google.com/p/pyglet/source/browse/pyglet/media/drivers/pulse/__init
__.py#60

..., app_name)  ->  ..., app_name.encode('ASCII'))

This is because strings are unicode in Py3k. I have tested this fix on Ubuntu 
13.10 using both Python2 and Python3, and it works.

Original issue reported on code.google.com by larson.e...@gmail.com on 27 Mar 2014 at 6:22

GoogleCodeExporter commented 9 years ago
Made the changes in case someone wants to merge upstream. (Let me know if you 
do so I can go back to using `tip.zip`.)

https://code.google.com/r/larsonericd-clone/source/detail?r=5dd0cc3eb64c3ff41fd8
2cc11b38343f05f9614f

Original comment by larson.e...@gmail.com on 27 Mar 2014 at 8:57

GoogleCodeExporter commented 9 years ago
And this change fixes an annoying unclosed-file warning on Py3k as well:

https://code.google.com/r/larsonericd-clone/source/detail?r=73627744502aff11eefc
880ab86f071c81086635&name=fixpulse

Original comment by larson.e...@gmail.com on 27 Mar 2014 at 9:00

GoogleCodeExporter commented 9 years ago
Thanks for your patches, I'll take a look at them ASAP.

Which Python 3 version are you testing?

Original comment by useboxnet on 29 Mar 2014 at 11:27

GoogleCodeExporter commented 9 years ago
Python 3.3.2 from the Ubuntu 13.10 (Saucy) repos. I expect that the patches 
should work for any version of Py3k, since that entire line switched from using 
ASCII strings to Unicode strings by default.

Original comment by larson.e...@gmail.com on 29 Mar 2014 at 2:10

GoogleCodeExporter commented 9 years ago
Great, I'm using Python 3.3.2 (Fedora).

Thanks for the follow up!

Original comment by useboxnet on 29 Mar 2014 at 2:12

GoogleCodeExporter commented 9 years ago
Hey -- just wanted to check to see if there were issues with this patch. The 
status was changed to "accepted", but I don't see it in the changelog although 
newer issues have been addressed 
(https://code.google.com/p/pyglet/source/list). If you haven't gotten around to 
this one, no rush from my end -- but if the contribution isn't correct and 
that's a holdup, feel free to let me know so that I can fix it or at least make 
any future patches work better. Cheers!

Original comment by larson.e...@gmail.com on 4 Apr 2014 at 10:05

GoogleCodeExporter commented 9 years ago
Looks OK, it's just that I didn't have the time to run some tests.

I'll update the ticket when I can work on it. Thanks again for the patch!

Original comment by useboxnet on 4 Apr 2014 at 10:14

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 4696faf9b844.

Original comment by useboxnet on 17 Apr 2014 at 4:53