-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Description
Please confirm the following
- I agree to follow this project's code of conduct.
- I have checked the current issues for duplicates.
- I understand that AWX is open source software provided for free and that I might not receive a timely response.
- I am NOT reporting a (potential) security vulnerability. (These should be emailed to
security@ansible.cominstead.)
Bug Summary
When trying to unpickle a DSAdapter you get a RecursionError
AWX version
master (38f0f8d)
Select the relevant components
- UI
- UI (tech preview)
- API
- Docs
- Collection
- CLI
- Other
Installation method
N/A
Modifications
no
Ansible version
N/A
Operating system
Linux
Web browser
No response
Steps to reproduce
In [15]: from awxkit.api.mixins import DSAdapter
In [16]: import pickle
In [17]: d = DSAdapter('joe', [])
In [18]: data = pickle.dumps(d)
In [19]: d2 = pickle.loads(data)
---------------------------------------------------------------------------
RecursionError Traceback (most recent call last)
Cell In[19], line 1
----> 1 d2 = pickle.loads(data)
File ~/src/3rd-party/awx/awxkit/awxkit/api/mixins/has_create.py:158, in DSAdapter.__getattr__(self, attr)
157 def __getattr__(self, attr):
--> 158 if attr in self._lookup:
159 dep = self.dependency_store[self._lookup[attr]]
160 if dep:
File ~/src/3rd-party/awx/awxkit/awxkit/api/mixins/has_create.py:158, in DSAdapter.__getattr__(self, attr)
157 def __getattr__(self, attr):
--> 158 if attr in self._lookup:
159 dep = self.dependency_store[self._lookup[attr]]
160 if dep:
[... skipping similar frames: DSAdapter.__getattr__ at line 158 (2984 times)]
File ~/src/3rd-party/awx/awxkit/awxkit/api/mixins/has_create.py:158, in DSAdapter.__getattr__(self, attr)
157 def __getattr__(self, attr):
--> 158 if attr in self._lookup:
159 dep = self.dependency_store[self._lookup[attr]]
160 if dep:
RecursionError: maximum recursion depth exceeded
Expected results
I should be able to pickle and unpickle it.
Actual results
RecursionError
Additional information
No response