Skip to content

Commit d34ab39

Browse files
merge master into doc-prod
2 parents 75ae9ff + 6fb1052 commit d34ab39

File tree

7 files changed

+20
-11
lines changed

7 files changed

+20
-11
lines changed

Diff for: CHANGELOG.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [4.4.1] - 2019-12-10
6+
7+
### Fixed
8+
- Fixed improper JSON encoding exception when the `pillow` module not installed [#1993](https://github.com/plotly/plotly.py/pull/1993)
9+
510
## [4.4.0] - 2019-12-10
611

712
### Updated
@@ -22,8 +27,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
2227

2328
### Added
2429

25-
- Extended the plotly.express functional API with .. new functions: `px.pie`,
26-
`px.sunburst`, `px.treemap`, `px.funnel`, and `px.funnelarea` ([#1909](https://github.com/plotly/plotly.py/pull/1909)) `px.density_mapbox` and
30+
- Extended the plotly.express functional API with 7 new functions: `px.pie`,
31+
`px.sunburst`, `px.treemap`, `px.funnel`, and `px.funnel_area` ([#1909](https://github.com/plotly/plotly.py/pull/1909)) `px.density_mapbox` and
2732
`px.choropleth_mapbox` [#1937](https://github.com/plotly/plotly.py/pull/1937). Also, all mapbox functions in plotly.express have new arguments `center` and `mapbox_style` [#1937](https://github.com/plotly/plotly.py/pull/1937).
2833
- plotly.express polar plots (`scatter_polar`, `line_polar`, `bar_polar`) now
2934
have a `range_theta` keyword argument for representing only an angular

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
## Quickstart
2828

29-
`pip install plotly==4.4.0`
29+
`pip install plotly==4.4.1`
3030

3131
Inside [Jupyter notebook](https://jupyter.org/install) (installable with `pip install "notebook>=5.3" "ipywidgets>=7.2"`):
3232
```python
@@ -72,12 +72,12 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is
7272

7373
plotly.py may be installed using pip...
7474
```
75-
pip install plotly==4.4.0
75+
pip install plotly==4.4.1
7676
```
7777

7878
or conda.
7979
```
80-
conda install -c plotly plotly=4.4.0
80+
conda install -c plotly plotly=4.4.1
8181
```
8282

8383
### Jupyter Notebook Support

Diff for: binder/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
jupytext
2-
plotly==4.3.0
2+
plotly==4.4.1
33
jupyter
44
notebook
55
pandas==0.23.0

Diff for: doc/python/getting-started.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ Thanks to deep integration with the [orca](https://github.com/plotly/orca) image
4646
plotly.py may be installed using pip...
4747

4848
```
49-
$ pip install plotly==4.4.0
49+
$ pip install plotly==4.4.1
5050
```
5151
or conda.
5252

5353
```
54-
$ conda install -c plotly plotly=4.4.0
54+
$ conda install -c plotly plotly=4.4.1
5555
```
5656
This package contains everything you need to write figures to standalone HTML files.
5757

Diff for: doc/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
plotly==4.4.0
1+
plotly==4.4.1
22
jupytext==1.1.1
33
jupyter
44
notebook

Diff for: packages/python/plotly/_plotly_utils/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ def encode_as_decimal(obj):
197197
@staticmethod
198198
def encode_as_pil(obj):
199199
"""Attempt to convert PIL.Image.Image to base64 data uri"""
200-
pil = get_module("PIL")
201-
if isinstance(obj, pil.Image.Image):
200+
image = get_module("PIL.Image")
201+
if image is not None and isinstance(obj, image.Image):
202202
return ImageUriValidator.pil_image_to_uri(obj)
203203
else:
204204
raise NotEncodable

Diff for: packages/python/plotly/plotly/tests/test_core/test_utils/test_utils.py

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ def test_nan_to_null(self):
1515
expected_result = '[1, null, null, null, "platypus"]'
1616
self.assertEqual(result, expected_result)
1717

18+
def test_invalid_encode_exception(self):
19+
with self.assertRaises(TypeError):
20+
_json.dumps({"a": {1}}, cls=PlotlyJSONEncoder)
21+
1822

1923
class TestGetByPath(TestCase):
2024
def test_get_by_path(self):

0 commit comments

Comments
 (0)