8000 Remove CIRCUITPY_8_9_WARNINGS and its usage. · adafruit/circuitpython@4bcc424 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4bcc424

Browse files
committed
Remove CIRCUITPY_8_9_WARNINGS and its usage.
1 parent 04e6363 commit 4bcc424

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
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_8_9_WARNINGS
23-
#define CIRCUITPY_8_9_WARNINGS (0)
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_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
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) {

0 commit comments

Comments
 (0)
0