File: Fix-graphical-init-for-work-with-Python-3.13.patch

package info (click to toggle)
pyraf 2.2.2-4~deb13u1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,664 kB
  • sloc: python: 24,944; ansic: 372; lisp: 76; makefile: 8
file content (38 lines) | stat: -rw-r--r-- 1,394 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From: Ole Streicher <olebole@debian.org>
Date: Sun, 10 Aug 2025 11:58:06 +0200
Subject: Fix graphical init for work with Python 3.13

As pointed out in https://github.com/iraf-community/pyraf/issues/182,
version 2.2.2-3 fails to work properly with Python 3.13:

    $ pyraf -c 'onedspec; splot dev$pix 34'
    [...]
      File "/usr/lib/python3/dist-packages/pyraf/gki.py", line 1423, in
__init__
        p[0:4] = [0x92, 0x49, 0x24, 0x92]
    OverflowError: Python integer 146 out of bounds for int8

    PANIC in `/usr/lib/iraf/noao/bin/x_onedspec.e': Write to IPC with
no reader

The proper solution is to apply
https://github.com/iraf-community/pyraf/pull/176; however for a minimal
fix one can just remove the line 208 from   pyraf/pyraf/gkitkbase.py.

Closes: #1110708
---
 pyraf/gkitkbase.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/pyraf/gkitkbase.py b/pyraf/gkitkbase.py
index e55fe18..e77373d 100644
--- a/pyraf/gkitkbase.py
+++ b/pyraf/gkitkbase.py
@@ -205,7 +205,6 @@ class GkiInteractiveTkBase(gki.GkiKernel, wutil.FocusEntity):
         self.colorManager.setColors(self.gwidget)
         self.wcs = irafgwcs.IrafGWcs()
         self.linestyles = gki.IrafLineStyles()
-        self.hatchfills = gki.IrafHatchFills()
         self.textAttributes = gki.TextAttributes()
         self.lineAttributes = gki.LineAttributes()
         self.fillAttributes = gki.FillAttributes()