Accepting request 987755 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/987755 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-bokeh?expand=0&rev=36
This commit is contained in:
commit
487772fd08
42
bokeh-pr12218-Pillow9.2.patch
Normal file
42
bokeh-pr12218-Pillow9.2.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From b86d5458cbf6d371013a8ced744b262460005e23 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mateusz Paprocki <mattpap@gmail.com>
|
||||||
|
Date: Wed, 6 Jul 2022 14:59:48 +0200
|
||||||
|
Subject: [PATCH] Robustify a unit test of Image.transform()
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/unit/bokeh/core/property/test_visual.py | 14 +++++++++-----
|
||||||
|
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/unit/bokeh/core/property/test_visual.py b/tests/unit/bokeh/core/property/test_visual.py
|
||||||
|
index 3f293642b56..37620d35c1d 100644
|
||||||
|
--- a/tests/unit/bokeh/core/property/test_visual.py
|
||||||
|
+++ b/tests/unit/bokeh/core/property/test_visual.py
|
||||||
|
@@ -21,6 +21,7 @@
|
||||||
|
import datetime
|
||||||
|
from io import BytesIO
|
||||||
|
from pathlib import Path
|
||||||
|
+from typing import Literal
|
||||||
|
|
||||||
|
# External imports
|
||||||
|
import numpy as np
|
||||||
|
@@ -284,12 +285,15 @@ def test_transform_numpy(self) -> None:
|
||||||
|
assert prop.transform(data) == expected
|
||||||
|
|
||||||
|
@pytest.mark.parametrize('typ', ('png', 'gif', 'tiff'))
|
||||||
|
- def test_transform_PIL(self, typ) -> None:
|
||||||
|
+ def test_transform_PIL(self, typ: Literal["png", "gif", "tiff"]) -> None:
|
||||||
|
image = PIL.Image.new("RGBA", size=(50, 50), color=(155, 0, 0))
|
||||||
|
- out = BytesIO()
|
||||||
|
- image.save(out, typ)
|
||||||
|
- value = PIL.Image.open(out)
|
||||||
|
- expected = "data:image/%s;base64," % typ + base64.b64encode(out.getvalue()).decode('ascii')
|
||||||
|
+ out0 = BytesIO()
|
||||||
|
+ image.save(out0, typ)
|
||||||
|
+
|
||||||
|
+ value = PIL.Image.open(out0)
|
||||||
|
+ out1 = BytesIO()
|
||||||
|
+ value.save(out1, typ)
|
||||||
|
+ expected = "data:image/%s;base64," % typ + base64.b64encode(out1.getvalue()).decode('ascii')
|
||||||
|
|
||||||
|
prop = bcpv.Image()
|
||||||
|
assert prop.transform(value) == expected
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 7 17:32:06 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Add bokeh-pr12218-Pillow9.2.patch for fixing failures with
|
||||||
|
Pillow 9.2
|
||||||
|
* gh#bokeh/bokeh#12216
|
||||||
|
* gh#bokeh/bokeh#12218
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun May 29 15:02:34 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
|
Sun May 29 15:02:34 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
|
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
%define skip_python36 1
|
|
||||||
%bcond_without tests
|
%bcond_without tests
|
||||||
Name: python-bokeh
|
Name: python-bokeh
|
||||||
Version: 2.4.3
|
Version: 2.4.3
|
||||||
@ -27,6 +26,8 @@ License: BSD-3-Clause
|
|||||||
URL: https://github.com/bokeh/bokeh/
|
URL: https://github.com/bokeh/bokeh/
|
||||||
Source0: https://files.pythonhosted.org/packages/source/b/bokeh/bokeh-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/b/bokeh/bokeh-%{version}.tar.gz
|
||||||
Source1: https://raw.githubusercontent.com/bokeh/bokeh/%{version}/conftest.py
|
Source1: https://raw.githubusercontent.com/bokeh/bokeh/%{version}/conftest.py
|
||||||
|
#PATCH-FIX-UPSTREAM bokeh-pr12218-Pillow9.2.patch gh#bokeh/bokeh#12218
|
||||||
|
Patch1: https://github.com/bokeh/bokeh/pull/12218.patch#/bokeh-pr12218-Pillow9.2.patch
|
||||||
BuildRequires: %{python_module Jinja2 >= 2.9}
|
BuildRequires: %{python_module Jinja2 >= 2.9}
|
||||||
BuildRequires: %{python_module Pillow >= 7.1.0}
|
BuildRequires: %{python_module Pillow >= 7.1.0}
|
||||||
BuildRequires: %{python_module PyYAML >= 3.10}
|
BuildRequires: %{python_module PyYAML >= 3.10}
|
||||||
|
Loading…
Reference in New Issue
Block a user