From 17729de36e725fe345949c4e2262276420f10bf7 Mon Sep 17 00:00:00 2001 From: DivingDuck Date: Mon, 17 Jun 2024 22:16:31 +0200 Subject: [PATCH 1/3] Issue #1433. Correction of type error for G2/G3 arc moves (#1434) Fixes #1433 --- printrun/gviz.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/printrun/gviz.py b/printrun/gviz.py index f17008b4..e700d652 100644 --- a/printrun/gviz.py +++ b/printrun/gviz.py @@ -332,12 +332,12 @@ def _line_scaler(self, x): int(self.scale[1] * x[3]),) def _arc_scaler(self, x): - return (self.scale[0] * x[0], - self.scale[1] * x[1], - self.scale[0] * x[2], - self.scale[1] * x[3], - self.scale[0] * x[4], - self.scale[1] * x[5],) + return (int(self.scale[0] * x[0]), + int(self.scale[1] * x[1]), + int(self.scale[0] * x[2]), + int(self.scale[1] * x[3]), + int(self.scale[0] * x[4]), + int(self.scale[1] * x[5]),) def _drawlines(self, dc, lines, pens): scaled_lines = [self._line_scaler(l) for l in lines] From 7b199eded20826718252a17cd4210074f690cab9 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Wed, 19 Jun 2024 09:51:13 -0700 Subject: [PATCH 2/3] Replace configparser readfp with read_file (#1428) readfp() was [deprecated in Python 3.2][1] and [removed in Python 3.12][2]. read_file() is a drop-in replacement. [1]: https://github.com/python/cpython/blob/dd0e8a62df8be2a09ef6035b4c92bd9a68a7b918/Lib/configparser.py#L757-L764 [2]: https://github.com/python/cpython/commit/1fc41ae8709e20d741bd86c2345173688a5e84b0 Fixes this error with Python 3.12: ``` Traceback (most recent call last): File "/usr/bin/pronterface.py", line 62, in app = PronterApp(False) ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/printrun/pronterface.py", line 2596, in __init__ self.mainwindow = PronterWindow(self) ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/printrun/pronterface.py", line 220, in __init__ self.reload_ui() File "/usr/lib/python3.12/site-packages/printrun/pronterface.py", line 288, in reload_ui self.create_menu() File "/usr/lib/python3.12/site-packages/printrun/pronterface.py", line 862, in create_menu self.load_slic3r_configs(menus) File "/usr/lib/python3.12/site-packages/printrun/pronterface.py", line 2517, in load_slic3r_configs config = self.read_slic3r_config(configfile) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/printrun/pronterface.py", line 2562, in read_slic3r_config parser.readfp(add_header(open(configfile)), configfile) ^^^^^^^^^^^^^ AttributeError: 'RawConfigParser' object has no attribute 'readfp'. Did you mean: 'read'? ``` --- printrun/pronterface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/printrun/pronterface.py b/printrun/pronterface.py index 84489bc2..29e6be18 100644 --- a/printrun/pronterface.py +++ b/printrun/pronterface.py @@ -2559,7 +2559,7 @@ def __iter__(self): import itertools return itertools.chain([self.header], iter(self.f)) - parser.readfp(add_header(open(configfile)), configfile) + parser.read_file(add_header(open(configfile)), configfile) return parser def set_slic3r_config(self, configfile, cat, file): From 0af3755bfd543ee6f911ea489f448d8638fd61b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 18:51:58 +0200 Subject: [PATCH 3/3] ci: Bump pypa/cibuildwheel from 2.18.1 to 2.19.1 (#1431) Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.18.1 to 2.19.1. - [Release notes](https://github.com/pypa/cibuildwheel/releases) - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md) - [Commits](https://github.com/pypa/cibuildwheel/compare/v2.18.1...v2.19.1) --- updated-dependencies: - dependency-name: pypa/cibuildwheel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 56e7b2f9..59595e40 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -25,7 +25,7 @@ jobs: platforms: all - name: Build ${{ matrix.os }} wheels - uses: pypa/cibuildwheel@v2.18.1 + uses: pypa/cibuildwheel@v2.19.1 env: # we only support what's supported by wxPython, therefore we skip: # * PyPy Python implementation