This release doesn’t bring any new features, only bug fixes. The release brings no backward-incompatible changes, so you can upgrade from PonyORM 0.6.2 without any modifications in your code.
- Fixed #138: Incorrect behavior of obj.flush(): assertion failed after exception
- Fixed #157: Incorrect transaction state after obj.flush() caused “release unlocked lock” error in SQLite
- Fixed #151: SQLite + upper() or lower() does not work as expected
#138: Incorrect behavior of obj.flush(): assertion failed after exception,
#157: Incorrect transaction state after obj.flush() caused “release unlocked lock” error in SQLite
These are long-standing bugs, but they were discovered just recently. The bugs were caused by incorrect implementation of
obj.flush() method. In the same time the global
flush() function worked correctly. Before this fix the method
obj.flush() didn’t call
after_xxx hooks. In some cases it led to assertion error or some other errors when using SQLite.
Now both bugs are fixed and the method
obj.flush() works properly.
#151: SQLite + upper() or lower() does not work as expected
Since SQLite does not support Unicode operations, the
lower() SQL functions do not work for non-ascii symbols.
Starting with this release Pony registers two additional unicode-aware functions in SQLite:
py_lower(), and uses these functions instead of the standard
>>> select(p.id for p in Person if p.name.upper() == 'John')[:]
SELECT "p"."id" FROM "Person" "p" WHERE py_upper("p"."name") = 'John'
For other databases Pony still uses standard