Steven Silvester
b40f13bf7d
PYTHON-3311 Module "pymongo" does not explicitly export attribute "MongoClient"; implicit reexport disabled ( #994 )
2022-07-06 18:30:00 -05:00
Shane Harvey
dca72b7884
PYTHON-3222 Fix memory leak in cbson decode_all ( #927 )
...
Add decode_all keyword arg for codec_options.
Make decode_all show up in docs.
2022-04-12 17:18:23 -07:00
Steven Silvester
b3604a81d3
PYTHON-3171 Add usage of NoReturn annotation ( #901 )
2022-03-16 15:26:10 -05:00
Steven Silvester
474420b2e5
PYTHON-3085 Audit consistent and correct types for _DocumentOut ( #893 )
2022-03-16 05:56:07 -05:00
Steven Silvester
a0fe7c03af
PYTHON-3120 Set up flake8 linting ( #868 )
2022-02-17 06:44:08 -06:00
Steven Silvester
2db512f5d5
PYTHON-3078 Remove Use of Unsupported NoReturn Type Class ( #864 )
2022-02-14 16:14:36 -06:00
Steven Silvester
5578999a90
PYTHON-1834 Use a code formatter ( #852 )
2022-02-09 06:44:28 -06:00
Steven Silvester
dd6c140d43
PYTHON-3060 Add typings to pymongo package ( #831 )
2022-02-02 21:12:36 -06: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
afa3997bb2
PYTHON-2680 Breaking changes to DBRef BSON+JSON decoding ( #722 )
...
Implement DBRef spec version 1.0 tests.
2021-09-10 11:03:25 -07:00
Shane Harvey
69c69a6bfb
PYTHON-2862 Remove versionchanged info for PyMongo <3.0 ( #709 )
2021-08-19 10:39:26 -07:00
Shane Harvey
5fd175c0d8
PYTHON-2529 Remove UUIDLegacy ( #698 )
2021-08-06 16:52:41 -07:00
Prashant Mital
209d5009e6
PYTHON-1860 Use OP_MSG for find/aggregate_raw_batches when supported ( #622 )
2021-05-19 12:05:35 -07:00
Bernie Hackett
521f7b9af4
PYTHON-2133 Fix up docs
...
And finish deleting python 2 specific code.
2021-01-21 15:49:23 -08:00
Bernie Hackett
c70071df1d
PYTHON-2133 Remove Py2 compatibility from bson
2021-01-14 14:57:20 -08:00
Prashant Mital
4760d07815
PYTHON-2152 Expand native UUID handling support; Implement UUID specification
2020-06-01 17:45:08 -07:00
paul fisher
6c4e1c9371
PYTHON-2061 bson: check for negative entry size in decode_file_iter ( #429 )
...
Raise InvalidBSON instead of ValueError when decode_file_iter reads an invalid
BSON object size.
2019-11-22 14:57:00 -08:00
Shane Harvey
57302846b7
PYTHON-1930 Fix pure python decoder support for memoryviews
2019-08-02 12:17:45 -07:00
Bernie Hackett
3bcdde34c9
PYTHON-1785 Add bson.encode and bson.decode
2019-07-30 11:52:03 -07:00
Bernie Hackett
57c7f8ccbb
PYTHON-1785 Pure Python decoders support the buffer protocol
2019-07-30 11:51:24 -07:00
Shane Harvey
6b6efd9b59
PYTHON-1664 Include type in InvalidDocument error
2019-04-19 16:51:04 -07:00
Prashant Mital
2f2fe9db0d
PYTHON-1818 TypeCodec support for ChangeStreams
2019-04-18 18:02:12 -07:00
Shane Harvey
fbb56a2311
PYTHON-1820 Validate bson size in RawBSONDocument init
...
Also fixes a bug where an empty bson document could not be represented
by RawBSONDocument.
2019-04-18 15:15:10 -07:00
Shane Harvey
2cb34e4efc
PYTHON-1814 Support custom type decoder with distinct
...
Fix pure python custom type decoding of bson arrays.
2019-04-17 15:44:51 -07:00
Prashant Mital
749116287a
PYTHON-1783 Decode user-facing documents but not internal driver-server
...
communications.
2019-04-16 15:01:42 -07:00
Prashant Mital
4049b1493a
PYTHON-1783: disallow custom-encoding built-in types
2019-04-11 11:28:14 -07:00
Shane Harvey
eb4a047278
PYTHON-1799 Don't iterate _ENCODERS dict when encoding bson
2019-04-02 16:48:34 -07:00
Prashant Mital
cda0b71b78
PYTHON-1696 Stop encouraging use of BSON.decode as a classmethod
2019-03-21 11:45:43 -07: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
Shane Harvey
7ca04999e9
PYTHON-1603 Truncate large datetimes properly ( #362 )
2018-07-09 16:28:48 -07: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
Bernie Hackett
2719464837
PYTHON-1352 - Move BSON type map docs from bson.son.SON to bson
2017-11-08 11:24:28 -08:00
Shane Harvey
e775295ab5
PYTHON-1367 Ignore uuid_representation when decoding BSON binary subtype 4.
2017-09-12 17:20:14 -07:00
Bernie Hackett
82db71e1e8
PYTHON-1068 - Support for BSON Decimal128
2016-08-29 15:07:07 -07:00
Luke Lovett
b6c74cf33d
PYTHON-1106 - Implement BSON corpus test suite.
2016-08-24 11:01:45 -07:00
Luke Lovett
6692e8877a
PYTHON-1131 - Fix inconsistent handling of scope, unicode support for Code.
2016-08-19 15:22:19 -07: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
Bernie Hackett
6a14d70120
PYTHON-1044 - Fix up unknown BSON type handing
2016-01-28 11:21:34 -08: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
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
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
2ba730722b
PYTHON-526 Remove 'compile_re' option.
...
PyMongo now never attempts to compile BSON regular expressions as Python native
regular expressions.
2014-12-05 14:06:38 -05:00
Bernie Hackett
db4ab8d769
Use _UNPACK_INT in new BSON helpers.
2014-11-24 13:30:34 -08:00
Bernie Hackett
4e20ab3ca5
Document uuid_subtype parameter for BSON.encode/decode.
2014-11-24 13:14:39 -08:00