Commit Graph

16 Commits

Author SHA1 Message Date
Bernie Hackett
ba7c95a9df PYTHON-1462 - Import ABCs from collections.abc 2018-02-12 19:42:44 -08:00
Bernie Hackett
507f954ed4 Update copyright dates 2017-12-01 17:23:39 -08:00
Bernie Hackett
1a45a0fa08 Changelog for PyMongo 3.4 2016-09-16 14:31:20 -07:00
Luke Lovett
6692e8877a PYTHON-1131 - Fix inconsistent handling of scope, unicode support for Code. 2016-08-19 15:22:19 -07:00
Luke Lovett
3321b66d34 PYTHON-977 - Fix __hash__ method on BSON types that inherit from Python builtin types.
In Python 2, objects automatically inherit the __hash__ of their parent
class. In Python 3, objects that override __eq__ do not automatically inherit
__hash__, so these objects were not hashable under Python 3.  Additionally,
mutable BSON types and types that overide __eq__ but did not explicitly define
__hash__ had broken __hash__ methods under Python 2.  This commit unifies the
hashing behavior between Python versions and fixes the __hash__ methods such
that two BSON objects hash the same only if they are equal.

N.B.: bson.code.Code and bson.regex.Regex are no longer hashable under Python 2
because they are mutable.
2015-09-04 14:45:24 -07:00
Bernie Hackett
aec685b374 Fix up copyright dates. 2015-03-25 11:55:02 -07:00
A. Jesse Jiryu Davis
08dccbba46 Remove ancient version annotations.
Delete "versionchanged" and "versionadded" directives that predate 2.0.
2014-10-31 14:15:24 -04:00
Luke Lovett
17fb3a2a02 PYTHON-505 Allow C extensions to encode any mapping type, not just dicts. 2014-08-13 16:16:25 +00:00
Luke Lovett
d4a94d30fd PYTHON-673 python 2/3 single-source for the bson module 2014-04-17 21:29:15 +00:00
A. Jesse Jiryu Davis
2fa1750b07 Update copyright notices and company name. 2014-01-31 09:36:46 -05:00
behackett
2483775f0b Silence C extension RuntimeWarning PYTHON-569
When encoding a document in C while running in a python sub interpreter
(e.g. mod_wsgi spawning sub interpreters) PyMongo would often have
to reload its cache of pure python types - ObjectId, Timestamp,
UUID, etc. - raising RuntimeWarning in the process. The reason this was
necessary is described in the mod_wsgi documentation here:

https://code.google.com/p/modwsgi/wiki/ApplicationIssues#Multiple_Python_Sub_Interpreters

With workarounds documented here:

http://api.mongodb.org/python/2.6.2/faq.html#does-pymongo-work-with-mod-wsgi

With this commit PyMongo will no longer use cached pure python types
when running in a sub interpreter. Instead it will look up pure python
types as needed (primarily when decoding BSON). This eliminates the
problem described in the mod_wsgi docs and eliminates the need for the
Runtime warning.
2013-09-16 17:24:37 -04:00
behackett
0ee7170cc2 It's 2012... 2012-04-19 12:40:38 -07:00
behackett
8cde67c330 Update bson module docs and comments for python 3. 2012-03-21 15:37:31 -07:00
behackett
7474f5cde8 Python 3 bson changes PYTHON-84 2012-03-20 13:56:15 -07:00
Mike Dirolf
1992b6cd29 BUMP 1.9 2010-09-28 10:48:46 -04:00
Mike Dirolf
9c182809f3 Create a separate bson package PYTHON-60
Many of the pymongo modules have been moved into the bson
package. Aliases for those modules have been added to the pymongo
package, without deprecation warnings for now. Application developers
should begin to use the bson namespace, as deprecation of moved
modules will probably begin in the next release.
2010-09-14 13:52:50 -04:00