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

Rename client methods #8206

Closed
1 task done
pngwn opened this issue May 3, 2024 · 0 comments · Fixed by #8209
Closed
1 task done

Rename client methods #8206

pngwn opened this issue May 3, 2024 · 0 comments · Fixed by #8209
Assignees
Labels
gradio_client Related to the one of the gradio client libraries

Comments

@pngwn
Copy link
Member

pngwn commented May 3, 2024

  • I have searched to see if a similar issue already exists.

Rename the following class methods:

  • fetch_implementation -> fetch
    • is is common for fetch 'replacements' to be referenced as this.fetch fetch correctly describes this behaviour (even though it is also the name of the platform builtin). This language is universal
  • event_source -> stream
    • the fact we use an event source here is an implementation detail, so this name is leaky. There is no requirement for this to be an instance of EventSource and indeed it isn't in the client.

Aside form these methods being more descriptive they are also nicer to work with. They are now exposed to component directly (including custom components), so this is public API and not internal.

@pngwn pngwn added the gradio_client Related to the one of the gradio client libraries label May 3, 2024
@pngwn pngwn added this to the @gradio/client 1.0 milestone May 3, 2024
@hannahblair hannahblair self-assigned this May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gradio_client Related to the one of the gradio client libraries
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants