Skip to content

update needed for CP 9 to use busdisplay to eliminate FutureWarnings #37

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

Closed
jerryneedell opened this issue Dec 30, 2023 · 1 comment · Fixed by #39
Closed

update needed for CP 9 to use busdisplay to eliminate FutureWarnings #37

jerryneedell opened this issue Dec 30, 2023 · 1 comment · Fixed by #39

Comments

@jerryneedell
Copy link

jerryneedell commented Dec 30, 2023

When this library is used with CP9 some "FutureWarnings" are generated due to this line

https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SSD1306/blob/main/adafruit_displayio_ssd1306.py#L62
class SSD1306(displayio.Display):
I think it just needs to be changed to:
class SSD1306(busdisplay.BusDisplay):
as well as importing busdisplay instead of displayio

Is this already planned for update when CP9 is released?
I suppose it will need to check for the CP release for backward compatibility.

I imagine there will be many guide updates as well when CP9 is released.
https://learn.adafruit.com/adafruit-oled-featherwing/python-usage and had to make a new changes to code.py but also had to update the library as noted to eliminate all warnings.

I just wanted to open this as a warning to other users. Feel free to close it if this is being dealt with in another way.

Since the FutureWarnings are just Warnings, it works fine as is but the warnings can be annoying.

@tannewt
Copy link
Member

tannewt commented Jan 17, 2024

Ya, the plan is to update everything once 9.0 is stable and it's been long enough for folks to be using it by default. You can disable the warning output in the meantime.

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 a pull request may close this issue.

2 participants