Skip to content

Conversation

@tconkling
Copy link
Contributor

@tconkling tconkling commented Nov 29, 2022

Renames memo to cache_data, and singleton to cache_resource.

These are still called @st.experimental_memo and @st.experimental_singleton in the public API. Deprecation-related changes; those will come in a future PR.

- Move CacheType out of cache_errors.py, since it's not intrinsically error-related
- CacheType.value is no longer the public API name of the decorator it refers to. Instead, `get_decorator_api_name` implements this mapping explicitly.
* tim/CacheTypeEnumSanity:
  Blah, circular imports. Move back to cache_errors
  CacheType changes

# Conflicts:
#	lib/streamlit/runtime/caching/cache_errors.py
* develop: (25 commits)
  Fix CORS acronym in docstring (streamlit#5727)
  Add integration tests for Snowpark (streamlit#5543)
  Release/1.15.0 (streamlit#5720)
  Add audit_frontend_dependencies script to CODEOWNERS (streamlit#5708)
  Add label_visibility option for st.checkbox (streamlit#5705)
  Display existing column names in st.map exception and make st.map work with capital letters (streamlit#5679)
  Plotly Customization (streamlit#5681)
  Turn off theme for now (streamlit#5701)
  Add all vendored code to `make notices` (streamlit#5704)
  Audit frontend licenses (streamlit#5664)
  Surround labels in quotes (streamlit#5703)
  Add info about voting on features (streamlit#5660)
  Update issue labeling scheme to adopt new standards (streamlit#5702)
  Cached media (audio+video) replay (streamlit#5695)
  Fix docstring line wrap (streamlit#5698)
  Use specialized assertion functions (streamlit#5680)
  Release 1.14.1 (streamlit#5693)
  Image replay in cached functions (streamlit#5675)
  Add docstrings for `experimental_allow_widgets` (streamlit#5670)
  Remove `st.write` from `CachedStFunctionWarning` (streamlit#5669)
  ...
* tim/CLICleanup:
  Fix CORS acronym in docstring (streamlit#5727)
  Add integration tests for Snowpark (streamlit#5543)
  Release/1.15.0 (streamlit#5720)
  more!
  more f-strings
  cli.py: types, f-strings, fixes
* develop:
  cli.py cleanup (streamlit#5737)
  Add CI job to enforce security assessments (streamlit#5709)
* develop:
  cache_utils.get_decorator_api_name util (streamlit#5721)
  Add blocking tests to release workflow (streamlit#5732)
# By Abhik Lodh (1) and others
# Via GitHub
* develop:
  memo_test/singleton_test: ensure ScriptRunCtx exists (streamlit#5739)
  Update loadApp command timeout (streamlit#5731)
  Allow emojis with variant selectors to be validated (streamlit#5583)

# Conflicts:
#	lib/tests/streamlit/runtime/caching/cache_data_api_test.py
#	lib/tests/streamlit/runtime/caching/cache_resource_api_test.py
* 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)
* develop:
  Improve error message when widgets of different types have the same key (streamlit#5748)
  Add a new make target to only install build dependencies (streamlit#5755)
  Fix camera_input flaky test (hopefully) (streamlit#5714)
  Fix py_snowflake job for Nightly Release (streamlit#5751)
* develop:
  Use newer annotations features in caching modules (streamlit#5738)
  Add links for workflow failure slack messages (streamlit#5772)
  Refactor AppSession to simplify improving reconnect behavior (streamlit#5782)
  Fixing component-template typecheck failure (streamlit#5780)
@tconkling tconkling requested a review from kajarenc November 29, 2022 20:16
@tconkling tconkling added the security-assessment-completed Security assessment has been completed for PR label Nov 29, 2022

def get_function_cache(self, function_key: str) -> Cache:
return _memo_caches.get_cache(
return _data_caches.get_cache(
Copy link
Collaborator

Choose a reason for hiding this comment

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

it is ironic that in the case of full naming this line should look like cache_data_caches.get_cache.
Cache for the Cache God!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

& Data for the Data Throne!

@tconkling tconkling merged commit ec4d3ce into streamlit:feature/ReleaseCacheV2 Nov 30, 2022
@tconkling tconkling deleted the tim/CacheRenaming branch November 30, 2022 18:04
tconkling added a commit to tconkling/streamlit that referenced this pull request Nov 30, 2022
* feature/ReleaseCacheV2:
  Rename: cache_data, cache_resource (streamlit#5785)
  Pin pyflakes in autoflake hook (streamlit#5790)
  Fix plotly height attributes and useContainerWidth (streamlit#5779)
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