Closed jerryneedell closed 6 years ago
Is there an existing workaround for this CPX CP 3.0 incompatibility?
woops we missed this one - no workaround right now! we have to fix :)
@jerryneedell wanna try submitting a PR fix?
I am going to try to get up a CP build/test env and take a stab at a fix for this issue
oops -- looks like I dropped the ball on this one -- sorry @ladyada . @idcrook please go ahead - let me me know if you run into problems and I can take a look at it.
OK, I am creating a CircuitPython build and have successfully built a CP .uf2 on macOS and deployed to a CPX.
Are there some example python code snippets for idiomatically addressing 2.0 / 3.0 / 4.0 version compatibility handling that you can point me to, @jerryneedell ? I was thinking I would put version checks inline in the code and then use the appropriate function signatures.
There is precedent for doing an inline check.
@idcrook you can check the version via sys.implementation.version[0] - here is an example: https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/blob/master/adafruit_circuitplayground/express.py#L624
I'd do something similar and see if any of the reviewers have alternative suggestions. Good luck!
Thank you for the code pointer, @jerryneedell -- was exactly what I was looking for. I've submitted a PR
The PR was accepted and merged. It has been observed working on both CP/libs 2.x, and CP/libs 3.x on a CircuitPlayground Express. I think this issue can be closed, and perhaps the RTTTL library released with the fix?
heya @kattni yay wanna re-release & close?
Done!
this line causes an error under CP3.0 because of an API change. https://github.com/adafruit/Adafruit_CircuitPython_RTTTL/blob/master/adafruit_rtttl.py#L170
test code