Skip to content

Releases: ponyorm/pony

Pony ORM Release 0.7.1

10 Jan 14:52
Compare
Choose a tag to compare

New features

  • New warning DatabaseContainsIncorrectEmptyValue added, it is raised when the required attribute is empty during loading an entity from the database

Bugfixes

  • Fixes #216: Added Python 3.6 support
  • Fixes #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

11 Oct 19:15
Compare
Choose a tag to compare

Starting with this release Pony ORM is release under the Apache License, Version 2.0.

New features

Backward incompatible changes

  • #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

  • #190: Timedelta is not supported when using pymysql

PonyORM Release 0.6.6 (2016-08-22)

22 Aug 13:35
Compare
Choose a tag to compare

New features

Backward incompatible changes

  • Dropped Python 2.6 support

Improvements

Bugfixes

  • #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)

04 Apr 12:17
Compare
Choose a tag to compare

Improvements

  • Fixes #172: Query prefetch() method should load specified lazy attributes right in the main query if possible

Bugfixes

  • Fixes #168: Incorrect caching when slicing the same query multiple times
  • Fixes #169: When py_check() returns False, Pony should truncate too large values in resulting ValueError message
  • Fixes #171: AssertionError when saving changes of multiple objects
  • Fixes #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.4

10 Feb 16:36
Compare
Choose a tag to compare

Pony ORM Release 0.6.4 (2016-02-10)

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.4 release.

  • Fixed #161: 0.6.3 + obj.flush(): after_insert, after_update & after_delete hooks do not work

Pony ORM Release 0.6.3

05 Feb 16:45
Compare
Choose a tag to compare

This release was intended to fix the behavior of obj.flush(), but failed to do it in a proper way.
Please skip this release and update to 0.6.4 if you are using obj.flush() method.

  • 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 before_xxx and 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 upper() and lower() SQL functions do not work for non-ascii symbols.

Starting with this release Pony registers two additional unicode-aware functions in SQLite: py_upper() and py_lower(), and uses these functions instead of the standard upper() and lower() functions:

>>> select(p.id for p in Person if p.name.upper() == 'John')[:]

SQLite query:

SELECT "p"."id"
FROM "Person" "p"
WHERE py_upper("p"."name") = 'John'

For other databases Pony still uses standard upper() and lower() functions.

Pony ORM Release 0.6.2

11 Jan 13:15
Compare
Choose a tag to compare

Pony ORM Release 0.6.2 (2016-01-11)

Blogpost: https://blog.ponyorm.com/2016/01/11/pony-orm-release-0-6-2/

The documentation was moved from this repo to a separate one at https://github.com/ponyorm/pony-doc
The compiled version can be found at https://docs.ponyorm.com

New features

  • Python 3.5 support
  • #132, #145: raw_sql() function was added
  • #126: Ability to use @db_session with generator functions
  • #116: Add support to select by UUID
  • Ability to get string SQL statement using the Query.get_sql() method
  • New function delete(gen) and Query.delete(bulk=False)
  • Now it is possible to override Entity.init() and declare custom entity methods

Backward incompatible changes

  • Normalizing table names for symmetric relationships
  • Autostrip - automatically remove leading and trailing characters

Bugfixes

  • #87: Pony fails with pymysql installed as MySQLdb
  • #118: Pony should reconnect if previous connection was created before process was forked
  • #121: Unable to update value of unique attribute
  • #122: AssertionError when changing part of a composite key
  • #127: a workaround for incorrect pysqlite locking behavior
  • #136: Cascade delete does not work correctly for one-to-one relationships
  • #141, #143: remove restriction on adding new methods to entities
  • #142: Entity.select_random() AssertionError
  • #147: Add 'atom_expr' symbol handling for Python 3.5 grammar

Pony ORM Release 0.6.1

20 Feb 06:30
Compare
Choose a tag to compare
  • Closed #65: Now the select(), filter(), order_by(), page(), limit(), random() methods can be applied to collection attributes
  • Closed #105: Now you can pass globals and locals to the select() function
  • Improved inheritance support in queries: select(x for x in BaseClass if x.subclass_attr == y)
  • Now it is possible to do db.insert(SomeEntity, column1=x, column2=y) instead of db.insert(SomeEntity._table_, column1=x, column2=y)
  • Discriminator attribute can be part of the composite index
  • Now it is possible to specify the attribute name instead of the attribute itself in composite index
  • Query statistics: global_stats_lock is deprecated, just use global_stats property without any locking
  • New load() method for entity instances which retrieves all unloaded attributes except collections
  • New load() method for collections, e.g. customer.orders.load()
  • Enhanced error message when descendant classes declare attributes with the same name
  • Fixed #98: Composite index can include attributes of base entity
  • Fixed #106: incorrect loading of object which consists of primary key only
  • Fixed pony.converting.check_email()
  • Prefetching bug fixed: if collection is already fully loaded it shouldn't be loaded again
  • Deprecated Entity.order_by(..) method was removed. Use Entity.select().order_by(...) instead
  • Various performance enhancements
  • Multiple bugs were fixed

Pony ORM Release 0.6

05 Nov 13:08
Compare
Choose a tag to compare

Changes since Pony ORM 0.6rc3:

  • Fixed #94: Aggregated subquery bug fixed

Short description

  • Official support of Python 3 added!
  • As a string attribute type, use str instead of unicode for compatibility with Python 3
  • Use int with size=64 option instead of long for compatibility with Python 3
  • In Python 3, use pure-python pymysql adapter instead of MySQLdb
  • Multiple bugfixes and optimizations since 0.5.4 release

Full description:

http://blog.ponyorm.com/2014/11/05/pony-orm-release-0-6/

Pony ORM 0.6 Release Candidate 3

30 Oct 13:22
Compare
Choose a tag to compare
Pre-release

Bugfixes

  • Fixed #18: Allow to specify size and unsigned for int type
  • Fixed #77: Discriminate Pony-generated fields in entities: Attribute.is_implicit field added
  • Fixed #83: Entity.get() should issue LIMIT 2 when non-unique criteria used for search
  • Fixed #84: executing db.insert() should turn off autocommit and begin transaction
  • Fixed #88: composite_index(*attrs) added to support non-unique composite indexes
  • Fixed #89: IN / NOT IN clauses works different with empty sequence
  • Fixed #90: Do not automatically add "distinct" if query.first() used
  • Fixed #91: document automatic "distinct" behaviour and also .without_distinct()
  • Fixed #92: without_distinct() and first() do not work together correctly

Deprecation of attribute long type

  • size and unsigned options for int attributes link

Since the long type has gone in Python 3, the long type is deprecated in Pony now. Instead of long you should use the int type and specify the size option:

    class MyEntity(db.Entity):
        attr1 = Required(long) # deprecated
        attr2 = Required(int, size=64) # new way for using BIGINT type in the database