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

Auto generated use of the client with context manager is wrong #999

Open
idan3 opened this issue Mar 12, 2024 · 0 comments
Open

Auto generated use of the client with context manager is wrong #999

idan3 opened this issue Mar 12, 2024 · 0 comments

Comments

@idan3
Copy link

idan3 commented Mar 12, 2024

There should be a new instance every time we use the with statement. because if not the next time you use the client you'll get "Cannot reopen a client instance, once it has been closed."

Like in this example you should write in the docs:
with Client(base_url="Somthing") as client:
and not:
with client as client:

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

No branches or pull requests

1 participant