python3-cephfs focal 'syntax warning' is/literal
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ceph (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
During apt install from an otherwise blank focal/mate:
setting up python3-cephfs (15.2.1-0ubuntu2) ...
/usr/lib/
group_id = group_id if group_id is not 'None' else None
/usr/lib/
readonly = True if access_level is 'r' else False
/usr/lib/
...
The compiler now produces a SyntaxWarning when identity checks (is and is not) are used with certain types of literals (e.g. strings, numbers). These can often work by accident in CPython, but are not guaranteed by the language spec. The warning advises users to use equality tests (== and !=) instead. (Contributed by Serhiy Storchaka in bpo-34850.)
Good detail here on why this can go horribly wrong if ignored: /adamj. eu/tech/ 2020/01/ 21/why- does-python- 3-8-syntaxwarni ng-for- is-literal/
https:/