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

Unable to use retries and timeout in OpaClient #29

Open
TheRealHaoLiu opened this issue Feb 26, 2025 · 0 comments · May be fixed by #30
Open

Unable to use retries and timeout in OpaClient #29

TheRealHaoLiu opened this issue Feb 26, 2025 · 0 comments · May be fixed by #30

Comments

@TheRealHaoLiu
Copy link

TheRealHaoLiu commented Feb 26, 2025

Example:

>>> from opa_client import OpaClient
>>> OpaClient(
...     host='localhost',
...     port=5000,
...     timeout=10.0,
...     retries=5,
... )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/haoli/.pyenv/versions/tower-release_4.6/lib/python3.11/site-packages/opa_client/opa.py", line 43, in __init__
    super().__init__(*args, **kwargs)
TypeError: BaseClient.__init__() got an unexpected keyword argument 'retries'

Further more it seems that in the BaseClient.init() self.timeout and self.retries are being hardcoded https://github.com/Turall/OPA-python-client/blob/master/opa_client/base.py#L44-L45

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.

1 participant