#4692 closed enhancement (fixed)

Python 3.8 introduces new warning about using operator "is" with a literal

Reported by: Konrad Schwarz Owned by: Chris Johns
Priority: normal Milestone: 5.1
Component: test Version: 5
Severity: normal Keywords: Python 3.8
Cc: Blocked By:
Blocking:

Description

Python 3.8 introduces a new warning: using the "is" operator as an equality operation is incorrect (although it works by chance on CPython). To compare for equality, the "==" operator must be used.

Warnings popped up when I called rtems-tester.

Attached please find patches for this case.

Attachments (1)

0001-Python-3.8-warning-about-is-vs-in-comparisons-of-lit.patch (7.2 KB) - added by Konrad Schwarz on 08/01/22 at 15:59:00.
Patch file

Download all attachments as: .zip

Change History (4)

comment:1 Changed on 08/01/22 at 15:51:56 by Joel Sherrill

Owner: changed from joel@… to Chris Johns
Status: newassigned

comment:2 Changed on 08/01/22 at 15:52:39 by Joel Sherrill

Konrad, there are no patches attached (yet I hope).

And thanks in advance for the patches.

comment:3 Changed on 08/12/22 at 14:18:53 by Konrad Schwarz <konrad.schwarz@…>

Resolution: fixed
Status: assignedclosed

In 04d6aa3/rtems-tools:

Python 3.8 warning about "is" vs "==" in comparisons of literals

Signed-off-by: Konrad Schwarz <konrad.schwarz@…>

Closes #4692

Note: See TracTickets for help on using tickets.