Skip to content

Commit bcc9311

Browse files
author
Release Manager
committed
sagemathgh-38917: Allow optional elliptic curve data from database_cremona_ellcurve If the optional db in istalled, then extra data is passed to the elliptic curve constructor. Recently unexpected keyword arguments were changed to an exception, without taking the optional package into account. Caused by sagemath#38361 Without the patch tests fail with ``` $ sage -i database_cremona_ellcurve $ sage -t src/sage/schemes/elliptic_curves/period_lattice.py [...] ********************************************************************** File "src/sage/schemes/elliptic_curves/period_lattice.py", line 77, in sage.schemes.elliptic_curves.period_lattice Failed example: E = EllipticCurve('37a') Exception raised: Traceback (most recent call last): File "/var/lib/buildbot/worker/sage_git/build/src/sage/doctest/forker.py", line 715, in _run self.compile_and_execute(example, compiler, test.globs) File "/var/lib/buildbot/worker/sage_git/build/src/sage/doctest/forker.py", line 1136, in compile_and_execute exec(compiled, globs) File "<doctest sage.schemes.elliptic_curves.period_lattice[14]>", line 1, in <module> E = EllipticCurve('37a') ^^^^^^^^^^^^^^^^^^^^ File "sage/structure/factory.pyx", line 373, in sage.structure.factory.UniqueFactory.__call__ return self.get_object(version, key, kwds) File "sage/structure/factory.pyx", line 416, in sage.structure.factory.UniqueFactory.get_object obj = self.create_object(version, key, **extra_args) File "/var/lib/buildbot/worker/sage_git/build/src/sage/schemes/ell iptic_curves/constructor.py", line 508, in create_object return EllipticCurve_rational_field(x, **kwds) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/var/lib/buildbot/worker/sage_git/build/src/sage/schemes/ell iptic_curves/ell_rational_field.py", line 207, in __init__ raise TypeError(f"unexpected keyword arguments: {kwds}") TypeError: unexpected keyword arguments: {'db_extra': [1, 5.98691729246392, 0.305999773834052, 0.0511114082399688, 1.0]} ********************************************************************** ``` URL: sagemath#38917 Reported by: Volker Braun Reviewer(s): Travis Scrimshaw
2 parents 76d5e05 + e7327ec commit bcc9311

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/sage/schemes/elliptic_curves/ell_rational_field.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ def __init__(self, ainvs, **kwds):
203203
self.__regulator = (kwds.pop('regulator'), True)
204204
if 'torsion_order' in kwds:
205205
self._set_torsion_order(kwds.pop('torsion_order'))
206+
if 'db_extra' in kwds:
207+
# optional data provided by database_cremona_ellcurve
208+
self.db_extra = kwds.pop('db_extra')
206209
if kwds:
207210
raise TypeError(f"unexpected keyword arguments: {kwds}")
208211

0 commit comments

Comments
 (0)