Skip to content

Commit 9185bef

Browse files
author
Release Manager
committed
gh-35558: sage.quadratic_forms: Fix use of staticmethod for Python < 3.10
<!-- Please provide a concise, informative and self-explanatory title. --> <!-- Don't put issue numbers in the title. Put it in the Description below. --> <!-- For example, instead of "Fixes #12345", use "Add a new method to multiply two integers" --> ### 📚 Description <!-- Describe your changes here in detail. --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> Fixes #35557 <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x ]`. --> - [x] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #35558 Reported by: Matthias Köppe Reviewer(s): Kwankyu Lee
2 parents 2bedb53 + dcd1f18 commit 9185bef

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

build/pkgs/configure/checksums.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=configure-VERSION.tar.gz
2-
sha1=527827bf6b3d445dc433219b4423f824dc95ec94
3-
md5=edf7a6212cc3e0f37acad73af1f059c8
4-
cksum=998886037
2+
sha1=f06ad875b0bf9ca2c22fd5bd3195ad0a0c62d064
3+
md5=6bf8b6f79f7341dc33f05e17a625d262
4+
cksum=351732165
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
eca2a773d086dbbd6c88bb36e2fac4748aa602bf
1+
4aadac6fe81c8d4bb8056f0ca70c30195b6fdc56

src/sage/quadratic_forms/genera/genus.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ def genera(sig_pair, determinant, max_scale=None, even=False):
121121
return genera
122122

123123

124-
genera = staticmethod(genera)
124+
# #35557: In Python < 3.10, a staticmethod cannot be called directly
125+
_genera_staticmethod = staticmethod(genera)
125126

126127

127128
def _local_genera(p, rank, det_val, max_scale, even):

src/sage/quadratic_forms/quadratic_form.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,9 +502,8 @@ class QuadraticForm(SageObject):
502502
])
503503

504504
# Genus
505-
lazy_import("sage.quadratic_forms.genera.genus", [
506-
"genera"
507-
])
505+
lazy_import("sage.quadratic_forms.genera.genus",
506+
"_genera_staticmethod", as_="genera")
508507

509508
def __init__(self, R, n=None, entries=None, unsafe_initialization=False, number_of_automorphisms=None, determinant=None):
510509
"""

0 commit comments

Comments
 (0)