Noah Stapp
f145c7db94
PYTHON-5756 - Fix BSON Binary type length bug ( #2790 )
2026-05-07 15:23:00 -04:00
Noah Stapp
b6bac45c7e
PYTHON-5032 - Use PyErr_GetRaisedException instead of deprecated PyEr… ( #2795 )
2026-05-07 14:52:19 -04:00
Noah Stapp
469a32a9dd
PYTHON-5737 - BSON encoding/decoding performance improvements ( #2715 )
2026-03-02 10:06:47 -08:00
Noah Stapp
52400e11a1
PYTHON-5571 - Fix memory leak when raising InvalidDocument with C extensions ( #2573 )
2025-10-06 09:25:57 -04:00
Noah Stapp
266caf02c4
PYTHON-5449 - Do not attach invalid document in exception message ( #2539 )
2025-09-23 14:31:35 -04:00
Jeffrey A. Clark
2655bb4d86
PYTHON-5033 Use PyModule_Add on >= 3.13 ( #2332 )
2025-05-08 17:14:26 -04:00
Steven Silvester
ecf7ac7770
PYTHON-5013 Add NULL checks in InvalidDocument bson handling ( #2049 )
2025-01-13 20:34:58 -06:00
Navjot
fdcbe2e622
PYTHON-1982 Update Invalid Document error message to include doc ( #1854 )
...
Co-authored-by: Navjot Singh <navjot@Navjots-Air.station>
Co-authored-by: Navjot Singh <navjot@Navjots-MacBook-Air.local>
Co-authored-by: Steven Silvester <steven.silvester@ieee.org>
2024-12-03 08:22:06 -06:00
Shane Harvey
8f26f43911
PYTHON-4450 Support free-threaded Python 3.13t with no-GIL ( #1906 )
2024-10-10 09:01:27 -07:00
Jeffrey A. Clark
7380097dbc
PYTHON-3959 - NULL Initialize PyObjects ( #1859 )
2024-10-03 13:39:04 -04:00
Jib
3b21517608
PYTHON-4752 Migrate docs links to Internal Docs Where Possible ( #1715 )
...
Co-authored-by: Steven Silvester <steve.silvester@mongodb.com>
2024-09-16 21:23:09 -05:00
Shane Harvey
3504130322
PYTHON-4663 Fix coverity warnings in datetime decoding change ( #1835 )
2024-09-05 11:28:49 -07:00
Shane Harvey
a2059dc9cb
PYTHON-4663 Fix compatibility with dateutil timezones ( #1812 )
2024-08-28 14:20:55 -07:00
Steven Silvester
fd0787a57b
PYTHON-4615 Address sign-compare warning, improve array_of_documents_to_buffer validation ( #1804 )
2024-08-27 19:05:15 -05:00
Shane Harvey
add6a30766
PYTHON-4285 Fix PyModule_GetState check ( #1565 )
2024-03-29 10:09:29 -07:00
Shane Harvey
372b5d68d5
PYTHON-4305 Fix bson size check ( #1564 )
2024-03-27 18:51:23 -05:00
Shane Harvey
ec4cb3ee55
PYTHON-4285 More consistent PyModule_GetState checks ( #1560 )
2024-03-25 13:48:45 -07:00
Shane Harvey
a8b8dab04a
PYTHON-3745 Add support for multiphase initialization ( #1499 )
...
Co-authored-by: Steven Silvester <steven.silvester@ieee.org>
2024-02-16 10:44:13 -08:00
Shane Harvey
7d6635b56c
PYTHON-3847 Encode DatetimeMS using type_marker lookup ( #1524 )
2024-02-16 10:43:57 -08:00
Noah Stapp
9d32a09e30
PYTHON-4084 Fix BSON inflation for DBRef ( #1458 )
2023-12-12 13:00:14 -08:00
Noah Stapp
568a3b1294
PYTHON-4084 Fix BSON inflation for RawBSONDocument ( #1456 )
2023-12-08 10:08:41 -08:00
Jib
c9f8829749
PYTHON-3855: Appends suggestion Use CodecOptions into errorhandler for datetime conversions ( #1349 )
...
* first commit, appends suggestion into errorhandler
* catch only ArithmeticErrors, scoped try clause, and using raise _ from
* fixed unused import
* formatting
* stepped through each logical call to ensure functional parity; added refactoring suggestions
* Revert "stepped through each logical call to ensure functional parity; added refactoring suggestions"
This reverts commit 77e99c97d6 .
I took PYTHON-3739 and accidentally super-imposed it onto this one. Reverting to fix
* place the msg check in the excxeption handle
* cleaned up some code callsites. applied refactor changes. made a more generic error checking test
* edited code comment
* Update test/test_bson.py
rename just to retrigger test suite
* DECREF -> XDECREF and formatting
2023-08-23 11:34:07 -04:00
Iris
4d42931823
PYTHON-3820 Optimize PyObject_CallMethod calls ( #1314 )
2023-07-19 09:03:45 -07:00
Shane Harvey
70da43ffe8
PYTHON-3846 Faster int encoding ( #1311 )
2023-07-17 14:40:27 -04:00
Shane Harvey
469e2e95f5
PYTHON-3511 Cleanup some more Python 2 references ( #1309 )
2023-07-14 17:02:24 -04:00
Iris
3f9e722e01
PYTHON-3824 Optimize BSON encoding of standard Python list and tuples ( #1302 )
2023-07-13 14:29:00 -07:00
Iris
9a4911fca6
PYTHON-3817 Optimize BSON encoding of standard Python dict ( #1301 )
2023-07-11 12:32:56 -07:00
Iris
5a8f422b9f
PYTHON-3816 use Use PyObject_GetItem instead of PyMapping_GetItemString ( #1294 )
2023-07-07 12:27:35 -07:00
Iris
7e96249212
PYTHON-3797 cache commonly used strings ( #1292 )
2023-07-06 08:26:21 -07:00
Iris
0b5bdccf3a
PYTHON-3729 use PyObject_GetAddr instead of PyObject_GetAddrString ( #1281 )
2023-07-03 09:15:04 -07:00
stephan-hof
8b23204408
PYTHON-3758 Support overflow integers in fallback_encoder. ( #1243 )
...
bson only supports 64-bit integer within range:
[-9_223_372_036_854_775_807, +9_223_372_036_854_775_807]
This change calls the fallback_encoder before raising OverflowError on
integers outside of this range.
2023-06-26 15:20:01 -04:00
Shane Harvey
3f687f71fb
PYTHON-3443 Remove redundant code to avoid Coverity warnings ( #1228 )
2023-06-12 12:41:59 -07:00
Shane Harvey
0bce579b81
PYTHON-3728 Simplify convert_codec_options signature ( #1225 )
2023-06-09 13:08:56 -07:00
thalassemia
1ba4c0bcbd
PYTHON-3718 Faster INT2STRING ( #1221 )
2023-06-05 18:35:39 -05:00
thalassemia
4c0196d340
PYTHON-3717 Speed up _type_marker check in BSON ( #1219 )
2023-05-26 09:40:32 -05:00
Jean-Christophe Fillion-Robin
d340710e3d
PYTHON-3703 Fix typos and add codespell pre-commit hook ( #1203 )
...
Update pre-commit config adding "codespell" hook
2023-05-03 14:47:24 -07:00
Steven Silvester
449cb8fb0f
PYTHON-2722 Improve performance of find/aggregate_raw_batches ( #1047 )
2022-09-22 15:14:40 -05:00
Ben Warner
14002a5a0d
PYTHON-1824 Allow encoding/decoding out-of-range datetimes via DatetimeMS and datetime_conversion ( #981 )
...
https://jira.mongodb.org/browse/PYTHON-1824
Co-authored-by: Ben Warner <ben.warner@mongodb.com>
2022-07-27 16:53:52 -07:00
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