1515 EntryNotifySmeResponse ,
1616)
1717
18+ # pyright: reportDeprecated=false
19+
1820base_url = os .environ .get ("TEST_API_BASE_URL" , "http://127.0.0.1:4010" )
1921
2022
@@ -382,40 +384,45 @@ def test_path_params_publish_draft_answer(self, client: Codex) -> None:
382384 @pytest .mark .skip ()
383385 @parametrize
384386 def test_method_query (self , client : Codex ) -> None :
385- entry = client .projects .entries .query (
386- project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
387- question = "question" ,
388- )
387+ with pytest .warns (DeprecationWarning ):
388+ entry = client .projects .entries .query (
389+ project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
390+ question = "question" ,
391+ )
392+
389393 assert_matches_type (EntryQueryResponse , entry , path = ["response" ])
390394
391395 @pytest .mark .skip ()
392396 @parametrize
393397 def test_method_query_with_all_params (self , client : Codex ) -> None :
394- entry = client .projects .entries .query (
395- project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
396- question = "question" ,
397- use_llm_matching = True ,
398- client_metadata = {},
399- query_metadata = {
400- "context" : "string" ,
401- "custom_metadata" : {},
402- "eval_scores" : {"foo" : 0 },
403- "evaluated_response" : "evaluated_response" ,
404- },
405- x_client_library_version = "x-client-library-version" ,
406- x_integration_type = "x-integration-type" ,
407- x_source = "x-source" ,
408- x_stainless_package_version = "x-stainless-package-version" ,
409- )
398+ with pytest .warns (DeprecationWarning ):
399+ entry = client .projects .entries .query (
400+ project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
401+ question = "question" ,
402+ use_llm_matching = True ,
403+ client_metadata = {},
404+ query_metadata = {
405+ "context" : "string" ,
406+ "custom_metadata" : {},
407+ "eval_scores" : {"foo" : 0 },
408+ "evaluated_response" : "evaluated_response" ,
409+ },
410+ x_client_library_version = "x-client-library-version" ,
411+ x_integration_type = "x-integration-type" ,
412+ x_source = "x-source" ,
413+ x_stainless_package_version = "x-stainless-package-version" ,
414+ )
415+
410416 assert_matches_type (EntryQueryResponse , entry , path = ["response" ])
411417
412418 @pytest .mark .skip ()
413419 @parametrize
414420 def test_raw_response_query (self , client : Codex ) -> None :
415- response = client .projects .entries .with_raw_response .query (
416- project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
417- question = "question" ,
418- )
421+ with pytest .warns (DeprecationWarning ):
422+ response = client .projects .entries .with_raw_response .query (
423+ project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
424+ question = "question" ,
425+ )
419426
420427 assert response .is_closed is True
421428 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -425,26 +432,28 @@ def test_raw_response_query(self, client: Codex) -> None:
425432 @pytest .mark .skip ()
426433 @parametrize
427434 def test_streaming_response_query (self , client : Codex ) -> None :
428- with client .projects .entries .with_streaming_response .query (
429- project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
430- question = "question" ,
431- ) as response :
432- assert not response .is_closed
433- assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
435+ with pytest .warns (DeprecationWarning ):
436+ with client .projects .entries .with_streaming_response .query (
437+ project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
438+ question = "question" ,
439+ ) as response :
440+ assert not response .is_closed
441+ assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
434442
435- entry = response .parse ()
436- assert_matches_type (EntryQueryResponse , entry , path = ["response" ])
443+ entry = response .parse ()
444+ assert_matches_type (EntryQueryResponse , entry , path = ["response" ])
437445
438446 assert cast (Any , response .is_closed ) is True
439447
440448 @pytest .mark .skip ()
441449 @parametrize
442450 def test_path_params_query (self , client : Codex ) -> None :
443- with pytest .raises (ValueError , match = r"Expected a non-empty value for `project_id` but received ''" ):
444- client .projects .entries .with_raw_response .query (
445- project_id = "" ,
446- question = "question" ,
447- )
451+ with pytest .warns (DeprecationWarning ):
452+ with pytest .raises (ValueError , match = r"Expected a non-empty value for `project_id` but received ''" ):
453+ client .projects .entries .with_raw_response .query (
454+ project_id = "" ,
455+ question = "question" ,
456+ )
448457
449458 @pytest .mark .skip ()
450459 @parametrize
@@ -863,40 +872,45 @@ async def test_path_params_publish_draft_answer(self, async_client: AsyncCodex)
863872 @pytest .mark .skip ()
864873 @parametrize
865874 async def test_method_query (self , async_client : AsyncCodex ) -> None :
866- entry = await async_client .projects .entries .query (
867- project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
868- question = "question" ,
869- )
875+ with pytest .warns (DeprecationWarning ):
876+ entry = await async_client .projects .entries .query (
877+ project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
878+ question = "question" ,
879+ )
880+
870881 assert_matches_type (EntryQueryResponse , entry , path = ["response" ])
871882
872883 @pytest .mark .skip ()
873884 @parametrize
874885 async def test_method_query_with_all_params (self , async_client : AsyncCodex ) -> None :
875- entry = await async_client .projects .entries .query (
876- project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
877- question = "question" ,
878- use_llm_matching = True ,
879- client_metadata = {},
880- query_metadata = {
881- "context" : "string" ,
882- "custom_metadata" : {},
883- "eval_scores" : {"foo" : 0 },
884- "evaluated_response" : "evaluated_response" ,
885- },
886- x_client_library_version = "x-client-library-version" ,
887- x_integration_type = "x-integration-type" ,
888- x_source = "x-source" ,
889- x_stainless_package_version = "x-stainless-package-version" ,
890- )
886+ with pytest .warns (DeprecationWarning ):
887+ entry = await async_client .projects .entries .query (
888+ project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
889+ question = "question" ,
890+ use_llm_matching = True ,
891+ client_metadata = {},
892+ query_metadata = {
893+ "context" : "string" ,
894+ "custom_metadata" : {},
895+ "eval_scores" : {"foo" : 0 },
896+ "evaluated_response" : "evaluated_response" ,
897+ },
898+ x_client_library_version = "x-client-library-version" ,
899+ x_integration_type = "x-integration-type" ,
900+ x_source = "x-source" ,
901+ x_stainless_package_version = "x-stainless-package-version" ,
902+ )
903+
891904 assert_matches_type (EntryQueryResponse , entry , path = ["response" ])
892905
893906 @pytest .mark .skip ()
894907 @parametrize
895908 async def test_raw_response_query (self , async_client : AsyncCodex ) -> None :
896- response = await async_client .projects .entries .with_raw_response .query (
897- project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
898- question = "question" ,
899- )
909+ with pytest .warns (DeprecationWarning ):
910+ response = await async_client .projects .entries .with_raw_response .query (
911+ project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
912+ question = "question" ,
913+ )
900914
901915 assert response .is_closed is True
902916 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -906,26 +920,28 @@ async def test_raw_response_query(self, async_client: AsyncCodex) -> None:
906920 @pytest .mark .skip ()
907921 @parametrize
908922 async def test_streaming_response_query (self , async_client : AsyncCodex ) -> None :
909- async with async_client .projects .entries .with_streaming_response .query (
910- project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
911- question = "question" ,
912- ) as response :
913- assert not response .is_closed
914- assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
923+ with pytest .warns (DeprecationWarning ):
924+ async with async_client .projects .entries .with_streaming_response .query (
925+ project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
926+ question = "question" ,
927+ ) as response :
928+ assert not response .is_closed
929+ assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
915930
916- entry = await response .parse ()
917- assert_matches_type (EntryQueryResponse , entry , path = ["response" ])
931+ entry = await response .parse ()
932+ assert_matches_type (EntryQueryResponse , entry , path = ["response" ])
918933
919934 assert cast (Any , response .is_closed ) is True
920935
921936 @pytest .mark .skip ()
922937 @parametrize
923938 async def test_path_params_query (self , async_client : AsyncCodex ) -> None :
924- with pytest .raises (ValueError , match = r"Expected a non-empty value for `project_id` but received ''" ):
925- await async_client .projects .entries .with_raw_response .query (
926- project_id = "" ,
927- question = "question" ,
928- )
939+ with pytest .warns (DeprecationWarning ):
940+ with pytest .raises (ValueError , match = r"Expected a non-empty value for `project_id` but received ''" ):
941+ await async_client .projects .entries .with_raw_response .query (
942+ project_id = "" ,
943+ question = "question" ,
944+ )
929945
930946 @pytest .mark .skip ()
931947 @parametrize
0 commit comments