Skip to content

Commit

Permalink
Merge pull request #9096 from dhalbert/9.0.x-disable-displayio-warnings
Browse files Browse the repository at this point in the history
Disable 9.0.0 displayio warnings
  • Loading branch information
dhalbert committed Mar 26, 2024
2 parents 7d30ef3 + 999a4ac commit 6d1b940
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions py/circuitpy_mpconfig.h
Expand Up @@ -38,6 +38,12 @@
// Always 1: defined in circuitpy_mpconfig.mk
// #define CIRCUITPY (1)

// Can be removed once CircuitPython 10 is released.
// Print warnings or not about deprecated names. See objmodule.c.
#ifndef CIRCUITPY_8_9_WARNINGS
#define CIRCUITPY_8_9_WARNINGS (0)
#endif

// REPR_C encodes qstrs, 31-bit ints, and 30-bit floats in a single 32-bit word.
#ifndef MICROPY_OBJ_REPR
#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)
Expand Down
2 changes: 1 addition & 1 deletion py/objmodule.c
Expand Up @@ -66,7 +66,7 @@ STATIC void module_attr_try_delegation(mp_obj_t self_in, qstr attr, mp_obj_t *de
STATIC void module_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
mp_obj_module_t *self = MP_OBJ_TO_PTR(self_in);
if (dest[0] == MP_OBJ_NULL) {
#if CIRCUITPY_DISPLAYIO && CIRCUITPY_WARNINGS
#if CIRCUITPY_8_9_WARNINGS && CIRCUITPY_DISPLAYIO && CIRCUITPY_WARNINGS
if (self == &displayio_module) {
#if CIRCUITPY_BUSDISPLAY
if (attr == MP_QSTR_Display) {
Expand Down

0 comments on commit 6d1b940

Please sign in to comment.