anthropic 0.66.0__tar.gz → 0.67.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- anthropic-0.67.0/.release-please-manifest.json +3 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/CHANGELOG.md +21 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/PKG-INFO +1 -1
- {anthropic-0.66.0 → anthropic-0.67.0}/api.md +10 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/pyproject.toml +56 -1
- {anthropic-0.66.0 → anthropic-0.67.0}/requirements-dev.lock +1 -1
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_base_client.py +3 -3
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_compat.py +48 -48
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_models.py +41 -41
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_utils/__init__.py +8 -2
- anthropic-0.67.0/src/anthropic/_utils/_compat.py +45 -0
- anthropic-0.67.0/src/anthropic/_utils/_datetime_parse.py +136 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_utils/_transform.py +5 -1
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_utils/_typing.py +1 -1
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_utils/_utils.py +0 -1
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_version.py +1 -1
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/__init__.py +14 -0
- anthropic-0.67.0/src/anthropic/types/beta/beta_base64_pdf_source.py +15 -0
- anthropic-0.67.0/src/anthropic/types/beta/beta_citation_config.py +9 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_content_block.py +2 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_content_block_param.py +4 -0
- anthropic-0.67.0/src/anthropic/types/beta/beta_document_block.py +26 -0
- anthropic-0.67.0/src/anthropic/types/beta/beta_plain_text_source.py +15 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_raw_content_block_start_event.py +2 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_request_document_block_param.py +1 -1
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_server_tool_usage.py +3 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_server_tool_use_block.py +1 -1
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_server_tool_use_block_param.py +3 -1
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_union_param.py +2 -0
- anthropic-0.67.0/src/anthropic/types/beta/beta_web_fetch_block.py +21 -0
- anthropic-0.67.0/src/anthropic/types/beta/beta_web_fetch_block_param.py +22 -0
- anthropic-0.67.0/src/anthropic/types/beta/beta_web_fetch_tool_20250910_param.py +46 -0
- anthropic-0.67.0/src/anthropic/types/beta/beta_web_fetch_tool_result_block.py +20 -0
- anthropic-0.67.0/src/anthropic/types/beta/beta_web_fetch_tool_result_block_param.py +25 -0
- anthropic-0.67.0/src/anthropic/types/beta/beta_web_fetch_tool_result_error_block.py +14 -0
- anthropic-0.67.0/src/anthropic/types/beta/beta_web_fetch_tool_result_error_block_param.py +15 -0
- anthropic-0.67.0/src/anthropic/types/beta/beta_web_fetch_tool_result_error_code.py +16 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/message_count_tokens_params.py +2 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/document_block_param.py +1 -1
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/lib/streaming/test_beta_messages.py +2 -2
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/lib/streaming/test_messages.py +2 -2
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/test_models.py +24 -24
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/test_transform.py +8 -8
- anthropic-0.67.0/tests/test_utils/test_datetime_parse.py +110 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/utils.py +4 -4
- {anthropic-0.66.0 → anthropic-0.67.0}/uv.lock +4 -4
- anthropic-0.66.0/.release-please-manifest.json +0 -3
- anthropic-0.66.0/mypy.ini +0 -53
- {anthropic-0.66.0 → anthropic-0.67.0}/.gitignore +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/CONTRIBUTING.md +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/LICENSE +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/README.md +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/SECURITY.md +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/bin/check-release-environment +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/bin/publish-pypi +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/.keep +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/batch_results.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/bedrock.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/images.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/logo.png +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/mcp.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/messages.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/messages_stream.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/text_completions_demo_async.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/text_completions_demo_sync.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/text_completions_streaming.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/thinking.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/thinking_stream.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/tools.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/tools_stream.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/vertex.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/web_search.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/examples/web_search_stream.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/helpers.md +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/release-please-config.json +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_client.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_constants.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_decoders/jsonl.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_exceptions.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_files.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_legacy_response.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_qs.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_resource.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_response.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_streaming.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_types.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_utils/_httpx.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_utils/_logs.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_utils/_proxy.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_utils/_reflection.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_utils/_resources_proxy.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_utils/_streams.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/_utils/_sync.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/.keep +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/_extras/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/_extras/_common.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/_extras/_google_auth.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/bedrock/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/bedrock/_auth.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/bedrock/_beta.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/bedrock/_beta_messages.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/bedrock/_client.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/bedrock/_stream.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/bedrock/_stream_decoder.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/streaming/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/streaming/_beta_messages.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/streaming/_beta_types.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/streaming/_messages.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/streaming/_types.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/vertex/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/vertex/_auth.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/vertex/_beta.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/vertex/_beta_messages.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/lib/vertex/_client.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/pagination.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/py.typed +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/resources/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/resources/beta/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/resources/beta/beta.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/resources/beta/files.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/resources/beta/messages/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/resources/beta/messages/batches.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/resources/beta/messages/messages.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/resources/beta/models.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/resources/completions.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/resources/messages/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/resources/messages/batches.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/resources/messages/messages.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/resources/models.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/anthropic_beta_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/base64_image_source_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/base64_pdf_source_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_base64_image_source_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_base64_pdf_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_base64_pdf_source_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_bash_code_execution_output_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_bash_code_execution_output_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_bash_code_execution_result_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_bash_code_execution_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_bash_code_execution_tool_result_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_bash_code_execution_tool_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_bash_code_execution_tool_result_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_bash_code_execution_tool_result_error_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_cache_control_ephemeral_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_cache_creation.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_citation_char_location.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_citation_char_location_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_citation_content_block_location.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_citation_content_block_location_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_citation_page_location.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_citation_page_location_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_citation_search_result_location.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_citation_search_result_location_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_citation_web_search_result_location_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_citations_config_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_citations_delta.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_citations_web_search_result_location.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_code_execution_output_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_code_execution_output_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_code_execution_result_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_code_execution_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_code_execution_tool_20250522_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_code_execution_tool_20250825_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_code_execution_tool_result_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_code_execution_tool_result_block_content.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_code_execution_tool_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_code_execution_tool_result_block_param_content_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_code_execution_tool_result_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_code_execution_tool_result_error_code.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_code_execution_tool_result_error_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_container.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_container_upload_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_container_upload_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_content_block_source_content_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_content_block_source_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_file_document_source_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_file_image_source_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_image_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_input_json_delta.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_mcp_tool_result_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_mcp_tool_use_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_mcp_tool_use_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_message.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_message_delta_usage.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_message_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_message_tokens_count.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_metadata_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_model_info.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_plain_text_source_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_raw_content_block_delta.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_raw_content_block_delta_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_raw_content_block_stop_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_raw_message_delta_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_raw_message_start_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_raw_message_stop_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_raw_message_stream_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_redacted_thinking_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_redacted_thinking_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_request_mcp_server_tool_configuration_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_request_mcp_server_url_definition_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_request_mcp_tool_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_search_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_signature_delta.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_stop_reason.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_text_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_text_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_text_citation.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_text_citation_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_text_delta.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_text_editor_code_execution_create_result_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_text_editor_code_execution_create_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_text_editor_code_execution_str_replace_result_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_text_editor_code_execution_str_replace_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_text_editor_code_execution_tool_result_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_text_editor_code_execution_tool_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_text_editor_code_execution_tool_result_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_text_editor_code_execution_tool_result_error_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_text_editor_code_execution_view_result_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_text_editor_code_execution_view_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_thinking_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_thinking_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_thinking_config_disabled_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_thinking_config_enabled_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_thinking_config_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_thinking_delta.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_bash_20241022_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_bash_20250124_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_choice_any_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_choice_auto_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_choice_none_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_choice_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_choice_tool_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_computer_use_20241022_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_computer_use_20250124_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_text_editor_20241022_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_text_editor_20250124_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_text_editor_20250429_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_text_editor_20250728_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_use_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_tool_use_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_url_image_source_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_url_pdf_source_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_usage.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_web_search_result_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_web_search_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_web_search_tool_20250305_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_web_search_tool_request_error_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_web_search_tool_result_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_web_search_tool_result_block_content.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_web_search_tool_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_web_search_tool_result_block_param_content_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_web_search_tool_result_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/beta_web_search_tool_result_error_code.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/deleted_file.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/file_list_params.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/file_metadata.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/file_upload_params.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/message_create_params.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/messages/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/messages/batch_create_params.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/messages/batch_list_params.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/messages/beta_deleted_message_batch.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/messages/beta_message_batch.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/messages/beta_message_batch_canceled_result.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/messages/beta_message_batch_errored_result.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/messages/beta_message_batch_expired_result.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/messages/beta_message_batch_individual_response.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/messages/beta_message_batch_request_counts.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/messages/beta_message_batch_result.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/messages/beta_message_batch_succeeded_result.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta/model_list_params.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta_api_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta_authentication_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta_billing_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta_error_response.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta_gateway_timeout_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta_invalid_request_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta_not_found_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta_overloaded_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta_permission_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/beta_rate_limit_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/cache_control_ephemeral_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/cache_creation.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/citation_char_location.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/citation_char_location_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/citation_content_block_location.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/citation_content_block_location_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/citation_page_location.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/citation_page_location_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/citation_search_result_location_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/citation_web_search_result_location_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/citations_config_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/citations_delta.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/citations_search_result_location.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/citations_web_search_result_location.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/completion.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/completion_create_params.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/content_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/content_block_delta_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/content_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/content_block_source_content_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/content_block_source_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/content_block_start_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/content_block_stop_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/image_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/input_json_delta.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/message.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/message_count_tokens_params.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/message_count_tokens_tool_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/message_create_params.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/message_delta_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/message_delta_usage.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/message_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/message_start_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/message_stop_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/message_stream_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/message_tokens_count.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/messages/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/messages/batch_create_params.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/messages/batch_list_params.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/messages/deleted_message_batch.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/messages/message_batch.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/messages/message_batch_canceled_result.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/messages/message_batch_errored_result.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/messages/message_batch_expired_result.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/messages/message_batch_individual_response.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/messages/message_batch_request_counts.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/messages/message_batch_result.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/messages/message_batch_succeeded_result.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/metadata_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/model.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/model_info.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/model_list_params.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/model_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/plain_text_source_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/raw_content_block_delta.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/raw_content_block_delta_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/raw_content_block_start_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/raw_content_block_stop_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/raw_message_delta_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/raw_message_start_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/raw_message_stop_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/raw_message_stream_event.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/redacted_thinking_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/redacted_thinking_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/search_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/server_tool_usage.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/server_tool_use_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/server_tool_use_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/shared/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/shared/api_error_object.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/shared/authentication_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/shared/billing_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/shared/error_object.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/shared/error_response.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/shared/gateway_timeout_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/shared/invalid_request_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/shared/not_found_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/shared/overloaded_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/shared/permission_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/shared/rate_limit_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/signature_delta.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/stop_reason.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/text_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/text_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/text_citation.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/text_citation_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/text_delta.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/thinking_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/thinking_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/thinking_config_disabled_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/thinking_config_enabled_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/thinking_config_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/thinking_delta.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/tool_bash_20250124_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/tool_choice_any_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/tool_choice_auto_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/tool_choice_none_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/tool_choice_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/tool_choice_tool_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/tool_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/tool_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/tool_text_editor_20250124_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/tool_text_editor_20250429_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/tool_text_editor_20250728_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/tool_union_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/tool_use_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/tool_use_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/url_image_source_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/url_pdf_source_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/usage.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/web_search_result_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/web_search_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/web_search_tool_20250305_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/web_search_tool_request_error_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/web_search_tool_result_block.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/web_search_tool_result_block_content.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/web_search_tool_result_block_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/web_search_tool_result_block_param_content_param.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/src/anthropic/types/web_search_tool_result_error.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/api_resources/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/api_resources/beta/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/api_resources/beta/messages/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/api_resources/beta/messages/test_batches.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/api_resources/beta/test_files.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/api_resources/beta/test_messages.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/api_resources/beta/test_models.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/api_resources/messages/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/api_resources/messages/test_batches.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/api_resources/test_completions.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/api_resources/test_messages.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/api_resources/test_models.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/conftest.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/decoders/test_jsonl.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/lib/streaming/__init__.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/lib/streaming/fixtures/basic_response.txt +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/lib/streaming/fixtures/incomplete_partial_json_response.txt +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/lib/streaming/fixtures/tool_use_response.txt +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/lib/streaming/helpers.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/lib/streaming/test_partial_json.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/lib/test_bedrock.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/lib/test_vertex.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/sample_file.txt +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/test_client.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/test_deepcopy.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/test_extract_files.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/test_files.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/test_legacy_response.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/test_qs.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/test_required_args.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/test_response.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/test_streaming.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/test_utils/test_proxy.py +0 -0
- {anthropic-0.66.0 → anthropic-0.67.0}/tests/test_utils/test_typing.py +0 -0
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.67.0 (2025-09-10)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.66.0...v0.67.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.66.0...v0.67.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** adds support for web_fetch_20250910 tool ([f85b6a1](https://github.com/anthropics/anthropic-sdk-python/commit/f85b6a172b4b6d3b42119d75f0fefbbf7dcd2351))
|
|
10
|
+
* improve future compat with pydantic v3 ([39f28c5](https://github.com/anthropics/anthropic-sdk-python/commit/39f28c51d328bc7bf5f86f252ea63e8325815c72))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* more updates for future pydantic v3 compat ([7967d15](https://github.com/anthropics/anthropic-sdk-python/commit/7967d1501297e188f451fa39a33b38317dfcb883))
|
|
16
|
+
* **types/beta:** add response content block type to params ([#1030](https://github.com/anthropics/anthropic-sdk-python/issues/1030)) ([9febe38](https://github.com/anthropics/anthropic-sdk-python/commit/9febe38a309d290f2c2a8d96eb458972652b98cd))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
|
|
21
|
+
* **internal:** move mypy configurations to `pyproject.toml` file ([c5347b6](https://github.com/anthropics/anthropic-sdk-python/commit/c5347b6affba397276c13e763f5eb820d11f912f))
|
|
22
|
+
* update SDK settings ([36e6870](https://github.com/anthropics/anthropic-sdk-python/commit/36e687098acc8c66613712c89667edea73ce799f))
|
|
23
|
+
|
|
3
24
|
## 0.66.0 (2025-09-03)
|
|
4
25
|
|
|
5
26
|
Full Changelog: [v0.65.0...v0.66.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.65.0...v0.66.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: anthropic
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.67.0
|
|
4
4
|
Summary: The official Python library for the anthropic API
|
|
5
5
|
Project-URL: Homepage, https://github.com/anthropics/anthropic-sdk-python
|
|
6
6
|
Project-URL: Repository, https://github.com/anthropics/anthropic-sdk-python
|
|
@@ -216,6 +216,7 @@ from anthropic.types.beta import (
|
|
|
216
216
|
BetaCacheCreation,
|
|
217
217
|
BetaCitationCharLocation,
|
|
218
218
|
BetaCitationCharLocationParam,
|
|
219
|
+
BetaCitationConfig,
|
|
219
220
|
BetaCitationContentBlockLocation,
|
|
220
221
|
BetaCitationContentBlockLocationParam,
|
|
221
222
|
BetaCitationPageLocation,
|
|
@@ -246,6 +247,7 @@ from anthropic.types.beta import (
|
|
|
246
247
|
BetaContentBlockParam,
|
|
247
248
|
BetaContentBlockSource,
|
|
248
249
|
BetaContentBlockSourceContent,
|
|
250
|
+
BetaDocumentBlock,
|
|
249
251
|
BetaFileDocumentSource,
|
|
250
252
|
BetaFileImageSource,
|
|
251
253
|
BetaImageBlockParam,
|
|
@@ -321,6 +323,14 @@ from anthropic.types.beta import (
|
|
|
321
323
|
BetaURLImageSource,
|
|
322
324
|
BetaURLPDFSource,
|
|
323
325
|
BetaUsage,
|
|
326
|
+
BetaWebFetchBlock,
|
|
327
|
+
BetaWebFetchBlockParam,
|
|
328
|
+
BetaWebFetchTool20250910,
|
|
329
|
+
BetaWebFetchToolResultBlock,
|
|
330
|
+
BetaWebFetchToolResultBlockParam,
|
|
331
|
+
BetaWebFetchToolResultErrorBlock,
|
|
332
|
+
BetaWebFetchToolResultErrorBlockParam,
|
|
333
|
+
BetaWebFetchToolResultErrorCode,
|
|
324
334
|
BetaWebSearchResultBlock,
|
|
325
335
|
BetaWebSearchResultBlockParam,
|
|
326
336
|
BetaWebSearchTool20250305,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "anthropic"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.67.0"
|
|
4
4
|
description = "The official Python library for the anthropic API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "MIT"
|
|
@@ -147,6 +147,61 @@ reportOverlappingOverload = false
|
|
|
147
147
|
reportImportCycles = false
|
|
148
148
|
reportPrivateUsage = false
|
|
149
149
|
|
|
150
|
+
[tool.mypy]
|
|
151
|
+
pretty = true
|
|
152
|
+
show_error_codes = true
|
|
153
|
+
|
|
154
|
+
# Exclude _files.py because mypy isn't smart enough to apply
|
|
155
|
+
# the correct type narrowing and as this is an internal module
|
|
156
|
+
# it's fine to just use Pyright.
|
|
157
|
+
#
|
|
158
|
+
# We also exclude our `tests` as mypy doesn't always infer
|
|
159
|
+
# types correctly and Pyright will still catch any type errors.
|
|
160
|
+
exclude = ['src/anthropic/_files.py', '_dev/.*.py', 'tests/.*']
|
|
161
|
+
|
|
162
|
+
strict_equality = true
|
|
163
|
+
implicit_reexport = true
|
|
164
|
+
check_untyped_defs = true
|
|
165
|
+
no_implicit_optional = true
|
|
166
|
+
|
|
167
|
+
warn_return_any = true
|
|
168
|
+
warn_unreachable = true
|
|
169
|
+
warn_unused_configs = true
|
|
170
|
+
|
|
171
|
+
# Turn these options off as it could cause conflicts
|
|
172
|
+
# with the Pyright options.
|
|
173
|
+
warn_unused_ignores = false
|
|
174
|
+
warn_redundant_casts = false
|
|
175
|
+
|
|
176
|
+
disallow_any_generics = true
|
|
177
|
+
disallow_untyped_defs = true
|
|
178
|
+
disallow_untyped_calls = true
|
|
179
|
+
disallow_subclassing_any = true
|
|
180
|
+
disallow_incomplete_defs = true
|
|
181
|
+
disallow_untyped_decorators = true
|
|
182
|
+
cache_fine_grained = true
|
|
183
|
+
|
|
184
|
+
# By default, mypy reports an error if you assign a value to the result
|
|
185
|
+
# of a function call that doesn't return anything. We do this in our test
|
|
186
|
+
# cases:
|
|
187
|
+
# ```
|
|
188
|
+
# result = ...
|
|
189
|
+
# assert result is None
|
|
190
|
+
# ```
|
|
191
|
+
# Changing this codegen to make mypy happy would increase complexity
|
|
192
|
+
# and would not be worth it.
|
|
193
|
+
disable_error_code = "func-returns-value,overload-cannot-match"
|
|
194
|
+
|
|
195
|
+
# https://github.com/python/mypy/issues/12162
|
|
196
|
+
[[tool.mypy.overrides]]
|
|
197
|
+
module = "black.files.*"
|
|
198
|
+
ignore_errors = true
|
|
199
|
+
ignore_missing_imports = true
|
|
200
|
+
|
|
201
|
+
[[tool.mypy.overrides]]
|
|
202
|
+
module = "anthropic.lib.vertex._auth"
|
|
203
|
+
disallow_untyped_calls = false
|
|
204
|
+
|
|
150
205
|
[tool.ruff]
|
|
151
206
|
line-length = 120
|
|
152
207
|
output-format = "grouped"
|
|
@@ -36,7 +36,7 @@ exceptiongroup==1.2.2 ; python_full_version < '3.11'
|
|
|
36
36
|
execnet==2.1.1
|
|
37
37
|
# via pytest-xdist
|
|
38
38
|
griffe==1.4.0 ; python_full_version < '3.9'
|
|
39
|
-
griffe==1.
|
|
39
|
+
griffe==1.14.0 ; python_full_version >= '3.9'
|
|
40
40
|
h11==0.16.0
|
|
41
41
|
# via httpcore
|
|
42
42
|
httpcore==1.0.9
|
|
@@ -62,7 +62,7 @@ from ._types import (
|
|
|
62
62
|
ModelBuilderProtocol,
|
|
63
63
|
)
|
|
64
64
|
from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
|
|
65
|
-
from ._compat import
|
|
65
|
+
from ._compat import PYDANTIC_V1, model_copy, model_dump
|
|
66
66
|
from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type
|
|
67
67
|
from ._response import (
|
|
68
68
|
APIResponse,
|
|
@@ -237,7 +237,7 @@ class BaseSyncPage(BasePage[_T], Generic[_T]):
|
|
|
237
237
|
model: Type[_T],
|
|
238
238
|
options: FinalRequestOptions,
|
|
239
239
|
) -> None:
|
|
240
|
-
if
|
|
240
|
+
if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None:
|
|
241
241
|
self.__pydantic_private__ = {}
|
|
242
242
|
|
|
243
243
|
self._model = model
|
|
@@ -325,7 +325,7 @@ class BaseAsyncPage(BasePage[_T], Generic[_T]):
|
|
|
325
325
|
client: AsyncAPIClient,
|
|
326
326
|
options: FinalRequestOptions,
|
|
327
327
|
) -> None:
|
|
328
|
-
if
|
|
328
|
+
if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None:
|
|
329
329
|
self.__pydantic_private__ = {}
|
|
330
330
|
|
|
331
331
|
self._model = model
|
|
@@ -12,14 +12,13 @@ from ._types import IncEx, StrBytesIntFloat
|
|
|
12
12
|
_T = TypeVar("_T")
|
|
13
13
|
_ModelT = TypeVar("_ModelT", bound=pydantic.BaseModel)
|
|
14
14
|
|
|
15
|
-
# --------------- Pydantic v2 compatibility ---------------
|
|
15
|
+
# --------------- Pydantic v2, v3 compatibility ---------------
|
|
16
16
|
|
|
17
17
|
# Pyright incorrectly reports some of our functions as overriding a method when they don't
|
|
18
18
|
# pyright: reportIncompatibleMethodOverride=false
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
PYDANTIC_V1 = pydantic.VERSION.startswith("1.")
|
|
21
21
|
|
|
22
|
-
# v1 re-exports
|
|
23
22
|
if TYPE_CHECKING:
|
|
24
23
|
|
|
25
24
|
def parse_date(value: date | StrBytesIntFloat) -> date: # noqa: ARG001
|
|
@@ -44,90 +43,92 @@ if TYPE_CHECKING:
|
|
|
44
43
|
...
|
|
45
44
|
|
|
46
45
|
else:
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
# v1 re-exports
|
|
47
|
+
if PYDANTIC_V1:
|
|
48
|
+
from pydantic.typing import (
|
|
49
49
|
get_args as get_args,
|
|
50
50
|
is_union as is_union,
|
|
51
51
|
get_origin as get_origin,
|
|
52
52
|
is_typeddict as is_typeddict,
|
|
53
53
|
is_literal_type as is_literal_type,
|
|
54
54
|
)
|
|
55
|
-
from pydantic.
|
|
55
|
+
from pydantic.datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime
|
|
56
56
|
else:
|
|
57
|
-
from
|
|
57
|
+
from ._utils import (
|
|
58
58
|
get_args as get_args,
|
|
59
59
|
is_union as is_union,
|
|
60
60
|
get_origin as get_origin,
|
|
61
|
+
parse_date as parse_date,
|
|
61
62
|
is_typeddict as is_typeddict,
|
|
63
|
+
parse_datetime as parse_datetime,
|
|
62
64
|
is_literal_type as is_literal_type,
|
|
63
65
|
)
|
|
64
|
-
from pydantic.datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime
|
|
65
66
|
|
|
66
67
|
|
|
67
68
|
# refactored config
|
|
68
69
|
if TYPE_CHECKING:
|
|
69
70
|
from pydantic import ConfigDict as ConfigDict
|
|
70
71
|
else:
|
|
71
|
-
if
|
|
72
|
-
from pydantic import ConfigDict
|
|
73
|
-
else:
|
|
72
|
+
if PYDANTIC_V1:
|
|
74
73
|
# TODO: provide an error message here?
|
|
75
74
|
ConfigDict = None
|
|
75
|
+
else:
|
|
76
|
+
from pydantic import ConfigDict as ConfigDict
|
|
76
77
|
|
|
77
78
|
|
|
78
79
|
# renamed methods / properties
|
|
79
80
|
def parse_obj(model: type[_ModelT], value: object) -> _ModelT:
|
|
80
|
-
if
|
|
81
|
-
return model.model_validate(value)
|
|
82
|
-
else:
|
|
81
|
+
if PYDANTIC_V1:
|
|
83
82
|
return cast(_ModelT, model.parse_obj(value)) # pyright: ignore[reportDeprecated, reportUnnecessaryCast]
|
|
83
|
+
else:
|
|
84
|
+
return model.model_validate(value)
|
|
84
85
|
|
|
85
86
|
|
|
86
87
|
def field_is_required(field: FieldInfo) -> bool:
|
|
87
|
-
if
|
|
88
|
-
return field.
|
|
89
|
-
return field.
|
|
88
|
+
if PYDANTIC_V1:
|
|
89
|
+
return field.required # type: ignore
|
|
90
|
+
return field.is_required()
|
|
90
91
|
|
|
91
92
|
|
|
92
93
|
def field_get_default(field: FieldInfo) -> Any:
|
|
93
94
|
value = field.get_default()
|
|
94
|
-
if
|
|
95
|
-
from pydantic_core import PydanticUndefined
|
|
96
|
-
|
|
97
|
-
if value == PydanticUndefined:
|
|
98
|
-
return None
|
|
95
|
+
if PYDANTIC_V1:
|
|
99
96
|
return value
|
|
97
|
+
from pydantic_core import PydanticUndefined
|
|
98
|
+
|
|
99
|
+
if value == PydanticUndefined:
|
|
100
|
+
return None
|
|
100
101
|
return value
|
|
101
102
|
|
|
102
103
|
|
|
103
104
|
def field_outer_type(field: FieldInfo) -> Any:
|
|
104
|
-
if
|
|
105
|
-
return field.
|
|
106
|
-
return field.
|
|
105
|
+
if PYDANTIC_V1:
|
|
106
|
+
return field.outer_type_ # type: ignore
|
|
107
|
+
return field.annotation
|
|
107
108
|
|
|
108
109
|
|
|
109
110
|
def get_model_config(model: type[pydantic.BaseModel]) -> Any:
|
|
110
|
-
if
|
|
111
|
-
return model.
|
|
112
|
-
return model.
|
|
111
|
+
if PYDANTIC_V1:
|
|
112
|
+
return model.__config__ # type: ignore
|
|
113
|
+
return model.model_config
|
|
113
114
|
|
|
114
115
|
|
|
115
116
|
def get_model_fields(model: type[pydantic.BaseModel]) -> dict[str, FieldInfo]:
|
|
116
|
-
if
|
|
117
|
-
return model.
|
|
118
|
-
return model.
|
|
117
|
+
if PYDANTIC_V1:
|
|
118
|
+
return model.__fields__ # type: ignore
|
|
119
|
+
return model.model_fields
|
|
119
120
|
|
|
120
121
|
|
|
121
122
|
def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT:
|
|
122
|
-
if
|
|
123
|
-
return model.
|
|
124
|
-
return model.
|
|
123
|
+
if PYDANTIC_V1:
|
|
124
|
+
return model.copy(deep=deep) # type: ignore
|
|
125
|
+
return model.model_copy(deep=deep)
|
|
125
126
|
|
|
126
127
|
|
|
127
128
|
def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str:
|
|
128
|
-
if
|
|
129
|
-
return model.
|
|
130
|
-
return model.
|
|
129
|
+
if PYDANTIC_V1:
|
|
130
|
+
return model.json(indent=indent) # type: ignore
|
|
131
|
+
return model.model_dump_json(indent=indent)
|
|
131
132
|
|
|
132
133
|
|
|
133
134
|
def model_dump(
|
|
@@ -139,14 +140,14 @@ def model_dump(
|
|
|
139
140
|
warnings: bool = True,
|
|
140
141
|
mode: Literal["json", "python"] = "python",
|
|
141
142
|
) -> dict[str, Any]:
|
|
142
|
-
if
|
|
143
|
+
if (not PYDANTIC_V1) or hasattr(model, "model_dump"):
|
|
143
144
|
return model.model_dump(
|
|
144
145
|
mode=mode,
|
|
145
146
|
exclude=exclude,
|
|
146
147
|
exclude_unset=exclude_unset,
|
|
147
148
|
exclude_defaults=exclude_defaults,
|
|
148
149
|
# warnings are not supported in Pydantic v1
|
|
149
|
-
warnings=
|
|
150
|
+
warnings=True if PYDANTIC_V1 else warnings,
|
|
150
151
|
)
|
|
151
152
|
return cast(
|
|
152
153
|
"dict[str, Any]",
|
|
@@ -159,9 +160,9 @@ def model_dump(
|
|
|
159
160
|
|
|
160
161
|
|
|
161
162
|
def model_parse(model: type[_ModelT], data: Any) -> _ModelT:
|
|
162
|
-
if
|
|
163
|
-
return model.
|
|
164
|
-
return model.
|
|
163
|
+
if PYDANTIC_V1:
|
|
164
|
+
return model.parse_obj(data) # pyright: ignore[reportDeprecated]
|
|
165
|
+
return model.model_validate(data)
|
|
165
166
|
|
|
166
167
|
|
|
167
168
|
# generic models
|
|
@@ -170,17 +171,16 @@ if TYPE_CHECKING:
|
|
|
170
171
|
class GenericModel(pydantic.BaseModel): ...
|
|
171
172
|
|
|
172
173
|
else:
|
|
173
|
-
if
|
|
174
|
+
if PYDANTIC_V1:
|
|
175
|
+
import pydantic.generics
|
|
176
|
+
|
|
177
|
+
class GenericModel(pydantic.generics.GenericModel, pydantic.BaseModel): ...
|
|
178
|
+
else:
|
|
174
179
|
# there no longer needs to be a distinction in v2 but
|
|
175
180
|
# we still have to create our own subclass to avoid
|
|
176
181
|
# inconsistent MRO ordering errors
|
|
177
182
|
class GenericModel(pydantic.BaseModel): ...
|
|
178
183
|
|
|
179
|
-
else:
|
|
180
|
-
import pydantic.generics
|
|
181
|
-
|
|
182
|
-
class GenericModel(pydantic.generics.GenericModel, pydantic.BaseModel): ...
|
|
183
|
-
|
|
184
184
|
|
|
185
185
|
# cached properties
|
|
186
186
|
if TYPE_CHECKING:
|
|
@@ -50,7 +50,7 @@ from ._utils import (
|
|
|
50
50
|
strip_annotated_type,
|
|
51
51
|
)
|
|
52
52
|
from ._compat import (
|
|
53
|
-
|
|
53
|
+
PYDANTIC_V1,
|
|
54
54
|
ConfigDict,
|
|
55
55
|
GenericModel as BaseGenericModel,
|
|
56
56
|
get_args,
|
|
@@ -81,11 +81,7 @@ class _ConfigProtocol(Protocol):
|
|
|
81
81
|
|
|
82
82
|
|
|
83
83
|
class BaseModel(pydantic.BaseModel):
|
|
84
|
-
if
|
|
85
|
-
model_config: ClassVar[ConfigDict] = ConfigDict(
|
|
86
|
-
extra="allow", defer_build=coerce_boolean(os.environ.get("DEFER_PYDANTIC_BUILD", "true"))
|
|
87
|
-
)
|
|
88
|
-
else:
|
|
84
|
+
if PYDANTIC_V1:
|
|
89
85
|
|
|
90
86
|
@property
|
|
91
87
|
@override
|
|
@@ -95,6 +91,10 @@ class BaseModel(pydantic.BaseModel):
|
|
|
95
91
|
|
|
96
92
|
class Config(pydantic.BaseConfig): # pyright: ignore[reportDeprecated]
|
|
97
93
|
extra: Any = pydantic.Extra.allow # type: ignore
|
|
94
|
+
else:
|
|
95
|
+
model_config: ClassVar[ConfigDict] = ConfigDict(
|
|
96
|
+
extra="allow", defer_build=coerce_boolean(os.environ.get("DEFER_PYDANTIC_BUILD", "true"))
|
|
97
|
+
)
|
|
98
98
|
|
|
99
99
|
if TYPE_CHECKING:
|
|
100
100
|
_request_id: Optional[str] = None
|
|
@@ -231,25 +231,25 @@ class BaseModel(pydantic.BaseModel):
|
|
|
231
231
|
if key not in model_fields:
|
|
232
232
|
parsed = construct_type(value=value, type_=extra_field_type) if extra_field_type is not None else value
|
|
233
233
|
|
|
234
|
-
if
|
|
235
|
-
_extra[key] = parsed
|
|
236
|
-
else:
|
|
234
|
+
if PYDANTIC_V1:
|
|
237
235
|
_fields_set.add(key)
|
|
238
236
|
fields_values[key] = parsed
|
|
237
|
+
else:
|
|
238
|
+
_extra[key] = parsed
|
|
239
239
|
|
|
240
240
|
object.__setattr__(m, "__dict__", fields_values)
|
|
241
241
|
|
|
242
|
-
if
|
|
243
|
-
# these properties are copied from Pydantic's `model_construct()` method
|
|
244
|
-
object.__setattr__(m, "__pydantic_private__", None)
|
|
245
|
-
object.__setattr__(m, "__pydantic_extra__", _extra)
|
|
246
|
-
object.__setattr__(m, "__pydantic_fields_set__", _fields_set)
|
|
247
|
-
else:
|
|
242
|
+
if PYDANTIC_V1:
|
|
248
243
|
# init_private_attributes() does not exist in v2
|
|
249
244
|
m._init_private_attributes() # type: ignore
|
|
250
245
|
|
|
251
246
|
# copied from Pydantic v1's `construct()` method
|
|
252
247
|
object.__setattr__(m, "__fields_set__", _fields_set)
|
|
248
|
+
else:
|
|
249
|
+
# these properties are copied from Pydantic's `model_construct()` method
|
|
250
|
+
object.__setattr__(m, "__pydantic_private__", None)
|
|
251
|
+
object.__setattr__(m, "__pydantic_extra__", _extra)
|
|
252
|
+
object.__setattr__(m, "__pydantic_fields_set__", _fields_set)
|
|
253
253
|
|
|
254
254
|
return m
|
|
255
255
|
|
|
@@ -259,7 +259,7 @@ class BaseModel(pydantic.BaseModel):
|
|
|
259
259
|
# although not in practice
|
|
260
260
|
model_construct = construct
|
|
261
261
|
|
|
262
|
-
if
|
|
262
|
+
if PYDANTIC_V1:
|
|
263
263
|
# we define aliases for some of the new pydantic v2 methods so
|
|
264
264
|
# that we can just document these methods without having to specify
|
|
265
265
|
# a specific pydantic version as some users may not know which
|
|
@@ -379,10 +379,10 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
|
|
|
379
379
|
if value is None:
|
|
380
380
|
return field_get_default(field)
|
|
381
381
|
|
|
382
|
-
if
|
|
383
|
-
type_ = field.annotation
|
|
384
|
-
else:
|
|
382
|
+
if PYDANTIC_V1:
|
|
385
383
|
type_ = cast(type, field.outer_type_) # type: ignore
|
|
384
|
+
else:
|
|
385
|
+
type_ = field.annotation # type: ignore
|
|
386
386
|
|
|
387
387
|
if type_ is None:
|
|
388
388
|
raise RuntimeError(f"Unexpected field type is None for {key}")
|
|
@@ -391,7 +391,7 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
|
|
|
391
391
|
|
|
392
392
|
|
|
393
393
|
def _get_extra_fields_type(cls: type[pydantic.BaseModel]) -> type | None:
|
|
394
|
-
if
|
|
394
|
+
if PYDANTIC_V1:
|
|
395
395
|
# TODO
|
|
396
396
|
return None
|
|
397
397
|
|
|
@@ -644,30 +644,30 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any,
|
|
|
644
644
|
for variant in get_args(union):
|
|
645
645
|
variant = strip_annotated_type(variant)
|
|
646
646
|
if is_basemodel_type(variant):
|
|
647
|
-
if
|
|
648
|
-
|
|
649
|
-
if not
|
|
647
|
+
if PYDANTIC_V1:
|
|
648
|
+
field_info = cast("dict[str, FieldInfo]", variant.__fields__).get(discriminator_field_name) # pyright: ignore[reportDeprecated, reportUnnecessaryCast]
|
|
649
|
+
if not field_info:
|
|
650
650
|
continue
|
|
651
651
|
|
|
652
652
|
# Note: if one variant defines an alias then they all should
|
|
653
|
-
discriminator_alias =
|
|
654
|
-
|
|
655
|
-
field_schema = field["schema"]
|
|
653
|
+
discriminator_alias = field_info.alias
|
|
656
654
|
|
|
657
|
-
if
|
|
658
|
-
for entry in
|
|
655
|
+
if (annotation := getattr(field_info, "annotation", None)) and is_literal_type(annotation):
|
|
656
|
+
for entry in get_args(annotation):
|
|
659
657
|
if isinstance(entry, str):
|
|
660
658
|
mapping[entry] = variant
|
|
661
659
|
else:
|
|
662
|
-
|
|
663
|
-
if not
|
|
660
|
+
field = _extract_field_schema_pv2(variant, discriminator_field_name)
|
|
661
|
+
if not field:
|
|
664
662
|
continue
|
|
665
663
|
|
|
666
664
|
# Note: if one variant defines an alias then they all should
|
|
667
|
-
discriminator_alias =
|
|
665
|
+
discriminator_alias = field.get("serialization_alias")
|
|
668
666
|
|
|
669
|
-
|
|
670
|
-
|
|
667
|
+
field_schema = field["schema"]
|
|
668
|
+
|
|
669
|
+
if field_schema["type"] == "literal":
|
|
670
|
+
for entry in cast("LiteralSchema", field_schema)["expected"]:
|
|
671
671
|
if isinstance(entry, str):
|
|
672
672
|
mapping[entry] = variant
|
|
673
673
|
|
|
@@ -726,7 +726,7 @@ def add_request_id(obj: BaseModel, request_id: str | None) -> None:
|
|
|
726
726
|
# in Pydantic v1, using setattr like we do above causes the attribute
|
|
727
727
|
# to be included when serializing the model which we don't want in this
|
|
728
728
|
# case so we need to explicitly exclude it
|
|
729
|
-
if
|
|
729
|
+
if PYDANTIC_V1:
|
|
730
730
|
try:
|
|
731
731
|
exclude_fields = obj.__exclude_fields__ # type: ignore
|
|
732
732
|
except AttributeError:
|
|
@@ -745,7 +745,7 @@ else:
|
|
|
745
745
|
pass
|
|
746
746
|
|
|
747
747
|
|
|
748
|
-
if
|
|
748
|
+
if not PYDANTIC_V1:
|
|
749
749
|
from pydantic import TypeAdapter as _TypeAdapter
|
|
750
750
|
|
|
751
751
|
_CachedTypeAdapter = cast("TypeAdapter[object]", lru_cache(maxsize=None)(_TypeAdapter))
|
|
@@ -813,12 +813,12 @@ class FinalRequestOptions(pydantic.BaseModel):
|
|
|
813
813
|
json_data: Union[Body, None] = None
|
|
814
814
|
extra_json: Union[AnyMapping, None] = None
|
|
815
815
|
|
|
816
|
-
if
|
|
817
|
-
model_config: ClassVar[ConfigDict] = ConfigDict(arbitrary_types_allowed=True)
|
|
818
|
-
else:
|
|
816
|
+
if PYDANTIC_V1:
|
|
819
817
|
|
|
820
818
|
class Config(pydantic.BaseConfig): # pyright: ignore[reportDeprecated]
|
|
821
819
|
arbitrary_types_allowed: bool = True
|
|
820
|
+
else:
|
|
821
|
+
model_config: ClassVar[ConfigDict] = ConfigDict(arbitrary_types_allowed=True)
|
|
822
822
|
|
|
823
823
|
def get_max_retries(self, max_retries: int) -> int:
|
|
824
824
|
if isinstance(self.max_retries, NotGiven):
|
|
@@ -851,9 +851,9 @@ class FinalRequestOptions(pydantic.BaseModel):
|
|
|
851
851
|
key: strip_not_given(value)
|
|
852
852
|
for key, value in values.items()
|
|
853
853
|
}
|
|
854
|
-
if
|
|
855
|
-
return super().
|
|
856
|
-
return
|
|
854
|
+
if PYDANTIC_V1:
|
|
855
|
+
return cast(FinalRequestOptions, super().construct(_fields_set, **kwargs)) # pyright: ignore[reportDeprecated]
|
|
856
|
+
return super().model_construct(_fields_set, **kwargs)
|
|
857
857
|
|
|
858
858
|
if not TYPE_CHECKING:
|
|
859
859
|
# type checkers incorrectly complain about this assignment
|
|
@@ -10,7 +10,6 @@ from ._utils import (
|
|
|
10
10
|
lru_cache as lru_cache,
|
|
11
11
|
is_mapping as is_mapping,
|
|
12
12
|
is_tuple_t as is_tuple_t,
|
|
13
|
-
parse_date as parse_date,
|
|
14
13
|
is_iterable as is_iterable,
|
|
15
14
|
is_sequence as is_sequence,
|
|
16
15
|
coerce_float as coerce_float,
|
|
@@ -23,7 +22,6 @@ from ._utils import (
|
|
|
23
22
|
coerce_boolean as coerce_boolean,
|
|
24
23
|
coerce_integer as coerce_integer,
|
|
25
24
|
file_from_path as file_from_path,
|
|
26
|
-
parse_datetime as parse_datetime,
|
|
27
25
|
strip_not_given as strip_not_given,
|
|
28
26
|
deepcopy_minimal as deepcopy_minimal,
|
|
29
27
|
get_async_library as get_async_library,
|
|
@@ -32,6 +30,13 @@ from ._utils import (
|
|
|
32
30
|
maybe_coerce_boolean as maybe_coerce_boolean,
|
|
33
31
|
maybe_coerce_integer as maybe_coerce_integer,
|
|
34
32
|
)
|
|
33
|
+
from ._compat import (
|
|
34
|
+
get_args as get_args,
|
|
35
|
+
is_union as is_union,
|
|
36
|
+
get_origin as get_origin,
|
|
37
|
+
is_typeddict as is_typeddict,
|
|
38
|
+
is_literal_type as is_literal_type,
|
|
39
|
+
)
|
|
35
40
|
from ._typing import (
|
|
36
41
|
is_list_type as is_list_type,
|
|
37
42
|
is_union_type as is_union_type,
|
|
@@ -56,3 +61,4 @@ from ._reflection import (
|
|
|
56
61
|
function_has_argument as function_has_argument,
|
|
57
62
|
assert_signatures_in_sync as assert_signatures_in_sync,
|
|
58
63
|
)
|
|
64
|
+
from ._datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import sys
|
|
4
|
+
import typing_extensions
|
|
5
|
+
from typing import Any, Type, Union, Literal, Optional
|
|
6
|
+
from datetime import date, datetime
|
|
7
|
+
from typing_extensions import get_args as _get_args, get_origin as _get_origin
|
|
8
|
+
|
|
9
|
+
from .._types import StrBytesIntFloat
|
|
10
|
+
from ._datetime_parse import parse_date as _parse_date, parse_datetime as _parse_datetime
|
|
11
|
+
|
|
12
|
+
_LITERAL_TYPES = {Literal, typing_extensions.Literal}
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def get_args(tp: type[Any]) -> tuple[Any, ...]:
|
|
16
|
+
return _get_args(tp)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def get_origin(tp: type[Any]) -> type[Any] | None:
|
|
20
|
+
return _get_origin(tp)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def is_union(tp: Optional[Type[Any]]) -> bool:
|
|
24
|
+
if sys.version_info < (3, 10):
|
|
25
|
+
return tp is Union # type: ignore[comparison-overlap]
|
|
26
|
+
else:
|
|
27
|
+
import types
|
|
28
|
+
|
|
29
|
+
return tp is Union or tp is types.UnionType
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def is_typeddict(tp: Type[Any]) -> bool:
|
|
33
|
+
return typing_extensions.is_typeddict(tp)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def is_literal_type(tp: Type[Any]) -> bool:
|
|
37
|
+
return get_origin(tp) in _LITERAL_TYPES
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def parse_date(value: Union[date, StrBytesIntFloat]) -> date:
|
|
41
|
+
return _parse_date(value)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def parse_datetime(value: Union[datetime, StrBytesIntFloat]) -> datetime:
|
|
45
|
+
return _parse_datetime(value)
|