Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Fix python syntax to suppress 3.8 warnings about "is with a literal" #84

Closed
wants to merge 1 commit into from

Conversation

aptalca
Copy link

@aptalca aptalca commented Jan 10, 2020

Python 3.8 is now displaying a warning when is is used with a literal.

Here are the relevant errors with 2.4.0:

/usr/lib/python3.8/site-packages/CloudFlare/cloudflare.py:839: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if email is '':
/usr/lib/python3.8/site-packages/CloudFlare/cloudflare.py:841: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if token is '':
/usr/lib/python3.8/site-packages/CloudFlare/cloudflare.py:843: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if certtoken is '':

See python/cpython#9642 for more info

closes #83

@mahtin
Copy link

mahtin commented Jan 14, 2020

Yeah - I found a bunch of these and pushed it as branch fix-python-3.8 which is merged into master now and released as 2.4.1 on https://pypi.org/project/cloudflare/ (i.e. pip3 install cloudflare)

@mahtin mahtin closed this Jan 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python 3.8 warnings about "is with a literal"
2 participants