Repository navigation
Remove desktoptoken methods from admin.py - #316
Merged
AaronAtDuo merged 1 commit intoNov 16, 2026
Merged
AaronAtDuo merged 1 commit into
AaronAtDuo merged 1 commit into
Conversation
The /admin/v1/desktoptokens Admin API endpoint was removed server-side, so these SDK methods now point at a non-existent endpoint. Removes: * get_desktoptokens_generator, get_desktoptokens, get_desktoptoken_by_id, add_desktoptoken, delete_desktoptoken, update_desktoptoken, activate_desktoptoken * DESKTOP_TOKENS response-shape docstring block * tests/admin/test_desktop_tokens.py This is a breaking change for external consumers of the PyPI duo_client package. Version bump and release left to maintainers per the project's existing release cadence. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AaronAtDuo
approved these changes
Nov 16, 2026
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.
Description
Removes the
desktoptokenmethods andDESKTOP_TOKENSfromduo_client/admin.py, plus the correspondingtests/admin/test_desktop_tokens.py. Specifically removes:get_desktoptokens_generator()get_desktoptokens()get_desktoptoken_by_id()add_desktoptoken()delete_desktoptoken()update_desktoptoken()activate_desktoptoken()DESKTOP_TOKENSdocstring blockNo version bump is included.
Motivation and Context
The
/admin/v1/desktoptokensAdmin API endpoint was removed server-side as part of the Duo Desktop Tokens deprecation. The SDK methods in this module now point at a non-existent endpoint, so any caller hitting them gets a runtime failure.How Has This Been Tested?
nose2suite passes locally (248 tests).flake8 duo_client testsreports no errors.desktoptoken/DESKTOP_TOKENSremain induo_client/,tests/, orexamples/.Types of Changes
External consumers currently calling these methods on the PyPI
duo_clientpackage will seeAttributeErrorafter upgrading. This is acceptable because the underlying API endpoint is already gone — the methods would fail at runtime regardless.