SyntaxWarning on bad equality check
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
s3cmd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* Every time you use `s3cmd` you get a SyntaxWarning due to Python 3.8 changes.
* While this has no functional impact on functions, it pollutes output in a way that is quite annoying.
[Test Case]
* Install s3cmd
* Run any s3cmd command, even `s3cmd --help`.
* Fixed / patched version will not trigger this error
[Regression Potential]
Extremely minimal risk of regression. We are simply replacing `is` with an equality operator per Python 3.8 in two places to remove the warning, and no other functionality is altered.
[Additional Information]
Originally fixed upstream via https:/
[Original Description]
Everytime I use s3cmd I get this warning
/usr/bin/s3cmd:308: SyntaxWarning: "is" with a literal. Did you mean "=="?
if response["status"] is 200:
/usr/bin/s3cmd:310: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif response["status"] is 204:
Issue was reported here
https:/
and seems to be solved in version 2.1.0
no longer affects: | s3-tools |
Changed in s3cmd (Ubuntu Focal): | |
status: | New → Confirmed |
Changed in s3cmd (Ubuntu): | |
status: | Confirmed → Fix Released |
description: | updated |
I made a patch.
It's attached.