[GH-ISSUE #20] Min python version 3.6 doesn't support the walrus operator (:=) found in generate_totp() #12

Closed
opened 2026-02-27 20:07:40 +03:00 by kerem · 6 comments
Owner

Originally created by @tomballgithub on GitHub (Jul 19, 2025).
Original GitHub issue: https://github.com/misiektoja/spotify_monitor/issues/20

The walrus operator (:=) was introduced in python 3.8.
So, either it should be removed, or the minimum version should be 3.8

def generate_totp():
...
    if str((ver := TOTP_VER or max(map(int, SECRET_CIPHER_DICT)))) not in SECRET_CIPHER_DICT:
        raise Exception(f"generate_totp(): Defined TOTP_VER ({ver}) is missing in SECRET_CIPHER_DICT")
...
Originally created by @tomballgithub on GitHub (Jul 19, 2025). Original GitHub issue: https://github.com/misiektoja/spotify_monitor/issues/20 The walrus operator (:=) was introduced in python 3.8. So, either it should be removed, or the minimum version should be 3.8 ``` def generate_totp(): ... if str((ver := TOTP_VER or max(map(int, SECRET_CIPHER_DICT)))) not in SECRET_CIPHER_DICT: raise Exception(f"generate_totp(): Defined TOTP_VER ({ver}) is missing in SECRET_CIPHER_DICT") ... ```
kerem closed this issue 2026-02-27 20:07:40 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 19, 2025):

This issue has been marked as stale because it has been inactive for 30 days. It will be closed in 7 days if no further activity occurs.

<!-- gh-comment-id:3198868220 --> @github-actions[bot] commented on GitHub (Aug 19, 2025): This issue has been marked as stale because it has been inactive for 30 days. It will be closed in 7 days if no further activity occurs.
Author
Owner

@tomballgithub commented on GitHub (Aug 19, 2025):

Updating to keep this active

<!-- gh-comment-id:3198887366 --> @tomballgithub commented on GitHub (Aug 19, 2025): Updating to keep this active
Author
Owner

@github-actions[bot] commented on GitHub (Sep 20, 2025):

This issue has been marked as stale because it has been inactive for 30 days. It will be closed in 7 days if no further activity occurs.

<!-- gh-comment-id:3314327982 --> @github-actions[bot] commented on GitHub (Sep 20, 2025): This issue has been marked as stale because it has been inactive for 30 days. It will be closed in 7 days if no further activity occurs.
Author
Owner

@tomballgithub commented on GitHub (Sep 20, 2025):

I'll make a PR

<!-- gh-comment-id:3314330315 --> @tomballgithub commented on GitHub (Sep 20, 2025): I'll make a PR
Author
Owner

@tomballgithub commented on GitHub (Oct 3, 2025):

Can close after merge to main

<!-- gh-comment-id:3363962070 --> @tomballgithub commented on GitHub (Oct 3, 2025): Can close after merge to main
Author
Owner

@tomballgithub commented on GitHub (Oct 12, 2025):

Fixed in new release

<!-- gh-comment-id:3395105664 --> @tomballgithub commented on GitHub (Oct 12, 2025): Fixed in new release
Sign in to join this conversation.
No labels
Stale
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify_monitor#12
No description provided.