Skip to content

Commit 63ed27f

Browse files
authored
Merge pull request #5368 from markotoplak/pyqtgraph-0.11.1
Require pyqtgraph>=0.11.1
2 parents 0d4f3f0 + 2946c65 commit 63ed27f

File tree

5 files changed

+2
-45
lines changed

5 files changed

+2
-45
lines changed

Orange/widgets/visualize/tests/test_owlineplot.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,6 @@ def test_selection_line(self):
160160
pos_down, pos_up = QPointF(2.38, 4.84), QPointF(3.58, 4.76)
161161
mapToParent = self.widget.graph.view_box.childGroup.mapToParent
162162

163-
# On pyqtgraph < 0.11.1 mapping does not work unless the widget is shown
164-
# Delete when Orange stops supporting pyqtgraph < 0.11.1,
165-
to_and_back = self.widget.graph.view_box.childGroup.mapFromParent(
166-
mapToParent(pos_down))
167-
successful_mapping = (to_and_back - pos_down).manhattanLength() < 0.001
168-
if not successful_mapping: # on pyqtgraph < 0.11.1
169-
mapToParent = lambda x: x
170-
171163
event.buttonDownPos.return_value = mapToParent(pos_down)
172164
event.pos.return_value = mapToParent(pos_up)
173165

@@ -180,12 +172,6 @@ def test_selection_line(self):
180172
self.widget.graph.view_box.mouseClickEvent(event)
181173
self.assertListEqual(self.widget.selection, [])
182174

183-
def test_remove_old_pyqtgraph_support(self):
184-
# When 0.11.2 is released there is probably time to drop support
185-
# for pyqtgraph <= 0.11.0:
186-
# - remove test_selection_line workaround for 0.11.0
187-
self.assertLess(pyqtgraph.__version__, "0.11.2")
188-
189175
@patch("Orange.widgets.visualize.owlineplot.SEL_MAX_INSTANCES", 100)
190176
def test_select_lines_enabled(self):
191177
self.send_signal(self.widget.Inputs.data, self.data[::2])

Orange/widgets/visualize/utils/plotutils.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -508,13 +508,6 @@ def setRotateTicks(self, rotate):
508508
self.prepareGeometryChange()
509509
self.update()
510510

511-
# remove after Orange requires pyqtgraph >= 0.11.1
512-
if pg.__version__ <= "0.11.0":
513-
def generateDrawSpecs(self, p):
514-
if self.style["tickFont"]:
515-
p.setFont(self.style["tickFont"])
516-
return super().generateDrawSpecs(p)
517-
518511
def drawPicture(self, p, axisSpec, tickSpecs, textSpecs):
519512
if self.orientation in ["bottom", "top"] and self.style["rotateTicks"]:
520513
p.setRenderHint(p.Antialiasing, False)
@@ -550,15 +543,3 @@ def drawPicture(self, p, axisSpec, tickSpecs, textSpecs):
550543
self._updateMaxTextSize(max_text_size + offset)
551544
else:
552545
super().drawPicture(p, axisSpec, tickSpecs, textSpecs)
553-
554-
# remove after Orange requires pyqtgraph >= 0.11.1
555-
if pg.__version__ <= "0.11.0":
556-
def _updateMaxTextSize(self, x):
557-
if self.orientation in ["left", "right"]:
558-
self.textWidth = x
559-
if self.style["autoExpandTextSpace"] is True:
560-
self._updateWidth()
561-
else:
562-
self.textHeight = x
563-
if self.style["autoExpandTextSpace"] is True:
564-
self._updateHeight()

Orange/widgets/visualize/utils/tests/test_plotutils.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,6 @@
77
from Orange.widgets.visualize.utils.plotutils import InteractiveViewBox
88

99

10-
class TestAxisItem(unittest.TestCase):
11-
def test_remove_old_pyqtgraph_support(self):
12-
from pyqtgraph import __version__
13-
# When 0.11.2 is released there is probably time to drop support
14-
# for pyqtgraph <= 0.11.0:
15-
# - remove AxisItem.generateDrawSpecs
16-
# - remove AxisItem._updateMaxTextSize
17-
self.assertLess(__version__, "0.11.2")
18-
19-
2010
class TestInteractiveViewBox(unittest.TestCase):
2111

2212
def test_update_scale_box(self):

conda-recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ requirements:
4646
- xlsxwriter
4747
- anyqt >=0.0.11
4848
- pyqt >=5.12,!=5.15.1
49-
- pyqtgraph >=0.11.0
49+
- pyqtgraph >=0.11.1
5050
- joblib >=0.9.4
5151
- keyring
5252
- keyrings.alt

requirements-gui.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ PyQt5>=5.12,!=5.15.1 # 5.15.1 skipped because of QTBUG-87057 - affects select c
55
PyQtWebEngine>=5.12
66
AnyQt>=0.0.11
77

8-
pyqtgraph>=0.11.0
8+
pyqtgraph>=0.11.1
99
matplotlib>=2.0.0

0 commit comments

Comments
 (0)