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
Steven Silvester
a0fe7c03af
PYTHON-3120 Set up flake8 linting ( #868 )
2022-02-17 06:44:08 -06:00
Steven Silvester
cbc7cc33e5
PYTHON-3073 Copy the unit tests from pymongo-stubs into pymongo ( #859 )
2022-02-10 18:54:46 -06:00
Steven Silvester
5578999a90
PYTHON-1834 Use a code formatter ( #852 )
2022-02-09 06:44:28 -06:00
Steven Silvester
f4cef37328
PYTHON-3064 Add typings to test package ( #844 )
2022-02-07 19:33:41 -06:00
Shane Harvey
b7c33debbf
PYTHON-3046 Document support for backslashreplace and surrogateescape ( #836 )
2022-01-21 10:08:48 -08:00
Julius Park
c38085269b
PYTHON-1337 Add __slots__ to commonly used bson classes ( #739 )
2021-09-24 13:54:40 -07: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
5fd175c0d8
PYTHON-2529 Remove UUIDLegacy ( #698 )
2021-08-06 16:52:41 -07:00
Shane Harvey
cc029a1e62
PYTHON-2631 Add missing error message to InvalidBSON error ( #589 )
2021-04-02 10:17:04 -07:00
Bernie Hackett
1f1670cc35
PYTHON-1974 Drop support for Python 3.4
2021-01-22 15:54:26 -08:00
Bernie Hackett
521f7b9af4
PYTHON-2133 Fix up docs
...
And finish deleting python 2 specific code.
2021-01-21 15:49:23 -08:00
Bernie Hackett
e17299ab2e
PYTHON-2133 Remove u prefixes from code
2021-01-20 16:10:23 -08:00
Bernie Hackett
a72e8b8823
PYTHON-2133 Remove py2 support from test
...
Also delete bson/py3compat.py
2021-01-20 09:40:36 -08:00
Prashant Mital
4760d07815
PYTHON-2152 Expand native UUID handling support; Implement UUID specification
2020-06-01 17:45:08 -07:00
paul fisher
6c4e1c9371
PYTHON-2061 bson: check for negative entry size in decode_file_iter ( #429 )
...
Raise InvalidBSON instead of ValueError when decode_file_iter reads an invalid
BSON object size.
2019-11-22 14:57:00 -08:00
Prashant Mital
ef3df1663c
PYTHON-1918 Stop using BSON.encode and BSON.decode functions
2019-09-09 18:06:46 -07:00
Shane Harvey
57302846b7
PYTHON-1930 Fix pure python decoder support for memoryviews
2019-08-02 12:17:45 -07:00
Bernie Hackett
3bcdde34c9
PYTHON-1785 Add bson.encode and bson.decode
2019-07-30 11:52:03 -07:00
Bernie Hackett
57c7f8ccbb
PYTHON-1785 Pure Python decoders support the buffer protocol
2019-07-30 11:51:24 -07:00
Shane Harvey
6b6efd9b59
PYTHON-1664 Include type in InvalidDocument error
2019-04-19 16:51:04 -07:00
Shane Harvey
eb4a047278
PYTHON-1799 Don't iterate _ENCODERS dict when encoding bson
2019-04-02 16:48:34 -07:00
Prashant Mital
cda0b71b78
PYTHON-1696 Stop encouraging use of BSON.decode as a classmethod
2019-03-21 11:45:43 -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
Shane Harvey
7ca04999e9
PYTHON-1603 Truncate large datetimes properly ( #362 )
2018-07-09 16:28:48 -07:00
Bernie Hackett
8573099c4b
Move time consuming utf8 tests out of the main suite
2018-06-24 20:45:59 -07:00
stephan-hof
9b632c776c
Refactor the the assert into a separate function.
2018-06-24 19:59:16 -07:00
stephan-hof
e113a338e9
Improve the check for legal utf8 in the bson module.
...
Now python and bson have the same understanding of legal utf8.
2018-06-24 19:59:16 -07: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
gzcf
9051b65510
PYTHON-1299 fix Regex __eq__ method ( #337 )
2017-09-29 10:57:21 -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
788debfdd6
PYTHON-1228 - Fix BSON test failures with Jython 2.7
...
The 'replace' and 'ignore' handlers for Jython generate output that
differs from CPython / PyPy.
Jython doesn't properly handle NaN with payload from struct.(un)pack.
2017-02-17 13:55:50 -08:00
Bernie Hackett
82db71e1e8
PYTHON-1068 - Support for BSON Decimal128
2016-08-29 15:07:07 -07:00
Bernie Hackett
f8aa26c549
Change solution to max recursion depth test issue
...
Changing max recursion depth to work around the CPython
issue seems to cause random failures in previous
python versions.
2016-08-26 13:52:22 -07:00
Luke Lovett
6692e8877a
PYTHON-1131 - Fix inconsistent handling of scope, unicode support for Code.
2016-08-19 15:22:19 -07:00
Shane Harvey
bc6da8333d
PYTHON-1122 Fix test_bad_encode on OS X Python 2.6
2016-07-28 11:08:25 -07:00
Bernie Hackett
53a7bea492
PYTHON-1022 - Drop support for Python 3.2
...
This change removes the u() helper from bson.py3compat
and all of its uses in the driver and tests. PyPy3 continues
to be supported since, even though it is based on python 3.2.5,
it has always supported the u string prefix.
The README and install docs are now explicit about PyPy(3) support.
2016-06-15 10:05:43 -07:00
Bernie Hackett
6a14d70120
PYTHON-1044 - Fix up unknown BSON type handing
2016-01-28 11:21:34 -08:00
Bernie Hackett
0558e4b3a4
PYTHON-996 - More aggressively lower recursion limit
2015-09-23 16:42:42 -07:00
Bernie Hackett
40e0d9d14b
PYTHON-996 - Work around overflow handling change in python 3.5
2015-09-23 16:11:11 -07:00
Bernie Hackett
4bbe2133a1
PYTHON-996 - Adjust regex tests for python 3.5
2015-09-22 15:17:50 -07:00
Luke Lovett
3321b66d34
PYTHON-977 - Fix __hash__ method on BSON types that inherit from Python builtin types.
...
In Python 2, objects automatically inherit the __hash__ of their parent
class. In Python 3, objects that override __eq__ do not automatically inherit
__hash__, so these objects were not hashable under Python 3. Additionally,
mutable BSON types and types that overide __eq__ but did not explicitly define
__hash__ had broken __hash__ methods under Python 2. This commit unifies the
hashing behavior between Python versions and fixes the __hash__ methods such
that two BSON objects hash the same only if they are equal.
N.B.: bson.code.Code and bson.regex.Regex are no longer hashable under Python 2
because they are mutable.
2015-09-04 14:45:24 -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