Ben Warner
3f7231a1a2
PYTHON-3048 Fixed bug with incorrect validation of UTF-8 regex patterns ( #970 )
2022-06-13 16:04:30 -07:00
Ben Warner
be3008aa11
PYTHON-2110 Refactored some C to avoid symbol conflicts ( #968 )
...
* Refactored to avoid symbol conflicts
* Forgot a replacement
* Found a symbol
* Undid symbol replacement for PyInit__cmessage
* Changed cbson too
Co-authored-by: Ben Warner <ben.warner@mongodb.com>
2022-06-13 11:42:41 -07: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
474420b2e5
PYTHON-3085 Audit consistent and correct types for _DocumentOut ( #893 )
2022-03-16 05:56:07 -05: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
cc029a1e62
PYTHON-2631 Add missing error message to InvalidBSON error ( #589 )
2021-04-02 10:17:04 -07:00
Shane Harvey
c0321ef2c5
PYTHON-2630 Statically initialize Py_buffer to avoid false positives in Coverity ( #588 )
2021-04-02 10:09:27 -07:00
Bernie Hackett
96b75808d1
PYTHON-2133 Remove py2 support from extensions
2021-01-26 14:26:03 -08:00
Prashant Mital
594b211ff1
PYTHON-2382 Destroy codec options struct in _cbson._element_to_dict ( #496 )
2020-10-06 11:01:11 -07:00
Prashant Mital
4760d07815
PYTHON-2152 Expand native UUID handling support; Implement UUID specification
2020-06-01 17:45:08 -07:00
Shane Harvey
643e64880e
PYTHON-2188 Raise ValueError instead of MemoryError when encoding exceeds 2GiB
2020-04-08 15:07:41 -07:00
Shane Harvey
9cf0fbd785
PYTHON-2001 Fix warnings emitted by Python 3.8 ( #428 )
...
Fix DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
Fix DeprecationWarning: isAlive() is deprecated, use is_alive() instead
Fix SyntaxWarning: invalid escape sequence
Test Python 3.8 on Travis
2019-11-08 11:48:15 -08:00
Bernie Hackett
57c7f8ccbb
PYTHON-1785 Pure Python decoders support the buffer protocol
2019-07-30 11:51:24 -07:00
Bernie Hackett
de7c94cdac
PYTHON-1785 C extension decoders support the buffer protocol
2019-07-30 11:51:00 -07:00
Shane Harvey
201c3d2208
PYTHON-1916 Don't decode RawBSONDocument during insert operations
...
This change improves the performance of inserting RawBSONDocuments with
insert_one, insert_many, and bulk_write.
2019-07-29 17:55:53 -07:00
Shane Harvey
b2c5c5f8b8
PYTHON-1843 Use public attribute to encode ObjectId in C
2019-06-04 15:40:08 -07:00
Shane Harvey
6b6efd9b59
PYTHON-1664 Include type in InvalidDocument error
2019-04-19 16:51:04 -07:00
Prashant Mital
4049b1493a
PYTHON-1783: disallow custom-encoding built-in types
2019-04-11 11:28:14 -07:00
Shane Harvey
cd787dbb2c
PYTHON-1791 Fix reference counting leaks
...
Fix batched op_msg/op_query reference leak of overflow doc.
Fix theoretically possible (but practically impossible) reference leak of
$clusterTime in op_query.
Optimization: Don't encode document past the batch size in batched op_query.
2019-03-27 13:04:02 -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
ea8cb6c209
PYTHON-1329 Send/receive commands as OP_MSG
...
Don't use $query with OP_MSG.
Support compression with OP_MSG.
2018-06-21 15:46:48 -07:00
Shane Harvey
5ff33a2a37
PYTHON-1554 Fix datetime decoding memory leak
2018-05-22 13:42:59 -07:00
Bernie Hackett
ba7c95a9df
PYTHON-1462 - Import ABCs from collections.abc
2018-02-12 19:42:44 -08:00
Shane Harvey
1a784e1afb
PYTHON-1466 Silence minor complaints from Coverity
...
Remove useless NULL check as GETSTATE cannot return NULL after
successful initialization.
2018-02-12 11:31:48 -08:00
Bernie Hackett
507f954ed4
Update copyright dates
2017-12-01 17:23:39 -08:00
Bernie Hackett
de801be529
Silence various complaints from Coverity
2017-11-30 15:02:20 -08:00
Shane Harvey
a4f58cce53
PYTHON-1404 Avoid copying RawBSONDocument.raw.
2017-11-10 15:45:04 -08:00
Shane Harvey
e775295ab5
PYTHON-1367 Ignore uuid_representation when decoding BSON binary subtype 4.
2017-09-12 17:20:14 -07:00
Anthony Sottile
41be71f09f
Trim trailing whitespace
2017-08-31 22:26:39 -07:00
Shane Harvey
47ab8c3187
PYTHON-1343 Use unsigned long to encode Timestamps.
...
The time and increment portions of a Timestamp are unsigned 32-bit integers
which are not guaranteed to fit inside a long.
2017-08-04 11:33:49 -07:00
Bernie Hackett
2fe8d7cf69
PYTHON-1244 - Fix signed/unsigned comparison
2017-02-27 16:14:47 -08:00
Bernie Hackett
8ae717d0df
Always check for errors after calling PyLong/Int_AsLong
2016-10-26 16:48:24 -07:00
Petr Messner
8712009f5a
Fix ref count management when building _element_to_dict result tuple
2016-10-20 15:46:00 -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
Bernie Hackett
c4e8d22544
PYTHON-1025 - C extensions big endian support
2016-06-24 17:54:24 -07:00
Bernie Hackett
49c847f9b5
Fix a few issues discovered by coverity scan
2016-02-01 17:05:28 -08: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
c63c0f1d91
PYTHON-1013 - Only reraise PyExc_Exceptions as InvalidBSON in C extensions.
2015-11-17 11:07:39 -08:00
aherlihy
af0daa4fc4
PYTHON-1010 write_dict now checks the error indicator when exiting iteration loop
2015-11-13 10:58:23 -05:00
Bernie Hackett
c327913cbf
Fix issues found in coverity scan
2015-09-29 17:29:59 -07:00
Luke Lovett
f62dbc15bd
PYTHON-969 - Check return value from PyObject_Call before using it in PyObject_GetAttrString.
2015-07-22 16:43:34 -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
3716b449cc
PYTHON-871 - Fix encoding of defaultdict.
2015-03-27 14:35:09 -07:00
Bernie Hackett
76530ccd72
PYTHON-870 - Fix two unlikely reference leaks.
2015-03-26 13:00:40 -07:00