Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] krita: fix scripts not working with python3.13
@ 2025-01-14 12:27 dataCobra
  2025-01-14 12:49 ` ahesford
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: dataCobra @ 2025-01-14 12:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 607 bytes --]

There is a new pull request by dataCobra against master on the void-packages repository

https://github.com/dataCobra/void-packages krita
https://github.com/void-linux/void-packages/pull/53965

krita: fix scripts not working with python3.13
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl

[ci skip]


A patch file from https://github.com/void-linux/void-packages/pull/53965.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-krita-53965.patch --]
[-- Type: text/x-diff, Size: 3516 bytes --]

From bd2696fdc36ed3da2262312cf9dacb420426e209 Mon Sep 17 00:00:00 2001
From: dataCobra <datacobra@thinkbot.de>
Date: Tue, 14 Jan 2025 13:15:37 +0100
Subject: [PATCH] krita: fix scripts not working with python3.13

---
 srcpkgs/krita/patches/python-3.13.patch | 56 +++++++++++++++++++++++--
 srcpkgs/krita/template                  |  2 +-
 2 files changed, 54 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/krita/patches/python-3.13.patch b/srcpkgs/krita/patches/python-3.13.patch
index 6714059895d0ff..0a23a63adcea44 100644
--- a/srcpkgs/krita/patches/python-3.13.patch
+++ b/srcpkgs/krita/patches/python-3.13.patch
@@ -115,6 +115,56 @@ index fb309bd0b8..aec47da239 100644
       */
      static bool setPath(const QStringList& scriptPaths);
  
--- 
-2.45.2
-
+diff --git a/plugins/extensions/pykrita/plugin/krita/excepthook.py b/plugins/extensions/pykrita/plugin/krita/excepthook.py
+index 029d5d3cb93..dfaeb560a37 100644
+--- a/plugins/extensions/pykrita/plugin/krita/excepthook.py
++++ b/plugins/extensions/pykrita/plugin/krita/excepthook.py
+@@ -11,7 +11,7 @@ Things to extend: Clicking on the filename should open an editor.
+ Things to consider: Mail exceptions, copy to clipboard or send to bug tracker.
+ """
+ import sys
+-import cgitb
++import traceback
+ import atexit
+ 
+ from PyQt5.QtCore import pyqtSlot, Qt
+@@ -61,7 +61,7 @@ class ExceptHookDialog(QDialog):
+             self.setWindowTitle(self.windowTitle() + ": " + title)
+         msg = "%s: %s" % (exc_type.__name__, exc_obj)
+         self.ui.exceptionLabel.setText(msg)
+-        html = cgitb.text((exc_type, exc_obj, exc_tb))
++        html = traceback.format_exception(exc_type, exc_obj, exc_tb).splitlines()
+         self.ui.tracebackBrowser.setText(html)
+         self.resize(650, 350)  # give enough space to see the backtrace better
+ 
+@@ -74,7 +74,7 @@ if __name__ == "__main__":
+     # Some tests:
+     app = QApplication(sys.argv)
+     install()
+-    print("Triggering error 1")
++    print("Triggering error 1")f
+     try:
+         fail = 1 / 0
+     except:
+diff --git a/plugins/extensions/pykrita/plugin/krita/excepthook.py b/plugins/extensions/pykrita/plugin/krita/excepthook.py
+index dfaeb560a37..a6b7fafc4f6 100644
+--- a/plugins/extensions/pykrita/plugin/krita/excepthook.py
++++ b/plugins/extensions/pykrita/plugin/krita/excepthook.py
+@@ -61,7 +61,7 @@ class ExceptHookDialog(QDialog):
+             self.setWindowTitle(self.windowTitle() + ": " + title)
+         msg = "%s: %s" % (exc_type.__name__, exc_obj)
+         self.ui.exceptionLabel.setText(msg)
+-        html = traceback.format_exception(exc_type, exc_obj, exc_tb).splitlines()
++        html = "\n".join(traceback.format_exception(exc_type, exc_obj, exc_tb))
+         self.ui.tracebackBrowser.setText(html)
+         self.resize(650, 350)  # give enough space to see the backtrace better
+ 
+@@ -74,7 +74,7 @@ if __name__ == "__main__":
+     # Some tests:
+     app = QApplication(sys.argv)
+     install()
+-    print("Triggering error 1")f
++    print("Triggering error 1")
+     try:
+         fail = 1 / 0
+     except:
diff --git a/srcpkgs/krita/template b/srcpkgs/krita/template
index 9b69726d67dcaf..b151a7bdc0119f 100644
--- a/srcpkgs/krita/template
+++ b/srcpkgs/krita/template
@@ -1,7 +1,7 @@
 # Template file for 'krita'
 pkgname=krita
 version=5.2.6
-revision=2
+revision=3
 build_style=cmake
 configure_args="-Wno-dev -DBUILD_TESTING=OFF -DENABLE_UPDATERS=OFF"
 hostmakedepends="extra-cmake-modules gettext pkg-config python3

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: krita: fix scripts not working with python3.13
  2025-01-14 12:27 [PR PATCH] krita: fix scripts not working with python3.13 dataCobra
@ 2025-01-14 12:49 ` ahesford
  2025-01-14 12:52 ` dataCobra
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ahesford @ 2025-01-14 12:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 162 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/53965#issuecomment-2589830157

Comment:
Why was CI skipped?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: krita: fix scripts not working with python3.13
  2025-01-14 12:27 [PR PATCH] krita: fix scripts not working with python3.13 dataCobra
  2025-01-14 12:49 ` ahesford
@ 2025-01-14 12:52 ` dataCobra
  2025-01-14 13:47 ` ahesford
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dataCobra @ 2025-01-14 12:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 225 bytes --]

New comment by dataCobra on void-packages repository

https://github.com/void-linux/void-packages/pull/53965#issuecomment-2589836131

Comment:
Because building Krita does take a long time. (Same as Thunderbird I would think)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: krita: fix scripts not working with python3.13
  2025-01-14 12:27 [PR PATCH] krita: fix scripts not working with python3.13 dataCobra
  2025-01-14 12:49 ` ahesford
  2025-01-14 12:52 ` dataCobra
@ 2025-01-14 13:47 ` ahesford
  2025-01-15 12:46 ` [PR REVIEW] " sgn
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ahesford @ 2025-01-14 13:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 261 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/53965#issuecomment-2589957737

Comment:
Don't try to guage build times on CI and preempt testing, just let it build.

Also, stop skipping CI on Thunderbird.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR REVIEW] krita: fix scripts not working with python3.13
  2025-01-14 12:27 [PR PATCH] krita: fix scripts not working with python3.13 dataCobra
                   ` (2 preceding siblings ...)
  2025-01-14 13:47 ` ahesford
@ 2025-01-15 12:46 ` sgn
  2025-01-15 12:47 ` sgn
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2025-01-15 12:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 176 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/53965#discussion_r1916587710

Comment:
Does it really have an `f` here?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR REVIEW] krita: fix scripts not working with python3.13
  2025-01-14 12:27 [PR PATCH] krita: fix scripts not working with python3.13 dataCobra
                   ` (3 preceding siblings ...)
  2025-01-15 12:46 ` [PR REVIEW] " sgn
@ 2025-01-15 12:47 ` sgn
  2025-01-15 13:07 ` ahesford
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2025-01-15 12:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 225 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/53965#discussion_r1916590441

Comment:
This patch likely created twice, and apply directly on each other, please change.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR REVIEW] krita: fix scripts not working with python3.13
  2025-01-14 12:27 [PR PATCH] krita: fix scripts not working with python3.13 dataCobra
                   ` (4 preceding siblings ...)
  2025-01-15 12:47 ` sgn
@ 2025-01-15 13:07 ` ahesford
  2025-02-03  8:57 ` [PR PATCH] [Updated] krita: update to 5.2.9 dataCobra
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ahesford @ 2025-01-15 13:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 283 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/53965#discussion_r1916622849

Comment:
This is a major reason we don't want submitters skipping CI. Remove the `[ci skip]` from your comment and let our tests do their jobs.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] krita: update to 5.2.9.
  2025-01-14 12:27 [PR PATCH] krita: fix scripts not working with python3.13 dataCobra
                   ` (5 preceding siblings ...)
  2025-01-15 13:07 ` ahesford
@ 2025-02-03  8:57 ` dataCobra
  2025-02-03  9:05 ` dataCobra
  2025-02-03 13:06 ` [PR PATCH] [Merged]: " Johnnynator
  8 siblings, 0 replies; 10+ messages in thread
From: dataCobra @ 2025-02-03  8:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 693 bytes --]

There is an updated pull request by dataCobra against master on the void-packages repository

https://github.com/dataCobra/void-packages krita
https://github.com/void-linux/void-packages/pull/53965

krita: update to 5.2.9.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl

The new version came out some days ago. I've updated the commit and the python-3.13 patch is no longer necessary.


A patch file from https://github.com/void-linux/void-packages/pull/53965.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-krita-53965.patch --]
[-- Type: text/x-diff, Size: 6119 bytes --]

From f71b8821cc6d1f490c87742e6a193acab67b143a Mon Sep 17 00:00:00 2001
From: dataCobra <datacobra@thinkbot.de>
Date: Mon, 3 Feb 2025 09:57:24 +0100
Subject: [PATCH] krita: update to 5.2.9.

---
 srcpkgs/krita/patches/python-3.13.patch | 120 ------------------------
 srcpkgs/krita/template                  |   6 +-
 2 files changed, 3 insertions(+), 123 deletions(-)
 delete mode 100644 srcpkgs/krita/patches/python-3.13.patch

diff --git a/srcpkgs/krita/patches/python-3.13.patch b/srcpkgs/krita/patches/python-3.13.patch
deleted file mode 100644
index 6714059895d0ff..00000000000000
--- a/srcpkgs/krita/patches/python-3.13.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From 0f43ec3158225092f6a02422eb90c56421326570 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
-Date: Tue, 18 Jun 2024 22:05:34 +0200
-Subject: [PATCH] Changes to build pykrita with Python 3.13
-
-Python 3.11 deprecated Py_SetPath() in 2022 and Python 3.13 removed it.
-Instead one needs to use the new PyConfig API (PEP 587) added to Python
-3.8.
-
-Fix: #488680
----
- .../extensions/pykrita/plugin/utilities.cpp   | 61 +++++++++++++++++--
- plugins/extensions/pykrita/plugin/utilities.h |  4 +-
- 2 files changed, 57 insertions(+), 8 deletions(-)
-
-diff --git a/plugins/extensions/pykrita/plugin/utilities.cpp b/plugins/extensions/pykrita/plugin/utilities.cpp
-index 4f58183238..1e497b2681 100644
---- a/plugins/extensions/pykrita/plugin/utilities.cpp
-+++ b/plugins/extensions/pykrita/plugin/utilities.cpp
-@@ -19,8 +19,10 @@
- #include <cmath>
- #include <Python.h>
- 
-+#include <QDebug>
- #include <QDir>
- #include <QLibrary>
-+#include <QProcessEnvironment>
- #include <QString>
- #include <QStringList>
- #include <QVector>
-@@ -412,18 +414,65 @@ bool Python::setPath(const QStringList& scriptPaths)
-         joinedPaths = joinedPaths + pathSeparator + originalPath;
-     }
-     dbgScript << "Setting python paths:" << joinedPaths;
-+
- #ifdef Q_OS_WIN
--    QVector<wchar_t> joinedPathsWChars(joinedPaths.size() + 1, 0);
--    joinedPaths.toWCharArray(joinedPathsWChars.data());
--    Py_SetPath(joinedPathsWChars.data());
-+    PyStatus status;
-+    PyConfig config;
-+    PyConfig_InitPythonConfig(&config);
-+
-+    for (const QString& path : joinedPaths.split(pathSeparator)) {
-+        status = PyWideStringList_Append(&config.module_search_paths, path.toStdWString().c_str());
-+        if (PyStatus_Exception(status)) {
-+            qDebug() << "Error appending to PyWideStringList:" << status.err_msg;
-+            dbgScript << "Error appending to PyWideStringList";
-+            return false;
-+        }
-+    }
-+
-+    config.module_search_paths_set = true;
-+    qDebug() << "Set module_search_paths";
-+
-+    status = Py_InitializeFromConfig(&config);
-+    if (PyStatus_Exception(status)) {
-+        qDebug() << "Cannot initialize Py_InitializeFromConfig:" << status.err_msg;
-+        Py_ExitStatusException(status);
-+        PyConfig_Clear(&config);
-+        dbgScript << "Cannot initialize Py_InitializeFromConfig config";
-+        return false;
-+    }
-+
-+    PyConfig_Clear(&config);
- #else
-     if (runningInBundle) {
--        QVector<wchar_t> joinedPathsWChars(joinedPaths.size() + 1, 0);
--        joinedPaths.toWCharArray(joinedPathsWChars.data());
--        Py_SetPath(joinedPathsWChars.data());
-+        PyStatus status;
-+        PyConfig config;
-+        PyConfig_InitPythonConfig(&config);
-+
-+        for (const QString& path : joinedPaths.split(pathSeparator)) {
-+            status = PyWideStringList_Append(&config.module_search_paths, path.toStdWString().c_str());
-+            if (PyStatus_Exception(status)) {
-+                qDebug() << "Error appending to PyWideStringList:" << status.err_msg;
-+                dbgScript << "Error appending to PyWideStringList";
-+                return false;
-+            }
-+        }
-+
-+        config.module_search_paths_set = true;
-+
-+        status = Py_InitializeFromConfig(&config);
-+        if (PyStatus_Exception(status)) {
-+            Py_ExitStatusException(status);
-+            qDebug() << "Cannot initialize Py_InitializeFromConfig 2:" << status.err_msg;
-+            PyConfig_Clear(&config);
-+            dbgScript << "Cannot initialize Py_InitializeFromConfig config";
-+            return false;
-+        }
-+
-+        PyConfig_Clear(&config);
-     }
-     else {
-         qputenv("PYTHONPATH", joinedPaths.toLocal8Bit());
-+        qDebug() << "Set PYTHONPATH environment variable";
-     }
- #endif
-     isPythonPathSet = true;
-diff --git a/plugins/extensions/pykrita/plugin/utilities.h b/plugins/extensions/pykrita/plugin/utilities.h
-index fb309bd0b8..aec47da239 100644
---- a/plugins/extensions/pykrita/plugin/utilities.h
-+++ b/plugins/extensions/pykrita/plugin/utilities.h
-@@ -81,8 +81,8 @@ public:
-     static bool libraryLoad();
- 
-     /**
--     * Set the Python paths by calling Py_SetPath. This should be called before
--     * initialization to ensure the proper libraries get loaded.
-+     * Set the Python paths by calling Py_InitializeFromConfig. This should be
-+     * called before initialization to ensure the proper libraries get loaded.
-      */
-     static bool setPath(const QStringList& scriptPaths);
- 
--- 
-2.45.2
-
diff --git a/srcpkgs/krita/template b/srcpkgs/krita/template
index 9b69726d67dcaf..ea68bd78c1d26b 100644
--- a/srcpkgs/krita/template
+++ b/srcpkgs/krita/template
@@ -1,7 +1,7 @@
 # Template file for 'krita'
 pkgname=krita
-version=5.2.6
-revision=2
+version=5.2.9
+revision=1
 build_style=cmake
 configure_args="-Wno-dev -DBUILD_TESTING=OFF -DENABLE_UPDATERS=OFF"
 hostmakedepends="extra-cmake-modules gettext pkg-config python3
@@ -23,7 +23,7 @@ maintainer="John <me@johnnynator.dev>"
 license="GPL-3.0-only"
 homepage="https://krita.org/"
 distfiles="${KDE_SITE}/krita/${version}/krita-${version}.tar.xz"
-checksum=7a9be2c782a87b349e2267bda74ecc43381a085b639b5b2b91da1c56f977de59
+checksum=f74e710e6d93ddd593fa0b249a64006ed4121a64ce7f95ac29aaa332a7e6e53e
 python_version=3
 replaces="calligra-krita>=0"
 # FIXME

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: krita: update to 5.2.9.
  2025-01-14 12:27 [PR PATCH] krita: fix scripts not working with python3.13 dataCobra
                   ` (6 preceding siblings ...)
  2025-02-03  8:57 ` [PR PATCH] [Updated] krita: update to 5.2.9 dataCobra
@ 2025-02-03  9:05 ` dataCobra
  2025-02-03 13:06 ` [PR PATCH] [Merged]: " Johnnynator
  8 siblings, 0 replies; 10+ messages in thread
From: dataCobra @ 2025-02-03  9:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 341 bytes --]

New comment by dataCobra on void-packages repository

https://github.com/void-linux/void-packages/pull/53965#issuecomment-2630349225

Comment:
Removed the ci skip and I'll remember not to use it for thunderbird as well.

Checked the contribution documentation and my memory on when to use ci skip was wrong.

Thank you for pointing it out. 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Merged]: krita: update to 5.2.9.
  2025-01-14 12:27 [PR PATCH] krita: fix scripts not working with python3.13 dataCobra
                   ` (7 preceding siblings ...)
  2025-02-03  9:05 ` dataCobra
@ 2025-02-03 13:06 ` Johnnynator
  8 siblings, 0 replies; 10+ messages in thread
From: Johnnynator @ 2025-02-03 13:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 535 bytes --]

There's a merged pull request on the void-packages repository

krita: update to 5.2.9.
https://github.com/void-linux/void-packages/pull/53965

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl

The new version came out some days ago. I've updated the commit and the python-3.13 patch is no longer necessary.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-02-03 13:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-14 12:27 [PR PATCH] krita: fix scripts not working with python3.13 dataCobra
2025-01-14 12:49 ` ahesford
2025-01-14 12:52 ` dataCobra
2025-01-14 13:47 ` ahesford
2025-01-15 12:46 ` [PR REVIEW] " sgn
2025-01-15 12:47 ` sgn
2025-01-15 13:07 ` ahesford
2025-02-03  8:57 ` [PR PATCH] [Updated] krita: update to 5.2.9 dataCobra
2025-02-03  9:05 ` dataCobra
2025-02-03 13:06 ` [PR PATCH] [Merged]: " Johnnynator

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).