Skip to content

feat: Python 3.14 compatibility, connection retry resilience, ParsingError, raw client improvements#819

Open
fern-api[bot] wants to merge 1 commit intomasterfrom
fern-bot/2026-04-09T15-24Z
Open

feat: Python 3.14 compatibility, connection retry resilience, ParsingError, raw client improvements#819
fern-api[bot] wants to merge 1 commit intomasterfrom
fern-bot/2026-04-09T15-24Z

Conversation

@fern-api
Copy link
Copy Markdown
Contributor

@fern-api fern-api Bot commented Apr 9, 2026

Changes

Python 3.14 Compatibility

  • Removed pydantic.v1 imports in core/pydantic_utilities.py - replaced with stdlib typing equivalents (get_args, get_origin, is_literal_type, is_union) and inlined encoders_by_type to avoid deprecated Pydantic v1 compatibility layer that breaks on Python 3.14

Connection Retry Resilience

  • HttpClient and AsyncHttpClient now retry on httpx.ConnectError and httpx.RemoteProtocolError (transient network failures), not just HTTP status codes
  • New _retry_timeout_from_retries() for exponential backoff when no response is available
  • Configurable base_max_retries parameter on both clients
  • Fixed missing data and force_multipart parameters in retry call paths (previously dropped on retry)

New: ParsingError Exception

  • Added core/parse_error.py with ParsingError class - raised when server responses fail Pydantic validation, wrapping the original ValidationError as cause
  • All raw_client.py files now catch ValidationError and raise ParsingError with status code, headers, and body context

New: RFC 2822 DateTime Support

  • Added Rfc2822DateTime type and parse_rfc2822_datetime helper in core/datetime_utils.py
  • Supports parsing RFC 2822 date strings (e.g., "Wed, 02 Oct 2002 13:00:00 GMT") with ISO 8601 fallback

AsyncAuth0 Improvements

  • New async_token parameter for async token acquisition (e.g., refreshing tokens via async HTTP client)
  • Auto-detection of httpx_aiohttp via _make_default_async_client() - uses aiohttp transport when available, falls back to httpx.AsyncClient
  • New _default_clients.py module with DefaultAioHttpClient and DefaultAsyncHttpxClient

Raw Client Updates

  • Replaced jsonable_encoder with encode_path_param for URL path encoding across all raw clients
  • Added ParsingError handling to all error response paths

Type & Documentation Changes

  • 346 type files updated (new types, field additions, docstring improvements)
  • Updated reference.md API documentation
  • Expanded wiremock-mappings.json with additional test fixtures

@fern-api fern-api Bot requested a review from a team as a code owner April 9, 2026 15:25
Comment thread src/auth0/management/core/pydantic_utilities.py Dismissed
Comment thread tests/conftest.py Dismissed
Comment thread tests/test_aiohttp_autodetect.py Dismissed
Comment thread tests/test_aiohttp_autodetect.py Dismissed
@fern-api fern-api Bot changed the title 🌿 Fern Regeneration -- April 9, 2026 SDK regeneration Apr 14, 2026
@fern-api fern-api Bot force-pushed the fern-bot/2026-04-09T15-24Z branch from 55c5532 to 96ebcee Compare April 14, 2026 04:32
@fern-api fern-api Bot force-pushed the fern-bot/2026-04-09T15-24Z branch from 96ebcee to 3236742 Compare April 22, 2026 05:37
@kishore7snehil kishore7snehil changed the title SDK regeneration feat: Python 3.14 compatibility, connection retry resilience, ParsingError, raw client improvements Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant