Commit Graph

2082 Commits

Author SHA1 Message Date
Shane Harvey
f359284ab2 PYTHON-1664 Include type in InvalidDocument error
(cherry picked from commit 6b6efd9b59)
2019-04-19 16:51:56 -07:00
Shane Harvey
353be17179 PYTHON-1818 Support custom type encoding in watch pipelines
(cherry picked from commit 9cca2a7d2c)
2019-04-19 15:54:54 -07:00
Prashant Mital
286ab13a8a
PYTHON-1821 Preserve field ordering when iterating over RawBSONDocument
instances

(cherry picked from commit 3b29458015)
2019-04-19 12:38:36 -07:00
Prashant Mital
f54562a9a5
PYTHON-1818 TypeCodec support for ChangeStreams
(cherry picked from commit 2f2fe9db0d)
2019-04-18 18:08:57 -07:00
Shane Harvey
6476cb8816 PYTHON-1820 Validate bson size in RawBSONDocument init
Also fixes a bug where an empty bson document could not be represented
by RawBSONDocument.

(cherry picked from commit fbb56a2311)
2019-04-18 15:16:58 -07:00
Shane Harvey
ec8768c3ea PYTHON-1814 Support custom type decoder with distinct
Fix pure python custom type decoding of bson arrays.

(cherry picked from commit 2cb34e4efc)

Conflicts:
	pymongo/command_cursor.py
2019-04-17 15:48:54 -07:00
Prashant Mital
b14dede0fb
PYTHON-1783 Decode user-facing documents but not internal driver-server
communications.

(cherry picked from commit 749116287a)
2019-04-16 15:35:29 -07:00
Prashant Mital
3f7481fe3b
PYTHON-1783: disallow custom-encoding built-in types
(cherry picked from commit 4049b1493a)
2019-04-16 15:25:03 -07:00
Shane Harvey
a3fe8bc106 PYTHON-1491 Skip OP_KILL_CURSORS on old 3.6 versions
(cherry picked from commit 007aa6ba50)
2019-04-16 14:34:18 -07:00
Shane Harvey
69353270f7 PYTHON-1811 Deprecate running min/max queries without hint
Starting in MongoDB 4.2 a hint will be required when using min/max.

(cherry picked from commit ea8941ef5d)
2019-04-16 14:10:28 -07:00
Shane Harvey
50b905ea2f PYTHON-1801 Update transactions count test for MongoDB >= 4.0.7
(cherry picked from commit f09d6fa052)

Changes:
    Replace runOn with minServerVersion.
2019-04-08 12:58:41 -07:00
Shane Harvey
35a408c425 PYTHON-1799 Don't iterate _ENCODERS dict when encoding bson
(cherry picked from commit eb4a047278)
2019-04-08 10:59:42 -07:00
Terence D. Honles
8cecd8eb86 PYTHON-1695 GridOut/GridIn more closely implement io.IOBase (#387)
Allows GridOut to be wrapped with zipfile.ZipFile from the stdlib.

(cherry picked from commit 481600b7fe)
2019-03-28 15:56:07 -07:00
Shane Harvey
7feb8ceee7 PYTHON-1792 More reliable tests for ChangeStream.try_next
(cherry picked from commit 5ebd2938bd)
2019-03-27 13:37:12 -07:00
Shane Harvey
c339077ec9 PYTHON-1662 Add ChangeStream.try_next API
(cherry picked from commit 92ddc09b7e)
2019-03-26 11:15:54 -07:00
Shane Harvey
86463345e6 PYTHON-1784 Add filter support to list_collection_names
Adhere to enumerate collection spec for setting nameOnly when filter
is provided to allow filtering based on collection options.

(cherry picked from commit 11967eb160)
2019-03-22 17:07:43 -07:00
Shane Harvey
0314ab18b5 PYTHON-1786 Send comment with Cursor.count and Cursor.distinct
(cherry picked from commit 4169a04821)
2019-03-22 17:03:20 -07:00
Shane Harvey
e7ddc291b1 PYTHON-1781 Raise a client side error when attempting a sharded transaction 2019-03-22 16:56:20 -07:00
Bernie Hackett
ea62ce57d7 PYTHON-1685 - Renovate get_default_database
(cherry picked from commit c55a66235d)
2019-03-22 16:50:32 -07:00
Prashant Mital
f88770798b
PYTHON-1786 Skip test_cursor.TestCursor.test_comment until SERVER-40270 is resolved
(cherry picked from commit 1b0b17450a)
2019-03-22 10:27:39 -07:00
Prashant Mital
c1453562f6
PYTHON-1782 Allow MongoClient to be initialized with type_registry
(cherry picked from commit 599e2d7117)
2019-03-21 15:34:59 -07:00
Prashant Mital
2e8d897026
PYTHON-1696 Stop encouraging use of BSON.decode as a classmethod
(cherry picked from commit cda0b71b78)
2019-03-21 11:46:48 -07:00
Prashant Mital
2867fe544c
PYTHON-1769 Re-define TypeCodecBase as an AbstractBaseClass
(cherry picked from commit 65f85f648c)
2019-03-19 18:03:25 -05:00
Prashant Mital
9093ddf365
PYTHON-1731 Implement callback for unencodable types
(cherry picked from commit e01efc7073)
2019-03-18 14:09:29 -05:00
Shane Harvey
3ef4aa982c PYTHON-1600 Avoid race condition in test_last_write_date
(cherry picked from commit a1b04628b9)
2019-03-15 17:29:51 -07:00
Shane Harvey
bdfa2919e0 PYTHON-1757 Properly skip tests that require enableTestCommands
(cherry picked from commit 923229de12)
2019-03-14 16:28:54 -07:00
Shane Harvey
2ab5d181b6 PYTHON-1773 Test against clusters with enableTestCommands=0
(cherry picked from commit 9f9b888111)
2019-03-14 16:26:16 -07:00
Shane Harvey
8069e13232 PYTHON-1721 Improve GridFS file download performance (#413)
This change uses a cursor to download all the chunks in a GridFS file
instead of using individual find_one operations to read each chunk.
Detect truncated/missing/extra chunks in _GridOutChunkIterator.
Only detect extra chunks after reading the final chunk, not on every
call to read().
Retry once after CursorNotFound for backward compatibility.

(cherry picked from commit 956fd92e82)
2019-03-13 15:48:38 -07:00
Shane Harvey
905c578fe6 PYTHON-1721 Add EventListener.started_command_names 2019-03-13 15:47:46 -07:00
Shane Harvey
61b38da1d2 PYTHON-1709 Always use codec_options in Database.current_op
(cherry picked from commit da2ba8d7ed)
2019-03-13 13:36:48 -07:00
Prashant Mital
7b6db40c7d
PYTHON-1750 Support callbacks for simple types (#405)
(cherry picked from commit 83755b8739)
2019-03-13 10:41:33 -07:00
Shane Harvey
a583eec290 PYTHON-1491 Enable OP_KILL_CURSORS test
(cherry picked from commit 59c3a22115)
2019-03-12 17:59:56 -07:00
Shane Harvey
c7f5b1b1fe PYTHON-1725 Fix TestThreadsAuth.test_auto_auth_login
Create the database upfront to avoid test failures on sharded clusters.

(cherry picked from commit fd34c1da2a)
2019-03-12 16:29:27 -07:00
Shane Harvey
3082649e89 PYTHON-1766 Use insert_many to reduce test runtime (#410)
(cherry picked from commit a84f50b998)
2019-03-12 16:28:53 -07:00
Shane Harvey
9902d239b4 PYTHON-1751 Resync transaction spec tests for bulk write error reporting change (#402) 2019-02-20 11:14:28 -08:00
Shane Harvey
9dcd828a0f
PYTHON-1739 Skip failing change stream test on sharded clusters (#397) 2019-02-07 16:01:32 -08:00
Thomas Hisch
19827c41ec PYTHON-1467 Remove outdated code for old python versions (#395) 2019-02-06 13:23:43 -08:00
Shane Harvey
c77a0d8e1f PYTHON-1719 Stop testing getpreverror on MongoDB 4.1+ 2019-01-31 17:00:26 -08:00
Shane Harvey
e9d433982b PYTHON-1734 Skip failing index tests on MongoDB 4.1 2019-01-31 17:00:15 -08:00
Shane Harvey
a913d34380 PYTHON-1706 Fix issues found by coverity pt. 2
Remove unused code.
2018-12-14 14:52:18 -08:00
Marek Skalický
51119f09ee PYTHON-1706 Fix issues found by coverity pt. 1 (#377) 2018-12-14 14:51:34 -08:00
Shane Harvey
ff5f1ce8a4
PYTHON-1704 Close periodic task thread when client is closed (#389) 2018-12-13 12:04:03 -08:00
Shane Harvey
1d8c73954c PYTHON-1691 Fix transaction test runner to read the latest data from the primary 2018-11-30 13:30:17 -08:00
Shane Harvey
c200c2cd0e
PYTHON-1658 Test that transaction reads ignore db/collection readConcern (#384)
Fix: properly skip tests that include 'skipReason'.
Revendor transaction spec tests at commit 367842f1ee4b80f75664a05c6b9d5b2498cf856d
2018-11-14 11:47:53 -08:00
Prashant Mital
b1fc024143
PYTHON-1683 Remove _partition and _rpartition from uri_parser module (#383) 2018-11-14 10:52:31 -08:00
Shane Harvey
e7114087c7 PYTHON-1682 UTF-8 encode unicode error messages on Python 2 2018-11-13 17:43:57 -08:00
Shane Harvey
d43ca118f9 PYTHON-1654 Ignore $clusterTime in test_command assertion 2018-10-09 15:55:10 -07:00
Pascal Corpet
9dae3d06a2 Fix equality comparison of WriteConcern objects. (#378) 2018-10-09 15:05:47 -07:00
Shane Harvey
6fe00109c1 PYTHON-1650 Always increment txnNumber before starting a retryable write 2018-10-08 11:42:02 -07:00
Prashant Mital
bc26c0db69
PYTHON-1577 Allow applications to register a custom server selector (#371)
PYTHON-1577 Allow applications to register a custom server selector
2018-08-30 17:33:03 -05:00