Tags: asmab/pony
Tags
Pony ORM Release 0.7.4 (2018-07-23) # Major features * Hybrid methods and properties added: https://docs.ponyorm.com/entities.html#hybrid-methods-and-properties * Allow to base queries on another queries: `select(x.a for x in prev_query if x.b)` * Added support of Python 3.7 * Added support of PyPy * `group_concat()` aggregate function added * pony.flask subpackage added for integration with Flask # Other features * `distinct` option added to aggregate functions * Support of explicit casting to `float` and `bool` in queries # Improvements * Apply @cut_traceback decorator only when pony.MODE is 'INTERACTIVE' # Bugfixes * In SQLite3 `LIKE` is case sensitive now * ponyorm#249: Fix incorrect mixin used for Timedelta * ponyorm#251: correct dealing with qualified table names * ponyorm#301: Fix aggregation over JSON Column * ponyorm#306: Support of frozenset constants added * ponyorm#308: Fixed an error when assigning JSON attribute value to the same attribute: obj.json_attr = obj.json_attr * ponyorm#313: Fix missed retry on exception raised during db_session.__exit__ * ponyorm#314: Fix AttributeError: 'NoneType' object has no attribute 'seeds' * ponyorm#315: Fix attribute lifting for JSON attributes * ponyorm#321: Fix KeyError on obj.delete() * ponyorm#325: duplicating percentage sign in raw SQL queries without parameters * ponyorm#331: Overriding __len__ in entity fails * ponyorm#336: entity declaration serialization * ponyorm#357: reconnect after PostgreSQL server closed the connection unexpectedly * Fix Python implementation of between() function and rename arguments: between(a, x, y) -> between(x, a, b) * Fix retry handling: in PostgreSQL and Oracle an error can be raised during commit * Fix optimistic update checks for composite foreign keys * Don't raise OptimisticCheckError if db_session is not optimistic * Handling incorrect datetime values in MySQL * Improved ImportError exception messages when MySQLdb, pymysql, psycopg2 or psycopg2cffi driver was not found * desc() function fixed to allow reverse its effect by calling desc(desc(x)) * __contains__ method should check if objects belong to the same db_session * Fix pony.MODE detection; mod_wsgi detection according to official doc * A lot of inner fixes
Pony ORM Release 0.7.3 (2017-10-23) # New features * `where()` method added to query * `coalesce()` function added * `between(x, a, b)` function added * ponyorm#295: Add `_table_options_` for entity class to specify engine, tablespace, etc. * Make debug flag thread-local * `sql_debugging` context manager added * `sql_debug` and show_values arguments to db_session added * `set_sql_debug` function added as alias to (to be deprecated) `sql_debug` function * Allow `db_session` to accept `ddl` parameter when used as context manager * Add `optimistic=True` option to db_session * Skip optimistic checks for queries in `db_session` with `serializable=True` * `fk_name` option added for attributes in order to specify foreign key name * ponyorm#280: Now it's possible to specify `timeout` option, as well as pass other keyword arguments for `sqlite3.connect` function * Add support of explicit casting to int in queries using `int()` function * Added modulo division % native support in queries # Bugfixes * Fix bugs with composite table names * Fix invalid foreign key & index names for tables which names include schema name * For queries like `select(x for x in MyObject if not x.description)` add "OR x.info IS NULL" for nullable string columns * Add optimistic checking for `delete()` method * Show updated attributes when `OptimisticCheckError` is being raised * Fix incorrect aliases in nested queries * Correctly pass exception from user-defined functions in SQLite * More clear error messages for `UnrepeatableReadError` * Fix `db_session(strict=True)` which was broken in 2d3afb2 * Fixes ponyorm#170: Problem with a primary key column used as a part of another key * Fixes ponyorm#223: incorrect result of `getattr(entity, attrname)` when the same lambda applies to different entities * Fixes ponyorm#266: Add handler to `"pony.orm"` logger does not work * Fixes ponyorm#278: Cascade delete error: FOREIGN KEY constraint failed, with complex entity relationships * Fixes ponyorm#283: Lost Json update immediately after object creation * Fixes ponyorm#284: `query.order_by()` orders Json numbers like strings * Fixes ponyorm#288: Expression text parsing issue in Python 3 * Fixes ponyorm#293: translation of if-expressions in expression * Fixes ponyorm#294: Real stack traces swallowed within IPython shell * `Collection.count()` method should check if session is alive * Set `obj._session_cache_` to None after exiting from db session for better garbage collection * Unload collections which are not fully loaded after exiting from db session for better garbage collection * Raise on unknown options for attributes that are part of relationship
Pony ORM Release 0.7.2 (2017-07-17) # New features * All arguments of db.bind() can be specified as keyword arguments. Previously Pony required the first positional argument which specified the database provider. Now you can pass all the database parameters using the dict: db.bind(**db_params). See https://docs.ponyorm.com/api_reference.html#Database.bind * The `optimistic` attribute option is added https://docs.ponyorm.com/api_reference.html#cmdoption-arg-optimistic # Bugfixes * Fixes ponyorm#219: when a database driver raises an error, sometimes this error was masked by the 'RollbackException: InterfaceError: connection already closed' exception. This happened because on error, Pony tried to rollback transaction, but the connection to the database was already closed and it masked the initial error. Now Pony displays the original error which helps to understand the cause of the problem. * Fixes ponyorm#276: Memory leak * Fixes the __all__ declaration. Previously IDEs, such as PyCharm, could not understand what is going to be imported by 'from pony.orm import *'. Now it works fine. * Fixes ponyorm#232: negate check for numeric expressions now checks if value is zero or NULL * Fixes ponyorm#238, fixes ponyorm#133: raise TransactionIntegrityError exception instead of AssertionError if obj.collection.create(**kwargs) creates a duplicate object * Fixes ponyorm#221: issue with unicode json path keys * Fixes bug when discriminator column is used as a part of a primary key * Handle situation when SQLite blob column contains non-binary value
Pony ORM Release 0.7.1 (2017-01-10) # New features * New warning DatabaseContainsIncorrectEmptyValue added, it is raised when the required attribute is empty during loading an entity from the database # Bugfixes * Fixes ponyorm#216: Added Python 3.6 support * Fixes ponyorm#203: subtranslator should use argnames from parent translator * Change a way aliases in SQL query are generated in order to fix a problem when a subquery alias masks a base query alias * Volatile attribute bug fixed * Fix creation of self-referenced foreign keys - before this Pony didn't create the foreign key for self-referenced attributes * Bug fixed: when required attribute is empty the loading from the database shouldn't raise the validation error. Now Pony raises the warning DatabaseContainsIncorrectEmptyValue * Throw an error with more clear explanation when a list comprehension is used inside a query instead of a generator expression: "Use generator expression (... for ... in ...) instead of list comprehension [... for ... in ...] inside query"
Pony ORM Release 0.7 (2016-10-11) Starting with this release Pony ORM is release under the Apache License, Version 2.0. # New features * Added getattr() support in queries: https://docs.ponyorm.com/api_reference.html#getattr # Backward incompatible changes * ponyorm#159: exceptions happened during flush() should not be wrapped with CommitException Before this release an exception that happened in a hook(https://docs.ponyorm.com/api_reference.html#entity-hooks), could be raised in two ways - either wrapped into the CommitException or without wrapping. It depended if the exception happened during the execution of flush() or commit() function on the db_session exit. Now the exception happened inside the hook never will be wrapped into the CommitException. # Bugfixes * ponyorm#190: Timedelta is not supported when using pymysql
PonyORM Release 0.6.6 (2016-08-22) # New features * Added native JSON data type support in all supported databases: https://docs.ponyorm.com/json.html # Backward incompatible changes * Dropped Python 2.6 support # Improvements * ponyorm#179 Added the compatibility with PYPY using psycopg2cffi * Added an experimental @db_session `strict` parameter: https://docs.ponyorm.com/transactions.html#strict # Bugfixes * ponyorm#182 - LEFT JOIN doesn't work as expected for inherited entities when foreign key is None * Some small bugs were fixed
Pony ORM Release 0.6.5 (2016-04-04) # Improvements * Fixes ponyorm#172: Query prefetch() method should load specified lazy attributes right in the main query if possible # Bugfixes * Fixes ponyorm#168: Incorrect caching when slicing the same query multiple times * Fixes ponyorm#169: When py_check() returns False, Pony should truncate too large values in resulting ValueError message * Fixes ponyorm#171: AssertionError when saving changes of multiple objects * Fixes ponyorm#176: Autostripped strings are not validated correctly for Required attributes See blog post for more detailed information: https://blog.ponyorm.com/2016/04/04/pony-orm-release-0-6-5/
Pony ORM Release 0.6.3 (2016-02-05) This release brings no new features, has no backward incompatible changes, only bug fixes. If you are using obj.flush() method in your code we recommend you to upgrade to 0.6.3 release. Blog post: https://blog.ponyorm.com/2016/02/05/pony-orm-release-0-6-3/
PreviousNext