Skip to content

Conversation

@neelkanth-kaushik
Copy link

@neelkanth-kaushik neelkanth-kaushik commented Nov 10, 2025

This pull request updates the library to version 2.3.5, addressing three GitHub issues and improving error handling and logging in the analytics consumer. The most important changes are grouped below:

Github Issues Fixed in this Pull Request:

  1. Refactor: Defer error logging until after all send retries are exhausted #515
  2. Return in finally block w/ Python 3.14 #516
  3. return in finally can swallow exceptions #493

Bug fixes and version update:

  • Updated the version to 2.3.5 in segment/analytics/version.py and documented the release and in HISTORY.md.
  • Enhanced retry logic in segment/analytics/consumer.py by adding detailed debug logs for each retry attempt and logging an error when all retries are exhausted.
  • Moved the return success out of the finally block in segment/analytics/consumer.py at Line 84.
  • Removed redundant error logging in segment/analytics/request.py to avoid duplicate logs when exceptions are raised.

Copy link

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 makes code formatting improvements and fixes a critical indentation bug in the upload() method.

  • Fixed indentation of the return success statement to ensure it executes after the try-except-finally block completes
  • Added blank lines for improved code formatting around the FatalError class definition

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

MichaelGHSeg
MichaelGHSeg previously approved these changes Nov 12, 2025
@neelkanth-kaushik neelkanth-kaushik changed the title Fixed Github Issue #516 Patch for Github Issue #516 Nov 17, 2025
@neelkanth-kaushik neelkanth-kaushik changed the title Patch for Github Issue #516 Patch for Github Issue #516 and Github Issue #515 Nov 18, 2025
@neelkanth-kaushik neelkanth-kaushik changed the title Patch for Github Issue #516 and Github Issue #515 Patch for Github Issue #516, #515 and #493 Nov 18, 2025
@neelkanth-kaushik neelkanth-kaushik changed the title Patch for Github Issue #516, #515 and #493 Fixes for Github Issue #516, #515 and #493 Nov 18, 2025
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.

3 participants