Repository navigation
Retry, edit, status and header fixes, release 0.3.0 - #23
Merged
Merged
Conversation
POST is not idempotent. Retrying a POST that the server processed but answered with a 5xx could create duplicate records (e.g. cous_add, coperson_roles_add). Retries remain for GET, PUT and DELETE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cous_edit, coperson_roles_edit and ssh_keys_edit now treat only None as
"keep the existing value". Previously any falsy argument ('' or 0) was
silently ignored, so a description or comment could not be cleared.
An empty status, affiliation or key_type now fails validation instead
of being dropped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
coperson_roles_add and coperson_roles_edit now accept status in any
case and send COmanage's canonical spelling ('active' -> 'Active'),
consistent with how affiliation and SSH key type are already handled.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use headers.update() to add Content-Type instead of replacing the session headers dict, which dropped User-Agent, Accept-Encoding and Accept from every request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bump version and add CHANGELOG entry for the retry, edit, status and header fixes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Fixes from a review of the client, one commit each, plus the 0.3.0 release bump.
7397a21). POST is not idempotent; a retry after the server created the record but returned 5xx could duplicate it (e.g.cous_add,coperson_roles_add). GET, PUT and DELETE still retry.f40b38d).cous_edit,coperson_roles_editandssh_keys_editkeep the existing value only forNone, so''now clears a description or comment instead of being silently ignored. An emptystatus,affiliationorkey_typenow raisesValueError.aabf319). CoPersonRolestatusis normalized to COmanage's canonical form ('active'->'Active'), matching how affiliation and key type are handled.c3c0d10).headers.update()instead of replacing the dict, soUser-Agent,Accept-EncodingandAcceptare sent again.The first two change caller-visible behavior, hence 0.3.0 rather than 0.2.4.
Verification
pytest: 145 passed (7 new tests);ruff check: cleanregistry-test.cilogon.org) currently serves a certificate fortest.cilogon.orgonly, so TLS verification fails.After merge, push tag
v0.3.0to publish to PyPI.🤖 Generated with Claude Code