All Versions
134
Latest Version
Avg Release Cycle
36 days
Latest Release
-

Changelog History
Page 12

  • v2.5.0 Changes

    ๐Ÿ‘€ There are a couple new features so I thought I'd bump to 2.5.x. One change Postgres users may be happy to see is the use of INSERT ... RETURNING to perform inserts. This should definitely speed up inserts for Postgres, since an extra query is no longer needed to get the new auto-generated primary key.

    โœ… I also added a new context manager/decorator that allows you to use a different database for the duration of the wrapped block.

    ๐Ÿ› Bugs fixed

    • #534, CSV utils was erroneously stripping the primary key from CSV data.
    • #537, fix upserts when using insert_many.
    • โช #541, respect autorollback with PostgresqlExtDatabase. Thanks @davidmcclure.
    • #551, fix for QueryResultWrapper's implementation of the iterator protocol.
    • #554, allow SQLite journal_mode to be set at run-time.
    • ๐Ÿ›  Fixed case-sensitivity issue with DataSet.

    ๐Ÿ†• New features

    • โž• Added support for CAST expressions.
    • โž• Added a hook for extending Node with custom methods.
    • JOIN_<type> became JOIN.<type>, e.g. .join(JOIN.LEFT_OUTER).
    • OP_<code> became OP.<code>.
    • ๐Ÿ›  #556, allowed using + and - prefixes to indicate ascending/descending ordering.
    • โœ… #550, added Database.initialize_connection() hook.
    • #549, bind selected columns to a particular model. Thanks @jhorman, nice PR!
    • โœ… #531, support for swapping databases at run-time via Using.
    • ๐Ÿ‘ #530, support for SQLCipher and Python3.
    • ๐Ÿ†• New RowIDField for sqlite_ext playhouse module. This field can be used to interact with SQLite rowid fields.
    • โž• Added LateralJoin helper to the postgres_ext playhouse module.
    • ๐Ÿ†• New example blog app.

    View commits

  • v2.4.7 Changes

    ๐Ÿ› Bugs fixed

    • โšก๏ธ #504, Docs updates.
    • ๐Ÿ›  #506, Fixed regression in aggregate_rows()
    • ๐Ÿ›  #510, Fixes bug in pwiz overwriting columns.
    • #514, Correctly cast foreign keys in prefetch().
    • #515, Simplifies queries issued when doing recursive deletes.
    • #516, Fix cloning of Field objects.
    • #519, Aggregate rows now correctly preserves ordering of joined instances.
    • ๐Ÿ›  Unreported, fixed bug to not leave expired connections sitting around in the pool.

    ๐Ÿ†• New features

    • โž• Added support for Postgresql's jsonb type with BinaryJSONField.
    • โž• Add some basic Flask helpers.
    • โž• Add support for UNION ALL queries in #512
    • โž• Add SqlCipherExtDatabase, which combines the sqlcipher database with the sqlite extensions.
    • โž• Add option to print metadata when generating code with pwiz.

    View commits

  • v2.4.6 Changes

    ๐Ÿ“š This is a relatively small release with mostly bug fixes and updates to the documentation. The one new feature I'd like to highlight is the ManyToManyField (docs).

    ๐Ÿ› Bugs fixed

    • ๐Ÿ›  #503, fixes behavior of aggregate_rows() when used with a CompositeKey.
    • ๐Ÿ›  #498, fixes value coercion for field aliases.
    • ๐Ÿ›  #492, fixes bug with pwiz and composite primary keys.
    • #486, correctly handle schemas with reflection module.

    ๐Ÿ†• New features

    • โœ… Peewee has a new ManyToManyField available in the playhouse.shortcuts module.
    • Peewee now has proper support for NOT IN queries through the Node.not_in() method.
    • ๐Ÿ‘ Models now support iteration. This is equivalent to Model.select().

    View commits

  • v2.4.5 Changes

    ๐Ÿ›  I'm excited about this release, as in addition to a number of new features and bugfixes, it also is a step towards cleaner code. I refactored the tests into a number of modules, using a standard set of base test-cases and helpers. I also introduced the mock library into the test suite and plan to use it for cleaner tests going forward. There's a lot of work to do to continue cleaning up the tests, but I'm feeling good about the changes. Curiously, the test suite runs faster now.

    ๐Ÿ› Bugs fixed

    • #471, #482 and #484, all of which had to do with how joins were handled by the aggregate_rows() query result wrapper.
    • ๐Ÿšš #472 removed some needless special-casing in Model.save().
    • ๐Ÿ›  #466 fixed case-sensitive issues with the SQLite migrator.
    • ๐Ÿ›  #474 fixed a handful of bugs that cropped up migrating foreign keys with SQLite.
    • ๐Ÿ›  #475 fixed the behavior of the SQLite migrator regarding auto-generated indexes.
    • ๐Ÿ›  #479 fixed a bug in the code that stripped extra parentheses in the SQL generator.
    • ๐Ÿ›  Fixed a handful of bugs in the APSW extension.

    ๐Ÿ†• New features

    • โž• Added connection abstraction called ExecutionContext (see docs).
    • Made all context managers work as decorators (atomic, transaction, savepoint, execution_context).
    • โž• Added explicit methods for IS NULL and IS NOT NULL queries. The latter was actually necessary since the behavior is different from NOT IS NULL (...).
    • ๐Ÿ‘ Allow disabling backref validation (#465)
    • ๐Ÿ“š Made quite a few improvements to the documentation, particularly sections on transactions.
    • โž• Added caching to the DataSet extension, which should improve performance.
    • Made the SQLite migrator smarter with regards to preserving indexes when a table copy is necessary.

    View commits

  • v2.4.4 Changes

    Biggest news: peewee has a new logo!

    • ๐Ÿ“š Small documentation updates here and there.

    Backwards-incompatible changes

    • The argument signature for the SqliteExtDatabase.aggregate() decorator changed so that the aggregate name is the first parameter, and the number of parameters is the second parameter. If no values are specified, peewee will choose the name of the class and an un-specified number of arguments (-1).
    • The logic for saving a model with a composite key changed slightly. Previously, if a model had a composite primary key and you called save(), only the dirty fields would be saved.

    ๐Ÿ› Bugs fixed

    • #462
    • #465, add hook for disabling backref validation.
    • #466, fix case-sensitive table names with migration module.
    • #469, save only dirty fields.

    ๐Ÿ†• New features

    • Lots of enhancements and cleanup to the playhouse.apsw_ext module.
    • ๐Ÿ‘ The playhouse.reflection module now supports introspecting indexes.
    • โž• Added a model option for disabling backref validation.
    • โž• Added support for the SQLite closure table extension.
    • Added support for virtual fields, which act on dynamically-created virtual table fields.
    • โž• Added a new example: a virtual table implementation that exposes Redis as a relational database table.
    • โž• Added a module playhouse.sqlite_aggregates that contains a handful of aggregates you may find useful when developing with SQLite.

    View commits

  • v2.4.3 Changes

    ๐Ÿš€ This release contains numerous improvements, particularly around the built-in database introspection utilities. Peewee should now also be compatible with PyPy.

    ๐Ÿ› Bugs fixed

    • #466, table names are case sensitive in the SQLite migrations module.
    • #465, added option to disable backref validation.
    • #462, use the schema name consistently with postgres reflection.

    ๐Ÿ†• New features

    • New model Meta option to disable backref validation. See validate_backrefs.
    • โž• Added documentation on ordering by calculated values.
    • โž• Added basic PyPy compatibility.
    • โž• Added logic to close cursors after they have been exhausted.
    • ๐Ÿ“‡ Structured and consolidated database metadata introspection, including improvements for introspecting indexes.
    • Added support to prefetch for traversing up the query tree.
    • โž• Added introspection option to skip invalid models while introspecting.
    • โž• Added option to limit the tables introspected.
    • โž• Added closed connection detection to the MySQL connection pool.
    • โœจ Enhancements to passing options to creating virtual tables with SQLite.
    • โž• Added factory method for generating Closure tables for use with the transitive_closure SQLite extension.
    • โž• Added support for loading SQLite extensions.
    • โœ… Numerous test-suite enhancements and new test-cases.

    View commits

  • v2.4.2 Changes

    This release contains a number of improvements to the reflection and migrate extension modules. I also added an encrypted diary app to the examples directory.

    ๐Ÿ› Bugs fixed

    • #449, typo in the db_url extension, thanks to @malea for the fix.
    • ๐Ÿ“š #457 and #458, fixed documentation deficiences.

    ๐Ÿ†• New features

    • โž• Added support for importing data when using the DataSet extension.
    • โž• Added an encrypted diary app to the examples.
    • ๐Ÿ‘ Better index reconstruction when altering columns on SQLite databases with the migrate module.
    • ๐Ÿ‘Œ Support for multi-column primary keys in the reflection module.
    • Close cursors more aggressively when executing SELECT queries.

    View commits

  • v2.4.1 Changes

    ๐Ÿ›  This release contains a few small bugfixes.

    ๐Ÿ› Bugs fixed

    • #448, add hook to the connection pool for detecting closed connections.
    • #229, fix join attribute detection.
    • ๐Ÿ“š #447, fixed documentation typo.

    View commits

  • v2.4.0 Changes

    ๐Ÿš€ This release contains a number of enhancements to the playhouse collection of extensions.

    Backwards-incompatible changes

    ๐Ÿšš As of 2.4.0, most of the introspection logic was moved out of the pwiz module and into playhouse.reflection.

    ๐Ÿ†• New features

    • Created a new reflection extension for introspecting databases. The reflection module additionally can generate actual peewee Model classes dynamically.
    • โœ… Created a dataset library (based on the SQLAlchemy project of the same name). For more info check out the blog post announcing playhouse.dataset.
    • โž• Added a db_url module which creates Database objects from a connection string.
    • โž• Added csv dump functionality to the CSV utils extension.
    • โž• Added an atomic context manager to support nested transactions.
    • โž• Added support for HStore, JSON and TSVector to the reflection module.
    • ๐Ÿ“š More documentation updates.

    ๐Ÿ› Bugs fixed

    • ๐Ÿ›  Fixed #440, which fixes a bug where Model.dirty_fields did not return an empty set for some subclasses of QueryResultWrapper.

    View commits

  • v2.3.3 Changes

    ๐Ÿ›  This release contains a lot of improvements to the documentation and a mixed bag of other new features and bugfixes.

    Backwards-incompatible changes

    ๐Ÿ“š As of 2.3.3, all peewee Database instances have a default of True for the threadlocals parameter. This means that a connection is opened for each thread. It seemed to me that by sharing connections across threads caused a lot of confusion to users who weren't aware of (or familiar with) the threadlocals parameter. For single-threaded apps the behavior will not be affected, but for multi-threaded applications, if you wish to share your connection across threads you must now specify threadlocals=False. For more information, see the documentation.

    I also renamed the Model.get_id() and Model.set_id() convenience methods so as not to conflict with Flask-Login. These methods should have probably been private anyways, and the new methods are named _get_pk_value() and _set_pk_value().

    ๐Ÿ†• New features

    • โœ… Basic support for Postgresql full-text search.
    • Helper functions for converting models to dictionaries and unpacking dictionaries into model instances. See docs.

    ๐Ÿ› Bugs fixed

    • ๐Ÿ›  Fixed #428, documentation formatting error.
    • ๐Ÿ›  Fixed #429, which fixes the way default values are initialized for bulk inserts.
    • ๐Ÿ›  Fixed #432, making the HStore extension optional when using PostgresqlExtDatabase.
    • ๐Ÿ›  Fixed #435, allowing peewee to be used with Flask-Login.
    • Fixed #436, allowing the SQLite date_part and date_trunc functions to correctly handle NULL values.
    • ๐Ÿ›  Fixed #438, in which the ordering of clauses in a Join expression were causing unpredictable behavior when selecting related instances.
    • โšก๏ธ Updated the berkeley_build.sh script, which was incompatible with the newest version of bsddb3.

    View commits