atlassian-python-api 3.41.18__tar.gz → 3.41.19__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. {atlassian_python_api-3.41.18/atlassian_python_api.egg-info → atlassian_python_api-3.41.19}/PKG-INFO +1 -1
  2. atlassian_python_api-3.41.19/atlassian/VERSION +1 -0
  3. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/base.py +3 -1
  4. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/commits.py +27 -1
  5. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/confluence.py +10 -7
  6. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/jira.py +10 -6
  7. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/rest_client.py +118 -32
  8. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/service_desk.py +2 -0
  9. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19/atlassian_python_api.egg-info}/PKG-INFO +1 -1
  10. atlassian_python_api-3.41.18/atlassian/VERSION +0 -1
  11. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/LICENSE +0 -0
  12. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/MANIFEST.in +0 -0
  13. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/README.rst +0 -0
  14. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/__init__.py +0 -0
  15. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bamboo.py +0 -0
  16. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/__init__.py +0 -0
  17. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/base.py +0 -0
  18. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/__init__.py +0 -0
  19. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/common/__init__.py +0 -0
  20. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/common/builds.py +0 -0
  21. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/common/comments.py +0 -0
  22. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/common/users.py +0 -0
  23. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/__init__.py +0 -0
  24. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/branchRestrictions.py +0 -0
  25. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/defaultReviewers.py +0 -0
  26. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/deploymentEnvironments.py +0 -0
  27. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/diffstat.py +0 -0
  28. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/groupPermissions.py +0 -0
  29. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/hooks.py +0 -0
  30. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/issues.py +0 -0
  31. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/pipelines.py +0 -0
  32. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/pullRequests.py +0 -0
  33. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/refs.py +0 -0
  34. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/repositoryVariables.py +0 -0
  35. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/workspaces/__init__.py +0 -0
  36. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/workspaces/members.py +0 -0
  37. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/workspaces/permissions.py +0 -0
  38. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/workspaces/projects.py +0 -0
  39. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/server/__init__.py +0 -0
  40. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/server/base.py +0 -0
  41. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/server/common/__init__.py +0 -0
  42. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/server/common/permissions.py +0 -0
  43. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/server/globalPermissions.py +0 -0
  44. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/server/projects/__init__.py +0 -0
  45. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/bitbucket/server/projects/repos/__init__.py +0 -0
  46. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/cloud_admin.py +0 -0
  47. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/crowd.py +0 -0
  48. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/errors.py +0 -0
  49. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/insight.py +0 -0
  50. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/marketplace.py +0 -0
  51. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/portfolio.py +0 -0
  52. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/request_utils.py +0 -0
  53. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/statuspage.py +0 -0
  54. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/utils.py +0 -0
  55. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian/xray.py +0 -0
  56. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian_python_api.egg-info/SOURCES.txt +0 -0
  57. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian_python_api.egg-info/dependency_links.txt +0 -0
  58. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian_python_api.egg-info/not-zip-safe +0 -0
  59. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian_python_api.egg-info/requires.txt +0 -0
  60. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/atlassian_python_api.egg-info/top_level.txt +0 -0
  61. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/pyproject.toml +0 -0
  62. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/requirements.txt +0 -0
  63. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/setup.cfg +0 -0
  64. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/setup.py +0 -0
  65. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/__init__.py +0 -0
  66. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/mockup.py +0 -0
  67. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/GET +0 -0
  68. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/TestRepositoryCreated/POST +0 -0
  69. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/GET +0 -0
  70. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/branch-restrictions/17203842/DELETE +0 -0
  71. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/branch-restrictions/17203842/GET +0 -0
  72. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/branch-restrictions/17203842/PUT +0 -0
  73. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/branch-restrictions/GET +0 -0
  74. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/default-reviewers/DefaultReviewer1Uuid/DELETE +0 -0
  75. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/default-reviewers/DefaultReviewer1Uuid/GET +0 -0
  76. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/default-reviewers/GET +0 -0
  77. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/3/DELETE +0 -0
  78. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/3/GET +0 -0
  79. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/3/PUT +0 -0
  80. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/GET +0 -0
  81. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/POST +0 -0
  82. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/GET +0 -0
  83. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/POST +0 -0
  84. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/GET +0 -0
  85. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/steps/GET +0 -0
  86. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/steps/{PipelineStep1Uuid}/GET +0 -0
  87. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/steps/{PipelineStep2Uuid}/GET +0 -0
  88. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/steps/{PipelineStep2Uuid}/log/GET +0 -0
  89. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/stopPipeline/POST +0 -0
  90. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/GET +0 -0
  91. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/approve/DELETE +0 -0
  92. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/approve/POST +0 -0
  93. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/comments/GET +0 -0
  94. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/comments/POST +0 -0
  95. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/commits/GET +0 -0
  96. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/decline/POST +0 -0
  97. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/merge/POST +0 -0
  98. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/request-changes/DELETE +0 -0
  99. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/request-changes/POST +0 -0
  100. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/statuses/GET +0 -0
  101. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/tasks/123456/DELETE +0 -0
  102. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/tasks/123456/PUT +0 -0
  103. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/tasks/GET +0 -0
  104. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/tasks/POST +0 -0
  105. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/25/GET +0 -0
  106. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/GET +0 -0
  107. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/POST +0 -0
  108. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/workspaces/GET +0 -0
  109. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/workspaces/TestWorkspace1/GET +0 -0
  110. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/workspaces/TestWorkspace2/GET +0 -0
  111. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/workspaces/TestWorkspace3/GET +0 -0
  112. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/groups/DELETE +0 -0
  113. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/groups/GET +0 -0
  114. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/groups/none/GET +0 -0
  115. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/users/DELETE +0 -0
  116. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/users/GET +0 -0
  117. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/users/none/GET +0 -0
  118. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/GET +0 -0
  119. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/GET +0 -0
  120. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/PUT +0 -0
  121. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/DELETE +0 -0
  122. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/GET +0 -0
  123. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/none/GET +0 -0
  124. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/users/DELETE +0 -0
  125. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/users/GET +0 -0
  126. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/users/none/GET +0 -0
  127. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/GET +0 -0
  128. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/GET +0 -0
  129. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/PUT +0 -0
  130. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/archive/GET +0 -0
  131. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/contributing/GET +0 -0
  132. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/default-branch/GET +0 -0
  133. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/default-branch/PUT +0 -0
  134. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/forks/GET +0 -0
  135. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/license/GET +0 -0
  136. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/DELETE +0 -0
  137. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/GET +0 -0
  138. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/none/GET +0 -0
  139. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/DELETE +0 -0
  140. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/GET +0 -0
  141. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/none/GET +0 -0
  142. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/readme/GET +0 -0
  143. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/related/GET +0 -0
  144. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/3/DELETE +0 -0
  145. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/3/GET +0 -0
  146. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/3/PUT +0 -0
  147. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/GET +0 -0
  148. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/POST +0 -0
  149. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/agile/1.0/epic/BAR-22/issue/GET +0 -0
  150. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/agile/1.0/epic/none/issue/GET +0 -0
  151. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/comment/list/POST +0 -0
  152. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/GET +0 -0
  153. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/comment/10000/GET +0 -0
  154. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/comment/GET +0 -0
  155. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/Bar1/DELETE +0 -0
  156. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/Bar1/GET +0 -0
  157. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/Bar1/PUT +0 -0
  158. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/Bar2New/PUT +0 -0
  159. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/GET +0 -0
  160. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/remotelink/POST +0 -0
  161. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/POST +0 -0
  162. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/REGEX-123/file.txt +0 -0
  163. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/customer/POST +0 -0
  164. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/organization/GET +0 -0
  165. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/organization/POST +0 -0
  166. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/DELETE +0 -0
  167. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/GET +0 -0
  168. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/property/GET +0 -0
  169. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/user/DELETE +0 -0
  170. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/user/GET +0 -0
  171. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/user/POST +0 -0
  172. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer/DELETE +0 -0
  173. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer/GET +0 -0
  174. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer/POST +0 -0
  175. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/organization/DELETE +0 -0
  176. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/organization/GET +0 -0
  177. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/organization/POST +0 -0
  178. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/test_base.py +0 -0
  179. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/test_bitbucket_cloud_oo.py +0 -0
  180. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/test_bitbucket_server.py +0 -0
  181. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/test_bitbucket_server_oo.py +0 -0
  182. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/test_confluence_advanced_mode.py +0 -0
  183. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/test_confluence_attach.py +0 -0
  184. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/test_jira.py +0 -0
  185. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tests/test_servicedesk.py +0 -0
  186. {atlassian_python_api-3.41.18 → atlassian_python_api-3.41.19}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: atlassian-python-api
3
- Version: 3.41.18
3
+ Version: 3.41.19
4
4
  Summary: Python Atlassian REST API Wrapper
5
5
  Home-page: https://github.com/atlassian-api/atlassian-python-api
6
6
  Download-URL: https://github.com/atlassian-api/atlassian-python-api
@@ -0,0 +1 @@
1
+ 3.41.19
@@ -113,7 +113,9 @@ class BitbucketCloudBase(BitbucketBase):
113
113
  e = j["error"]
114
114
  error_msg = e["message"]
115
115
  if e.get("detail"):
116
- error_msg += "\n" + e["detail"]
116
+ # It uses interpolation instead of concatenation because of
117
+ # https://github.com/atlassian-api/atlassian-python-api/issues/1481
118
+ error_msg = "{}\n{}".format(error_msg, str(e["detail"]))
117
119
  except Exception as e:
118
120
  log.error(e)
119
121
  response.raise_for_status()
@@ -3,7 +3,7 @@
3
3
  from ..base import BitbucketCloudBase
4
4
  from ..common.builds import Build
5
5
  from ..common.comments import Comment
6
- from ..common.users import User, Participant
6
+ from ..common.users import Participant, User
7
7
 
8
8
 
9
9
  class Commits(BitbucketCloudBase):
@@ -186,3 +186,29 @@ class Commit(BitbucketCloudBase):
186
186
  API docs: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-commit-commit-approve-delete
187
187
  """
188
188
  return super(BitbucketCloudBase, self).delete("approve")
189
+
190
+ def get_pull_requests(self, start=0, pagelen=0):
191
+ """
192
+ Retrieves pull requests associated with the current commit.
193
+
194
+ Pull Request Commit Links app must be installed first before using this API;
195
+ installation automatically occurs when 'Go to pull request' is clicked
196
+ from the web interface for a commit's details.
197
+
198
+ API docs: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-commit-commit-pullrequests-get
199
+
200
+ :param start: int, OPTIONAL: The starting page of pull requests to retrieve. Defaults to 0.
201
+ :param pagelen: int, OPTIONAL: The number of pull requests to retrieve per page. Defaults to 0.
202
+ :return: Generator[PullRequest]: A generator that yields `PullRequest` objects.
203
+ """
204
+ # NOTE: Import moved inside the method to avoid circular import issues
205
+ from ...cloud.repositories.pullRequests import PullRequest
206
+
207
+ params = {}
208
+ if start:
209
+ params["page"] = start
210
+ if pagelen:
211
+ params["pagelen"] = pagelen
212
+
213
+ for pull_request in self._get_paged(url="pullrequests", params=params):
214
+ yield PullRequest(pull_request, **self._new_session_args)
@@ -390,7 +390,8 @@ class Confluence(AtlassianRestAPI):
390
390
  """
391
391
  Fetches html tables added to confluence page
392
392
  :param page_id: integer confluence page_id
393
- :return: json object with page_id, number_of_tables_in_page and list of list tables_content representing scrapepd tables
393
+ :return: json object with page_id, number_of_tables_in_page
394
+ and list of list tables_content representing scraped tables
394
395
  """
395
396
  try:
396
397
  page_content = self.get_page_by_id(page_id, expand="body.storage")["body"]["storage"]["value"]
@@ -732,17 +733,17 @@ class Confluence(AtlassianRestAPI):
732
733
  """
733
734
  Get all pages from a set of space ids:
734
735
  https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-get
735
-
736
736
  :param space_ids: A Set of space IDs passed as a filter to Confluence
737
737
  :param batch_size: OPTIONAL: The batch size of pages to retrieve from confluence per request MAX is 250.
738
738
  Default: 250
739
739
  :param sort: OPTIONAL: The order the pages are retrieved in.
740
- Valid values: id, -id, created-date, -created-date, modified-date, -modified-date, title, -title
740
+ Valid values:
741
+ id, -id, created-date, -created-date, modified-date, -modified-date, title, -title
741
742
  :param status: OPTIONAL: Filter pages based on their status.
742
743
  Valid values: current, archived, deleted, trashed
743
744
  Default: current,archived
744
745
  :param title: OPTIONAL: Filter pages based on their title.
745
- :param body-format: OPTIONAL: The format of the body in the response. Valid values: storage, atlas_doc_format
746
+ :param body_format: OPTIONAL: The format of the body in the response. Valid values: storage, atlas_doc_format
746
747
  :return:
747
748
  """
748
749
  path = "/api/v2/pages"
@@ -2736,7 +2737,8 @@ class Confluence(AtlassianRestAPI):
2736
2737
  """
2737
2738
  Export a Confluence space to a file of the specified type.
2738
2739
  (!) This method was developed for Confluence Cloud and may not work with Confluence on-prem.
2739
- (!) This is an experimental method that does not trigger an officially supported REST endpoint. It may break if Atlassian changes the space export front-end logic.
2740
+ (!) This is an experimental method that does not trigger an officially supported REST endpoint.
2741
+ It may break if Atlassian changes the space export front-end logic.
2740
2742
 
2741
2743
  :param space_key: The key of the space to export.
2742
2744
  :param export_type: The type of export to perform. Valid values are: 'html', 'csv', 'xml', 'pdf'.
@@ -2744,7 +2746,8 @@ class Confluence(AtlassianRestAPI):
2744
2746
  """
2745
2747
 
2746
2748
  def get_atl_request(url: str):
2747
- # Nested function used to get atl_token used for XSRF protection. this is only applicable to html/csv/xml space exports
2749
+ # Nested function used to get atl_token used for XSRF protection.
2750
+ # This is only applicable to html/csv/xml space exports
2748
2751
  try:
2749
2752
  response = self.get(url, advanced_mode=True)
2750
2753
  parsed_html = BeautifulSoup(response.text, "html.parser")
@@ -2753,7 +2756,7 @@ class Confluence(AtlassianRestAPI):
2753
2756
  except Exception as e:
2754
2757
  raise ApiError("Problems with getting the atl_token for get_space_export method :", reason=e)
2755
2758
 
2756
- # Checks if space_ke parameter is valid and if api_token has relevant permissions to space
2759
+ # Checks if space_ke parameter is valid and if api_token has relevant permissions to space
2757
2760
  self.get_space(space_key=space_key, expand="permissions")
2758
2761
 
2759
2762
  try:
@@ -223,7 +223,7 @@ class Jira(AtlassianRestAPI):
223
223
  def get_attachments_ids_from_issue(self, issue):
224
224
  """
225
225
  Get attachments IDs from jira issue
226
- :param jira issue key: str
226
+ :param issue: str : jira issue key
227
227
  :return: list of integers attachment IDs
228
228
  """
229
229
  issue_id = self.get_issue(issue)["fields"]["attachment"]
@@ -656,12 +656,16 @@ class Jira(AtlassianRestAPI):
656
656
  def get_custom_fields(self, search=None, start=1, limit=50):
657
657
  """
658
658
  Get custom fields. Evaluated on 7.12
659
+ Get fields paginated in cloud
659
660
  :param search: str
660
661
  :param start: long Default: 1
661
662
  :param limit: int Default: 50
662
663
  :return:
663
664
  """
664
- url = self.resource_url("customFields")
665
+ if self.cloud:
666
+ url = self.resource_url("field/search")
667
+ else:
668
+ url = self.resource_url("customFields")
665
669
  params = {}
666
670
  if search:
667
671
  params["search"] = search
@@ -1382,7 +1386,7 @@ class Jira(AtlassianRestAPI):
1382
1386
 
1383
1387
  def update_issue(self, issue_key, update):
1384
1388
  """
1385
- :param issue: the issue to update
1389
+ :param issue_key: the issue to update
1386
1390
  :param update: the update to make
1387
1391
  :return: True if successful, False if not
1388
1392
  """
@@ -1391,7 +1395,7 @@ class Jira(AtlassianRestAPI):
1391
1395
 
1392
1396
  def label_issue(self, issue_key, labels):
1393
1397
  """
1394
- :param issue: the issue to update
1398
+ :param issue_key: the issue to update
1395
1399
  :param labels: the labels to add
1396
1400
  :return: True if successful, False if not
1397
1401
  """
@@ -1400,7 +1404,7 @@ class Jira(AtlassianRestAPI):
1400
1404
 
1401
1405
  def unlabel_issue(self, issue_key, labels):
1402
1406
  """
1403
- :param issue: the issue to update
1407
+ :param issue_key: the issue to update
1404
1408
  :param labels: the labels to remove
1405
1409
  :return: True if successful, False if not
1406
1410
  """
@@ -2508,7 +2512,7 @@ class Jira(AtlassianRestAPI):
2508
2512
  """
2509
2513
  base_url = self.resource_url("project")
2510
2514
  url = "{base_url}/{key}/archive".format(base_url=base_url, key=key)
2511
- return self.post(url)
2515
+ return self.put(url)
2512
2516
 
2513
2517
  def project(self, key, expand=None):
2514
2518
  """
@@ -1,5 +1,6 @@
1
1
  # coding=utf-8
2
2
  import logging
3
+ import random
3
4
  from json import dumps
4
5
 
5
6
  import requests
@@ -9,12 +10,13 @@ try:
9
10
  from oauthlib.oauth1.rfc5849 import SIGNATURE_RSA_SHA512 as SIGNATURE_RSA
10
11
  except ImportError:
11
12
  from oauthlib.oauth1 import SIGNATURE_RSA
13
+ import time
14
+
15
+ import urllib3
12
16
  from requests import HTTPError
13
17
  from requests_oauthlib import OAuth1, OAuth2
14
18
  from six.moves.urllib.parse import urlencode
15
- import time
16
19
  from urllib3.util import Retry
17
- import urllib3
18
20
 
19
21
  from atlassian.request_utils import get_default_logger
20
22
 
@@ -69,6 +71,9 @@ class AtlassianRestAPI(object):
69
71
  retry_status_codes=[413, 429, 503],
70
72
  max_backoff_seconds=1800,
71
73
  max_backoff_retries=1000,
74
+ backoff_factor=1.0,
75
+ backoff_jitter=1.0,
76
+ retry_with_header=True,
72
77
  ):
73
78
  """
74
79
  init function for the AtlassianRestAPI object.
@@ -102,6 +107,20 @@ class AtlassianRestAPI(object):
102
107
  wait any longer than this. Defaults to 1800.
103
108
  :param max_backoff_retries: Maximum number of retries to try before
104
109
  continuing. Defaults to 1000.
110
+ :param backoff_factor: Factor by which to multiply the backoff time (for exponential backoff).
111
+ Defaults to 1.0.
112
+ :param backoff_jitter: Random variation to add to the backoff time to avoid synchronized retries.
113
+ Defaults to 1.0.
114
+ :param retry_with_header: Enable retry logic based on the `Retry-After` header.
115
+ If set to True, the request will automatically retry if the response
116
+ contains a `Retry-After` header with a delay and has a status code of 429.
117
+ The retry delay will be extracted
118
+ from the `Retry-After` header and the request will be paused for the specified
119
+ duration before retrying. Defaults to True.
120
+ If the `Retry-After` header is not present, retries will not occur.
121
+ However, if the `Retry-After` header is missing and `backoff_and_retry` is enabled,
122
+ the retry logic will still be triggered based on the status code 429,
123
+ provided that 429 is included in the `retry_status_codes` list.
105
124
  """
106
125
  self.url = url
107
126
  self.username = username
@@ -115,21 +134,33 @@ class AtlassianRestAPI(object):
115
134
  self.cloud = cloud
116
135
  self.proxies = proxies
117
136
  self.cert = cert
137
+ self.backoff_and_retry = backoff_and_retry
138
+ self.max_backoff_retries = max_backoff_retries
139
+ self.retry_status_codes = retry_status_codes
140
+ self.max_backoff_seconds = max_backoff_seconds
141
+ self.use_urllib3_retry = int(urllib3.__version__.split(".")[0]) >= 2
142
+ self.backoff_factor = backoff_factor
143
+ self.backoff_jitter = backoff_jitter
144
+ self.retry_with_header = retry_with_header
118
145
  if session is None:
119
146
  self._session = requests.Session()
120
147
  else:
121
148
  self._session = session
122
- if backoff_and_retry and int(urllib3.__version__.split(".")[0]) >= 2:
149
+
150
+ if proxies is not None:
151
+ self._session.proxies = self.proxies
152
+
153
+ if self.backoff_and_retry and self.use_urllib3_retry:
123
154
  # Note: we only retry on status and not on any of the
124
155
  # other supported reasons
125
156
  retries = Retry(
126
157
  total=None,
127
- status=max_backoff_retries,
158
+ status=self.max_backoff_retries,
128
159
  allowed_methods=None,
129
- status_forcelist=retry_status_codes,
130
- backoff_factor=1,
131
- backoff_jitter=1,
132
- backoff_max=max_backoff_seconds,
160
+ status_forcelist=self.retry_status_codes,
161
+ backoff_factor=self.backoff_factor,
162
+ backoff_jitter=self.backoff_jitter,
163
+ backoff_max=self.max_backoff_seconds,
133
164
  )
134
165
  self._session.mount(self.url, HTTPAdapter(max_retries=retries))
135
166
  if username and password:
@@ -205,6 +236,59 @@ class AtlassianRestAPI(object):
205
236
  log.error(e)
206
237
  return None
207
238
 
239
+ def _calculate_backoff_value(self, retry_count):
240
+ """
241
+ Calculate the backoff delay for a given retry attempt.
242
+
243
+ This method computes an exponential backoff delay based on the retry count and
244
+ a configurable backoff factor. It optionally adds a random jitter to introduce
245
+ variability in the delay, which can help prevent synchronized retries in
246
+ distributed systems. The calculated backoff delay is clamped between 0 and a
247
+ maximum allowable delay (`self.max_backoff_seconds`) to avoid excessively long
248
+ wait times.
249
+
250
+ :param retry_count: int, REQUIRED: The current retry attempt number (1-based).
251
+ Determines the exponential backoff delay.
252
+ :return: float: The calculated backoff delay in seconds, adjusted for jitter
253
+ and clamped to the maximum allowable value.
254
+ """
255
+ backoff_value = self.backoff_factor * (2 ** (retry_count - 1))
256
+ if self.backoff_jitter != 0.0:
257
+ backoff_value += random.uniform(0, self.backoff_jitter) # nosec B311
258
+ return float(max(0, min(self.max_backoff_seconds, backoff_value)))
259
+
260
+ def _retry_handler(self):
261
+ """
262
+ Creates and returns a retry handler function for managing HTTP request retries.
263
+
264
+ The returned handler function determines whether a request should be retried
265
+ based on the response and retry settings.
266
+
267
+ :return: Callable[[Response], bool]: A function that takes an HTTP response object as input and
268
+ returns `True` if the request should be retried, or `False` otherwise.
269
+ """
270
+ retries = 0
271
+
272
+ def _handle(response):
273
+ nonlocal retries
274
+
275
+ if self.retry_with_header and "Retry-After" in response.headers and response.status_code == 429:
276
+ time.sleep(int(response.headers["Retry-After"]))
277
+ return True
278
+
279
+ if not self.backoff_and_retry or self.use_urllib3_retry:
280
+ return False
281
+
282
+ if retries < self.max_backoff_retries and response.status_code in self.retry_status_codes:
283
+ retries += 1
284
+ backoff_value = self._calculate_backoff_value(retries)
285
+ time.sleep(backoff_value)
286
+ return True
287
+
288
+ return False
289
+
290
+ return _handle
291
+
208
292
  def log_curl_debug(self, method, url, data=None, headers=None, level=logging.DEBUG):
209
293
  """
210
294
 
@@ -270,30 +354,32 @@ class AtlassianRestAPI(object):
270
354
  :param advanced_mode: bool, OPTIONAL: Return the raw response
271
355
  :return:
272
356
  """
357
+ url = self.url_joiner(None if absolute else self.url, path, trailing)
358
+ params_already_in_url = True if "?" in url else False
359
+ if params or flags:
360
+ if params_already_in_url:
361
+ url += "&"
362
+ else:
363
+ url += "?"
364
+ if params:
365
+ url += urlencode(params or {})
366
+ if flags:
367
+ url += ("&" if params or params_already_in_url else "") + "&".join(flags or [])
368
+ json_dump = None
369
+ if files is None:
370
+ data = None if not data else dumps(data)
371
+ json_dump = None if not json else dumps(json)
372
+
373
+ headers = headers or self.default_headers
273
374
 
375
+ retry_handler = self._retry_handler()
274
376
  while True:
275
- url = self.url_joiner(None if absolute else self.url, path, trailing)
276
- params_already_in_url = True if "?" in url else False
277
- if params or flags:
278
- if params_already_in_url:
279
- url += "&"
280
- else:
281
- url += "?"
282
- if params:
283
- url += urlencode(params or {})
284
- if flags:
285
- url += ("&" if params or params_already_in_url else "") + "&".join(flags or [])
286
- json_dump = None
287
- if files is None:
288
- data = None if not data else dumps(data)
289
- json_dump = None if not json else dumps(json)
290
377
  self.log_curl_debug(
291
378
  method=method,
292
379
  url=url,
293
380
  headers=headers,
294
- data=data if data else json_dump,
381
+ data=data or json_dump,
295
382
  )
296
- headers = headers or self.default_headers
297
383
  response = self._session.request(
298
384
  method=method,
299
385
  url=url,
@@ -306,15 +392,15 @@ class AtlassianRestAPI(object):
306
392
  proxies=self.proxies,
307
393
  cert=self.cert,
308
394
  )
309
- response.encoding = "utf-8"
395
+ continue_retries = retry_handler(response)
396
+ if continue_retries:
397
+ continue
398
+ break
310
399
 
311
- log.debug("HTTP: %s %s -> %s %s", method, path, response.status_code, response.reason)
312
- log.debug("HTTP: Response text -> %s", response.text)
400
+ response.encoding = "utf-8"
313
401
 
314
- if response.status_code == 429:
315
- time.sleep(int(response.headers["Retry-After"]))
316
- else:
317
- break
402
+ log.debug("HTTP: %s %s -> %s %s", method, path, response.status_code, response.reason)
403
+ log.debug("HTTP: Response text -> %s", response.text)
318
404
 
319
405
  if self.advanced_mode or advanced_mode:
320
406
  return response
@@ -196,6 +196,7 @@ class ServiceDesk(AtlassianRestAPI):
196
196
 
197
197
  :param issue_id_or_key: str
198
198
  :param users_list: list
199
+ :param account_list: list
199
200
  :return:
200
201
  """
201
202
  url = "rest/servicedeskapi/request/{}/participant".format(issue_id_or_key)
@@ -214,6 +215,7 @@ class ServiceDesk(AtlassianRestAPI):
214
215
 
215
216
  :param issue_id_or_key: str
216
217
  :param users_list: list
218
+ :param account_list: list
217
219
  :return:
218
220
  """
219
221
  url = "rest/servicedeskapi/request/{}/participant".format(issue_id_or_key)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: atlassian-python-api
3
- Version: 3.41.18
3
+ Version: 3.41.19
4
4
  Summary: Python Atlassian REST API Wrapper
5
5
  Home-page: https://github.com/atlassian-api/atlassian-python-api
6
6
  Download-URL: https://github.com/atlassian-api/atlassian-python-api
@@ -1 +0,0 @@
1
- 3.41.18