kennethreitz / clint

Python Command-line Application Tools
http://pypi.python.org/pypi/clint/
ISC License
95 stars 19 forks source link

Python 3.8 SyntaxWarning fix #184

Closed palewire closed 1 year ago

palewire commented 3 years ago

Starting in Python 3.8, this happened:

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

This patch takes the official advice and makes a tweak.

weakish commented 2 years ago

duplicate of #182

palewire commented 1 year ago

I am withdrawing this duplicate PR