Skip to content

Commit 1876c71

Browse files
committed
Convert completely to new displayio bindings; remove warnings
1 parent 70fe5cd commit 1876c71

File tree

3 files changed

+1
-47
lines changed

3 files changed

+1
-47
lines changed

py/circuitpy_mpconfig.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@
1717
// Always 1: defined in circuitpy_mpconfig.mk
1818
// #define CIRCUITPY (1)
1919

20-
// Can be removed once CircuitPython 10 is released.
21-
// Print warnings or not about deprecated names. See objmodule.c.
22-
#ifndef CIRCUITPY_9_10_WARNINGS
23-
#define CIRCUITPY_9_10_WARNINGS (1)
24-
#endif
25-
2620
// REPR_C encodes qstrs, 31-bit ints, and 30-bit floats in a single 32-bit word.
2721
#ifndef MICROPY_OBJ_REPR
2822
#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)

py/objmodule.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -67,33 +67,6 @@ static void module_attr_try_delegation(mp_obj_t self_in, qstr attr, mp_obj_t *de
6767
static void module_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
6868
mp_obj_module_t *self = MP_OBJ_TO_PTR(self_in);
6969
if (dest[0] == MP_OBJ_NULL) {
70-
// CIRCUITPY-CHANGE
71-
#if CIRCUITPY_9_10_WARNINGS && CIRCUITPY_DISPLAYIO && CIRCUITPY_WARNINGS
72-
if (self == &displayio_module) {
73-
#if CIRCUITPY_BUSDISPLAY
74-
if (attr == MP_QSTR_Display) {
75-
warnings_warn(&mp_type_FutureWarning, MP_ERROR_TEXT("%q moved from %q to %q"), MP_QSTR_Display, MP_QSTR_displayio, MP_QSTR_busdisplay);
76-
warnings_warn(&mp_type_FutureWarning, MP_ERROR_TEXT("%q renamed %q"), MP_QSTR_Display, MP_QSTR_BusDisplay);
77-
}
78-
#endif
79-
#if CIRCUITPY_EPAPERDISPLAY
80-
if (attr == MP_QSTR_EPaperDisplay) {
81-
warnings_warn(&mp_type_FutureWarning, MP_ERROR_TEXT("%q moved from %q to %q"), MP_QSTR_EPaperDisplay, MP_QSTR_displayio, MP_QSTR_epaperdisplay);
82-
}
83-
#endif
84-
#if CIRCUITPY_FOURWIRE
85-
if (attr == MP_QSTR_FourWire) {
86-
warnings_warn(&mp_type_FutureWarning, MP_ERROR_TEXT("%q moved from %q to %q"), MP_QSTR_FourWire, MP_QSTR_displayio, MP_QSTR_fourwire);
87-
}
88-
#endif
89-
#if CIRCUITPY_I2CDISPLAYBUS
90-
if (attr == MP_QSTR_I2CDisplay) {
91-
warnings_warn(&mp_type_FutureWarning, MP_ERROR_TEXT("%q moved from %q to %q"), MP_QSTR_I2CDisplay, MP_QSTR_displayio, MP_QSTR_i2cdisplaybus);
92-
warnings_warn(&mp_type_FutureWarning, MP_ERROR_TEXT("%q renamed %q"), MP_QSTR_I2CDisplay, MP_QSTR_I2CDisplayBus);
93-
}
94-
#endif
95-
}
96-
#endif
9770
// load attribute
9871
mp_map_elem_t *elem = mp_map_lookup(&self->globals->map, MP_OBJ_NEW_QSTR(attr), MP_MAP_LOOKUP);
9972
if (elem != NULL) {

shared-bindings/displayio/__init__.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,21 +100,8 @@ static const mp_rom_map_elem_t displayio_module_globals_table[] = {
100100
{ MP_ROM_QSTR(MP_QSTR_Palette), MP_ROM_PTR(&displayio_palette_type) },
101101
{ MP_ROM_QSTR(MP_QSTR_TileGrid), MP_ROM_PTR(&displayio_tilegrid_type) },
102102

103-
// Remove these in CircuitPython 10
104-
#if CIRCUITPY_BUSDISPLAY
105-
{ MP_ROM_QSTR(MP_QSTR_Display), MP_ROM_PTR(&busdisplay_busdisplay_type) },
106-
#endif
107-
#if CIRCUITPY_EPAPERDISPLAY
108-
{ MP_ROM_QSTR(MP_QSTR_EPaperDisplay), MP_ROM_PTR(&epaperdisplay_epaperdisplay_type) },
109-
#endif
110-
#if CIRCUITPY_FOURWIRE
111-
{ MP_ROM_QSTR(MP_QSTR_FourWire), MP_ROM_PTR(&fourwire_fourwire_type) },
112-
#endif
113-
#if CIRCUITPY_I2CDISPLAYBUS
114-
{ MP_ROM_QSTR(MP_QSTR_I2CDisplay), MP_ROM_PTR(&i2cdisplaybus_i2cdisplaybus_type) },
115-
#endif
116-
117103
{ MP_ROM_QSTR(MP_QSTR_release_displays), MP_ROM_PTR(&displayio_release_displays_obj) },
104+
118105
{ MP_ROM_QSTR(MP_QSTR_CIRCUITPYTHON_TERMINAL), MP_ROM_PTR(&circuitpython_splash) },
119106
};
120107
static MP_DEFINE_CONST_DICT(displayio_module_globals, displayio_module_globals_table);

0 commit comments

Comments
 (0)