Skip to content

Conversation

@pvaneck
Copy link
Member

@pvaneck pvaneck commented Jan 30, 2026

This pulls in applicable changes that were made in azure-core but not yet applied to corehttp.

This pulls in applicable changes that were made in azure-core but not
yet applied to corehttp.

Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
@pvaneck pvaneck marked this pull request as ready for review January 30, 2026 23:04
Copilot AI review requested due to automatic review settings January 30, 2026 23:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR synchronizes corehttp with applicable changes from azure-core, bringing in multiple bug fixes, improved error handling, and new serialization utilities.

Changes:

  • Adds new timeout-specific exception types (ServiceRequestTimeoutError, ServiceResponseTimeoutError) with improved exception handling across requests and aiohttp transports
  • Fixes retry_backoff_max configuration bug where the parameter was being ignored
  • Introduces TypeHandlerRegistry, is_generated_model, and attribute_list to the serialization module for SDK model handling
  • Adds start_time and context parameters to OpenTelemetry tracer methods along with set_span_error_status helper
  • Improves transport lifecycle management with proper closed state detection
  • Enhances exception chaining in authentication policies for better error diagnostics
  • Adds comprehensive test coverage for transport timeout scenarios and tracer functionality

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sdk/core/corehttp/tests/test_transport.py New tests for transport lifecycle and timeout handling (requests)
sdk/core/corehttp/tests/async_tests/test_transport_async.py New tests for async transport lifecycle and timeout handling (aiohttp)
sdk/core/corehttp/tests/test_tracer_otel.py Removed exception event assertions, added tests for new tracer features
sdk/core/corehttp/tests/test_stream_generator.py Updated to expect specific timeout exception types
sdk/core/corehttp/corehttp/transport/requests/_requests_basic.py Improved timeout exception handling, transport lifecycle management, removed unused imports
sdk/core/corehttp/corehttp/transport/aiohttp/_aiohttp.py Added ConnectionTimeoutError handling for aiohttp 3.10+, improved lifecycle management
sdk/core/corehttp/corehttp/transport/_base_async.py Simplified exception handling with try-finally pattern
sdk/core/corehttp/corehttp/transport/_base.py Simplified exception handling with try-finally pattern
sdk/core/corehttp/corehttp/serialization.py Added TypeHandlerRegistry class and model utility functions
sdk/core/corehttp/corehttp/rest/_requests_basic.py Enhanced stream download exception handling with timeout-specific errors
sdk/core/corehttp/corehttp/rest/_aiohttp.py Enhanced async response read error handling
sdk/core/corehttp/corehttp/rest/_rest_py3.py Fixed docstring formatting for raises clauses
sdk/core/corehttp/corehttp/rest/_http_response_impl_async.py Added missing blank lines in docstrings
sdk/core/corehttp/corehttp/runtime/policies/_retry.py Fixed backoff_max bug, improved docstring formatting, added RetryMode docstring
sdk/core/corehttp/corehttp/runtime/policies/_retry_async.py Improved docstring formatting
sdk/core/corehttp/corehttp/runtime/policies/_authentication.py Enhanced exception chaining for claims challenge failures
sdk/core/corehttp/corehttp/runtime/policies/_authentication_async.py Enhanced exception chaining for claims challenge failures
sdk/core/corehttp/corehttp/runtime/policies/_universal.py Added missing docstrings for policy methods
sdk/core/corehttp/corehttp/runtime/policies/_distributed_tracing.py Added missing docstrings for policy methods
sdk/core/corehttp/corehttp/runtime/pipeline/init.py Fixed docstring formatting for raises clauses
sdk/core/corehttp/corehttp/runtime/pipeline/_tools.py Fixed docstring formatting for raises clauses
sdk/core/corehttp/corehttp/paging.py Added missing docstrings for iterator methods
sdk/core/corehttp/corehttp/instrumentation/tracing/opentelemetry.py Added start_time, context parameters and set_span_error_status method
sdk/core/corehttp/corehttp/credentials.py Added missing docstrings for close methods and improved raises documentation
sdk/core/corehttp/corehttp/utils/_utils.py Fixed docstring formatting for raises clause
sdk/core/corehttp/CHANGELOG.md Comprehensive documentation of all changes

pvaneck and others added 2 commits January 30, 2026 15:37
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant