Commit Graph

23 Commits

Author SHA1 Message Date
Noah Stapp
469a32a9dd
PYTHON-5737 - BSON encoding/decoding performance improvements (#2715) 2026-03-02 10:06:47 -08: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
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
Bernie Hackett
96b75808d1 PYTHON-2133 Remove py2 support from extensions 2021-01-26 14:26:03 -08: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
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
Thomas Hisch
19827c41ec PYTHON-1467 Remove outdated code for old python versions (#395) 2019-02-06 13:23:43 -08:00
Bernie Hackett
507f954ed4 Update copyright dates 2017-12-01 17:23:39 -08:00
Bernie Hackett
c4e8d22544 PYTHON-1025 - C extensions big endian support 2016-06-24 17:54:24 -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
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
2fa1750b07 Update copyright notices and company name. 2014-01-31 09:36:46 -05:00
Bernie Hackett
b2d1034989 Use commands for write operations PYTHON-554 2013-11-25 18:21:04 -08:00
Bernie Hackett
2371f32894 Clean up str/bytes/unicode encoding in C.
Minor perf improvements included.
2013-11-18 14:54:10 -08:00
behackett
0ee7170cc2 It's 2012... 2012-04-19 12:40:38 -07:00
Bernie Hackett
ae58ae670e Python 3 C extension changes PYTHON-84. 2012-03-23 12:53:56 -07:00