Repository navigation
feat!: rename public fields and add configurable max_retries support - #39
Merged
Merged
Conversation
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
self-requested a review
May 19, 2026 08:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking: Existing callers accessing
NlpDataEntity.summary_translatedorAdditionalSourceInfo.nb_articles_for7dby attribute name will get an AttributeError after the rename.Breaking Changes
NlpDataEntity.summary_translated— renamed totranslation_summary; update all attribute access to use the new name (the JSON wire aliassummary_translatedis unchanged).AdditionalSourceInfo.nb_articles_for7d— renamed tonb_articles_for_7_d; update all attribute access to use the new name (the JSON wire aliasnb_articles_for_7dis unchanged).Added
max_retries— new optional constructor parameter onBaseNewscatcherApiandAsyncBaseNewscatcherApito configure the default number of HTTP retries (defaults to 2); per-requestmax_retriesinRequestOptionsstill takes precedence.Changed
pydantic-coredependency upper bound widened from<2.44.0to<3.0.0, allowing use of newer pydantic-core releases.Totype alias — union member order changed fromUnion[dt.datetime, str]toUnion[str, dt.datetime]; no runtime impact for most callers.See full changelog