Skip to content

feat!: rename public fields and add configurable max_retries support - #39

Merged
oscatcher merged 1 commit into
mainfrom
fern-bot/2026-05-19T08-42-24Z
May 19, 2026
Merged

oscatcher merged 1 commit into
mainfrom
fern-bot/2026-05-19T08-42-24Z

Conversation

@fern-api

@fern-api fern-api Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

⚠️ 2.1.1 → 3.0.0

Breaking: Existing callers accessing NlpDataEntity.summary_translated or AdditionalSourceInfo.nb_articles_for7d by attribute name will get an AttributeError after the rename.

Breaking Changes

  • NlpDataEntity.summary_translated — renamed to translation_summary; update all attribute access to use the new name (the JSON wire alias summary_translated is unchanged).
  • AdditionalSourceInfo.nb_articles_for7d — renamed to nb_articles_for_7_d; update all attribute access to use the new name (the JSON wire alias nb_articles_for_7d is unchanged).

Added

  • max_retries — new optional constructor parameter on BaseNewscatcherApi and AsyncBaseNewscatcherApi to configure the default number of HTTP retries (defaults to 2); per-request max_retries in RequestOptions still takes precedence.

Changed

  • pydantic-core dependency upper bound widened from <2.44.0 to <3.0.0, allowing use of newer pydantic-core releases.
  • To type alias — union member order changed from Union[dt.datetime, str] to Union[str, dt.datetime]; no runtime impact for most callers.

See full changelog

Introduce several breaking renames to public model fields alongside new
backward-compatible additions. The `NlpDataEntity.summary_translated`
field is renamed to `translation_summary`, and
`AdditionalSourceInfo.nb_articles_for7d` is renamed to
`nb_articles_for_7_d`. Both fields retain their original JSON wire
aliases so serialization is unaffected, but Python attribute access
breaks for callers using the old names.

On the additions side, both `BaseNewscatcherApi` and
`AsyncBaseNewscatcherApi` now accept an optional `max_retries` parameter
(defaulting to 2) that propagates through the client wrapper stack,
giving callers control over retry behavior at construction time.

Additional improvements include widening the `pydantic-core` upper bound
to `<3.0.0`, updating code-example `to` values from `"1 day ago"` to
`"now"`, trimming verbose date-format docstrings from `SearchByLink`
clients, and minor docstring reformatting across Search and Sources
clients.

Key changes:
- Rename `NlpDataEntity.summary_translated` → `translation_summary` (breaking)
- Rename `AdditionalSourceInfo.nb_articles_for7d` → `nb_articles_for_7_d` (breaking)
- Add optional `max_retries` parameter to `BaseNewscatcherApi` and `AsyncBaseNewscatcherApi` constructors
- Widen `pydantic-core` dependency upper bound from `<2.44.0` to `<3.0.0`
- Add `_should_retry` unit tests and refactor inline retryable-status list

🌿 Generated with Fern
@oscatcher
oscatcher self-requested a review May 19, 2026 08:49

@oscatcher oscatcher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

all good

@oscatcher
oscatcher merged commit a0593a0 into main May 19, 2026
@oscatcher
oscatcher deleted the fern-bot/2026-05-19T08-42-24Z branch May 19, 2026 08:52
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