Skip to content

clean-deprecated-parameters#1090

Merged
abidlabs merged 18 commits into
mainfrom
clean-deprecated-parameters
Apr 28, 2022
Merged

clean-deprecated-parameters#1090
abidlabs merged 18 commits into
mainfrom
clean-deprecated-parameters

Conversation

@omerXfaruq
Copy link
Copy Markdown
Contributor

Closes #920

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

@omerXfaruq
Copy link
Copy Markdown
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
Copy Markdown
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
Comment thread gradio/deprecation.py Outdated
Comment thread gradio/deprecation.py Outdated
Comment thread gradio/deprecation.py Outdated
@abidlabs
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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