Release Notes - Python Driver - Version 3.12 - HTML format

Bug

  • [PYTHON-1272] - Potential deadlock in an exhaust Cursor destructor
  • [PYTHON-2234] - When mongocryptd spawn fails, the driver does not indicate what it tried to spawn
  • [PYTHON-2397] - MongoClient(ssl=True, tls=False) fails with an AttributeError
  • [PYTHON-2440] - Do not rely on namedtuple._asdict()
  • [PYTHON-2628] - Fix Typo using nonexistent encryption algorithm in PyMongo.encryption.create_data_key docs
  • [PYTHON-2634] - Client Connection Regression with PSA + minPoolSize/maxPoolSize
  • [PYTHON-2719] - RawBatchCursor should raise StopIteration on receiving an empty batch instead of returning empty bytes
  • [PYTHON-2743] - Incompatibility with gevent.Timeout
  • [PYTHON-2761] - Pinned connections are sometimes returned to the pool twice
  • [PYTHON-2780] - OCSP tests fail with Python 3.4
  • [PYTHON-2781] - Evergreen failures with Python 3.4 when coverage is enabled
  • [PYTHON-2790] - raw_bson doctest failures
  • [PYTHON-2792] - ERROR [0.060s]: test_discovery_and_monitoring_integration_minPoolSize_error_Network_error_on_minPoolSize_background_creation
  • [PYTHON-2795] - Improve error messages when parsing hostnames from URIs
  • [PYTHON-2799] - killCursors must use the namespace returned the initial command response when closing cursors

Epic

New Feature

  • [PYTHON-1636] - Support Exhaust Cursor in OP_MSG
  • [PYTHON-2389] - Add session support to find_raw_batches and aggregate_raw_batches
  • [PYTHON-2480] - Add MongoClient helper to access the current TopologyDescription
  • [PYTHON-2533] - Accept a filter expression as an alternative to slowMS/sampleRate
  • [PYTHON-2539] - Support AWS authentication with temporary credentials in CSFLE
  • [PYTHON-2671] - Support loadBalanced URI option
  • [PYTHON-2672] - SDAM and connection establishment changes for load balancers
  • [PYTHON-2673] - Connection pinning behavior for load balanced clusters
  • [PYTHON-2674] - SDAM error handling changes for load balanced clusters
  • [PYTHON-2675] - Monitoring API changes for load balanced clusters
  • [PYTHON-2767] - Support snapshot reads on secondaries

Task

  • [PYTHON-1690] - Fix error message when insert_many is given a single document instead of a list
  • [PYTHON-1860] - Use OP_MSG not OP_GET_MORE in find_raw_batches and aggregate_raw_batches
  • [PYTHON-1878] - Add mongodb+srv URIs to Atlas Connectivity tests
  • [PYTHON-2008] - Test mod_wsgi with modern Pythons
  • [PYTHON-2033] - Unified test format
  • [PYTHON-2341] - Migrate RHEL 6.2 testing to Amazon1-2018
  • [PYTHON-2364] - Fix DeprecationWarning: please use dns.resolver.resolve() instead
  • [PYTHON-2366] - Test OCSP+FLE with Python 3.9 on Windows
  • [PYTHON-2377] - Deprecate Python 2 support
  • [PYTHON-2393] - Document support for unicode_decode_error_handler argument for MongoClient
  • [PYTHON-2413] - Deprecate Python 3.4 Support
  • [PYTHON-2414] - Deprecate Python 3.5 Support
  • [PYTHON-2429] - Deprecate pymongo.message module
  • [PYTHON-2431] - Test Failure - MONGODB-AWS Auth macOS 10.14 Python
  • [PYTHON-2441] - Test failure - test_client.TestClient.test_continuous_network_errors
  • [PYTHON-2445] - Test Failure - MONGODB-AWS Auth Ubuntu 18.04
  • [PYTHON-2455] - Update release checklist to include step to file docs ticket outlining compatibility changes/lack thereof
  • [PYTHON-2457] - Test that clients wait 500ms between failed isMaster checks
  • [PYTHON-2474] - Test failure - test_monitor_waits_after_server_check_error
  • [PYTHON-2482] - Test Versioned API with a server started with acceptAPIVersion2
  • [PYTHON-2489] - Test failures related to Unified tests and Versioned API
  • [PYTHON-2507] - Workaround pip install failure: RuntimeError: Python 3.5 or later is required
  • [PYTHON-2524] - Update find/Cursor docs to include allow_disk_use+session
  • [PYTHON-2536] - Document Versioned API Usage in Drivers (with Code Samples)
  • [PYTHON-2540] - Test failure - test_database.TestDatabase.test_errors
  • [PYTHON-2572] - Deprecate NotMasterError and introduce NotPrimaryError
  • [PYTHON-2575] - Test failure - PyPy cryptography install fails with: error: Can not find Rust compiler
  • [PYTHON-2577] - Test failure - Amazon Linux encryption: no such option: --prefer-binary
  • [PYTHON-2578] - KMS requests should use ssl.CERT_REQUIRED instead of None for clarity
  • [PYTHON-2586] - Changes to support Python 3.10
  • [PYTHON-2593] - Debian 9.2 /opt/python/3.4/bin/python3: not found
  • [PYTHON-2605] - Improve mongodb+srv:// error message when dnspython is not installed
  • [PYTHON-2631] - Add missing error message when raising InvalidBSON in C extensions
  • [PYTHON-2647] - Test failure - test_ssl.TestClientSSL.test_use_openssl_when_available Ubuntu 18.04 (ARM64)
  • [PYTHON-2662] - Deprecate profile command helpers
  • [PYTHON-2667] - Test failure - SRV support broken when running with eventlet
  • [PYTHON-2676] - Unified Test Runner changes for Load Balancer Support
  • [PYTHON-2678] - Resync SRV spec tests
  • [PYTHON-2724] - Add FAQ to PyMongo documentation pointing users to PyMongoArrow
  • [PYTHON-2726] - Document behavior quirk of primaryPreferred/secondaryPreferred readPreferences immediately after MongoClient initialization
  • [PYTHON-2729] - test_index_filter fails on 5.0 dues to missing indexName response field
  • [PYTHON-2730] - Test failures due unnecessary getMore and killCursors calls in 5.0
  • [PYTHON-2731] - Run load balancer test suite with PyPy
  • [PYTHON-2734] - Test failure - test_cursor.TestRawBatchCursor.test_read_concern
  • [PYTHON-2737] - [v3.12] Run Load Balancer test suite with Python 3.4
  • [PYTHON-2744] - Load Balancer spec tests need to run against non-load balanced clusters too
  • [PYTHON-2748] - UUID example code doesn't work
  • [PYTHON-2757] - Specify 5.0 cursor behaviour
  • [PYTHON-2759] - Test failure - Jython: AssertionError: 945727182758L is not an instance of (<type 'int'>, <class 'bson.int64.Int64'>)
  • [PYTHON-2762] - Unified tests should automatically get run when testing against a load balancer
  • [PYTHON-2764] - Test failure- test_Unacknowledged_write_using_dollar-prefixed_or_dotted_keys_may_be_silently_rejected_on_pre-5_0_server
  • [PYTHON-2765] - Test Failure - PyPy test_exhaust
  • [PYTHON-2768] - Add SDAM spec tests for load balancers
  • [PYTHON-2774] - [3.12] Migrate snappy testing from Ubuntu 18 to amazon1-2018
  • [PYTHON-2775] - Add documentation example for snapshot reads
  • [PYTHON-2779] - Fix topologies field in snapshot-sessions-not-supported-server-error tests
  • [PYTHON-2797] - Update changelog for 3.12 release
  • [PYTHON-2798] - Test failure - Windows FLE tests failing with oauth2.googleapis.com:443: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
  • [PYTHON-2800] - Add load balanced serverless connectivity tests
  • [PYTHON-2806] - Test Failure - test_aggregate_raw_transaction on sharded clusters
  • [PYTHON-2807] - Test failure - test_kill_cursors_with_tuple
  • [PYTHON-2809] - Jython fails TLS handshake on serverless
  • [PYTHON-2811] - Migrate versioned api testing from ubuntu1804 to amazon1-2018
  • [PYTHON-2848] - Update documentation to prefer ping command over ismaster

Improvement

  • [PYTHON-1359] - RawBSONDocument example
  • [PYTHON-1880] - Raise a warning when no_cursor_timeout is used with an implicit session
  • [PYTHON-2096] - Validate that mongocryptd is not spawned if bypassAutoEncryption=true
  • [PYTHON-2318] - Testing Data Lake with Drivers
  • [PYTHON-2396] - Deprecate ssl_keyfile and ssl_certfile URI options in favor of tls* equivalents
  • [PYTHON-2449] - Ensure cryptography can be installed across system configurations
  • [PYTHON-2453] - Versioned MongoDB API for Drivers
  • [PYTHON-2466] - Make MongoClient, Database and Collection objects hashable
  • [PYTHON-2472] - Sharing a MongoClient for metadata lookup can lead to deadlock in drivers using automatic encryption
  • [PYTHON-2475] - Implement Atlas Data Lake prose tests
  • [PYTHON-2506] - Test failure because $listLocalSessions is not supported in API version 1
  • [PYTHON-2508] - Clarify PyOpenSSL requirements for loading system CA certs
  • [PYTHON-2543] - Define error handling behavior of writeErrors and writeConcernError on Mongos
  • [PYTHON-2544] - Drivers should not inspect error messages for "not master" or "node is recovering"
  • [PYTHON-2548] - Implement change stream oplog parsing code for delta oplog entries
  • [PYTHON-2570] - Add test to ensure drivers expect operations to succeed when neither expectError nor expectResult are specified
  • [PYTHON-2599] - Versioned API database aggregation test only works on 4.9+ servers
  • [PYTHON-2600] - Add Versioned API test for abortTransaction
  • [PYTHON-2603] - Support Removal of Several Platform Builds
  • [PYTHON-2604] - Clarify behavior for runOn.minServerVersion for latest servers
  • [PYTHON-2608] - Test that KMS TLS connections verify peer certificates
  • [PYTHON-2624] - Update serverSelectionTimeoutMS of MongoClient to mongocryptd
  • [PYTHON-2629] - Use "hello" command when API Version is declared
  • [PYTHON-2635] - Test that session is unpinned when executing a non-transaction operation
  • [PYTHON-2641] - Replace usages of 'acceptAPIVersion2' with 'acceptApiVersion2'
  • [PYTHON-2677] - Better wait queue timeout errors for load balanced clusters
  • [PYTHON-2684] - Require passing Stable API options to getMore and transaction-continuing commands
  • [PYTHON-2710] - Stable API Connection Examples for Docs
  • [PYTHON-2718] - Add test for security-sensitive command monitoring event redaction
  • [PYTHON-2740] - Bump maxWireVersion for MongoDB 5.0
  • [PYTHON-2741] - Support 'let' option for aggregate command
  • [PYTHON-2766] - Improve documentation on cursor slices
  • [PYTHON-2776] - Disable writes on snapshot sessions
  • [PYTHON-2777] - Raise client error for snapshot sessions on <5.0 servers
  • [PYTHON-2794] - Remove insertedCount from insert result assertions and improve usage of $$unsetOrMatches

Edit/Copy Release Notes

The text area below allows the project release notes to be edited and copied to another document.