@@ -636,7 +636,6 @@ def encrypt(
636636 algorithm : str ,
637637 key_id : Optional [Binary ] = None ,
638638 key_alt_name : Optional [str ] = None ,
639- index_key_id : Optional [Binary ] = None ,
640639 query_type : Optional [str ] = None ,
641640 contention_factor : Optional [int ] = None ,
642641 ) -> Binary :
@@ -653,34 +652,29 @@ def encrypt(
653652 :class:`~bson.binary.Binary` with subtype 4 (
654653 :attr:`~bson.binary.UUID_SUBTYPE`).
655654 - `key_alt_name`: Identifies a key vault document by 'keyAltName'.
656- - `index_key_id`: **(BETA)** The index key id to use for Queryable Encryption. Must be
657- a :class:`~bson.binary.Binary` with subtype 4 (:attr:`~bson.binary.UUID_SUBTYPE`).
658655 - `query_type` (str): **(BETA)** The query type to execute. See
659656 :class:`QueryType` for valid options.
660657 - `contention_factor` (int): **(BETA)** The contention factor to use
661658 when the algorithm is :attr:`Algorithm.INDEXED`. An integer value
662659 *must* be given when the :attr:`Algorithm.INDEXED` algorithm is
663660 used.
664661
665- .. note:: `index_key_id`, ` query_type`, and `contention_factor` are part of the
662+ .. note:: `query_type` and `contention_factor` are part of the
666663 Queryable Encryption beta. Backwards-breaking changes may be made before the
667664 final release.
668665
669666 :Returns:
670667 The encrypted value, a :class:`~bson.binary.Binary` with subtype 6.
671668
672669 .. versionchanged:: 4.2
673- Added the `index_key_id`, `query_type`, and `contention_factor` parameters.
670+ Added the `query_type` and `contention_factor` parameters.
671+
674672 """
675673 self ._check_closed ()
676674 if key_id is not None and not (
677675 isinstance (key_id , Binary ) and key_id .subtype == UUID_SUBTYPE
678676 ):
679677 raise TypeError ("key_id must be a bson.binary.Binary with subtype 4" )
680- if index_key_id is not None and not (
681- isinstance (index_key_id , Binary ) and index_key_id .subtype == UUID_SUBTYPE
682- ):
683- raise TypeError ("index_key_id must be a bson.binary.Binary with subtype 4" )
684678
685679 doc = encode ({"v" : value }, codec_options = self ._codec_options )
686680 with _wrap_encryption_errors ():
@@ -689,7 +683,6 @@ def encrypt(
689683 algorithm ,
690684 key_id = key_id ,
691685 key_alt_name = key_alt_name ,
692- index_key_id = index_key_id ,
693686 query_type = query_type ,
694687 contention_factor = contention_factor ,
695688 )
0 commit comments