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

Specify default template files with extension #639

merged 1 commit into from Aug 7, 2017


None yet
2 participants
Copy link

takluyver commented Aug 5, 2017

This should make issues like ipython/ipython#10731 less likely. At present, if you have a file in the working directory called python or rst or article (and so on) with no extension, nbconvert will try to use that as the template. Honestly, I'm surprised this hasn't come up more.

With this change, it will only look for the default template files with their extension. So you can still override it with a file called python.tpl, for instance. But that's less likely to be there accidentally than python.

@takluyver takluyver added this to the 5.3 milestone Aug 5, 2017


This comment has been minimized.

Copy link

mpacer commented Aug 7, 2017

Merging, but should we go through the trouble to also check that a .tpl is actually given in all cases (perhaps excepting CLI's)?

@mpacer mpacer merged commit a96bfdd into jupyter:master Aug 7, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

@takluyver takluyver deleted the takluyver:template-file-exts branch Aug 7, 2017


This comment has been minimized.

Copy link
Member Author

takluyver commented Aug 7, 2017

IIRC we made the extension required at one point and broke some people's code. We could go through a proper deprecation cycle to make it required, but I don't think it's worth it. Our config system also makes it difficult to treat command line options differently from options in config files or third party Python code.

@mpacer mpacer added unlogged and removed unlogged labels Aug 31, 2017

nfultz added a commit to nfultz/nb2mail that referenced this pull request Jun 8, 2018

Corresponding change to jupyter/nbconvert#639
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment