@@ -658,16 +658,26 @@ def validate_tzinfo(dummy, value):
658
658
'tlscertificatekeyfilepassword' : 'ssl_pem_passphrase' ,
659
659
}
660
660
661
- # Map from deprecated URI option names to the updated option names.
662
- # Case is preserved for updated option names as they are part of user warnings.
661
+ # Map from deprecated URI option names to a tuple indicating the method of
662
+ # their deprecation and any additional information that may be needed to
663
+ # construct the warning message.
663
664
URI_OPTIONS_DEPRECATION_MAP = {
664
- 'j' : 'journal' ,
665
- 'wtimeout' : 'wTimeoutMS' ,
666
- 'ssl_cert_reqs' : 'tlsAllowInvalidCertificates' ,
667
- 'ssl_match_hostname' : 'tlsAllowInvalidHostnames' ,
668
- 'ssl_crlfile' : 'tlsCRLFile' ,
669
- 'ssl_ca_certs' : 'tlsCAFile' ,
670
- 'ssl_pem_passphrase' : 'tlsCertificateKeyFilePassword' ,
665
+ # format: <deprecated option name>: (<mode>, <message>),
666
+ # Supported <mode> values:
667
+ # - 'renamed': <message> should be the new option name. Note that case is
668
+ # preserved for renamed options as they are part of user warnings.
669
+ # - 'removed': <message> may suggest the rationale for deprecating the
670
+ # option and/or recommend remedial action.
671
+ 'j' : ('renamed' , 'journal' ),
672
+ 'wtimeout' : ('renamed' , 'wTimeoutMS' ),
673
+ 'ssl_cert_reqs' : ('renamed' , 'tlsAllowInvalidCertificates' ),
674
+ 'ssl_match_hostname' : ('renamed' , 'tlsAllowInvalidHostnames' ),
675
+ 'ssl_crlfile' : ('renamed' , 'tlsCRLFile' ),
676
+ 'ssl_ca_certs' : ('renamed' , 'tlsCAFile' ),
677
+ 'ssl_pem_passphrase' : ('renamed' , 'tlsCertificateKeyFilePassword' ),
678
+ 'waitqueuemultiple' : ('removed' , (
679
+ 'Instead of using waitQueueMultiple to bound queuing, limit the size '
680
+ 'of the thread pool in your application server' ))
671
681
}
672
682
673
683
# Augment the option validator map with pymongo-specific option information.
0 commit comments