./databases/py-peewee, Small, expressive ORM for PostgreSQL, MySQL and SQLite

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 2.9.2, Package name: py27-peewee-2.9.2, Maintainer: filip

Peewee is a simple and small ORM. It has few (but expressive)
concepts, making it easy to learn and intuitive to use.
Supports SQLite, MySQL and PostgreSQL.


Required to run:
[devel/py-cython] [lang/python27]

Required to build:
[textproc/py-sphinx] [pkgtools/cwrappers]

Master sites:

SHA1: f82d1e46d5561b1aa8da89b4af7fb36c0badacab
RMD160: cf27168cd442eae3bd8a92c546cbf22b6a9da57b
Filesize: 640.072 KB

Version history: (Expand)


CVS history: (Expand)


   2017-04-21 11:14:01 by Filip Hajny | Files touched by this commit (4) | Package updated
Log message:
Update databases/py-peewee to 2.9.2.

## 2.9.2

- Fixed significant bug in the `savepoint` commit/rollback implementation.
- Added support for postgresql `INTERVAL` columns.
- Fixed bug where missing `sqlite3` library was causing other, unrelated
  libraries to throw errors when attempting to import.
- Added a `case_sensitive` parameter to the SQLite `REGEXP` function
  implementation. The default is `False`, to preserve backwards-compatibility.
- Fixed bug that caused tables not to be created when using the `dataset`
  extension.
- Modified `drop_table` to raise an exception if the user attempts to drop
  tables with `CASCADE` when the database backend does not support it.
- Fixed Python3 issue in the `AESEncryptedField`.
- Modified the behavior of string-typed fields to treat the addition operator
  as concatenation

## 2.9.1

- Fixed #1218, where the use of `playhouse.flask_utils` was requiring the
  `sqlite3` module to be installed.
- Fixed #1219 regarding the SQL generation for composite key sub-selects,
  joins, etc.

## 2.9.0

In this release there are two notable changes:

- The ``Model.create_or_get()`` method was removed.
- The SQLite closure table extension gained support for many-to-many
  relationships thanks to a nice PR by @necoro.

## 2.8.8

This release contains a single important bugfix for a regression in specifying
the type of lock to use when opening a SQLite transaction.

## 2.8.7

This release contains numerous cleanups.

### Bugs fixed

- #1087 - Fixed a misuse of the iteration protocol in the `sqliteq` extension.
- #1096 - Fix representation of recursive foreign key relations when using the
  `model_to_dict` helper.
- #1126 - Allow `pskel` to be installed into `bin` directory.
- #1105 - Added a `Tuple()` type to Peewee to enable expressing arbitrary
  tuple expressions in SQL.
- #1133 - Fixed bug in the conversion of objects to `Decimal` instances in the
  `DecimalField`.
- Fixed an issue renaming a unique foreign key in MySQL.
- Remove the join predicate from CROSS JOINs.
- #1148 - Ensure indexes are created when a column is added using a schema
  migration.
- #1165 - Fix bug where the primary key was being overwritten in queries using
  the closure-table extension.

### New stuff

- Added properties to the `SqliteExtDatabase` to expose common `PRAGMA`
  settings.
- Clarified documentation on calling `commit()` or `rollback()` from within the
  scope of an atomic block.
- Allow table creation dependencies to be specified using new `depends_on` meta
  option.
- Allow specification of the lock type used in SQLite transactions.
- Added support for `CROSS JOIN` expressions in select queries.
- Docs on how to implement optimistic locking
- Documented optional dependencies.
- Generic support for specifying select queries as locking the selected rows
  `FOR X`, e.g. `FOR UPDATE` or `FOR SHARE`.
- Support for specifying the frame-of-reference in window queries, e.g.
  specifying `UNBOUNDED PRECEDING`, etc.

### Backwards-incompatible changes

- As of 9e76c99, an `OperationalError` is raised if the user calls `connect()`
  on an already-open Database object. Previously, the existing connection would
  remain open and a new connection would overwrite it, making it impossible to
  close the previous connection. If you find this is causing breakage in your
  application, you can switch the `connect()` call to `get_conn()` which will
  only open a connection if necessary. The error **is** indicative of a real
  issue, though, so audit your code for places where you may be opening a
  connection without closing it (module-scope operations, e.g.).
   2016-10-26 16:28:16 by Filip Hajny | Files touched by this commit (3) | Package updated
Log message:
Update databases/py-peewee to 2.8.5.

2.8.5

- Starting docs on sqliteq
- Use parentheses for compound select with MySQL.
- Remove "clean_prefetch_subquery" as I'm not sure why it exists in the
  first place.

2.8.4

- New playhouse extension module for working with SQLite in
  multi-threaded / concurrent environments. The new module is called
  playhouse.sqliteq and it works by serializing queries using a dedicated
  worker thread (or greenlet). The performance is quite good, hopefully
  this proves useful to someone besides myself! You can learn more by
  reading the sqliteq documentation.
- #1061 - @akrs patched a bug in TimestampField which affected the
  accuracy of sub-second timestamps (for resolution > 1).
- #1071, small python 3 fix.
- #1072, allow DeferredRelation to be used multiple times if there are
  multiple references to a given deferred model.
- #1073, fixed regression in the speedups module that caused SQL
  functions to always coerce return values, regardless of the coerce
  flag.
- #1083, another Python 3 issue - this time regarding the use of
  exc.message.
   2016-09-10 22:58:45 by Filip Hajny | Files touched by this commit (2) | Package updated
Log message:
Update databases/py-peewee to 2.8.3.

Bugs fixed and general changes

- #1028 - allow the ensure_join method to accept on and join_type
  parameters. Thanks @paulbooth.
- #1032 - fix bug related to coercing model instances to database
  parameters when the model's primary key is a foreign key.
- #1035 - fix bug introduced in 2.8.2, where I had added some
  logic to try and restrict the base Model class from being
  treated as a "real" Model.
- #1039 - update documentation to clarify that lists or tuples are
  acceptable values when specifying SQLite PRAGMA statements.
- #1041 - PyPy user was unable to install Peewee. (Who in their
  right mind would ever use PyPy?!) Bug was fixed by removing the
  pre-generated C files from the distribution.
- #1043 - fix bug where the speedups C extension was not calling
  the correct model initialization method, resulting in model
  instances returned as results of a query having their dirty flag
  incorrectly set.
- #1048 - similar to #1043, add logic to ensure that fields with
  default values are considered dirty when instantiating the
  model.
- #1049 - update URL to APSW.
- Fixed unreported bug regarding TimestampField with zero values
  reporting the incorrect datetime.

New stuff

- djpeewee extension module now works with Django 1.9.
- TimestampField is now an officially documented field.
- #1050 - use the db_column of a ForeignKeyField for the name of
  the ObjectIdDescriptor, except when the db_column and field name
  are the same, in which case the ID descriptor will be named
  <field_name>_id.
   2016-08-09 14:10:31 by Filip Hajny | Files touched by this commit (2) | Package updated
Log message:
Update databases/py-peewee to 2.8.2.

Bugs fixed and general cleanups
- fixed some bugs related to the Cython extension build process.
- allow blanks and perform type conversion when using the db_url
  extension
- added the ability to query using the <foreign_key>_id attribute.
- ensure that peewee.OperationalError is raised consistently when
  using the RetryOperationalError mixin.
- ensure that pwiz will import the appropriate extensions when
  vendor-specific fields are used.
- ensure that pwiz-generated models containing UnknownField
  placeholders do not blow up when you instantiate them.
- correctly limit the length of automatically-generated index
  names.
- fixed bug where BlobField could not be used if it's parent model
  pointed to an uninitialized database Proxy.
- greater consistency with the conversion to Python data-types
  when performing aggregations, annotations, or calling scalar().
- ensure the correct data-types are used when initializing a
  connection pool.
- fix bug where Signal subclasses were not returning rows affected
  on save.
- added documentation about SQLite limits and how they affect
  insert_many.
- better warnings regarding C extension compilation, thanks
  @dhaase-de.
- fix bug where table names starting with numbers generated
  invalid table names when using pwiz.
- fix bug where parameter was not being used. Thanks @jberkel.
- fixed the way SqliteExtDatabase handles the automatic rowid (and
  docid) columns. Thanks for alerting me to the issue and
  providing a failing test case @jberkel.
- fix obscure bug relating to cloning foreign key fields twice.
- allow set instances to be used on the right-hand side of IN
  exprs.
- fix behavior where the default id primary key was inherited
  regardless. When users would inadvertently include it in their
  queries, it would use the table alias of it's parent class.
- add support for db_column in djpeewee
- fix the behavior of truncate_date with Postgresql. Thanks
  @Zverik.
- allow DATABASE_URL as a recognized parameter to the Flask
  config.
- correctly handle bytes wrapper used by PasswordField to bytes.
- when selecting and joining on multiple models, do not create
  model instances when the foreign key is NULL.
- do not coerce the return value of function calls to COUNT or
  SUM, since the python driver will already give us the right
  Python value.
- use global state to resolve DeferredRelations, allowing for a
  nicer API. Thanks @brenguyen711.
- attempt to avoid creating invalid Python when using pwiz with
  MySQL database columns containing spaces. Yes, fucking spaces.
- fix bug in SQLite migrator which had a naive approach to fixing
  indexes.
- explicitly check for None when determining if the database has
  been set on ModelOptions. Thanks @joeyespo.

New stuff
- Added TimestampField for storing datetimes using integers.
  Greater than second delay is possible through exponentiation.
- Added Database.drop_index() method.
- Added a max_depth parameter to the model_to_dict function in the
  playhouse.shortcuts extension module.
- SelectQuery.first() function accepts a parameter n which applies
  a limit to the query and returns the first row.
- group_by(), order_by(), window() now accept a keyward argument
  extend, which, when set to True, will append to the existing
  values rather than overwriting them.
- Query results support negative indexing.
- C sources are included now as part of the package. I think they
  should be able to compile for python 2 or 3, on linux or
  windows...but not positive.
   2016-05-06 11:45:09 by Filip Hajny | Files touched by this commit (3) | Package updated
Log message:
Update databases/py-peewee to 2.8.1.

Bugs fixed
- #821 - issue warning if Cython is old
- #822 - better handling of MySQL connections point for advanced
  use-cases.
- #313 - support equality/inequality with generic foreign key
  queries, and ensure get_or_create works with GFKs.
- #834 - fixed Python3 incompatibilities in the PasswordField,
  thanks @mosquito.
- #836 - fix handling of last_insert_id() when using APSWDatabase.
- #845 - add connection hooks to APSWDatabase.
- #852 - check SQLite library version to avoid calls to missing
  APIs.
- #857 - allow database definition to be deferred when using the
  connection pool.
- #878 - formerly .limit(0) had no effect. Now adds LIMIT 0.
- #879 - implement a __hash__ method for Model
- #886 - fix count() for compound select queries.
- #895 - allow writing to the foreign_key_id descriptor to set the
  foreign key value.
- #893 - fix boolean logic bug in model_to_dict().
- #904 - fix side-effect in clean_prefetch_query, thanks to
  @p.kamayev
- #907 - package includes pskel now.
- #852 - fix sqlite version check in BerkeleyDB backend.
- #919 - add runtime check for sqlite3 library to match MySQL and
  Postgres. Thanks @M157q

New features
- Added a number of SQLite user-defined functions and aggregates.
- Use the DB-API2 Binary type for BlobField.
- Implemented the lucene scoring algorithm in the sqlite_ext
  Cython library.
- #825 - allow a custom base class for ModelOptions, providing an
  extension
- #830 - added SmallIntegerField type.
- #838 - allow using a custom descriptor class with
  ManyToManyField.
- #855 - merged change from @lez which included docs on using
  peewee with Pyramid.
- #858 - allow arguments to be passed on query-string when using
  the db_url module. Thanks @RealSalmon
- #862 - add support for truncate table, thanks @dev-zero for the
  sample code.
- Allow the related_name model Meta option to be a callable that
  accepts the foreign key field instance.
   2016-01-18 16:53:14 by Filip Hajny | Files touched by this commit (3) | Package updated
Log message:
Update databases/py-peewee to 2.8.0.

This release includes a couple new field types and greatly improved
C extension support for both speedups and SQLite enhancements. Also
includes some work, suggested by @foxx, to remove some places where
Proxy was used in favor of more obvious APIs.

New features

- C extension speedups now enabled by default, includes faster
  implementations for dict and tuple QueryResultWrapper classes,
  faster date formatting, and a faster field and model sorting.
- C implementations of SQLite functions is now enabled by default.
  SQLite extension is now compatible with APSW and can be used in
  standalone form directly from Python.
- SQLite C extension now supports murmurhash2.
- UUIDField is now supported for SQLite and MySQL, using text and
  varchar respectively, thanks @foxx!
- Added BinaryField, thanks again, @foxx!
- Added PickledField to playhouse.fields.
- ManyToManyField now accepts a list of primary keys when adding or
  removing values from the through relationship.
- Added support for SQLite table-valued functions using the
  sqlite-vtfunc library.
- Significantly simplified the build process for compiling the
  C extensions.

Backwards-incompatible changes

- Instead of using a Proxy for defining circular foreign key
  relationships, you now need to use DeferredRelation.
- Instead of using a Proxy for defining many-to-many through tables,
  you now need to use DeferredThroughModel.
- SQLite Virtual Models must now use Meta.extension_module and
  Meta.extension_options to declare extension and any options.
- MySQL database will now issue COMMIT statements for SELECT queries.

Bugs fixed

- #766, fixed bug with PasswordField and Python3. Fuck Python 3.
- #768, fixed SortedFieldList and remove_field(). Thanks @klen!
- #771, clarified docs for APSW.
- #773, added docs for request hooks in Pyramid
- #774, prefetch() only loads first ForeignKeyField
  for a given relation.
- #782, fixed typo in docs.
- #791, foreign keys were not correctly handling coercing to
  the appropriate python value.
- #792, cleaned up some CSV utils code.
- #798, cleaned up iteration protocol in QueryResultWrappers.
- #806, not really a bug, but MySQL users were clowning around
  and needed help.

2.7.4

This is another small release which adds code to automatically build
the SQLite C extension if libsqlite is available. The release also
includes:

- Support for UUIDField with SQLite.
- Support for registering additional database classes with the db_url
  module via register_database.
- prefetch() supports fetching multiple foreign-keys to the same model
  class.
- Added method to validate FTS5 search queries.
   2015-11-23 22:15:32 by Filip Hajny | Files touched by this commit (3) | Package updated
Log message:
Update databases/py-peewee to 2.7.3.

2.7.3
Small release which includes some changes to the BM25 sorting
algorithm and the addition of a JSONField for use with the new
JSON1 extension.

2.7.2
Small release with bugfixes to the setup script.

I've also cleaned up some missing APIs in the FTS5Model to
support more flexible use of either FTSModel or FTS5Model.

2.7.1
Small release which includes fixes to the setup script.
Particularly, if you did not have Cython installed, the
installation would completely fail. This was fixed.

2.7.0
New APIs, features, and performance improvements.

Notable changes and new features
- PasswordField that uses the bcrypt module.
- Added new Model Meta.only_save_dirty flag to, by default,
  only save fields that have been modified.
- Added support for upsert() on MySQL (in addition to SQLite).
- Implemented SQLite ranking functions (rank and bm25) in Cython,
  and changed both the Cython and Python APIs to accept weight
  values for every column in the search index. This more closely
  aligns with the APIs provided by FTS5. In fact, made the APIs
  for FTS4 and FTS5 result ranking compatible.
- Major changes to the :ref:sqlite_ext module. Function callbacks
  implemented in Python were implemented in Cython (e.g. date
  manipulation and regex processing) and will be used if Cython
  is available when Peewee is installed.
- Support for the experimental new FTS5 SQLite search extension.
- Added :py:class:SearchField for use with the SQLite FTS
  extensions.
- Added :py:class:RowIDField for working with the special rowid
  column in SQLite.
- Added a model class validation hook to allow model subclasses
  to perform any validation after class construction. This is
  currently used to ensure that FTS5Model subclasses do not
  violate any rules required by the FTS5 virtual table.

Bugs fixed
- #751, fixed some very broken behavior in the MySQL migrator
  code. Added more tests.
- #718, added a RetryOperationalError mixin that will try
  automatically reconnecting after a failed query. There was
  a bug in the previous error handler implementation that
  made this impossible, which is also fixed.
   2015-11-03 02:56:36 by Alistair G. Crooks | Files touched by this commit (368)
Log message:
Add SHA512 digests for distfiles for databases category

Problems found with existing distfiles:
	distfiles/D6.data.ros.gz
	distfiles/cstore0.2.tar.gz
	distfiles/data4.tar.gz
	distfiles/sphinx-2.2.7-release.tar.gz
No changes made to the cstore or mariadb55-client distinfo files.

Otherwise, existing SHA1 digests verified and found to be the same on
the machine holding the existing distfiles (morden).  All existing
SHA1 digests retained for now as an audit trail.