-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fix no_update caching issue (#1014) #1019
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
Fix no_update caching issue (#1014) #1019
Conversation
# Conflicts: # dash-renderer/package-lock.json
# Conflicts: # dash-renderer/package-lock.json
Hmm. It's failing some CI tests because its definition of |
@ProbonoBonobo thanks for bringing up the issue, and for giving the fix a shot! I decided to just go for an |
Probably the better solution, I agree. I wanted the @alexcjohnson The contributor checklist is super useful by the way, but I'm wondering if Plotly has published a more comprehensive "How To" guide to setting up the testing environment? I had trouble running the primary test suite, even after locating and building |
Ah interesting - Is there anything else specific you can share about what additional steps you had to figure out to get the integration tests to run? Or, even better, would you like to make a PR to improve |
Contributor Checklist
optionals
CHANGELOG.md
This closes #1014 by modifying the type signature of
dash._NoUpdate
toenum.Enum
and pointingdash.no_update
to an enumerated attribute of this class. This ensures thatis
still works on cached responses, which currently lose their identity when memoized withpickle.dumps
, and gives stronger assurance thata is b
returnsTrue
whena
andb
are both aliases ofdash.no_update
.Does this change fit within the scope of an existing test fixture? I wanted to add a unit test, but I didn't see a test fixture that pertained to HTTP Responses (and grepping "no_update" returned nothing). To make it easier to test this, it's probably sufficient to check that a no_response object obeys singleton mechanics after pickled to a string, e.g.:
(Note that it willl print
False
when executed in a Python REPL due to the implementation ofenum.Enum
, which binds to the module scope. When executed from a file, though, it printsTrue
as expected.)