bottlepy / bottle

bottle.py is a fast and simple micro-framework for python web-applications.
http://bottlepy.org/
MIT License
8.44k stars 1.47k forks source link

SyntaxWarning in Python 3.8 tests due to using is to compare literals. #1196

Closed tirkarthi closed 3 years ago

tirkarthi commented 4 years ago

Comparison of literals using "is" now raises SyntaxWarning from Python 3.8 . Use == to fix the warnings. This is a good beginner issue.

 test/test_server.py:56
  /home/runner/work/bottle/bottle/test/test_server.py:56: SyntaxWarning: "is" with a literal. Did you mean "=="?
    if rv is 128: # Import error

test/test_server.py:62
  /home/runner/work/bottle/bottle/test/test_server.py:62: SyntaxWarning: "is" with a literal. Did you mean "=="?
    if rv is 3: # Port in use
npalladium commented 4 years ago

Volunteering to create a PR to fix this if it can wait till 12th Feb or so.

tirkarthi commented 4 years ago

@npalladium I am not working on it. Feel free to pick it up.