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

clean-deprecated-parameters #1090

Merged
merged 18 commits into from
Apr 28, 2022
Merged

clean-deprecated-parameters #1090

merged 18 commits into from
Apr 28, 2022

Conversation

omerXfaruq
Copy link
Contributor

Closes #920

  • clean deprecated parameters
  • move possible deprecation notices under deprecation.py

@omerXfaruq
Copy link
Contributor Author

Example outputs:

gradio\gradio\deprecation.py:40: UserWarning: 'verbose is deprecated, and it has no effect
  warnings.warn(value)

gradio\gradio\deprecation.py:43: UserWarning: You have unused kwarg parameters,  please remove usage of them: {'verbse': True}
  warnings.warn(f"You have unused kwarg parameters,  please remove usage of them: {kwarg

@omerXfaruq
Copy link
Contributor Author

@abidlabs @aliabid94 we better merge this branch soon or conflicts will start to appear in an increasing fashion.

@omerXfaruq omerXfaruq force-pushed the clean-deprecated-parameters branch from 1a4b2c7 to 912623d Compare April 27, 2022 12:50
@omerXfaruq omerXfaruq force-pushed the clean-deprecated-parameters branch from 912623d to 4b75da1 Compare April 27, 2022 13:02
- resolve conflicts
- resolve conflicts
gradio/deprecation.py Outdated Show resolved Hide resolved
gradio/deprecation.py Outdated Show resolved Hide resolved
gradio/deprecation.py Outdated Show resolved Hide resolved
@abidlabs
Copy link
Member

abidlabs commented Apr 27, 2022

@farukozderim overall this looks great! I'm running into an issue when I test this though. I ran the following code:

import gradio as gr

io = gr.Interface(lambda x:x, "text", "text")
io.launch()

I got the following warning:

deprecation.py:42: UserWarning: You have unused kwarg parameters, please remove usage of them: {'label': None}

Although I'm not using any deprecated warnings. Why is this happening?

@abidlabs
Copy link
Member

Looks like the issue was that Button and StatusTracker had label parameters that were unused. So this deprecation warning was already useful in identifying those. Nice!

@abidlabs abidlabs merged commit 930c4a3 into main Apr 28, 2022
@abidlabs abidlabs deleted the clean-deprecated-parameters branch April 28, 2022 08:12
@omerXfaruq
Copy link
Contributor Author

omerXfaruq commented Apr 28, 2022

Good work & thanks for the contribution!

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 this pull request may close these issues.

Remove Deprecated Parameters
2 participants