diff --git a/.circleci/config.yml b/.circleci/config.yml index 81c16608bd4..e77a402dc67 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -150,6 +150,15 @@ jobs: - test_optional: py: "39" + # Pandas + + python_39_pandas_2_optional: + docker: + - image: circleci/python:3.9-buster-node-browsers + steps: + - test_optional: + py: "39_pandas_2" + # Orca python_38_orca: docker: @@ -470,6 +479,7 @@ workflows: - python_37_optional - python_38_optional - python_39_optional + - python_39_pandas_2_optional - python_38_orca - python_37_percy - build-doc diff --git a/CHANGELOG.md b/CHANGELOG.md index 1efe6a315d0..0019b2ccc65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [5.14.1] - 2023-04-05 + +### Fixed + - Fixed compatibility issue with Pandas 2.0 [[#4103](https://github.com/plotly/plotly.py/pull/4103)] + ## [5.14.0] - 2023-03-29 ### Updated diff --git a/README.md b/README.md index 0e6ceb0acb9..b0a96b037eb 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ ## Quickstart -`pip install plotly==5.14.0` +`pip install plotly==5.14.1` Inside [Jupyter](https://jupyter.org/install) (installable with `pip install "jupyterlab>=3" "ipywidgets>=7.6"`): @@ -78,13 +78,13 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is plotly.py may be installed using pip... ``` -pip install plotly==5.14.0 +pip install plotly==5.14.1 ``` or conda. ``` -conda install -c plotly plotly=5.14.0 +conda install -c plotly plotly=5.14.1 ``` ### JupyterLab Support @@ -106,7 +106,7 @@ The instructions above apply to JupyterLab 3.x. **For JupyterLab 2 or earlier**, ``` # JupyterLab 2.x renderer support -jupyter labextension install jupyterlab-plotly@5.14.0 @jupyter-widgets/jupyterlab-manager +jupyter labextension install jupyterlab-plotly@5.14.1 @jupyter-widgets/jupyterlab-manager ``` Please check out our [Troubleshooting guide](https://plotly.com/python/troubleshooting/) if you run into any problems with JupyterLab. diff --git a/binder/requirements.txt b/binder/requirements.txt index 12a2b2f6ba6..5e41a8749fb 100644 --- a/binder/requirements.txt +++ b/binder/requirements.txt @@ -1,5 +1,5 @@ jupytext -plotly==5.14.0 +plotly==5.14.1 jupyter notebook pandas==1.0.3 diff --git a/doc/apidoc/conf.py b/doc/apidoc/conf.py index 3000fc5d74d..2057b92e39a 100644 --- a/doc/apidoc/conf.py +++ b/doc/apidoc/conf.py @@ -28,7 +28,7 @@ # The short X.Y version version = "" # The full version, including alpha/beta/rc tags -release = "5.14.0" +release = "5.14.1" # -- General configuration --------------------------------------------------- diff --git a/doc/python/getting-started.md b/doc/python/getting-started.md index d7b34fa5d4e..1a971bc46fb 100644 --- a/doc/python/getting-started.md +++ b/doc/python/getting-started.md @@ -58,13 +58,13 @@ We also encourage you to join the [Plotly Community Forum](http://community.plot `plotly` may be installed using `pip`: ``` -$ pip install plotly==5.14.0 +$ pip install plotly==5.14.1 ``` or `conda`: ``` -$ conda install -c plotly plotly=5.14.0 +$ conda install -c plotly plotly=5.14.1 ``` This package contains everything you need to write figures to standalone HTML files. @@ -152,7 +152,7 @@ The instructions above apply to JupyterLab 3.x. **For JupyterLab 2 or earlier**, ``` # JupyterLab 2.x renderer support -jupyter labextension install jupyterlab-plotly@5.14.0 @jupyter-widgets/jupyterlab-manager +jupyter labextension install jupyterlab-plotly@5.14.1 @jupyter-widgets/jupyterlab-manager ``` Please check out our [Troubleshooting guide](/python/troubleshooting/) if you run into any problems with JupyterLab, particularly if you are using multiple python environments inside Jupyter. diff --git a/doc/requirements.txt b/doc/requirements.txt index c287d2721d8..0d4507d0bb6 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,4 +1,4 @@ -plotly==5.14.0 +plotly==5.14.1 jupytext==1.1.1 ipywidgets==7.7.2 jupyter-client<7 diff --git a/packages/javascript/jupyterlab-plotly/package-lock.json b/packages/javascript/jupyterlab-plotly/package-lock.json index af9f7a4c8c9..aed60d423d2 100644 --- a/packages/javascript/jupyterlab-plotly/package-lock.json +++ b/packages/javascript/jupyterlab-plotly/package-lock.json @@ -1,12 +1,12 @@ { "name": "jupyterlab-plotly", - "version": "5.14.0", + "version": "5.14.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "jupyterlab-plotly", - "version": "5.14.0", + "version": "5.14.1", "license": "MIT", "dependencies": { "@jupyter-widgets/base": ">=2.0.0 <7.0.0", diff --git a/packages/javascript/jupyterlab-plotly/package.json b/packages/javascript/jupyterlab-plotly/package.json index c38e3b9a31a..56201ab6cfa 100644 --- a/packages/javascript/jupyterlab-plotly/package.json +++ b/packages/javascript/jupyterlab-plotly/package.json @@ -1,6 +1,6 @@ { "name": "jupyterlab-plotly", - "version": "5.14.0", + "version": "5.14.1", "description": "The plotly Jupyter extension", "author": "The plotly.py team", "license": "MIT", diff --git a/packages/python/plotly/_plotly_utils/tests/validators/test_pandas_series_input.py b/packages/python/plotly/_plotly_utils/tests/validators/test_pandas_series_input.py index 53e05cd7d09..ef8818181db 100644 --- a/packages/python/plotly/_plotly_utils/tests/validators/test_pandas_series_input.py +++ b/packages/python/plotly/_plotly_utils/tests/validators/test_pandas_series_input.py @@ -40,7 +40,7 @@ def color_validator(request): "uint16", "uint32", "uint64", - "float16", + # "float16", "float32", "float64", ] diff --git a/packages/python/plotly/_plotly_utils/tests/validators/test_xarray_input.py b/packages/python/plotly/_plotly_utils/tests/validators/test_xarray_input.py index b5a885a9238..ada42342d63 100644 --- a/packages/python/plotly/_plotly_utils/tests/validators/test_xarray_input.py +++ b/packages/python/plotly/_plotly_utils/tests/validators/test_xarray_input.py @@ -40,7 +40,7 @@ def color_validator(request): "uint16", "uint32", "uint64", - "float16", + # "float16", "float32", "float64", ] diff --git a/packages/python/plotly/plotly/__init__.py b/packages/python/plotly/plotly/__init__.py index 0fce98691e3..83d6aaa03e6 100644 --- a/packages/python/plotly/plotly/__init__.py +++ b/packages/python/plotly/plotly/__init__.py @@ -102,7 +102,8 @@ def plot(data_frame, kind, **kwargs): if kind == "line": return line(data_frame, **kwargs) if kind == "area": - return area(data_frame, **kwargs) + new_kwargs = {k: kwargs[k] for k in kwargs if k not in ["stacked"]} + return area(data_frame, **new_kwargs) if kind == "bar": return bar(data_frame, **kwargs) if kind == "barh": diff --git a/packages/python/plotly/plotly/_widget_version.py b/packages/python/plotly/plotly/_widget_version.py index 4719145de23..99ed389a0b4 100644 --- a/packages/python/plotly/plotly/_widget_version.py +++ b/packages/python/plotly/plotly/_widget_version.py @@ -2,4 +2,4 @@ # for automated dev builds # # It is edited by hand prior to official releases -__frontend_version__ = "^5.14.0" +__frontend_version__ = "^5.14.1" diff --git a/packages/python/plotly/plotly/express/_core.py b/packages/python/plotly/plotly/express/_core.py index a1c14ae8846..39dabba6351 100644 --- a/packages/python/plotly/plotly/express/_core.py +++ b/packages/python/plotly/plotly/express/_core.py @@ -1682,7 +1682,9 @@ def process_dataframe_timeline(args): ) # note that we are not adding any columns to the data frame here, so no risk of overwrite - args["data_frame"][args["x_end"]] = (x_end - x_start).astype("timedelta64[ms]") + args["data_frame"][args["x_end"]] = (x_end - x_start).astype( + "timedelta64[ns]" + ) / np.timedelta64(1, "ms") args["x"] = args["x_end"] del args["x_end"] args["base"] = args["x_start"] diff --git a/packages/python/plotly/plotly/tests/test_optional/test_utils/test_utils.py b/packages/python/plotly/plotly/tests/test_optional/test_utils/test_utils.py index 1bd33252425..45f72a0fe1d 100644 --- a/packages/python/plotly/plotly/tests/test_optional/test_utils/test_utils.py +++ b/packages/python/plotly/plotly/tests/test_optional/test_utils/test_utils.py @@ -15,7 +15,7 @@ import numpy as np import pandas as pd import pytz -from pandas.util.testing import assert_series_equal +from pandas.testing import assert_series_equal import json as _json import os import base64 diff --git a/packages/python/plotly/test_requirements/requirements_39_pandas_2_optional.txt b/packages/python/plotly/test_requirements/requirements_39_pandas_2_optional.txt new file mode 100644 index 00000000000..7132d8a6340 --- /dev/null +++ b/packages/python/plotly/test_requirements/requirements_39_pandas_2_optional.txt @@ -0,0 +1,21 @@ +requests==2.25.1 +tenacity==6.2.0 +pandas==2.0.0 +numpy==1.20.3 +xarray==0.17.0 +statsmodels +Pillow==8.2.0 +pytest==6.2.3 +pytz==2021.1 +ipython[all]==7.22.0 +ipywidgets==8.0.2 +ipykernel==5.5.3 +jupyter==1.0.0 +scipy==1.6.2 +Shapely==1.7.1 +geopandas==0.9.0 +pyshp==2.1.3 +matplotlib==2.2.3 +scikit-image==0.18.1 +psutil==5.7.0 +kaleido