Repository navigation
docs: Call close() to send Python SDK events on shutdown - #8972
Draft
flagsmithsmith[bot] wants to merge 1 commit into
Draft
flagsmithsmith[bot] wants to merge 1 commit into
flagsmithsmith[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
flagsmithsmith Bot
added a commit
to Flagsmith/flagsmith-python-client
that referenced
this pull request
Nov 16, 2026
The section on calling close() at shutdown now lives in the Python tab of Run an Experiment (Flagsmith/flagsmith#8972). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
docs/if required so people know about the feature.Changes
Contributes to Flagsmith/flagsmith-python-client#283
The Python SDK's event processor no longer sends buffered events when the interpreter exits. Instead, the application calls
Flagsmith.close()when it shuts down. Flagsmith/flagsmith-python-client#283 addsclose(). As asked in this review comment, this moves that PR's README section here:flagsmith.close()under# Before your application exits, like the Java, Node.js and Go tabs. A short note follows on registering it withatexitor a framework shutdown hook, and on the 5-second defaulttimeout_seconds. This replaces the note saying buffered events are dropped at exit, with itsmax_buffer_items=1workaround.close()instead of the same workaround.This is a draft because released 6.5.1 doesn't have
Flagsmith.close()yet. Merge it once the Python SDK release that includes Flagsmith/flagsmith-python-client#283 is out.How did you test this code?
npx prettier@3.4.2 --checkon both files, the same version and check that pre-commit runs: passes.close()and itstimeout_secondsdefault of 5 seconds against the SDK PR's code and tests.🤖 Generated with Claude Code