From 52d25928d57ed37d8ab675a5092fbe13bdae69a4 Mon Sep 17 00:00:00 2001 From: Anson Mansfield Date: Mon, 7 Apr 2025 11:11:58 -0400 Subject: [PATCH] tests/cpydiff: Document ENOTSUP vs EOPNOTSUPP. Signed-off-by: Anson Mansfield --- tests/cpydiff/modules_errno_enotsup.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/cpydiff/modules_errno_enotsup.py diff --git a/tests/cpydiff/modules_errno_enotsup.py b/tests/cpydiff/modules_errno_enotsup.py new file mode 100644 index 0000000000..80e5ad9d03 --- /dev/null +++ b/tests/cpydiff/modules_errno_enotsup.py @@ -0,0 +1,10 @@ +""" +categories: Modules,errno +description: MicroPython does not include ``ENOTSUP`` as a name for errno 95. +cause: MicroPython does not implement the ``ENOTSUP`` canonical alias for ``EOPNOTSUPP`` added in CPython 3.2. +workaround: Use ``errno.EOPNOTSUPP`` in place of ``errno.ENOTSUP``. +""" + +import errno + +print(f"{errno.errorcode[errno.EOPNOTSUPP]=!s}")