Commit Graph

483 Commits

Author SHA1 Message Date
Noah Stapp
717fb47c17
PYTHON-5061 - Add an API to extend the bson TypeRegistry (#2345) 2025-05-21 13:45:36 -04:00
Steven Silvester
75f6a3718e
Revert "PYTHON-5126 & PYTHON-5280 Addresses issues raised in DRIVERS-3097 and DRIVERS-3123 " (#2337) 2025-05-12 09:35:08 -05:00
Jeffrey A. Clark
2655bb4d86
PYTHON-5033 Use PyModule_Add on >= 3.13 (#2332) 2025-05-08 17:14:26 -04:00
Casey Clements
fafa00e9e3
PYTHON-5126 & PYTHON-5280 Addresses issues raised in DRIVERS-3097 and DRIVERS-3123 (#2261) 2025-04-09 09:09:42 -04:00
Casey Clements
b66a5cb673
PYTHON-5172 bugfix: Add __repr__ and __eq__ to bson.binary.BinaryVector (#2162) 2025-03-10 15:45:32 -04:00
Casey Clements
6da1fdbed9
PYTHON-5126 Resync bson vector spec tests following additions (#2161) 2025-03-03 12:51:32 -05:00
The Light
44d1d40d65
PYTHON-5115 Type validation errors should include the invalid type name (#2085)
Co-authored-by: Iris Ho <iris.ho@mongodb.com>
2025-01-31 12:01:58 -08:00
Jib
7dba1e5dd9
PYTHON-5043: Fix list[int, float] typo in binary.py (#2066) 2025-01-21 14:37:52 -05: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
Casey Clements
466d0a188f
PYTHON-4903 Adds typing overloading to bson.binary.Binary.from_vector (#1967) 2024-11-05 10:47:36 -05:00
Shane Harvey
32269aac1e
PYTHON-4885 Fix legacy extended JSON encoding of DatetimeMS (#1986) 2024-10-31 14:01:30 -07:00
Steven Silvester
351196b91b
PYTHON-4813 Update specification documentation links (#1977) 2024-10-30 15:46:52 -05:00
Casey Clements
26a61c8c48
PYTHON-2926 Updated signature of Binary.from_vector to take a BinaryVector (#1963) 2024-10-23 08:24:59 -04: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
Casey Clements
7fbeca9793
[PYTHON-4803] Big endian fix for binary bson vectors (#1885) 2024-10-01 15:06:12 -04:00
Casey Clements
ae6cfd6d10
[DRIVERS-2926] [PYTHON-4577] BSON Binary Vector Subtype Support (#1813)
Co-authored-by: Steven Silvester <steve.silvester@mongodb.com>
Co-authored-by: Steven Silvester <steven.silvester@ieee.org>
2024-09-30 21:13:09 -05:00
Steven Silvester
3ef565fa43
PYTHON-4796 Update type checkers and handle with_options typing (#1880) 2024-09-30 18:01:53 -05: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
a4645f0f8b
PYTHON-4712 Improve BSON encoding/decoding docs (#1823) 2024-08-30 13:36:40 -07:00
Shane Harvey
a2059dc9cb
PYTHON-4663 Fix compatibility with dateutil timezones (#1812) 2024-08-28 14:20:55 -07:00
Shane Harvey
28697df6f8
PYTHON-4691 Fix non-UTC timezones with DATETIME_CLAMP/DATETIME_AUTO (#1811) 2024-08-28 11:39:03 -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
4eae7d2d94
PYTHON-4690 Add repr for FixedOffset eg FixedOffset(datetime.timedelta(seconds=3600), '+60')) (#1806) 2024-08-23 09:50:05 -07:00
Shane Harvey
8939ea359c
PYTHON-4640 Improve performance of creating ObjectIds with multiple threads (#1781) 2024-08-08 19:34:39 -07:00
Terry Patterson
ac66c9dfd2
PYTHON-4468 Hide the value of sensitive subtype binary objects (#1649)
Co-authored-by: Steven Silvester <steven.silvester@ieee.org>
2024-05-30 16:44:06 -05:00
Shane Harvey
724186700f
PYTHON-3741 Fix rendering of CodecOptions links in docs (#1595) 2024-04-16 11:29:27 -07: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
ebb94b669e
PYTHON-3457 Easier debugging with standardized logging (#1515)
PYTHON-3458 Add command logging.
PYTHON-3459 Add server selection logging.
PYTHON-3473 Add connection pool logging.
PYTHON-4167 Add documentation and examples.

Co-authored-by: sleepyStick <itsirisho@gmail.com>
2024-02-15 11:35:08 -08:00
Shane Harvey
4c2e717b9f
PYTHON-4204 Optimize JSON decoding using lookup table to find $ keys (#1512) 2024-02-06 16:18:31 -08:00
ilukyanchikov
97b9a333c8
PYTHON-4179: Optimize JSON decoding performance by avoiding object_pairs_hook (#1493) 2024-02-05 13:59:14 -08:00
Shane Harvey
b8d6bfdf08
PYTHON-4144 Optimize json_util encoding performance using single dispatch table (#1475) 2024-01-18 11:43:36 -08:00
Shane Harvey
cd3f502de6
PYTHON-4143 Optimize JSON encoding of int, float, str, and None (#1474) 2024-01-12 12:59:15 -08:00
Shane Harvey
72663deb33
PYTHON-4142 json_util.default should always convert Int64 (#1473) 2024-01-12 10:57:54 -08:00
Noah Stapp
f67e9ae207
PYTHON-1374 Optimize json_util performance (#1460) 2024-01-11 16:44:38 -08:00
Jib
60d0761527
PYTHON-2884: Replaced SON usage in all internal classes and commands (#1426) 2023-12-19 15:42:23 -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
Steven Silvester
6537415da7
PYTHON-3605 Move type annotations to parameter list in rendered docs (#1441) 2023-11-27 09:24:00 -06:00
Steven Silvester
923c8a5abe
PYTHON-4024 Use ruff formatter (#1419) 2023-11-02 12:46:40 -05:00
Steven Silvester
992d1507e7
PYTHON-4005 Replace flake8 and isort with ruff (#1399) 2023-10-19 11:56:22 -05:00
Steven Silvester
83ab612aa1
PYTHON-3932 Support mypy --strict testing in bson package (#1362) 2023-08-29 13:49:11 -05: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
0d44783edd
PYTHON-3821 use overload pattern for _DocumentType (#1352) 2023-08-10 16:46:41 -07:00