Skip to content

Conversation

@tconkling
Copy link
Contributor

  • Renames beta_util to deprecation_util
  • adds support for deprecating experimental_ methods
  • Adds proper type annotations to the deprecation wrapper functions, which should help with IDE autocomplete

@@ -0,0 +1,121 @@
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a renamed version of beta_util_test.py. The tests are now parameterized on PrereleaseAPIType, so that they test both beta_ and experimental_ deprecation warnings.

@tconkling tconkling added the security-assessment-completed Security assessment has been completed for PR label Nov 22, 2022
has_shown_beta_warning = True
_show_beta_warning(obj_name, date)
nonlocal has_shown_graduation_warning
if not has_shown_graduation_warning:

Check failure

Code scanning / CodeQL

Potentially uninitialized local variable

Local variable 'has_shown_graduation_warning' may be used before it is initialized.
"""

has_shown_beta_warning = False
has_shown_graduation_warning = False

Check notice

Code scanning / CodeQL

Unused local variable

Variable has_shown_graduation_warning is not used.
@tconkling tconkling merged commit 02d6ded into streamlit:develop Nov 22, 2022
@tconkling tconkling deleted the tim/BetaUtilImprovements branch November 22, 2022 22:25
tconkling added a commit to tconkling/streamlit that referenced this pull request Nov 22, 2022
* develop:
  `deprecation_util.py` (formerly `beta_util.py`) (streamlit#5754)
  Hoist element message data creation out of loop (streamlit#5734)
  Fail tests when all snapshots are not committed (streamlit#5729)
  Wrap type in quotes to support lower versions of protobuf (streamlit#5746)
  Fix py_snowflake for Nightly, Release Candidate & Release (streamlit#5747)
  Add GitHub Actions configuration to Dependabot (streamlit#5722)
  Fix snowpark integration test workflow (streamlit#5736)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants