all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#69260] [PATCH 0/3] Fix python-mysqlclient segfault
@ 2024-02-18 21:54 Marco Rimoldi via Guix-patches via
  2024-02-18 22:12 ` [bug#69260] [PATCH 1/3] gnu: python-mysqlclient: Enable selected tests Marco Rimoldi via Guix-patches via
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Marco Rimoldi via Guix-patches via @ 2024-02-18 21:54 UTC (permalink / raw)
  To: 69260; +Cc: Marco Rimoldi

From: Marco Rimoldi <rimarko@libero.it>

This patch is divided in three steps:

1. enable tests for python-mysqlclient (sigh!); check phase now fails (see https://issues.guix.gnu.org/69064)
2. work around the bug by changing input library
3. update the package to the latest version available

Cheers,
Marco

Marco Rimoldi (3):
  gnu: python-mysqlclient: Enable selected tests.
  gnu: python-mysqlclient: A test highlights segfault bug in mariadb:
    apply workaround.
  gnu: python-mysqlclient: Update to version 2.2.4.

 gnu/packages/databases.scm | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)


base-commit: fdbf4192f5eaa7fdb5e6e2e98ada0726c8104824
-- 
2.41.0





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

* [bug#69260] [PATCH 1/3] gnu: python-mysqlclient: Enable selected tests.
  2024-02-18 21:54 [bug#69260] [PATCH 0/3] Fix python-mysqlclient segfault Marco Rimoldi via Guix-patches via
@ 2024-02-18 22:12 ` Marco Rimoldi via Guix-patches via
  2024-02-18 22:12 ` [bug#69260] [PATCH 2/3] gnu: python-mysqlclient: A test highlights segfault bug in mariadb: apply workaround Marco Rimoldi via Guix-patches via
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Marco Rimoldi via Guix-patches via @ 2024-02-18 22:12 UTC (permalink / raw)
  To: 69260; +Cc: Marco Rimoldi

From: Marco Rimoldi <rimarko@libero.it>

* gnu/packages/databases.scm (python-mysqlclient)
[build-system]: Change to pyproject-build-system.
[arguments]
<#:phases>: Add 'fix-test phase.
<#:test-flags>: Specify tests to run.
[native-inputs]: Add python-pytest.
[homepage]: Updated.

Change-Id: I5ae0873155f9a7cc90a318762b77864665fadc01
---
 gnu/packages/databases.scm | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 5169795404..4bb992c97c 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -4155,15 +4155,24 @@ (define-public python-mysqlclient
        (method url-fetch)
        (uri (pypi-uri "mysqlclient" version))
        (sha256
-        (base32
-         "1rf5l8hazs3v18hmcrm90z3hi9wxv553ipwd5l6kj8j7l6p7abzv"))))
-    (build-system python-build-system)
-    (arguments '(#:tests? #f))          ;XXX: requires a live database
-    (inputs
-     `(("mysql-dev" ,mariadb "dev")))
-    (home-page "https://github.com/PyMySQL/mysqlclient-python")
-    (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
-    (description "MySQLdb is an interface to the popular MySQL database server
+        (base32 "1rf5l8hazs3v18hmcrm90z3hi9wxv553ipwd5l6kj8j7l6p7abzv"))))
+    (build-system pyproject-build-system)
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (add-before 'check 'fix-test
+                    (lambda _
+                      (substitute* "tests/test_MySQLdb_times.py"
+                        (("^import mock")
+                         "from unittest import mock")))))
+       #:test-flags '("tests/test__mysql.py" ;tests not needing a live db
+                      "tests/test_MySQLdb_times.py")))
+    (native-inputs (list python-pytest))
+    (inputs `(("mysql-dev" ,mariadb "dev")))
+    (home-page "https://github.com/PyMySQL/mysqlclient")
+    (synopsis
+     "MySQLdb is an interface to the popular MySQL database server for Python")
+    (description
+     "MySQLdb is an interface to the popular MySQL database server
 for Python.  The design goals are:
 @enumerate
 @item Compliance with Python database API version 2.0 [PEP-0249],
-- 
2.41.0





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

* [bug#69260] [PATCH 2/3] gnu: python-mysqlclient: A test highlights segfault bug in mariadb: apply workaround.
  2024-02-18 21:54 [bug#69260] [PATCH 0/3] Fix python-mysqlclient segfault Marco Rimoldi via Guix-patches via
  2024-02-18 22:12 ` [bug#69260] [PATCH 1/3] gnu: python-mysqlclient: Enable selected tests Marco Rimoldi via Guix-patches via
@ 2024-02-18 22:12 ` Marco Rimoldi via Guix-patches via
  2024-02-18 22:12 ` [bug#69260] [PATCH 3/3] gnu: python-mysqlclient: Update to version 2.2.4 Marco Rimoldi via Guix-patches via
  2024-03-27 15:21 ` bug#69260: [PATCH 0/3] Fix python-mysqlclient segfault Hilton Chain via Guix-patches via
  3 siblings, 0 replies; 5+ messages in thread
From: Marco Rimoldi via Guix-patches via @ 2024-02-18 22:12 UTC (permalink / raw)
  To: 69260; +Cc: Marco Rimoldi

From: Marco Rimoldi <rimarko@libero.it>

* gnu/packages/databases.scm (python-mysqlclient):
[inputs]: Change mariadb:dev to mariadb-connector-c, which also provides libmariadb.so.3.

Change-Id: I8adf277c2c9aae637aef8994b149b3b696bfe790
---
 gnu/packages/databases.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 4bb992c97c..c252738533 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -4167,7 +4167,7 @@ (define-public python-mysqlclient
        #:test-flags '("tests/test__mysql.py" ;tests not needing a live db
                       "tests/test_MySQLdb_times.py")))
     (native-inputs (list python-pytest))
-    (inputs `(("mysql-dev" ,mariadb "dev")))
+    (inputs (list mariadb-connector-c))
     (home-page "https://github.com/PyMySQL/mysqlclient")
     (synopsis
      "MySQLdb is an interface to the popular MySQL database server for Python")
-- 
2.41.0





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

* [bug#69260] [PATCH 3/3] gnu: python-mysqlclient: Update to version 2.2.4.
  2024-02-18 21:54 [bug#69260] [PATCH 0/3] Fix python-mysqlclient segfault Marco Rimoldi via Guix-patches via
  2024-02-18 22:12 ` [bug#69260] [PATCH 1/3] gnu: python-mysqlclient: Enable selected tests Marco Rimoldi via Guix-patches via
  2024-02-18 22:12 ` [bug#69260] [PATCH 2/3] gnu: python-mysqlclient: A test highlights segfault bug in mariadb: apply workaround Marco Rimoldi via Guix-patches via
@ 2024-02-18 22:12 ` Marco Rimoldi via Guix-patches via
  2024-03-27 15:21 ` bug#69260: [PATCH 0/3] Fix python-mysqlclient segfault Hilton Chain via Guix-patches via
  3 siblings, 0 replies; 5+ messages in thread
From: Marco Rimoldi via Guix-patches via @ 2024-02-18 22:12 UTC (permalink / raw)
  To: 69260; +Cc: Marco Rimoldi

From: Marco Rimoldi <rimarko@libero.it>

* gnu/packages/databases.scm (python-mysqlclient)
[version]: 2.0.1 -> 2.2.4.
[arguments] <#:phases> Remove 'fix-test phase (fixed upstream).
[native-inputs]: Add pkg-config.

Change-Id: I57a0b84eb0d56f9cea619b226090cc1ccd84812b
---
 gnu/packages/databases.scm | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index c252738533..c035a05e74 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -4149,24 +4149,18 @@ (define-public yoyo-migrations
 (define-public python-mysqlclient
   (package
     (name "python-mysqlclient")
-    (version "2.0.1")
+    (version "2.2.4")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "mysqlclient" version))
        (sha256
-        (base32 "1rf5l8hazs3v18hmcrm90z3hi9wxv553ipwd5l6kj8j7l6p7abzv"))))
+        (base32 "0hdznfz9095d2qhl7awbp39s7wpqbxn37xzan487qzaf8srrzg1k"))))
     (build-system pyproject-build-system)
     (arguments
-     '(#:phases (modify-phases %standard-phases
-                  (add-before 'check 'fix-test
-                    (lambda _
-                      (substitute* "tests/test_MySQLdb_times.py"
-                        (("^import mock")
-                         "from unittest import mock")))))
-       #:test-flags '("tests/test__mysql.py" ;tests not needing a live db
+     '(#:test-flags '("tests/test__mysql.py" ;tests not needing a live db
                       "tests/test_MySQLdb_times.py")))
-    (native-inputs (list python-pytest))
+    (native-inputs (list pkg-config python-pytest))
     (inputs (list mariadb-connector-c))
     (home-page "https://github.com/PyMySQL/mysqlclient")
     (synopsis
-- 
2.41.0





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

* bug#69260: [PATCH 0/3] Fix python-mysqlclient segfault
  2024-02-18 21:54 [bug#69260] [PATCH 0/3] Fix python-mysqlclient segfault Marco Rimoldi via Guix-patches via
                   ` (2 preceding siblings ...)
  2024-02-18 22:12 ` [bug#69260] [PATCH 3/3] gnu: python-mysqlclient: Update to version 2.2.4 Marco Rimoldi via Guix-patches via
@ 2024-03-27 15:21 ` Hilton Chain via Guix-patches via
  3 siblings, 0 replies; 5+ messages in thread
From: Hilton Chain via Guix-patches via @ 2024-03-27 15:21 UTC (permalink / raw)
  To: Marco Rimoldi; +Cc: 69260-done

Hi Marco,

On Mon, 19 Feb 2024 05:54:35 +0800,
Marco Rimoldi via Guix-patches via wrote:
>
> From: Marco Rimoldi <rimarko@libero.it>
>
> This patch is divided in three steps:
>
> 1. enable tests for python-mysqlclient (sigh!); check phase now fails (see https://issues.guix.gnu.org/69064)
> 2. work around the bug by changing input library
> 3. update the package to the latest version available
>
> Cheers,
> Marco
>
> Marco Rimoldi (3):
>   gnu: python-mysqlclient: Enable selected tests.
>   gnu: python-mysqlclient: A test highlights segfault bug in mariadb:
>     apply workaround.
>   gnu: python-mysqlclient: Update to version 2.2.4.
>
>  gnu/packages/databases.scm | 23 +++++++++++++----------
>  1 file changed, 13 insertions(+), 10 deletions(-)
>
>
> base-commit: fdbf4192f5eaa7fdb5e6e2e98ada0726c8104824
> --
> 2.41.0

I have merged patch 01 and 02 into one commit, used gexps for arguments,
adjusted commit messages, and applied the series as 5a41d4a56d0d...517c13624a96.

Thanks!




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

end of thread, other threads:[~2024-03-27 15:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-18 21:54 [bug#69260] [PATCH 0/3] Fix python-mysqlclient segfault Marco Rimoldi via Guix-patches via
2024-02-18 22:12 ` [bug#69260] [PATCH 1/3] gnu: python-mysqlclient: Enable selected tests Marco Rimoldi via Guix-patches via
2024-02-18 22:12 ` [bug#69260] [PATCH 2/3] gnu: python-mysqlclient: A test highlights segfault bug in mariadb: apply workaround Marco Rimoldi via Guix-patches via
2024-02-18 22:12 ` [bug#69260] [PATCH 3/3] gnu: python-mysqlclient: Update to version 2.2.4 Marco Rimoldi via Guix-patches via
2024-03-27 15:21 ` bug#69260: [PATCH 0/3] Fix python-mysqlclient segfault Hilton Chain via Guix-patches via

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.