drobilla / ingen

A realtime modular synthesizer and/or effects processor
GNU Affero General Public License v3.0
30 stars 7 forks source link

Python 3 incompatibilities #8

Closed SpotlightKid closed 4 years ago

SpotlightKid commented 5 years ago
  1. In ingen.py, line 224 when iterating over the attributes of class NS, dunder attributes (__dict__ and __weakref__) must be skipped, otherwise rdflib logs this warning.
<attribute '__dict__' of 'NS' objects> does not look like a valid URI, trying to serialize this will break.
<attribute '__weakref__' of 'NS' objects> does not look like a valid URI, trying to serialize this will break.

Adding these attributes as URIRefs, also leads to an error when calling ingen.Remote.get():

error: at line 13 of <>:
Bad syntax (expected '.' or '}' or ']' at end of statement) at ^ in:
"...b" .\n@prefix __dict__: <<attribute '__dict__' of 'NS' objects>"^b"> .\n@prefix __weakref__: <<attribute '__weakref__' of 'NS' o"..."
  1. In ingenish the return value of ingen.Remote.get() (type bytes) must be decoded before printing, to keep the corerct formatting in the output. There may be other places where decoding bytes instances is necessary.

Here's a patch I apply to the ingen-git AUR package, which, I believe, fixes these issues:

https://aur.archlinux.org/cgit/aur.git/tree/ingen-ingenish-python3.diff?h=ingen-git

drobilla commented 4 years ago

I really need to sit down and write proper Python bindings one of these days...

cf2d9708707d4a85ad774b7a333101914736fc10, thanks.