Skip to content

Conversation

@srl295
Copy link
Contributor

@srl295 srl295 commented Sep 16, 2025

  • also change dep for jira>=3.10.5 (may be able to be earlier, did not check - 0.22 did not have the 'new' api)

  • tested this locally as a hotpatch

  • need to test this from packaged build

Fixes: Jira failing with deprecation error
Fixes #1124

@ryneeverett
Copy link
Collaborator

ryneeverett commented Sep 16, 2025

Looks like the CI failure is simply due to jira-3.10.x not supporting python-3.9. There are two possible solutions:

  1. Reduce jira requirement to 3.9.4.
  2. Drop python-3.9. (This wouldn't be so terrible since it's support is EOL in two weeks.)

However, I wonder if upgrading the jira version was actually part of the solution for you? Generally the latest version gets installed regardless of the minimum requirement. Edit: I'd overlooked your comment about checking 0.22 before. I think changing to 3.9.4 and seeing if CI passes makes the most sense.

@srl295
Copy link
Contributor Author

srl295 commented Sep 17, 2025

Looks like the CI failure is simply due to jira-3.10.x not supporting python-3.9. There are two possible solutions:

  1. Reduce jira requirement to 3.9.4.
  2. Drop python-3.9. (This wouldn't be so terrible since it's support is EOL in two weeks.)

However, I wonder if upgrading the jira version was actually part of the solution for you? Generally the latest version gets installed regardless of the minimum requirement. Edit: I'd overlooked your comment about checking 0.22 before. I think changing to 3.9.4 and seeing if CI passes makes the most sense.

It's possible that a later library version has simply fixed this underneath (although that wasn't my reading of the issue).

I'll try 3.9.4.

Again though, i'm leaving this draft at the moment because I haven't had time to test it out end to end in production. It worked for me as a hot fix to jira.py as i mentioned.

@srl295
Copy link
Contributor Author

srl295 commented Sep 17, 2025

Oh and "I don't know who needs to hear this and do the same" but I’m bumping our (modest) sponsorship of @gothenburgbitfactory now that bugwarrior is here too!

@srl295
Copy link
Contributor Author

srl295 commented Sep 17, 2025

3.10.0 is required to get the enhanced api https://github.com/pycontribs/jira/releases/tag/3.10.0

Looks like the CI failure is simply due to jira-3.10.x not supporting python-3.9. There are two possible solutions:

  1. Reduce jira requirement to 3.9.4.
  2. Drop python-3.9. (This wouldn't be so terrible since it's support is EOL in two weeks.)

However, I wonder if upgrading the jira version was actually part of the solution for you? Generally the latest version gets installed regardless of the minimum requirement. Edit: I'd overlooked your comment about checking 0.22 before. I think changing to 3.9.4 and seeing if CI passes makes the most sense.

@ryneeverett
Copy link
Collaborator

Ah, I see now that that's when jql support was added. So I'd say:

  • change the jira requirement to >=3.10.0
  • bump requires-python (in pyproject.toml) to 3.10
  • remove references to 3.9 in .github/workflows/bugwarrior.yml so CI will pass

@srl295 srl295 marked this pull request as ready for review September 18, 2025 16:43
@srl295
Copy link
Contributor Author

srl295 commented Sep 19, 2025

okay. I still haven't been able to package this and test locally. but i've tested this same 1-line change locally as mentioned.

@ryneeverett
Copy link
Collaborator

Could use a rebase since #1123 was merged.

@srl295
Copy link
Contributor Author

srl295 commented Sep 19, 2025

Could use a rebase since #1123 was merged.

Think I merged but will rebase

…y3.9

- also change dep for jira>=3.10.5
- drop python 3.9, bump jira>=3.10.0

Fixes GothenburgBitFactory#1124

Fixes: GothenburgBitFactory#1124
Copy link
Collaborator

@ryneeverett ryneeverett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hadn't noticed that this was undrafted. Ready to merge?

@srl295
Copy link
Contributor Author

srl295 commented Sep 20, 2025

I hadn't noticed that this was undrafted. Ready to merge?

i think so… ! I didn't do the full local testing of this commit but i have tested the patch thoroughly as mentioned.

maybe a follow up to do loop-with-token in case there are more than 5k issues…

@ryneeverett ryneeverett merged commit 03ee466 into GothenburgBitFactory:develop Sep 21, 2025
7 checks passed
@srl295 srl295 deleted the fix1124-jira branch September 22, 2025 15:20
@srl295
Copy link
Contributor Author

srl295 commented Sep 23, 2025

post script: i finally rebuilt from this repo, and bugwarrior pull works again. So this PR fixed it.

@guelfey
Copy link

guelfey commented Sep 25, 2025

I got the same deprecation warning from Jira; this change leads to a different error for me:

INFO:bugwarrior.db:Service-defined UDAs exist: you can optionally use the `bugwarrior-uda` command to export a list of UDAs you can add to your taskrc file.
INFO:bugwarrior.collect:Starting to aggregate remote issues.
INFO:bugwarrior.collect:Spawning 2 workers.
INFO:bugwarrior.services:Working on [github]
INFO:bugwarrior.services:Working on [jira]
ERROR:bugwarrior.collect:Worker for [jira] failed: 'JIRA' object has no attribute 'extended_search_issues'
Traceback (most recent call last):
  File "/home/georg/bugwarrior/bugwarrior/collect.py", line 42, in _aggregate_issues
    for issue in service.issues():
  File "/home/georg/bugwarrior/bugwarrior/services/jira.py", line 437, in issues
    cases = self.jira.extended_search_issues(self.query, maxResults=False)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'JIRA' object has no attribute 'extended_search_issues'

Looking at https://github.com/pycontribs/jira/releases/tag/3.10.0 / pycontribs/jira#2326, I think the new function is simply called differently: enhanced_search_issues instead of extended_search_issues?

@srl295
Copy link
Contributor Author

srl295 commented Sep 25, 2025

I got the same deprecation warning from Jira; this change leads to a different error for me:


INFO:bugwarrior.db:Service-defined UDAs exist: you can optionally use the `bugwarrior-uda` command to export a list of UDAs you can add to your taskrc file.

INFO:bugwarrior.collect:Starting to aggregate remote issues.

INFO:bugwarrior.collect:Spawning 2 workers.

INFO:bugwarrior.services:Working on [github]

INFO:bugwarrior.services:Working on [jira]

ERROR:bugwarrior.collect:Worker for [jira] failed: 'JIRA' object has no attribute 'extended_search_issues'

Traceback (most recent call last):

  File "/home/georg/bugwarrior/bugwarrior/collect.py", line 42, in _aggregate_issues

    for issue in service.issues():

  File "/home/georg/bugwarrior/bugwarrior/services/jira.py", line 437, in issues

    cases = self.jira.extended_search_issues(self.query, maxResults=False)

            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

AttributeError: 'JIRA' object has no attribute 'extended_search_issues'

Looking at https://github.com/pycontribs/jira/releases/tag/3.10.0 / pycontribs/jira#2326, I think the new function is simply called differently: enhanced_search_issues instead of extended_search_issues?

You are right! See #1131 - I am not sure how this happened, but I was not testing what I thought I was testing.

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 this pull request may close these issues.

Jira failing with deprecation error

3 participants