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

Deprecation warnings from traitlets #1065

Open
timvink opened this issue Nov 29, 2022 · 2 comments
Open

Deprecation warnings from traitlets #1065

timvink opened this issue Nov 29, 2022 · 2 comments

Comments

@timvink
Copy link
Contributor

timvink commented Nov 29, 2022

I'm getting two deprecation warnings:

INFO     -  DeprecationWarning: 5.x style template file passed
            '/anaconda/envs/azureml_py38/lib/python3.8/site-packages/mknotebooks/templates/custom_markdown.tpl'.
            Use --template-name for the template directory with a index.<ext>.j2 file and/or
            --template-file to denote a different template.
              File "/anaconda/envs/azureml_py38/lib/python3.8/site-packages/traitlets/traitlets.py",
            line 1431, in _notify_observers
                c(event)
              File
            "/anaconda/envs/azureml_py38/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py",
            line 233, in _template_file_changed
                warnings.warn(

and

INFO     -  DeprecationWarning: Passing unrecognized arguments to
            super(HTMLExporter).__init__(template_path=['/anaconda/envs/azureml_py38/lib/python3.8/site-packages/mknotebooks/templates',
            '/home/azureuser/.local/share/jupyter/nbconvert/templates/base',
            '/anaconda/envs/azureml_py38/share/jupyter/nbconvert/templates/base',
            '/usr/local/share/jupyter/nbconvert/templates/base',
            '/usr/share/jupyter/nbconvert/templates/base']).
            object.__init__() takes exactly one argument (the instance to initialize)
            This is deprecated in traitlets 4.2.This error will be raised in a future release of
            traitlets.
              File
            "/anaconda/envs/azureml_py38/lib/python3.8/site-packages/traitlets/config/configurable.py",
            line 85, in __init__
                super().__init__(**kwargs)
              File "/anaconda/envs/azureml_py38/lib/python3.8/site-packages/traitlets/traitlets.py",
            line 1246, in __init__
                warn(

Both seem related to traitlets.

mknotebooks                        0.7.1
traitlets                                 5.3.0
mkdocs-material                           8.5.10
mkdocs-material-extensions                1.1.1
mkdocs                                    1.4.2

Tested using Python 3.8.5 and 3.9.12, both on Ubuntu 20.04

@timvink timvink changed the title Deprecation warnings Deprecation warnings with traitlets Nov 29, 2022
@timvink timvink changed the title Deprecation warnings with traitlets Deprecation warnings from traitlets Nov 29, 2022
@Lucas-C
Copy link

Lucas-C commented Jan 31, 2024

I also see the same two warnings displayed in mkdocs logs for my website: https://pyfpdf.github.io/fpdf2/

This seems raise by this piece of code: https://github.com/jupyter/nbconvert/blob/v7.14.2/nbconvert/exporters/templateexporter.py#L239

@darkopetrovic
Copy link

Annoying to see them in the output.

To hide them we can do:

python -W ignore::DeprecationWarning -m mkdocs serve

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

3 participants