Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected keyword argument 'paging_workaround' #1397

Closed
AnkeshThakur opened this issue May 23, 2024 · 6 comments · Fixed by #1415
Closed

unexpected keyword argument 'paging_workaround' #1397

AnkeshThakur opened this issue May 23, 2024 · 6 comments · Fixed by #1415

Comments

@AnkeshThakur
Copy link

I was trying to use this library and while trying to get it work I find that this paging_workaround is wrong key here. Is it known issue?

The cause of it wrong param being passed to Jira._get_paged().

Stacktrace:

  File "/workspace/dora/jira_project.py", line 49, in <module>
    p = jp.get_project()
        ^^^^^^^^^^^^^^^^
  File "/workspace/dora/jira_project.py", line 24, in get_project
    projects = self.jira.get_all_projects(included_archived=True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/atlassian/jira.py", line 2416, in get_all_projects
    return self.projects(included_archived, expand)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/atlassian/jira.py", line 2434, in projects
    self._get_paged(
TypeError: Jira._get_paged() got an unexpected keyword argument 'paging_workaround' 

Fix is very simple - just remove paging_workaround in this call

self._get_paged(
                     self.resource_url("project/search"),
                     params,
                     paging_workaround=True,
                 )

Associated PR: https://github.com/atlassian-api/atlassian-python-api/pull/1344/files#diff-160cdaa88ad7a2a6a2d2abd51b32052252fe4ec234c82030006888b10aca1bb0R2367

@AnkeshThakur
Copy link
Author

Happy to send the PR for the fix if I'm not the only one facing this and community agrees to it.

@gonchik
Copy link
Member

gonchik commented May 23, 2024

@AnkeshThakur feel free to send PR.
regarding that get_paged, it's mix of cloud and non-cloud method.
as I see time to wrap up

@jamesweakley
Copy link

jamesweakley commented May 23, 2024

I believe that paging workaround may have been due to #1310

So if you simply remove the parameter, it may go back to getting stuck in a loop for people with over 50 projects.

I wonder if the new parameter on _get_paged didn't make it through the merge somehow and just needs to be applied there.

@Spacetown
Copy link
Contributor

But then the parameter need to be handled in the _getPaged function.

@jamesweakley
Copy link

I think it'd be the same as you see here:

@MarcelWilson
Copy link

#1344 seems to be when the change was made to Jira._get_paged but they forgot to add the new paging logic (as @jamesweakley pointed out) found in BitbucketBase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants