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

bleach unconstrained dependency causes import errors #1754

Closed
ReubenFrankel opened this issue Apr 7, 2022 · 3 comments
Closed

bleach unconstrained dependency causes import errors #1754

ReubenFrankel opened this issue Apr 7, 2022 · 3 comments

Comments

@ReubenFrankel
Copy link

ReubenFrankel commented Apr 7, 2022

The bleach package was updated to version 5.0.0 earlier today. This broke importing modules from nbconvert on the latest version (6.4.5). This seems to be an issue with older 6.4 versions as well.

The bleach dependency is currently unconstrained:

"bleach",

We tested with the previous major version of bleach (4.1.0), which resolved the issue.


Steps to reproduce

(tested with Python 3.7.13 and 3.9.5)

pip install nbconvert
from nbconvert import MarkdownExporter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/private/tmp/.venv/lib/python3.7/site-packages/nbconvert/__init__.py", line 4, in <module>
    from .exporters import *
  File "/private/tmp/.venv/lib/python3.7/site-packages/nbconvert/exporters/__init__.py", line 3, in <module>
    from .html import HTMLExporter
  File "/private/tmp/.venv/lib/python3.7/site-packages/nbconvert/exporters/html.py", line 26, in <module>
    from nbconvert.filters.highlight import Highlight2HTML
  File "/private/tmp/.venv/lib/python3.7/site-packages/nbconvert/filters/__init__.py", line 6, in <module>
    from .markdown import *
  File "/private/tmp/.venv/lib/python3.7/site-packages/nbconvert/filters/markdown.py", line 23, in <module>
    from .pandoc import convert_pandoc
  File "/private/tmp/.venv/lib/python3.7/site-packages/nbconvert/filters/pandoc.py", line 1, in <module>
    from nbconvert.utils.pandoc import pandoc
  File "/private/tmp/.venv/lib/python3.7/site-packages/nbconvert/utils/pandoc.py", line 12, in <module>
    from nbconvert.utils.version import check_version
  File "/private/tmp/.venv/lib/python3.7/site-packages/nbconvert/utils/version.py", line 11, in <module>
    from packaging.version import Version
ModuleNotFoundError: No module named 'packaging'
@bollwyvl
Copy link
Contributor

bollwyvl commented Apr 7, 2022

ideally, we'd be able to add a dependency on packaging, which #1755 is exploring. it's already a dependency of many downstreams.

@bollwyvl
Copy link
Contributor

bollwyvl commented Apr 7, 2022

update: #1755 offers one approach to move forward. we'll see if others want to do alternative PRs.

@blink1073
Copy link
Contributor

Fixed by #1755

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