Skip to content

Commit

Permalink
gh-35558: sage.quadratic_forms: Fix use of staticmethod for Pytho…
Browse files Browse the repository at this point in the history
…n < 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
  • Loading branch information
Release Manager committed Apr 28, 2023
2 parents 2bedb53 + dcd1f18 commit 9185bef
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=527827bf6b3d445dc433219b4423f824dc95ec94
md5=edf7a6212cc3e0f37acad73af1f059c8
cksum=998886037
sha1=f06ad875b0bf9ca2c22fd5bd3195ad0a0c62d064
md5=6bf8b6f79f7341dc33f05e17a625d262
cksum=351732165
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
eca2a773d086dbbd6c88bb36e2fac4748aa602bf
4aadac6fe81c8d4bb8056f0ca70c30195b6fdc56
3 changes: 2 additions & 1 deletion src/sage/quadratic_forms/genera/genus.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ def genera(sig_pair, determinant, max_scale=None, even=False):
return genera


genera = staticmethod(genera)
# #35557: In Python < 3.10, a staticmethod cannot be called directly
_genera_staticmethod = staticmethod(genera)


def _local_genera(p, rank, det_val, max_scale, even):
Expand Down
5 changes: 2 additions & 3 deletions src/sage/quadratic_forms/quadratic_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,8 @@ class QuadraticForm(SageObject):
])

# Genus
lazy_import("sage.quadratic_forms.genera.genus", [
"genera"
])
lazy_import("sage.quadratic_forms.genera.genus",
"_genera_staticmethod", as_="genera")

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

0 comments on commit 9185bef

Please sign in to comment.