Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 396b066

Browse files
committed
Merge branch 'main' of github.com:plotly/plotly.py into unpin-requirements
2 parents 954db31 + f878224 commit 396b066

File tree

11 files changed

+26
-30
lines changed

11 files changed

+26
-30
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ below :-).
77
### Documentation PR
88
99
- [ ] I've [seen the `doc/README.md` file](https://github.com/plotly/plotly.py/blob/master/doc/README.md)
10-
- [ ] This change runs in the current version of Plotly on PyPI and targets the `doc-prod` branch OR it targets the `master` branch
10+
- [ ] This change runs in the current version of Plotly on PyPI and targets the `doc-prod` branch OR it targets the `main` branch
1111
- [ ] If this PR modifies the first example in a page or adds a new one, it is a `px` example if at all possible
1212
- [ ] Every new/modified example has a descriptive title and motivating sentence or paragraph
1313
- [ ] Every new/modified example is independently runnable

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
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+
## [6.0.1] - 2025-02-16
6+
7+
### Fixed
8+
- Fix `TypeError` when using `orjson` to serialize `pandas.NA`.
9+
510
## [6.0.0] - 2025-01-28
611

712
### Added

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ a PR as follows.
198198

199199
### Making a Development Branch
200200

201-
Third, *don't* work in the `master` branch. As soon as you get your master branch ready, run:
201+
Third, *don't* work in the `main` branch. As soon as you get your main branch ready, run:
202202

203203
**DO THIS (but change the branch name)**
204204
```bash

MANIFEST.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
include LICENSE.txt
22
include README.md
3-
include requires-install.txt
4-
include requires-express.txt
53
include plotly/package_data/widgetbundle.js

RELEASE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Manually update the versions to `X.Y.Z` in the files specified below.
3333
- Create a tag for Github release
3434
+ `git tag vX.Y.Z`
3535
+ `git push --atomic origin release-X.Y.Z vX.Y.Z`
36-
- Create a Github pull request from `release-X.Y.Z` to `master` and wait for CI to be green
36+
- Create a Github pull request from `release-X.Y.Z` to `main` and wait for CI to be green
3737

3838
### Download and QA CI Artifacts
3939

@@ -62,7 +62,7 @@ Publishing to PyPI:
6262

6363
### Merge the PR and make a Release
6464

65-
1. Merge the pull request you created above into `master`
65+
1. Merge the pull request you created above into `main`
6666
2. Go to https://github.com/plotly/plotly.py/releases and "Draft a new release"
6767
3. Enter the `vX.Y.Z` tag you created already above and make "Release title" the same string as the tag.
6868
4. Copy the changelog section for this version as the "Describe this release"
@@ -73,8 +73,8 @@ Publishing to PyPI:
7373
- `doc/python/getting-started.md`
7474
- `doc/apidoc/conf.py`
7575
- `doc/requirements.txt`
76-
2. `doc-prod` should already have been merged on a regular basis into `master`, but
77-
start by doing it first if not. Then merge `master` into `doc-prod` to deploy the doc related
76+
2. `doc-prod` should already have been merged on a regular basis into `main`, but
77+
start by doing it first if not. Then merge `main` into `doc-prod` to deploy the doc related
7878
to features in the release.
7979
3. in a clone of the [`graphing-library-docs` repo](https://github.com/plotly/graphing-library-docs):
8080
1. bump the version of Plotly.py in `_data/pyversion.json`

doc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ released, or which has just been included but not yet released.
4141
your branch off the `doc-prod` branch and open your pull request against this
4242
`doc-prod` branch.
4343
- Case of a new (not released yet) feature: start your branch / pull request
44-
against the `master` branch. `master` and `doc-prod` will be synchronized at
44+
against the `main` branch. `main` and `doc-prod` will be synchronized at
4545
release time, so that the documentation of the feature is only deployed when
4646
it is available in a released version of `plotly.py`.
4747

plotly/io/_json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ def clean_to_json_compatible(obj, **kwargs):
529529

530530
# pandas
531531
if pd is not None:
532-
if obj is pd.NaT:
532+
if obj is pd.NaT or obj is pd.NA:
533533
return None
534534
elif isinstance(obj, (pd.Series, pd.DatetimeIndex)):
535535
if numpy_allowed and obj.dtype.kind in ("b", "i", "u", "f"):

pyproject.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,14 @@ classifiers = [
3838
requires-python = ">=3.8"
3939
license = {file="LICENSE.txt"}
4040
version = "6.0.0"
41-
dynamic = ["dependencies"]
41+
dependencies = [
42+
"narwhals>=1.15.1",
43+
"packaging"
44+
]
45+
46+
[project.optional-dependencies]
47+
express = ["numpy"]
4248

43-
# TODO: check that this works
4449
[tool.setuptools.packages.find]
4550
where = ["."]
4651
include = ["plotly*", "_plotly*"]

requires-express.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

requires-install.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/test_io/test_to_from_plotly_json.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,3 +260,9 @@ def test_sanitize_json(engine):
260260
for bad, good in replacements.items():
261261
assert bad not in fig_json
262262
assert good in fig_json
263+
264+
265+
@pytest.mark.parametrize("na_value", [np.nan, pd.NaT, pd.NA])
266+
def test_na_values(engine, na_value):
267+
result = pio.to_json_plotly(na_value, engine=engine)
268+
assert result == "null"

0 commit comments

Comments
 (0)