You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/changelog.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,10 @@ This is a summary of changes in ipywidgets releases. For more detailed informati
7
7
To see the full list of pull requests and issues, see the [8.0 milestone](https://github.com/jupyter-widgets/ipywidgets/milestone/30?closed=1) on GitHub, or the
8
8
[full list of changes since 7.x](https://github.com/jupyter-widgets/ipywidgets/compare/7.x...master).
9
9
10
+
See the [user migration guide](./user_migration_guides.md) for suggestions about migrating your code that uses ipywidgets to 8.0.
11
+
12
+
If you author a custom widget, please see the [migration guide](./migration_guides.md) for suggestions about migrating your widget to support ipywidgets 8.
13
+
10
14
### Users
11
15
12
16
Here are some highlights of user-visible changes in ipywidgets 8.0.
@@ -63,13 +67,17 @@ VBox([d, s])
63
67
64
68
The file upload widget has been overhauled to handle multiple files in a more useful format:
65
69
66
-
- The `.value` attribute is now a list of dictionaries, rather than a dictionary mapping the uploaded name to the content. To retrieve the original form, use `{f["name"]: f.content.tobytes() for f in uploader.value}`.
70
+
- The `.value` attribute is now a list of dictionaries, rather than a dictionary mapping the uploaded name to the content.
67
71
- The contents of each uploaded file is a [memory view](https://docs.python.org/3/library/stdtypes.html#memory-views) in the `.content` key, e.g., `uploader.value[0].content`.
68
-
- The `.data` attribute has been removed. To retrieve it, use `[f.content.tobytes() for f in uploader.value]`.
69
-
- The `.metadata` attribute has been removed. To retrieve it, use `[{k: v for k, v in f.items() if k != "content"} for f in w.value]`.
72
+
- The `.data` attribute has been removed.
73
+
- The `.metadata` attribute has been removed.
74
+
75
+
See the [user migration guide](./user_migration_guides.md#FileUpload) for details on how to migrate your code.
Many style and layout options have been added to core widgets:
@@ -117,7 +125,7 @@ We have made it easier to load widgets from content delivery networks.
117
125
118
126
- The default CDN is changed from unpkg to jsDelivr ([#3121](https://github.com/jupyter-widgets/ipywidgets/pull/3121), [#1627](https://github.com/jupyter-widgets/ipywidgets/issues/1627))
119
127
- You can use the `data-jupyter-widgets-cdn-only` attribute to load modules only from CDN ([#2792](https://github.com/jupyter-widgets/ipywidgets/pull/2792), [#2786](https://github.com/jupyter-widgets/ipywidgets/issues/2786))
120
-
- We have updated the webpack public path settings so the HTMLManager and the Jupyter Notebook extensions pull assets from wherever they are loaded, rather than only from CDN. [#3464](https://github.com/jupyter-widgets/ipywidgets/pull/3464), [#3508](https://github.com/jupyter-widgets/ipywidgets/pull/3508)
128
+
- We have updated the webpack public path settings so the HTMLManager and the Jupyter Notebook extensions pull assets from wherever they are loaded, rather than only from CDN. If you author a custom widget, we highly encourage you to apply similar changes to your widget by adapting the changes at https://github.com/jupyter-widgets/widget-cookiecutter/pull/103/files. [#3464](https://github.com/jupyter-widgets/ipywidgets/pull/3464), [#3508](https://github.com/jupyter-widgets/ipywidgets/pull/3508)
Copy file name to clipboardExpand all lines: docs/source/examples/Layout Templates.ipynb
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
"source": [
7
7
"# Using Layout Templates\n",
8
8
"\n",
9
-
"As we showed in [Layout and Styling of Jupyter widgets](Widget%20Styling.ipynb) multiple widgets can be arranged together using the flexible [GridBox](Widget%20Styling.ipynb#The-Grid-Layout) specification. However, use of the specification involves some understanding of CSS properties and may impose sharp learning curve. Here, we will describe layout templates built on top of `GridBox` that simplify creation of common widget layouts."
9
+
"As we showed in [Layout of Jupyter widgets](Widget%20Layout.ipynb), multiple widgets can be arranged together using the flexible [GridBox](Widget%20Styling.ipynb#The-Grid-Layout) specification. However, use of the specification involves some understanding of CSS properties and may impose sharp learning curve. Here, we will describe layout templates built on top of `GridBox` that simplify creation of common widget layouts."
Copy file name to clipboardExpand all lines: docs/source/migration_guides.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,8 @@ than one that contains widgets that you instantiated with ipywidgets 7.x.
27
27
For a summarized list of relevant changes, please consult the "Developers" section of the
28
28
[changelog](./changelog).
29
29
30
+
You may consider updating your widget by generating a new widget from the cookiecutter at https://github.com/jupyter-widgets/widget-cookiecutter and adapting the changes to your widget. The widget cookiecutter has been updated to use best practices in Python packaging and Jupyter Widget infrastructure.
31
+
30
32
### Updating setup.py
31
33
32
34
Start by updating the dependency in your `setup.py` or `setup.cfg` to support 8.x.
@@ -68,6 +70,10 @@ The ``ManagerBase`` class has been split into an interface type `IWidgetManager`
68
70
+ "@jupyter-widgets/base-manager": "^1",
69
71
```
70
72
73
+
### Updating the AMD module logic
74
+
75
+
We highly encourage you to update your widget's logic around generating AMD modules for the CDN with changes similar to those at https://github.com/jupyter-widgets/widget-cookiecutter/pull/103/files. These changes allow your AMD module to be hosted anywhere, rather than hardcoding the `unpkg.com` CDN, and they remove the differences between the AMD module generated for the notebook extension and the AMD module generated for the CDN.
Copy file name to clipboardExpand all lines: docs/source/user_install.md
+39-31Lines changed: 39 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ Users can install the current version of **ipywidgets** with
5
5
[pip](https://pip.pypa.io/en/stable/) or
6
6
[conda](https://conda.readthedocs.io/en/latest/).
7
7
8
-
In most cases, installing the Python `ipywidgets` package will also automatically configure classic Jupyter Notebook and JupyterLab 3.0 to display ipywidgets. With pip, do:
8
+
In most cases, installing the Python `ipywidgets` package will also automatically configure classic Jupyter Notebook and JupyterLab 3.x to display ipywidgets. With pip, do:
9
9
10
10
```bash
11
11
pip install ipywidgets
@@ -17,61 +17,52 @@ or with conda, do:
17
17
conda install -c conda-forge ipywidgets
18
18
```
19
19
20
-
Installing in classic Jupyter Notebook
21
-
--------------------------------------
22
-
23
-
Most of the time, installing `ipywidgets` automatically configures Jupyter Notebook to use widgets. The `ipywidgets` package does this by depending on the `widgetsnbextension` package, which configures the classic Jupyter Notebook to display and use widgets. If you have an old version of Jupyter Notebook installed, you may need to manually enable the ipywidgets notebook extension with:
Most of the time, installing `ipywidgets` automatically configures JupyterLab 3.x to use widgets. The `ipywidgets` package does this by depending on the `jupyterlab_widgets` package, which configures JupyterLab 3 to display and use widgets.
34
24
35
-
If your Jupyter Notebook and the IPython kernel are installed in different
25
+
If JupyterLab and the IPython kernel are installed in different
36
26
environments (for example, separate environments are providing different
37
27
Python kernels), then the installation requires two steps:
38
28
39
-
1. Install the `widgetsnbextension` package in the environment
40
-
containing the Jupyter Notebook server.
29
+
1. Install the `jupyterlab_widgets` package in the environment containing JupyterLab.
41
30
2. Install `ipywidgets` in each kernel's environment that will use ipywidgets.
42
31
43
-
For example, if using conda environments, with Jupyter Notebook installed on the
44
-
`base` environment and the kernel installed in an environment called `py36`,
32
+
For example, if using conda environments, with JupyterLab installed on the
33
+
`base` environment and the kernel installed in an environment called `pyenv`,
45
34
the commands are:
46
35
47
36
```bash
48
-
conda install -n base -c conda-forge widgetsnbextension
49
-
conda install -n py36 -c conda-forge ipywidgets
37
+
conda install -n base -c conda-forge jupyterlab_widgets
38
+
conda install -n pyenv -c conda-forge ipywidgets
50
39
```
51
40
52
-
Installing in JupyterLab 3.0
53
-
----------------------------
54
41
55
-
Most of the time, installing `ipywidgets` automatically configures JupyterLab 3.0 to use widgets. The `ipywidgets` package does this by depending on the `jupyterlab_widgets` package, version 1.0, which configures JupyterLab 3 to display and use widgets.
42
+
Installing in classic Jupyter Notebook
43
+
--------------------------------------
44
+
45
+
Most of the time, installing `ipywidgets` automatically configures Jupyter Notebook to use widgets. The `ipywidgets` package does this by depending on the `widgetsnbextension` package, which configures the classic Jupyter Notebook to display and use widgets.
56
46
57
-
If your JupyterLab and the IPython kernel are installed in different
47
+
If your Jupyter Notebook and the IPython kernel are installed in different
58
48
environments (for example, separate environments are providing different
59
49
Python kernels), then the installation requires two steps:
60
50
61
-
1. Install the `jupyterlab_widgets` package (version 1.0 or later) in the environment
62
-
containing JupyterLab.
51
+
1. Install the `widgetsnbextension` package in the environment
52
+
containing the Jupyter Notebook server.
63
53
2. Install `ipywidgets` in each kernel's environment that will use ipywidgets.
64
54
65
-
For example, if using conda environments, with JupyterLab installed on the
66
-
`base` environment and the kernel installed in an environment called `py36`,
55
+
For example, if using conda environments, with Jupyter Notebook installed on the
56
+
`base` environment and the kernel installed in an environment called `pyenv`,
67
57
the commands are:
68
58
69
59
```bash
70
-
conda install -n base -c conda-forge jupyterlab_widgets
71
-
conda install -n py36 -c conda-forge ipywidgets
60
+
conda install -n base -c conda-forge widgetsnbextension
61
+
conda install -n pyenv -c conda-forge ipywidgets
72
62
```
73
63
74
64
65
+
75
66
Installing into JupyterLab 1 or 2
76
67
---------------------------------
77
68
@@ -103,6 +94,23 @@ running the `jupyter lab clean` command which will remove the staging and
103
94
static directories from the lab directory. The location of the lab directory
104
95
can be queried by executing the command `jupyter lab path` in your terminal.
105
96
97
+
Installing into classic Jupyter Notebook 5.2 or earlier
0 commit comments