Changelog¶
Changes by version¶
This section contains all the changes that I can remember, by version.
5.6.1¶
- Makes HumbleDB handle the
safe=
keyword forupdate()
,insert()
, andsave()
when using Pymongo 3.0 or greater. If you specifiedsafe=False
, then HumbleDB will usew=0
(no write concern), and otherwise will fall back to the configured write concern level, which defaults tow=1
.
Released July 8, 2015
5.6.0¶
- Adds support for Pymongo version 3.0.0 and higher which made some backwards incompatible changes.
Released June 14, 2015
5.5.1¶
- Add
humbledb.ensure_indexes
pyconfig setting to allow for disabling ensure index calls.
5.4.1¶
- Fix bug where
auto_increment()
helper didn’t respectincrement
argument. Thanks to paulnues for the fix.
5.4.0¶
- Add helpers module and
auto_increment()
default value helper.
5.3.0¶
- Add
config_uri
configuration option for declaring default databases and databases with authentication. - If a
Mongo
subclass specifies aconfig_uri
which includes a database, and aDocument
is used which does not match the database, aDatabaseMismatch
error will be raised. - Fix a bug where declaring
Mongo
subclasses late (at runtime) would not correctly instantiate the connection instance. - Fix a bug with Pymongo 2.1.x connection instances.
5.2.0¶
Document
declarations can now include default values. See Giving Documents Default Values for more details.Array
regexes now escape periods to prevent name collisions.
5.1.3¶
- Bump the default for
config_max_pool_size
up to 300, since in PyMongo 2.6, they changed the behavior of connection pools to make that a blocking limit, rather than a minimum size.
5.1.1¶
- Fix a bug where a
Array
may not have its page created before an append call attempts to modify it by adding write concern to the insert.
5.1.0¶
- Add count keyword argument to
humbledb.report.Report.record()
to allow recording multiple events instead of always incrementing one.
5.0.1¶
- Fix a bug with summing report intervals where too many or too few values could be returned, sometimes with the wrong timestamp.
5.0.0¶
- This release may break backwards compatibility.
- Total rewrite of the :module:`humbledb.report` module to make it much more useful. Sorry, but I’m fairly sure nobody was using it before anyway.
4.0.1¶
- Fix bug with
array.Array.remove()
in sharded environments.
4.0.0¶
- This release may break backwards compatibility.
- Restrict
from humbledb import *
to only basic document classes (Mongo
,Document
,Embed
,Index
). - Create new
humbledb.errors
module, which contains shortcuts to Pymongo specific errors, as well as the new exceptions:NoConnection
,NestedConnection
, andMissingConfig
. Document
will now raiseMissingConfig
andNoConnection
. The previous behavior was to raise just aRuntimeError
.Mongo
subclasses add the new configuration optionconfig_write_concern
. This now defaults to1
, which may break backwards compatibility. The previous behavior depended on which version of Pymongo you were using.Mongo
will now raiseNestedConnection
.Document
instances which do not map attributes for embedded documents will no longer wrap the accessed embedded documents inDictMap
instances. This should improve performance substantially for very large documents with many unmapped, embedded documents.- The
Array
class has been refactored to no longer need thearray_id
andnumber
fields, or the index on them. It now leverages regex queries against the_id
field instead. - The
Array
class now has shortcut properties for accessing the following attributes on thePage
class: find, update, remove, entries, size. The find, update, and remove attributes require aMongo
(or a subclass) connection context. - The
page_count
parameter toArray
is not longer required. If omitted, the number of pages will be queried for before the first append operation. remove()
now only removes the first matching element found. The previous behavior was to remove all matching elements, but this meant that theArray.length()
could get out of sync with the actual size.
3.3.1¶
- Now depends on Pytool >= 3.0.1.
3.3.0¶
- Implement
for_json()
hook onDocument
,DictMap
andListMap
. - Implement version checking for
ttl
vs.cache_for
keyword toensure_index()
. - Fix
config_replica
handling when config_replica is set to a descriptor class (i.e. apyconfig.setting()
instance). - Removed
humbledb.document.Document._asdict()
. Usefor_json()
instead.
3.2.0¶
- Add the
humbledb.array
module andhumbledb.array.Array
class for easily working with very large paginated arrays in MongoDB.
3.1.0¶
- Add support for
MongoClient
andMongoReplicaSetClient
.
3.0.3¶
- Fix bug in deleting embedded document keys via attributes.
3.0.2¶
- Fix bug with DocumentMeta accidentally getting extra
name
attribute, which in turn became available on Document, and would override mapping behavior.
3.0.1¶
- Fix bug with checking config_resolution on the MonthlyReport.
3.0.0¶
- Major internal refactoring of module layout.
- Add support for compound indexes.
- Add Cursor subclass to do document type coercion rather than use as_class argument to pymongo methods.
- Change return value of unset attributes from
None
to{}
. - Add aliases
humbledb.DESC
andhumbledb.ASC
forpymongo.DESCENDING
andpymongo.ASCENDING
respectively. - Add embedded document list attribute mapping.
- Lots of test coverage.
2.3.1¶
- Change
humbledb.report.DailyReport
to use 0-59 for minute range, rather than 0-1439.
2.3.0¶
- Add support for resolving dot-notation indexes.
- Add reporting framework.
2.2.1¶
- Fix bug when old version by using pkg_resources.parse_version to check pymongo version.
2.1.1¶
- Fix bug when find_one or find_and_modify return None.
2.1.0¶
- Add
Document.mapped_keys()
andDocument.mapped_attributes()
methods.
2.0.2¶
- Fix bug where find_and_modify returned dict instead of Document subclass.
2.0.1¶
- Updated documentation.
2.0.0¶
- First release fit for public consumption.