You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In certain cirumstances jira.resources.Resource.__getattr__ enters an infinite loop resulting in stack overflow (see output below).
Is there an existing issue for this?
I have searched the existing issues
Jira Instance type
Jira Server or Data Center (Self-hosted)
Jira instance version
9.4.8 (though this is not relevant)
jira-python version
3.5.2 (latest as of today)
Python Interpreter version
3.8
Which operating systems have you used?
Linux
macOS
Windows
Reproduction steps
Set up a virtualenv and install the following
pip install jira==3.5.2 pytest==7.4.0
Save this test as test_stuff.py
fromunittestimportmockimportjirafromrequests.modelsimportResponsedeftest_stuff():
# Simulate a broken responseduff_response=Response()
duff_response.status_code=200duff_response.reason='foo'duff_response._content=b'{"something":"blah"}'withmock.patch('jira.resilientsession.ResilientSession.get', return_value=duff_response):
# Try to log in - this fails with stack overflowjira.JIRA(
'https://jira.example.net',
token_auth='thisisatoken',
validate=True,
)
Run it e.g. py.test test_stuff.py and observe the unexpected stack overflow as below
Bug summary
In certain cirumstances
jira.resources.Resource.__getattr__
enters an infinite loop resulting in stack overflow (see output below).Is there an existing issue for this?
Jira Instance type
Jira Server or Data Center (Self-hosted)
Jira instance version
9.4.8 (though this is not relevant)
jira-python version
3.5.2 (latest as of today)
Python Interpreter version
3.8
Which operating systems have you used?
Reproduction steps
test_stuff.py
py.test test_stuff.py
and observe the unexpected stack overflow as belowStack trace
Expected behaviour
No stack overflow, instead the test should fail in jira.resources.User.init with a sensible message
Additional Context
No response
The text was updated successfully, but these errors were encountered: