Commit Graph

38 Commits

Author SHA1 Message Date
Steven Silvester
474420b2e5
PYTHON-3085 Audit consistent and correct types for _DocumentOut (#893) 2022-03-16 05:56:07 -05:00
Steven Silvester
a61ea0660a
PYTHON-3090 Clean up Database Command Typing (#879) 2022-03-02 13:10:15 -06:00
Steven Silvester
a0fe7c03af
PYTHON-3120 Set up flake8 linting (#868) 2022-02-17 06:44:08 -06:00
Steven Silvester
5578999a90
PYTHON-1834 Use a code formatter (#852) 2022-02-09 06:44:28 -06:00
Shane Harvey
b7c33debbf
PYTHON-3046 Document support for backslashreplace and surrogateescape (#836) 2022-01-21 10:08:48 -08:00
Steven Silvester
52ed5a4135
PYTHON-3052 Add Typings to PyMongo Itself (#829) 2022-01-13 16:09:48 -06:00
Shane Harvey
fb20975a1f
PYTHON-2245 Change default uuidRepresentation to UNSPECIFIED (ie disable UUID encoding by default) (#724)
This change also stops decoding both 3 and 4 subtypes as UUIDs.
With standard, only subtype 4 is decoded to UUID and subtype 3 is decoded to Binary.
With legacy representations, only subtype 3 is decoded to UUID and subtype 4 is decoded to Binary.
2021-09-14 16:48:52 -07:00
Shane Harvey
5fd175c0d8
PYTHON-2529 Remove UUIDLegacy (#698) 2021-08-06 16:52:41 -07:00
Bernie Hackett
c70071df1d PYTHON-2133 Remove Py2 compatibility from bson 2021-01-14 14:57:20 -08:00
Prashant Mital
4119d35d04
PYTHON-2440 Workaround namedtuple._asdict() bug on Python 3.4 (#525) 2020-11-24 12:11:22 -08:00
Prashant Mital
963759af33
PYTHON-2354 Add support for JSONOptions.with_options (#482) 2020-09-09 14:15:21 -07:00
Prashant Mital
ff327b3e31
PYTHON-2252 Add examples and documentation for new UUID behavior (#467) 2020-07-29 14:46:48 -07:00
Prashant Mital
426f5fdef7
PYTHON-2292 Fix failing doctest due to UuidRepresentation (#458)
PYTHON-2277 Remove UuidRepresentation DeprecationWarning
2020-07-08 15:45:25 -07:00
Prashant Mital
4760d07815
PYTHON-2152 Expand native UUID handling support; Implement UUID specification 2020-06-01 17:45:08 -07:00
Prashant Mital
0ea5a1542e
PYTHON-1819 Documentation & examples for custom type encoding/decoding
functionality
2019-04-19 13:32:06 -07:00
Prashant Mital
4049b1493a
PYTHON-1783: disallow custom-encoding built-in types 2019-04-11 11:28:14 -07:00
Prashant Mital
65f85f648c
PYTHON-1769 Re-define TypeCodecBase as an AbstractBaseClass 2019-03-19 18:00:30 -05:00
Prashant Mital
e01efc7073
PYTHON-1731 Implement callback for unencodable types 2019-03-18 11:43:51 -05:00
Prashant Mital
83755b8739
PYTHON-1750 Support callbacks for simple types (#405) 2019-03-12 16:40:23 -07:00
Bernie Hackett
ccbd857838 PYTHON-1506 - Add CodecOptions examples 2018-06-25 23:13:15 -04:00
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
Shane Harvey
b7893b7ec4 3.5 changelog and documentation fixes. 2017-08-08 09:32:09 -07:00
A. Jesse Jiryu Davis
217f90bab6 PYTHON-1284 Don't copy CodecOptions in RawBSONDocument 2017-07-01 09:07:58 -04:00
Luke Lovett
d37bb4aabf Merge branch 'patch-1' of https://github.com/cjgibson/mongo-python-driver into 34dev 2016-09-09 15:07:59 -07:00
Christian Gibson
bca7e3b994 Updating class reference in comment. 2016-09-09 17:55:20 -04:00
Shane Harvey
57d1ccde2f PYTHON-1111 Add JSONOptions for dumps and loads
PYTHON-767 Support JSON strict mode $date output
PYTHON-1039 Support JSON strict mode $numberLong output
PYTHON-1103 Support JSON strict mode UUID output
PYTHON-1111 Support custom document class in loads
PYTHON-1111 Support tz_aware and tzinfo in loads
Refactor milliseconds to datetime conversions
2016-07-27 11:32:59 -07:00
Shane Harvey
5afd19922a PYTHON-1111 Add JSONOptions for dumps and loads 2016-07-22 12:10:29 -07:00
Luke Lovett
e4d3392f90 PYTHON-472 - Add a RawBSONDocument class that decodes its comprising bytes only on-demand.
This provides an API for inserting and returning raw BSON.
2015-11-18 15:00:09 -08:00
Bernie Hackett
c0df9955f4 Changelog for 3.1 2015-10-12 12:28:31 -07:00
Luke Lovett
880394fe99 PYTHON-222 - Add a 'tzinfo' attribute to CodecOptions that specifies a timezone to which to decode datetime objects. 2015-07-09 13:32:23 -07:00
aherlihy
39308c4b2f PYTHON-721 - Add unicode_decode_error_handler to CodecOptions. 2015-07-09 15:08:02 -04:00
Bernie Hackett
aec685b374 Fix up copyright dates. 2015-03-25 11:55:02 -07:00
Bernie Hackett
c87424e7af PYTHON-856 - as_class -> document_class
This commit changes the name of the as_class option
in CodecOptions to document_class, to match the name
of the MongoClient option.
2015-03-09 14:32:42 -07:00
Bernie Hackett
6bacdaafaa PYTHON-851 - Clean up MongoClient properties. 2015-03-08 20:23:07 -07:00
Bernie Hackett
7164ba2f41 PYTHON-839 - Better validation error messages. 2015-02-25 10:14:29 -08:00
A. Jesse Jiryu Davis
9da835ab3d PYTHON-825 BSON API changes and internal options handling.
This change resolves four issues:

PYTHON-826 The new codec_options submodule is moved from pymongo to bson.

PYTHON-827 Use codec_options in BSON APIs.

Functions and methods of the bson module that accepted the options as_class,
tz_aware, and uuid_subtype now accept a codec_options parameter instead.

For example, the function definition for bson.decode_all changes from this:

def decode_all(data, as_class=dict, tz_aware=True,
               uuid_subtype=OLD_UUID_SUBTYPE)

to:

def decode_all(data, codec_options=CodecOptions())

The following functions are changed:

- decode_all
- decode_iter
- decode_file_iter

The following methods are changed:

- BSON.encode
- BSON.decode

This is a breaking change for any application that uses the BSON API directly
and changes any of the named parameter defaults. No changes are required for
applications that use the default values for these options. The behavior
remains the same.

PYTHON-828 Internal BSON module changes to support CodecOptions

The pure Python BSON module passes around a CodecOptions instance instead of
as_class, tz_aware, and uuid_subtype. C extensions pass these values around in
a struct.

PYTHON-801 Rename uuid_subtype to uuid_representation.
2015-02-05 23:09:23 -06:00
A. Jesse Jiryu Davis
a2c13090d8 PYTHON-826 Move codec_options submodule from pymongo to bson. 2015-02-02 09:38:49 -05:00