Commit Graph

57 Commits

Author SHA1 Message Date
Rin
6585d9cb51
PYTHON-2442: Refactor: use _asdict() in _options_dict() (#2670)
Co-authored-by: Steven Silvester <steve.silvester@mongodb.com>
2025-12-30 10:41:37 -06:00
Noah Stapp
ad16d6e880
PYTHON-4431 - Remove ReadTheDocs Documentation in Favor of Official Docs (#2459) 2025-08-07 12:06:38 -04:00
Noah Stapp
717fb47c17
PYTHON-5061 - Add an API to extend the bson TypeRegistry (#2345) 2025-05-21 13:45:36 -04: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
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
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
Iris
c1d33831e8
PYTHON-3907 add --disallow-untyped-defs for mypy (#1351) 2023-08-10 11:08:36 -07:00
Iris
7bcbb0de9b
PYTHON-3802 add types to database.py (#1295) 2023-07-12 10:48:33 -07:00
Iris
f7874fb110
PYTHON-2287 Improve error message for invalid boolean option (#1236) 2023-06-15 11:54:20 -07:00
Shane Harvey
0092b0af79
PYTHON-2504 Run pyupgrade 3.4.0 and ruff 0.0.265 (#1196)
pyupgrade --py37-plus bson/*.py pymongo/*.py gridfs/*.py test/*.py tools/*.py test/*/*.py
ruff --fix-only --select ALL --fixable ALL --target-version py37 --line-length=100 --unfixable COM812,D400,D415,ERA001,RUF100,SIM108,D211,D212,SIM105,SIM,PT,ANN204,EM bson/*.py pymongo/*.py gridfs/*.py test/*.py test/*/*.py
2023-05-11 15:27:17 -07:00
Steven Silvester
e75cfec34f
PYTHON-3686 Consolidate CodecOptions Typings (#1199) 2023-04-28 16:11:27 -05:00
Julius Park
b3099c62de
PYTHON-3558 Missing docs for JSONOptions (#1143) 2023-01-30 12:13:30 -08:00
Steven Silvester
7299dff84d
PYTHON-3546 bson.CodecOptions docs missing unicode_decode_error_handler=ignore option in newer documentation (#1131) 2023-01-05 13:55:47 -06:00
Steven Silvester
df77653ccc
PYTHON-3347 Test against Python 3.11 prerelease (#1069) 2022-10-13 06:09:23 -05:00
Ben Warner
46673c3705
PYTHON-3379 Refactored DatetimeConversionOpts to DatetimeConversion (#1031) 2022-08-04 12:53:57 -07:00
Ben Warner
fbb8dde826
PYTHON-3375 Added docstrings to DatetimeConversionOpts (#1024)
* Added docstrings

* Fixed detail

* Fixed punctuation and links

Co-authored-by: Ben Warner <ben.warner@mongodb.com>
2022-07-29 15:53:38 -07:00
Ben Warner
0c56d56658
PYTHON-3371 Remove DatetimeConversionOpts.__repr__ (#1023)
* Removed __repr__ and adjusted repr string

* Changed to %s

Co-authored-by: Ben Warner <ben.warner@mongodb.com>
2022-07-28 15:55:34 -07: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
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