Bugs item #1445743, was opened at 2006-03-08 16:58
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1445743&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: SQLObject from repository
Status: Open
Resolution: None
Priority: 5
Submitted By: Dennis Brakhane (dennis)
Assigned to: Nobody/Anonymous (nobody)
Summary: SQLObject uses assert for parameter checks
Initial Comment:
SQLObject uses some assert statements to make sure the
classes were given correct parameters or called correctly.
For example, in dbconnection.py
def uri(self):
auth = getattr(self, 'user', None) or ''
if auth:
if self.password:
auth = auth + '@' + self.password
auth = auth + ':'
else:
>>> assert not getattr(self, 'password',
None), (
>>> 'URIs cannot express passwords
without usernames')
or
assert not self._obsolete, "This transaction has
already gone through ROLLBACK; begin another transaction"
The problem with these constructs is that if SQLObject
is compiled with -O (which, for example Debian does),
asserts are removed!
So I can import sqlobject and happily pass incorrect
values, it will not be noticed.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1445743&group_id=74338
|