SyntaxWarning on bad equality check

Bug #1874651 reported by Giovanni
34
This bug affects 4 people
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://github.com/s3tools/s3cmd/commit/92a9c79b5a505d66ff25b661ef9c5191d9985252

[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://github.com/s3tools/s3cmd/issues/1055
and seems to be solved in version 2.1.0

Revision history for this message
Giovanni (gcrisci) wrote :

I made a patch.
It's attached.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "s3cmd.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in s3cmd (Ubuntu):
status: New → Confirmed
Revision history for this message
Ben Coleman (oloryn) wrote :

This is potentially especially annoying to me, because I have backups that use s3cmd that run under cron, with the expectation that they emit nothing when the backups go ok. Spewing these warnings could potentially spam my inbox daily.

Revision history for this message
Alistair Cunningham (acunningham) wrote :

Any news on fixing this? It's really annoying.

Revision history for this message
Thomas Ward (teward) wrote :

Just got bit by this myself.

no longer affects: s3-tools
Thomas Ward (teward)
Changed in s3cmd (Ubuntu Focal):
status: New → Confirmed
Changed in s3cmd (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Kai Kasurinen (kai-kasurinen) wrote :

2.1.0-1 published in groovy-release on 2020-05-03

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because the bug has been fixed in the latest development version of Ubuntu.

Thomas Ward (teward)
description: updated
Revision history for this message
Thomas Ward (teward) wrote :

@Kai This is still SRUable for Focal I believe.

Debdiff attached for Focal with the nitpicked patch from Upstream git.

Revision history for this message
Thomas Ward (teward) wrote :

This is also uploaded to Focal Proposed as well right now.

description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Giovanni, or anyone else affected,

Accepted s3cmd into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/s3cmd/2.0.2-1ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

summary: - SyntaxWaning on bad equality check
+ SyntaxWarning on bad equality check
Changed in s3cmd (Ubuntu Focal):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Giovanni (gcrisci) wrote :

Hi

I confirm that the proposed package works. Thanks for your help.

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Giovanni (gcrisci) wrote :

I installed the proposed 2.0.2-1ubuntu1 package
https://launchpad.net/ubuntu/+source/s3cmd/2.0.2-1ubuntu1
by adding the focal-proposed repository.
After that, all the s3cmd commands worked without the annoying SyntaxWarning message.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package s3cmd - 2.0.2-1ubuntu1

---------------
s3cmd (2.0.2-1ubuntu1) focal; urgency=medium

  * d/patches/py38-compat.patch: Apply fixes for syntax issues introduced
    by Python 3.8, from upstream. (LP: #1874651)

 -- Thomas Ward <email address hidden> Mon, 31 Aug 2020 12:31:54 -0400

Changed in s3cmd (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for s3cmd has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Chris Hillery (ceejatec) wrote :

Verified problem is resolved after "apt update && apt install s3cmd". Thank you!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.