Skip to content

Commit

Permalink
Checked compatibility with NumPy V2
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRaybaut committed Jun 20, 2024
1 parent 70a66e2 commit c152cd1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# PythonQwt Releases

## Version 0.12.5

- Successfully tested with Python 3.12 and NumPy 2.0: requirements have been updated
to remove the NumPy version upper bound constraint.

## Version 0.12.4

- Fixed segmentation fault issue reported in the `PlotPy` project:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
]
requires-python = ">=3.8, <4"
dependencies = ["NumPy>=1.21,<2", "QtPy>=1.9"]
dependencies = ["NumPy>=1.21", "QtPy>=1.9"]
dynamic = ["version"]

[project.urls]
Expand Down Expand Up @@ -63,7 +63,7 @@ target-version = "py38" # Assume Python 3.8

[tool.ruff.lint]
# all rules can be found here: https://beta.ruff.rs/docs/rules/
select = ["E", "F", "W", "I"]
select = ["E", "F", "W", "I", "NPY201"]
ignore = [
"E203", # space before : (needed for how black formats slicing)
]
Expand Down
2 changes: 1 addition & 1 deletion qwt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
from qwt.text import QwtText # noqa: F401
from qwt.toqimage import array_to_qimage as toQImage # noqa: F401

__version__ = "0.12.4"
__version__ = "0.12.5"
QWT_VERSION_STR = "6.1.5"


Expand Down
1 change: 0 additions & 1 deletion qwt/symbol.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from qtpy.QtGui import (
QBrush,
QPainter,
QPainterPath,
QPen,
QPixmap,
QPolygonF,
Expand Down
2 changes: 1 addition & 1 deletion qwt/tests/test_errorbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def drawSeries(self, painter, xMap, yMap, canvasRect, first, last=-1):
# draw the caps
if self.errorCap > 0:
cap = self.errorCap / 2
n, i, j = len(x), 0, 0
n, i, _j = len(x), 0, 0
lines = []
while i < n:
xi = xMap.transform(x[i])
Expand Down
5 changes: 4 additions & 1 deletion qwt/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ def fill_layout(self):
all_act.triggered.connect(lambda checked: run_all_tests(wait=False))
folder_act = QW.QAction(self.get_std_icon("DirOpenIcon"), "", self)
folder_act.setIconText("Open tests folder")
open_test_folder = lambda checked: os.startfile(TEST_PATH)

def open_test_folder(checked):
return os.startfile(TEST_PATH)

folder_act.triggered.connect(open_test_folder)
about_act = QW.QAction(self.get_std_icon("FileDialogInfoView"), "", self)
about_act.setIconText("About")
Expand Down

0 comments on commit c152cd1

Please sign in to comment.