Welcome to the Atlassian developer community @RemiCarton,
I was able to reproduce your bug. I’ll have to direct you to developer support to get that logged and routed to the right team. In the meantime, let’s see if we can consider some workarounds.
At first, I was suspicious that your example was the right way to use the SDK. “Surely, you wouldn’t need to do a GET just to turn around and PUT,” I thought. No, you are 100% correct, that’s how the Python Jira library works. If you have any choice in the matter, I would abandon this hand-coded library.
My recommendation would be to use Uplink instead. I prefer this library because it keeps coupling to an absolute minimum: you only “bind” your code to the API endpoints that you need. That keeps you from having to worry that a change in the GET endpoint would affect the PUT.
Another approach that I’ve used is to generate an SDK from the Open API spec using openapi-python-client. You can expect a few generation-time warnings, and the Python linter has a complaint here and there, but it basically works as expected. This is more like the SDK you have, in that it would provide a full type model and code completion. The advantage is the generated SDK is definitionally complete, whereas the hand-coded one in pycontribs
is quite limiting. The downside is the high coupling (to everything in the API) and, because the Jira API is so “wide”, the code completion might be noisy (too many options) and slow.
In both cases, the tricky, Jira-specific stuff that aren’t in those general libraries are the base URL construction (like https://api.atlassian.com/ex/jira/396b747a-789f-48ec-a637-d0caefeac0ee
), and Atlassian’s sometimes quirky OAuth.