[Bug 1878939] [NEW] python3-cephfs focal 'syntax warning' is/literal

Harry Coin hgcoin at gmail.com
Fri May 15 15:12:57 UTC 2020


Public bug reported:

During apt install from an otherwise blank focal/mate:

setting up python3-cephfs (15.2.1-0ubuntu2) ...
/usr/lib/python3/dist-packages/ceph_volume_client.py:358: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  group_id = group_id if group_id is not 'None' else None
/usr/lib/python3/dist-packages/ceph_volume_client.py:381: SyntaxWarning: "is" with a literal. Did you mean "=="?
  readonly = True if access_level is 'r' else False
/usr/lib/python3/dist-packages/ceph_volume_client.py:1102: SyntaxWarning: "is" with a literal. Did you mean "=="?

...
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.)

** Affects: ceph (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to ceph in Ubuntu.
https://bugs.launchpad.net/bugs/1878939

Title:
  python3-cephfs focal 'syntax warning' is/literal

Status in ceph package in Ubuntu:
  New

Bug description:
  During apt install from an otherwise blank focal/mate:

  setting up python3-cephfs (15.2.1-0ubuntu2) ...
  /usr/lib/python3/dist-packages/ceph_volume_client.py:358: SyntaxWarning: "is not" with a literal. Did you mean "!="?
    group_id = group_id if group_id is not 'None' else None
  /usr/lib/python3/dist-packages/ceph_volume_client.py:381: SyntaxWarning: "is" with a literal. Did you mean "=="?
    readonly = True if access_level is 'r' else False
  /usr/lib/python3/dist-packages/ceph_volume_client.py:1102: SyntaxWarning: "is" with a literal. Did you mean "=="?

  ...
  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.)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1878939/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list