diff --git a/build/pkgs/configure/checksums.ini b/build/pkgs/configure/checksums.ini
index 1c872212d2e..f53f99cbe10 100644
--- a/build/pkgs/configure/checksums.ini
+++ b/build/pkgs/configure/checksums.ini
@@ -1,3 +1,3 @@
 tarball=configure-VERSION.tar.gz
-sha1=852d0d200a6a73aa5ddb9e00874cbe4a61c211e9
-sha256=c4b089d90850dfdf15b905f66e4f6a0d961b96eb0663d8603beaff1a9efb2cbe
+sha1=0c3839396c1925ed5f34ae2332f2af284d42bd4f
+sha256=f15f6168285c6503516ab8787770f805324f8b3a74414cd4409ad382b9859328
diff --git a/build/pkgs/configure/package-version.txt b/build/pkgs/configure/package-version.txt
index 093cb148078..8d202f6a3ee 100644
--- a/build/pkgs/configure/package-version.txt
+++ b/build/pkgs/configure/package-version.txt
@@ -1 +1 @@
-a2ba1f943f88775218c385efe55509c4548d1b44
+9b7fe9ce8099decea34168e2dc536ce64465ceda
diff --git a/src/sage/algebras/cluster_algebra.py b/src/sage/algebras/cluster_algebra.py
index 6772673cbcb..ca34a34acfc 100644
--- a/src/sage/algebras/cluster_algebra.py
+++ b/src/sage/algebras/cluster_algebra.py
@@ -572,12 +572,12 @@ def homogeneous_components(self) -> dict:
                 components[g_vect] += self.parent().retract(x.monomial_coefficient(m) * m)
             else:
                 components[g_vect] = self.parent().retract(x.monomial_coefficient(m) * m)
-        for g_vect in components:
-            components[g_vect]._is_homogeneous = True
-            components[g_vect]._g_vector = g_vect
+        for g_vect, compo in components.items():
+            compo._is_homogeneous = True
+            compo._g_vector = g_vect
         self._is_homogeneous = (len(components) == 1)
         if self._is_homogeneous:
-            self._g_vector = list(components.keys())[0]
+            self._g_vector = next(iter(components))
         return components
 
     def theta_basis_decomposition(self):
diff --git a/src/sage/algebras/fusion_rings/fusion_ring.py b/src/sage/algebras/fusion_rings/fusion_ring.py
index 56045d2dce6..e454b07dfcb 100644
--- a/src/sage/algebras/fusion_rings/fusion_ring.py
+++ b/src/sage/algebras/fusion_rings/fusion_ring.py
@@ -1564,15 +1564,14 @@ def q_dimension(self, base_coercion=True):
             R = ZZ['q']
             q = R.gen()
             expr = R.fraction_field().one()
-            for val in powers:
-                exp = powers[val]
+            for val, exp in powers.items():
                 if exp > 0:
                     expr *= q_int(P._nf * val, q)**exp
                 elif exp < 0:
                     expr /= q_int(P._nf * val, q)**(-exp)
             expr = R(expr)
-            expr = expr.substitute(q=q**4) / (q**(2*expr.degree()))
-            zet = P.field().gen() ** (P._cyclotomic_order/P._l)
+            expr = expr.substitute(q=q**4) / (q**(2 * expr.degree()))
+            zet = P.field().gen() ** (P._cyclotomic_order / P._l)
             ret = expr.substitute(q=zet)
 
             if (not base_coercion) or (self.parent()._basecoer is None):
diff --git a/src/sage/algebras/hecke_algebras/ariki_koike_algebra.py b/src/sage/algebras/hecke_algebras/ariki_koike_algebra.py
index 8d674d0aaf1..e6368ea8389 100644
--- a/src/sage/algebras/hecke_algebras/ariki_koike_algebra.py
+++ b/src/sage/algebras/hecke_algebras/ariki_koike_algebra.py
@@ -954,9 +954,8 @@ def _product_LTwTv(self, L, w, v):
             ret = {v: self.base_ring().one()}
             qm1 = self._q - self.base_ring().one()
             for i in reversed(w.reduced_word()):
-                temp = {} # start from 0
-                for p in ret:
-                    c = ret[p]
+                temp = {}  # start from 0
+                for p, c in ret.items():
                     # We have to flip the side due to Sage's
                     # convention for multiplying permutations
                     pi = p.apply_simple_reflection(i, side='left')
@@ -965,7 +964,7 @@ def _product_LTwTv(self, L, w, v):
                     else:
                         iaxpy(1, {pi: c}, temp)
                 ret = temp
-            return {(L, p): ret[p] for p in ret}
+            return {(L, p): c for p, c in ret.items()}
 
         def _product_Tw_L(self, w, L):
             r"""
@@ -1011,10 +1010,9 @@ def _product_Tw_L(self, w, L):
             q = self._q
             one = q.parent().one()
             for i in w.reduced_word()[::-1]:
-                iL = {} # this will become T_i * L, written in standard form
-                for lv in wL:
-                    c = wL[lv]
-                    L = list(lv[0]) # make a copy
+                iL = {}  # this will become T_i * L, written in standard form
+                for lv, c in wL.items():
+                    L = list(lv[0])  # make a copy
                     v = lv[1]
                     a, b = L[i-1], L[i]
                     L[i-1], L[i] = L[i], L[i-1] # swap L_i=L[i-1] and L_{i+1}=L[i]
@@ -1038,7 +1036,7 @@ def _product_Tw_L(self, w, L):
                         c *= (one - q)
                         iaxpy(1, {(tuple(l), v): c for l in Ls}, iL)
 
-                wL = iL # replace wL with iL and repeat
+                wL = iL  # replace wL with iL and repeat
             return self._from_dict(wL, remove_zeros=False, coerce=False)
 
         @cached_method
diff --git a/src/sage/algebras/lie_algebras/verma_module.py b/src/sage/algebras/lie_algebras/verma_module.py
index 01320616c5a..71ea8e68cb9 100644
--- a/src/sage/algebras/lie_algebras/verma_module.py
+++ b/src/sage/algebras/lie_algebras/verma_module.py
@@ -701,21 +701,23 @@ def _homogeneous_component_f(self, d):
         """
         if not d:
             return frozenset([self.highest_weight_vector()])
-        f = {i: self._pbw(g) for i,g in enumerate(self._g.f())}
-        basis = d.parent().basis() # Standard basis vectors
+        f = {i: self._pbw(g) for i, g in enumerate(self._g.f())}
+        basis = d.parent().basis()  # Standard basis vectors
         ret = set()
 
         def degree(m):
             m = m.dict()
             if not m:
                 return d.parent().zero()
-            return sum(e * self._g.degree_on_basis(k) for k,e in m.items()).to_vector()
-        for i in f:
+            return sum(e * self._g.degree_on_basis(k)
+                       for k, e in m.items()).to_vector()
+        for i, fi in f.items():
             if d[i] == 0:
                 continue
             for b in self._homogeneous_component_f(d + basis[i]):
-                temp = f[i] * b
-                ret.update([self.monomial(m) for m in temp.support() if degree(m) == d])
+                temp = fi * b
+                ret.update([self.monomial(m) for m in temp.support()
+                            if degree(m) == d])
         return frozenset(ret)
 
     def _Hom_(self, Y, category=None, **options):
diff --git a/src/sage/algebras/rational_cherednik_algebra.py b/src/sage/algebras/rational_cherednik_algebra.py
index 1ded26a1112..537f39e8f68 100644
--- a/src/sage/algebras/rational_cherednik_algebra.py
+++ b/src/sage/algebras/rational_cherednik_algebra.py
@@ -369,18 +369,19 @@ def commute_w_hd(w, al): # al is given as a dictionary
             #   so we must commute Lac Rs = Rs Lac'
             #   and obtain La (Ls Rs) (Lac' Rac)
             ret = P.one()
-            for k in dl:
+            r1_red = right[1].reduced_word()
+            for k, dlk in dl.items():
                 x = sum(c * gens_dict[i]
-                        for i,c in alphacheck[k].weyl_action(right[1].reduced_word(),
-                                                             inverse=True))
-                ret *= x**dl[k]
+                        for i, c in alphacheck[k].weyl_action(r1_red,
+                                                              inverse=True))
+                ret *= x**dlk
             ret = ret.monomial_coefficients()
-            w = left[1]*right[1]
+            w = left[1] * right[1]
             return self._from_dict({(left[0], w,
-                                      self._h({I[i]: e for i,e in enumerate(k)
-                                               if e != 0}) * right[2]
+                                     self._h({I[i]: e for i, e in enumerate(k)
+                                              if e != 0}) * right[2]
                                      ): ret[k]
-                                     for k in ret})
+                                    for k in ret})
 
         # Otherwise dr is non-trivial and we have La Ls Ra Rs Rac,
         #   so we must commute Ls Ra = Ra' Ls
diff --git a/src/sage/algebras/steenrod/steenrod_algebra.py b/src/sage/algebras/steenrod/steenrod_algebra.py
index 337e50f700c..e9b86a59098 100644
--- a/src/sage/algebras/steenrod/steenrod_algebra.py
+++ b/src/sage/algebras/steenrod/steenrod_algebra.py
@@ -1346,10 +1346,9 @@ def coprod_list(t):
                         right_q = sorted(all_q - a)
                         sign = Permutation(convert_perm(left_q + right_q)).signature()
                         tens_q[(tuple(left_q), tuple(right_q))] = sign
-                    tens = {}
-                    for l, r in zip(left_p, right_p):
-                        for q in tens_q:
-                            tens[((q[0], l), (q[1], r))] = tens_q[q]
+                    tens = {((q[0], l), (q[1], r)): tq
+                            for l, r in zip(left_p, right_p)
+                            for q, tq in tens_q.items()}
                     return self.tensor_square()._from_dict(tens, coerce=True)
             elif basis == 'serre-cartan':
                 result = self.tensor_square().one()