public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-sgqlc] rawhide: relaxed the pin in %prep + fix F46FTBFS
@ 2026-11-07 21:07 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-11-07 21:07 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-sgqlc
Branch : rawhide
Commit : 21bcd24f7acbffb1d782aee4f464b4f26822dd56
Author : Filipe Rosset <rosset.filipe@gmail.com>
Date   : 2026-11-07T15:11:34-03:00
Stats  : +36/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-sgqlc/c/21bcd24f7acbffb1d782aee4f464b4f26822dd56?branch=rawhide

Log:
relaxed the pin in %prep + fix F46FTBFS

---
diff --git a/0001-handle-None-arguments-in-codegen.patch b/0001-handle-None-arguments-in-codegen.patch
new file mode 100644
index 0000000..44f820c
--- /dev/null
+++ b/0001-handle-None-arguments-in-codegen.patch
@@ -0,0 +1,33 @@
+Subject: [PATCH] Handle None arguments in codegen for graphql-core 3.3
+
+github.com/profusion/sgqlc pull request: #
+
+github.com/graphql-python/graphql-core
+
+graphql-core 3.3 leaves FieldNode.arguments as None when a field has no
+arguments, instead of an empty list. Guard the two iteration sites so
+codegen does not crash with "TypeError: 'NoneType' object is not iterable".
+
+---
+diff --git a/sgqlc/codegen/operation.py b/sgqlc/codegen/operation.py
+index 8523b15..cf5aa73 100644
+--- a/sgqlc/codegen/operation.py
++++ b/sgqlc/codegen/operation.py
+@@ -687,7 +687,7 @@ def fragment_%(name)s():
+             if is_value_required(a):
+                 required.add(a['name'])
+ 
+-        for name, _ in node.arguments:
++        for name, _ in node.arguments or ():
+             if name in required:
+                 required.remove(name)
+ 
+@@ -700,7 +700,7 @@ def fragment_%(name)s():
+     def leave_field(self, node, *_args):
+         self.validate_required_arguments(node)
+ 
+-        args = node.arguments
++        args = node.arguments or []
+         alias = ''
+         if node.alias:
+             alias = to_python_name(node.alias)

diff --git a/python-sgqlc.spec b/python-sgqlc.spec
index 1923c0b..bf26800 100644
--- a/python-sgqlc.spec
+++ b/python-sgqlc.spec
@@ -12,6 +12,8 @@ License:        ISC
 URL:            %forgeurl
 Source:         %forgesource
 
+Patch1:         0001-handle-None-arguments-in-codegen.patch
+
 BuildArch:      noarch
 BuildRequires:  python3-devel
 # For tests
@@ -42,6 +44,7 @@ sed -r \
     -e "s/--cov.* //g" \
     -e "s/ --cov.*'/'/" \
     -e "s/ --doctest.*'/'/" \
+    -e "s/graphql-core~=3.2.6/graphql-core>=3.2.6/" \
     -i pyproject.toml
 
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-07 21:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-07 21:07 [rpms/python-sgqlc] rawhide: relaxed the pin in %prep + fix F46FTBFS Filipe Rosset

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox