Skip to content

Add Python version file and update unsubscribe methods to be asynchronous #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

goldhaxx
Copy link
Contributor

  • Introduced a new .python-version file specifying Python version 3.10.11.
  • Modified unsubscribe method in DriftUserStats class to be asynchronous, ensuring it properly awaits the unsubscribe call from account_subscriber.
  • Updated UserStatsMap class to await the unsubscribe method of existing_drift_user_stat when it exists.
  • Enhanced VSCode settings to include additional paths for Python analysis.

…nous

- Introduced a new `.python-version` file specifying Python version 3.10.11.
- Modified `unsubscribe` method in `DriftUserStats` class to be asynchronous, ensuring it properly awaits the `unsubscribe` call from `account_subscriber`.
- Updated `UserStatsMap` class to await the `unsubscribe` method of `existing_drift_user_stat` when it exists.
- Enhanced VSCode settings to include additional paths for Python analysis.
@goldhaxx goldhaxx self-assigned this Jun 24, 2025
@goldhaxx goldhaxx requested a review from SinaKhalili June 24, 2025 01:10
Copy link
Contributor

@SinaKhalili SinaKhalili left a comment

Choose a reason for hiding this comment

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

Just a couple noticed some codepaths that the subscribe change being async might affect, lmk if you find any others. Otherwise, looks good 👍🏽

@@ -312,7 +312,7 @@ async def update_user_stat(
existing_drift_user_stat = self.get(authority_str)

if existing_drift_user_stat:
existing_drift_user_stat.unsubscribe()
await existing_drift_user_stat.unsubscribe()
Copy link
Contributor

Choose a reason for hiding this comment

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

I think there might be more places to put await if we change unsubscribe to async

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

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.

2 participants