We need to loop to compare the values instead of using a dictionary because the
values are not necessary hashable. But it is still an improvement compared to
calling the set method for each record.
issue5398
review19111002
default values should be constant during the create transaction so we could
cache the result and avoid query it for each created record.
issue5397
review16121002
This allows to loop over the key in the same order as the list of records.
Also avoid to use .keys() when iterating on dict because it generate a useless
list on Python2.
Use list on dict instead of .keys() to avoid one extra call on Python3 because
.key() return an iterator.
issue5396
review20061002
cursor_dict returns an iterator that consumes the cursor. This means the cursor
can not be used before the iteration is stopped. So we need to use another
cursor to make the update queries.
When we instantiate a Database for each database to test, the threaded
connection pool keep one connection opens which could consume all the available
connections even if the databases are not really used.
issue5368
review16091002
This is more efficient if there are a huge number of old login attempt because
it avoid to fetch the ids and to have loop over them to delete.
issue5377
review24901002
Cache.resets create a new transaction but SQLite keeps a lock from the previous
transaction is it was not committed.
This commit was removed by changeset 9b2e0aac2d9c
issue5388
review16071002
The login data comes from an unauthenticated user so it could be very large and
thus fill the database. But indeed we don't need to have the full login to get
the LoginAttempt benefit, just the 1024 starting char is enough.
issue5381
review17901002
First entries of "skip_data" blocks were always imported,
since the call to startElement was done right after setting
the taghandler attribute.
issue5254
review20781003
The getter of the Binary field could be called many times in the same
transaction, so popping out the format from the context create a side effect
that changes the requested format.
issue3774
review19981002
This method is there to only skip the id attribute to be set using the field
__set__ but it has a cost as it is called each time an attribute is set.
So we store now the id value in the attribute '_id' which doesn't overload the
field and we adapt field __get__ for this new location.
The __getitem__ is also removed as it is deprecated since 2.6.
issue5296
review17031002
In Python3, None can not be ordered because it doesn't have a natural order.
So we implement the same behaviour for SQLite than PostgreSQL which ignore NULL.
issue5358
review20821002
Since the support of python3 has been added file_open will return unicode
object when read in normal mode but icon files has to be considered as bytes
and lxml.etree.fromstring expect also bytes when there is an encoding
declaration (and not unicode).
issue5354
review17081002
2to3 doesn't convert unicode string of Python 2 into string of Python 3.
So we will use a special checker that remove the 'u' prefix when checking
output.
issue3211
review19911002
The sax parser expect a byte stream, so we must open the file with the binary
mode. Also file_open should have a default encoding to None because encoding
should not be set in binary mode.
issue5313