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

store_history is defaulting to False instead of True #1583

Open
crew102 opened this issue May 30, 2021 · 2 comments
Open

store_history is defaulting to False instead of True #1583

crew102 opened this issue May 30, 2021 · 2 comments

Comments

@crew102
Copy link

crew102 commented May 30, 2021

Greetings. It looks like #1380 changed the default of store_history from True to False. This makes versions 6.0.2+ not backwards compatible with calls to nbconvert that used prior versions.

Incidentally, prior to version 6.0.2, the doctstring had indicated that the default was False (and not True), but it has always been True since that feature was first introduced in #1055.

@MSeal
Copy link
Contributor

MSeal commented Jun 6, 2021

Two points:

One, the value of store_history should not impact actual execution of notebooks from a headless setting. It's only used to be able to fetch the history of commands when running in a live repl. There should be no compatibility impact -- where were you seeing such an issue care about this setting?

Two, store history was turned off because it A) polluted actual local history if one is also using a real kernel in the same environment and B) because it persisted notebook contents to disk and sometimes templates or runtimes were injecting code they didn't know was staying around on the machine after cleaning up the template files. The latter was more of a concern for papermill, which used to call nbconvert to execute and would sometimes inject secrets into parameter cells. That is not longer the case but the merits of not persisting by default stand imho.

@crew102
Copy link
Author

crew102 commented Jun 11, 2021

The issue came about for me when I tried to fetch the history outside of an interactive interpreter (i.e., when running nbconvert). This used to work fine for me, but after updating to version 6.0.2, some functionality in my package (reprexpy) stopped working b/c the default was set to false.

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

No branches or pull requests

2 participants