All Versions
16
Latest Version
Avg Release Cycle
149 days
Latest Release
928 days ago
Changelog History
Page 2
Changelog History
Page 2
-
v0.7.5 Changes
July 24, 2018π Bugfixes
- π
query.where
andquery.filter
method bug introduced in 0.7.4 was fixed
- π
-
v0.7.4 Changes
July 23, 2018Major 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
andbool
in queries
π Improvements
- Apply @cut_traceback decorator only when pony.MODE is 'INTERACTIVE'
π Bugfixes
- In SQLite3
LIKE
is case sensitive now - #249: Fix incorrect mixin used for Timedelta
- #251: correct dealing with qualified table names
- #301: Fix aggregation over JSON Column
- π #306: Support of frozenset constants added
- #308: Fixed an error when assigning JSON attribute value to the same attribute:
obj.json_attr = obj.json_attr
- #313: Fix missed retry on exception raised during
db_session. __exit__
- π #314: Fix AttributeError: 'NoneType' object has no attribute 'seeds'
- #315: Fix attribute lifting for JSON attributes
- #321: Fix KeyError on
obj.delete()
- #325: duplicating percentage sign in raw SQL queries without parameters
- #331: Overriding
__len__
in entity fails - #336: entity declaration serialization
- #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
ifdb_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 callingdesc(desc(x))
__contains__
method should check if objects belong to the samedb_session
- π Fix pony.MODE detection; mod_wsgi detection according to official doc
- π A lot of inner fixes
-
v0.7.3 Changes
October 23, 2017π New features
where()
method added to querycoalesce()
function addedbetween(x, a, b)
function added- #295: Add
_table_options_
for entity class to specify engine, tablespace, etc. - π Make debug flag thread-local
sql_debugging
context manager addedsql_debug
and show_values arguments to db_session addedset_sql_debug
function added as alias to (to be deprecated)sql_debug
function- π Allow
db_session
to acceptddl
parameter when used as context manager - β Add
optimistic=True
option to db_session - Skip optimistic checks for queries in
db_session
withserializable=True
fk_name
option added for attributes in order to specify foreign key name- β± #280: Now it's possible to specify
timeout
option, as well as pass other keyword arguments forsqlite3.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 #170: Problem with a primary key column used as a part of another key
- π Fixes #223: incorrect result of
getattr(entity, attrname)
when the same lambda applies to different entities - π Fixes #266: Add handler to
"pony.orm"
logger does not work - π Fixes #278: Cascade delete error: FOREIGN KEY constraint failed, with complex entity relationships
- π Fixes #283: Lost Json update immediately after object creation
- π Fixes #284:
query.order_by()
orders Json numbers like strings - π Fixes #288: Expression text parsing issue in Python 3
- π Fixes #293: translation of if-expressions in expression
- π Fixes #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
-
v0.6.rc3 Changes
October 30, 2014π Bugfixes
- π Fixed #18: Allow to specify
size
andunsigned
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
π New features
size
andunsigned
options forint
attributeslink
π Since the
long
type has gone in Python 3, thelong
type is deprecated in Pony now. Instead oflong
you should use theint
type and specify thesize
option:class MyEntity(db.Entity): attr1 = Required(long) # deprecated attr2 = Required(int, size=64) # new way for using BIGINT type in the database
- π Fixed #18: Allow to specify
-
v0.6.rc2 Changes
October 10, 2014π Bugfixes
- π Fixes #81: python3.3: syntax error during installation in ubuntu 14.04
-
v0.6.rc1 Changes
October 08, 2014π New features:
- π Python 3 support
- π pymysql adapter support for MySQL databases
Backward incompatible changes
Now Pony treats both
str
andunicode
attribute types as they are unicode strings in both Python 2 and 3. So, the attribute declarationattr = Required(str)
is equal toattr = Required(unicode)
in Python 2 and 3. The same thing is withLongStr
andLongUnicode
- both of them are represented as unicode strings now.For the sake of backward compatibility Pony adds
unicode
as an alias tostr
andbuffer
as an alias tobytes
in Python 3.π Other changes and bug fixes
- π Fixes #74: Wrong FK column type when using sql_type on foreign ID column
- π Fixes #75: MappingError for self-referenced entities in a many-to-many relationship
- π Fixes #80: βEntity NoneType does not belong to databaseβ when using to_dict