zopefoundation / zope.sqlalchemy

Integration of SQLAlchemy with transaction management
Other
32 stars 34 forks source link

Fix string comparison (use != instead of is not) #41

Closed martinstein closed 4 years ago

martinstein commented 4 years ago

Python 3.8 gives a warning for us in zope/sqlalchemy/datamanager.py:132:

SyntaxWarning: "is not" with a literal. Did you mean "!="?

That warning seems correct, and the is not might even lead to unintended results. So this line should probably be changed to != .

martinstein commented 4 years ago

Good to hear. Can this be merged without the whole Contributor Agreement? I'd say the proposed change is so small that it can be considered a "minor change" according to the Policy for Contributor Agreements ( https://plone.org/foundation/materials/foundation-resolutions/patch-policy-052011 ). They mention as minor fixes:

Correcting typographic errors such as incorrect identifiers, operators, punctuation or white space;

and the PR simply corrects an operator, so it should be fine.

mgedmin commented 4 years ago

Yeah, the change looks too trivial to be copyrightable, so I'm going to just merge this.

Thank you!