@@ -67,6 +67,33 @@ static void module_attr_try_delegation(mp_obj_t self_in, qstr attr, mp_obj_t *de
6767static 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_8_9_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
7097 // load attribute
7198 mp_map_elem_t * elem = mp_map_lookup (& self -> globals -> map , MP_OBJ_NEW_QSTR (attr ), MP_MAP_LOOKUP );
7299 if (elem != NULL ) {
0 commit comments