Skip to content

Commit

Permalink
Use import_vl_convert in _spec_to_mimebundle_with_engine for better e…
Browse files Browse the repository at this point in the history
…rror message (#3168)

* Use import_vl_convert in _spec_to_mimebundle_with_engine

* one more `import_vl_convert`

* include versions of dependencies in changes

---------

Co-authored-by: mattijn <mattijn@gmail.com>
  • Loading branch information
jonmmease and mattijn authored Aug 26, 2023
1 parent 303f970 commit 9fdfae9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions altair/utils/mimebundle.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .html import spec_to_html
from ._importers import import_vl_convert
import struct


Expand Down Expand Up @@ -103,7 +104,7 @@ def _spec_to_mimebundle_with_engine(spec, format, mode, **kwargs):
normalized_engine = _validate_normalize_engine(engine, format)

if normalized_engine == "vlconvert":
import vl_convert as vlc
vlc = import_vl_convert()
from ..vegalite import SCHEMA_VERSION

# Compute VlConvert's vl_version string (of the form 'v5_2')
Expand Down Expand Up @@ -170,7 +171,7 @@ def _validate_normalize_engine(engine, format):
"""
# Try to import vl_convert
try:
import vl_convert as vlc
vlc = import_vl_convert()
except ImportError:
vlc = None

Expand Down
3 changes: 2 additions & 1 deletion doc/releases/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ Bug Fixes
Backward-Incompatible Changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Drop support for Python 3.7 which is end-of-life (#3100)
- Increase minimum required Pandas version to 0.25 (#3130)
- Hard dependencies: Increase minimum required pandas version to 0.25 (#3130)
- Soft dependencies: Increase minimum required vl-convert-python version to 0.13.0 and increase minimum required vegafusion version to 1.4.0 (#3163, #3160)

Version 5.0.1 (released May 26, 2023)
-------------------------------------
Expand Down

0 comments on commit 9fdfae9

Please sign in to comment.