Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-ipywidgets for openSUSE:Factory checked in at 2023-08-20 00:11:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-ipywidgets (Old) and /work/SRC/openSUSE:Factory/.python-ipywidgets.new.1766 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ipywidgets" Sun Aug 20 00:11:56 2023 rev:14 rq:1104764 version:8.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-ipywidgets/python-ipywidgets.changes 2023-04-04 21:27:57.135758369 +0200 +++ /work/SRC/openSUSE:Factory/.python-ipywidgets.new.1766/python-ipywidgets.changes 2023-08-20 00:15:30.379387427 +0200 @@ -1,0 +2,11 @@ +Fri Aug 18 18:01:24 UTC 2023 - Ben Greiner <c...@bnavigator.de> + +- Update to 8.1.0 + * Allow CSS variables to be used as values in the Color trait by + @nurbo in #3796 + * Replace ipykernel dependency by the comm dependency by + @martinRenou in #3811 +- Release 8.0.6 + * Fix tab widget with JupyterLab 4 by @martinRenou in #3787 + +------------------------------------------------------------------- Old: ---- ipywidgets-8.0.6.tar.gz New: ---- ipywidgets-8.1.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-ipywidgets.spec ++++++ --- /var/tmp/diff_new_pack.DNJ2Au/_old 2023-08-20 00:15:31.055388757 +0200 +++ /var/tmp/diff_new_pack.DNJ2Au/_new 2023-08-20 00:15:31.059388765 +0200 @@ -17,7 +17,7 @@ Name: python-ipywidgets -Version: 8.0.6 +Version: 8.1.0 Release: 0 Summary: IPython HTML widgets for Jupyter License: BSD-3-Clause @@ -31,7 +31,7 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: unzip -Requires: python-ipykernel >= 4.5.1 +Requires: python-comm >= 0.1.3 Requires: python-ipython >= 6.1.0 Requires: python-traitlets >= 4.3.1 Requires: (python-jupyterlab_widgets >= 3.0.7 with python-jupyterlab_widgets < 4) @@ -40,7 +40,8 @@ Obsoletes: python-jupyter_ipywidgets < %{version} BuildArch: noarch # SECTION test requirements -BuildRequires: %{python_module ipykernel >= 4.5.1} +BuildRequires: %{python_module comm >= 0.1.3} +BuildRequires: %{python_module ipykernel} BuildRequires: %{python_module ipython >= 6.1.0} BuildRequires: %{python_module jsonschema} BuildRequires: %{python_module jupyterlab_widgets >= 3.0.7 with %python-jupyterlab_widgets < 4} @@ -59,8 +60,6 @@ %prep %autosetup -p1 -n ipywidgets-%{version} -# remove shebangs from test modules. Those are not standalone scripts. -sed -i '1{/env python/d}' ipywidgets/widgets/tests/*.py %build %pyproject_wheel ++++++ ipywidgets-8.0.6.tar.gz -> ipywidgets-8.1.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipywidgets-8.0.6/PKG-INFO new/ipywidgets-8.1.0/PKG-INFO --- old/ipywidgets-8.0.6/PKG-INFO 2023-03-28 17:16:38.152982000 +0200 +++ new/ipywidgets-8.1.0/PKG-INFO 2023-08-01 09:35:26.818381000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: ipywidgets -Version: 8.0.6 +Version: 8.1.0 Summary: Jupyter interactive widgets Home-page: http://jupyter.org Author: Jupyter Development Team diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipywidgets-8.0.6/ipywidgets/__init__.py new/ipywidgets-8.1.0/ipywidgets/__init__.py --- old/ipywidgets-8.0.6/ipywidgets/__init__.py 2023-03-28 17:07:35.000000000 +0200 +++ new/ipywidgets-8.1.0/ipywidgets/__init__.py 2023-07-31 14:53:52.000000000 +0200 @@ -21,17 +21,10 @@ from ._version import __version__, __protocol_version__, __jupyter_widgets_controls_version__, __jupyter_widgets_base_version__ import os +import sys from traitlets import link, dlink from IPython import get_ipython -try: - from comm import get_comm_manager -except ImportError: - def get_comm_manager(): - ip = get_ipython() - - if ip is not None and getattr(ip, "kernel", None) is not None: - return get_ipython().kernel.comm_manager from .widgets import * @@ -44,7 +37,8 @@ def register_comm_target(kernel=None): """Register the jupyter.widget comm target""" - comm_manager = get_comm_manager() + from . import comm + comm_manager = comm.get_comm_manager() if comm_manager is None: return comm_manager.register_target('jupyter.widget', Widget.handle_comm_opened) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipywidgets-8.0.6/ipywidgets/_version.py new/ipywidgets-8.1.0/ipywidgets/_version.py --- old/ipywidgets-8.0.6/ipywidgets/_version.py 2023-03-28 17:15:08.000000000 +0200 +++ new/ipywidgets-8.1.0/ipywidgets/_version.py 2023-08-01 09:35:08.000000000 +0200 @@ -1,7 +1,7 @@ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. -__version__ = '8.0.6' +__version__ = '8.1.0' __protocol_version__ = '2.1.0' __control_protocol_version__ = '1.0.0' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipywidgets-8.0.6/ipywidgets/comm.py new/ipywidgets-8.1.0/ipywidgets/comm.py --- old/ipywidgets-8.0.6/ipywidgets/comm.py 1970-01-01 01:00:00.000000000 +0100 +++ new/ipywidgets-8.1.0/ipywidgets/comm.py 2023-07-31 14:53:52.000000000 +0200 @@ -0,0 +1,33 @@ +# compatibility shim for ipykernel < 6.18 +import sys +from IPython import get_ipython +import comm + + +def requires_ipykernel_shim(): + if "ipykernel" in sys.modules: + import ipykernel + + version = ipykernel.version_info + return version < (6, 18) + else: + return False + + +def get_comm_manager(): + if requires_ipykernel_shim(): + ip = get_ipython() + + if ip is not None and getattr(ip, "kernel", None) is not None: + return get_ipython().kernel.comm_manager + else: + return comm.get_comm_manager() + + +def create_comm(*args, **kwargs): + if requires_ipykernel_shim(): + from ipykernel.comm import Comm + + return Comm(*args, **kwargs) + else: + return comm.create_comm(*args, **kwargs) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipywidgets-8.0.6/ipywidgets/tests/test_embed.py new/ipywidgets-8.1.0/ipywidgets/tests/test_embed.py --- old/ipywidgets-8.0.6/ipywidgets/tests/test_embed.py 2023-03-28 17:07:31.000000000 +0200 +++ new/ipywidgets-8.1.0/ipywidgets/tests/test_embed.py 2023-07-31 14:53:52.000000000 +0200 @@ -9,9 +9,6 @@ import traitlets -# This has a byproduct of setting up the comms -import ipykernel.ipkernel - from ..widgets import IntSlider, IntText, Text, Widget, jslink, HBox, widget_serialization, widget as widget_module from ..embed import embed_data, embed_snippet, embed_minimal_html, dependency_state diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipywidgets-8.0.6/ipywidgets/widgets/tests/test_datetime_serializers.py new/ipywidgets-8.1.0/ipywidgets/widgets/tests/test_datetime_serializers.py --- old/ipywidgets-8.0.6/ipywidgets/widgets/tests/test_datetime_serializers.py 2023-03-28 17:07:31.000000000 +0200 +++ new/ipywidgets-8.1.0/ipywidgets/widgets/tests/test_datetime_serializers.py 2023-07-31 14:53:54.000000000 +0200 @@ -1,4 +1,3 @@ -#!/usr/bin/env python # coding: utf-8 # Copyright (c) Vidar Tonaas Fauske. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipywidgets-8.0.6/ipywidgets/widgets/tests/test_traits.py new/ipywidgets-8.1.0/ipywidgets/widgets/tests/test_traits.py --- old/ipywidgets-8.0.6/ipywidgets/widgets/tests/test_traits.py 2023-03-28 17:07:31.000000000 +0200 +++ new/ipywidgets-8.1.0/ipywidgets/widgets/tests/test_traits.py 2023-07-31 16:37:23.000000000 +0200 @@ -52,6 +52,17 @@ 'hsl(0.0, .0, 0)', # hsl 'hsl( 0.5,0.3,0 )', # hsl with spaces 'hsla(10,10,10, 0.5)', # rgba with float alpha + 'var(--my-color)', # CSS variable without fallback + 'var(--my-color-with_separators)', # CSS variable without fallback + 'var(--my-color,)', # CSS variable with empty fallback + 'var(--my-color-æ)', # CSS variable with non-ascii characters + 'var(--my-color-\u1234)', # CSS variable with unicode characters + r'var(--my-color-\\1234)', # CSS variable escaped hex character + 'var(--my-color-\.)', # CSS variable with escaped characters + 'var(--my-color,black)', # CSS variable with named color fallback + 'var(--my-color, black)', # CSS variable with named color fallback + 'var(--my-color, rgb(20, 70, 50))', # CSS variable with rgb color fallback + 'var(--my-color, #fff)', # CSS variable with rgb color fallback ] _bad_values = [ "vanilla", "blues", # Invalid color names @@ -61,6 +72,12 @@ 'hsl(0.4, 512, -40)', 'rgba(0, 0, 0)', 'hsla(0, 0, 0)', + 'var(-my-color)', # wrong identifier + 'var(--my-color-\u2041)', # invalid unicode codepoint + 'var(my-color, black)', # wrong identifier + 'var(my-color-., black)', # invalid character in identifier + 'var(--my-color, vanilla)', # wrong fallback + 'var(--my-color, rgba(0,0,0))', # wrong fallback None, ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipywidgets-8.0.6/ipywidgets/widgets/tests/test_widget_datetime.py new/ipywidgets-8.1.0/ipywidgets/widgets/tests/test_widget_datetime.py --- old/ipywidgets-8.0.6/ipywidgets/widgets/tests/test_widget_datetime.py 2023-03-28 17:07:31.000000000 +0200 +++ new/ipywidgets-8.1.0/ipywidgets/widgets/tests/test_widget_datetime.py 2023-07-31 14:53:54.000000000 +0200 @@ -1,4 +1,3 @@ -#!/usr/bin/env python # coding: utf-8 # Copyright (c) Jupyter Development Team. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipywidgets-8.0.6/ipywidgets/widgets/tests/test_widget_naive_datetime.py new/ipywidgets-8.1.0/ipywidgets/widgets/tests/test_widget_naive_datetime.py --- old/ipywidgets-8.0.6/ipywidgets/widgets/tests/test_widget_naive_datetime.py 2023-03-28 17:07:31.000000000 +0200 +++ new/ipywidgets-8.1.0/ipywidgets/widgets/tests/test_widget_naive_datetime.py 2023-07-31 14:53:54.000000000 +0200 @@ -1,4 +1,3 @@ -#!/usr/bin/env python # coding: utf-8 # Copyright (c) Vidar Tonaas Fauske. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipywidgets-8.0.6/ipywidgets/widgets/tests/test_widget_time.py new/ipywidgets-8.1.0/ipywidgets/widgets/tests/test_widget_time.py --- old/ipywidgets-8.0.6/ipywidgets/widgets/tests/test_widget_time.py 2023-03-28 17:07:31.000000000 +0200 +++ new/ipywidgets-8.1.0/ipywidgets/widgets/tests/test_widget_time.py 2023-07-31 14:53:54.000000000 +0200 @@ -1,4 +1,3 @@ -#!/usr/bin/env python # coding: utf-8 # Copyright (c) Vidar Tonaas Fauske. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipywidgets-8.0.6/ipywidgets/widgets/trait_types.py new/ipywidgets-8.1.0/ipywidgets/widgets/trait_types.py --- old/ipywidgets-8.0.6/ipywidgets/widgets/trait_types.py 2023-03-28 17:07:31.000000000 +0200 +++ new/ipywidgets-8.1.0/ipywidgets/widgets/trait_types.py 2023-07-31 16:37:23.000000000 +0200 @@ -13,9 +13,11 @@ _color_names = ['aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beiae', 'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgrey', 'darkgreen', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'fuchsia', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'gray', 'grey', 'green', 'greenyellow', 'honeydew', 'hotpink', 'indianred ', 'indigo ', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgrey', 'lightgreen', 'lightpink', 'lightsalmon ', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'lime', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'navy', 'oldlace', 'olive', 'olivedrab', 'orange', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'purple', 'rebeccapurple', 'red', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'silver', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'teal', 'thistle', 'tomato', 'transparent', 'turquoise', 'violet', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen'] # Regex colors #fff and #ffffff -_color_hex_re = re.compile(r'#[a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?$') +_color_hex = r'#[a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?' +_color_hex_re = re.compile(fr'^{_color_hex}$') # Regex colors #ffff and #ffffffff (includes alpha value) -_color_hexa_re = re.compile(r'^#[a-fA-F0-9]{4}(?:[a-fA-F0-9]{4})?$') +_color_hexa = r'#[a-fA-F0-9]{4}(?:[a-fA-F0-9]{4})?' +_color_hexa_re = re.compile(fr'^{_color_hexa}$') # Helpers (float percent, int percent with optional surrounding whitespace) _color_frac_percent = r'\s*(\d+(\.\d*)?|\.\d+)?%?\s*' @@ -28,9 +30,50 @@ _color_hsla = r'hsla\({fp},{fp},{fp},{fp}\)' # Regex colors rgb/rgba/hsl/hsla -_color_rgbhsl_re = re.compile('({})|({})|({})|({})'.format( +_color_rgbhsl = '({})|({})|({})|({})'.format( _color_rgb, _color_rgba, _color_hsl, _color_hsla -).format(ip=_color_int_percent, fp=_color_frac_percent)) +).format(ip=_color_int_percent, fp=_color_frac_percent) +_color_rgbhsl_re = re.compile(_color_rgbhsl) + +# Support for CSS variables. +# For production rules, see: https://drafts.csswg.org/css-syntax-3/#tokenization + +_escape = r'\\([0-9a-fA-F]{1-6}\s?|[^0-9a-fA-F\s])' +_non_ascii = r''.join( + ( + r'\u00B7', + r'\u00C0-\u00D6', + r'\u00C0-\u00D6', + r'\u00D8-\u00F6', + r'\u00F8-\u037D', + r'\u037F-\u1FFF', + r'\u200C', + r'\u200D', + r'\u203F', + r'\u2040', + r'\u2070-\u218F', + r'\u2C00-\u2FEF', + r'\u3001-\uD7FF', + r'\uF900-\uFDCF', + r'\uFDF0-\uFFFD', + r'\u10000' + ) +) + +# Custom CSS identifier +_custom_ident = fr'--([a-zA-Z0-9_\-{_non_ascii}]|{_escape})+' + +# Matching for CSS variables with valid color fallback declaration values. +# +# A CSS variable consists of a custom identifier starting with '--'. +# The 'var()' function can be used for substituting the custom property into +# the value of another property. +# +# Here we further restrict the fallback values to be valid colors. + +_css_color = fr'({"|".join(_color_names)}|({_color_rgbhsl})|({_color_hex})|({_color_hexa}))' +_css_var_fallback_color = fr'var\({_custom_ident}(,\s*({_css_color}\s*)?)?\)' +_color_var_re = re.compile(_css_var_fallback_color) class Color(traitlets.Unicode): @@ -44,7 +87,8 @@ return value if isinstance(value, str): if (value.lower() in _color_names or _color_hex_re.match(value) or - _color_hexa_re.match(value) or _color_rgbhsl_re.match(value)): + _color_hexa_re.match(value) or _color_rgbhsl_re.match(value) or + _color_var_re.match(value)): return value self.error(obj, value) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipywidgets-8.0.6/ipywidgets/widgets/widget.py new/ipywidgets-8.1.0/ipywidgets/widgets/widget.py --- old/ipywidgets-8.0.6/ipywidgets/widgets/widget.py 2023-03-28 17:07:31.000000000 +0200 +++ new/ipywidgets-8.1.0/ipywidgets/widgets/widget.py 2023-07-31 14:53:52.000000000 +0200 @@ -6,6 +6,7 @@ in the Jupyter notebook front-end. """ import os +import sys import typing from contextlib import contextmanager from collections.abc import Iterable @@ -14,6 +15,7 @@ Any, HasTraits, Unicode, Dict, Instance, List, Int, Set, Bytes, observe, default, Container, Undefined) from json import loads as jsonloads, dumps as jsondumps +from .. import comm from base64 import standard_b64encode @@ -524,15 +526,7 @@ if self._model_id is not None: args['comm_id'] = self._model_id - try: - from comm import create_comm - except ImportError: - def create_comm(**kwargs): - from ipykernel.comm import Comm - - return Comm(**kwargs) - - self.comm = create_comm(**args) + self.comm = comm.create_comm(**args) @observe('comm') def _comm_changed(self, change): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipywidgets-8.0.6/ipywidgets.egg-info/PKG-INFO new/ipywidgets-8.1.0/ipywidgets.egg-info/PKG-INFO --- old/ipywidgets-8.0.6/ipywidgets.egg-info/PKG-INFO 2023-03-28 17:16:38.000000000 +0200 +++ new/ipywidgets-8.1.0/ipywidgets.egg-info/PKG-INFO 2023-08-01 09:35:26.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: ipywidgets -Version: 8.0.6 +Version: 8.1.0 Summary: Jupyter interactive widgets Home-page: http://jupyter.org Author: Jupyter Development Team diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipywidgets-8.0.6/ipywidgets.egg-info/SOURCES.txt new/ipywidgets-8.1.0/ipywidgets.egg-info/SOURCES.txt --- old/ipywidgets-8.0.6/ipywidgets.egg-info/SOURCES.txt 2023-03-28 17:16:38.000000000 +0200 +++ new/ipywidgets-8.1.0/ipywidgets.egg-info/SOURCES.txt 2023-08-01 09:35:26.000000000 +0200 @@ -6,6 +6,7 @@ setup.py ipywidgets/__init__.py ipywidgets/_version.py +ipywidgets/comm.py ipywidgets/embed.py ipywidgets/state.schema.json ipywidgets/view.schema.json diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipywidgets-8.0.6/ipywidgets.egg-info/requires.txt new/ipywidgets-8.1.0/ipywidgets.egg-info/requires.txt --- old/ipywidgets-8.0.6/ipywidgets.egg-info/requires.txt 2023-03-28 17:16:38.000000000 +0200 +++ new/ipywidgets-8.1.0/ipywidgets.egg-info/requires.txt 2023-08-01 09:35:26.000000000 +0200 @@ -1,4 +1,4 @@ -ipykernel>=4.5.1 +comm>=0.1.3 ipython>=6.1.0 traitlets>=4.3.1 widgetsnbextension~=4.0.7 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ipywidgets-8.0.6/setup.cfg new/ipywidgets-8.1.0/setup.cfg --- old/ipywidgets-8.0.6/setup.cfg 2023-03-28 17:16:38.153421400 +0200 +++ new/ipywidgets-8.1.0/setup.cfg 2023-08-01 09:35:26.818381000 +0200 @@ -31,7 +31,7 @@ zip_safe = False packages = find: install_requires = - ipykernel>=4.5.1 + comm>=0.1.3 ipython>=6.1.0 traitlets>=4.3.1 widgetsnbextension~=4.0.7