Skip to content

Commit

Permalink
Merge pull request #5634 from LMFDB/master
Browse files Browse the repository at this point in the history
master -> dev
  • Loading branch information
roed314 authored Aug 9, 2023
2 parents d645f77 + cb3a11c commit e004574
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lmfdb/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def badbot():
ua = request.user_agent.string.lower()
for elt in bad_bots_list():
if elt in ua:
time.sleep(5)
time.sleep(10)


def timestamp():
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/characters/TinyConrey.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def galois_orbit(self, limit=31):
elif order < limit or order * order < limit * self.modulus:
logger.debug(f"compute all conjugate characters and return first {limit}")
return self.galois_orbit_all(limit)
elif limit == 1 or self.modulus < 30 * order:
elif limit == 1 or self.modulus <= 1000000:
logger.debug(f"compute {limit} first conjugate characters")
return self.galois_orbit_search(limit)
else:
Expand Down
3 changes: 3 additions & 0 deletions lmfdb/characters/test_characters.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ def test_dirichletgalorbs(self):
W = self.tc.get('/Character/Dirichlet/9999999999/banana', follow_redirects=True)
assert 'Error: Galois orbits have only been computed for modulus up to 100,000' in W.get_data(as_text=True)

W = self.tc.get('/Character/Dirichlet/58589/50021', follow_redirects=True)
assert 'Number field defined by a degree 1428 polynomial' in W.get_data(as_text=True)

def test_dirichletchar11(self):
W = self.tc.get('/Character/Dirichlet/1/1')
assert '/NumberField/1.1.1.1' in W.get_data(as_text=True)
Expand Down
10 changes: 9 additions & 1 deletion lmfdb/lfunctions/Lfunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
)
import sage.libs.lcalc.lcalc_Lfunction as lc

from lmfdb.app import is_debug_mode

from lmfdb.backend.encoding import Json
from lmfdb.utils import (
Downloader,
Expand Down Expand Up @@ -1254,6 +1256,12 @@ def __init__(self, **args):
self.primitive = self.artin.primitive()
self.degree = self.artin.dimension()
self.level = self.artin.conductor()

# disable expensive L-functions, these should not be linked anywhere regardless
# this threshold comes from lmfdb/artin_representations/main.py
if not is_debug_mode() and self.level**self.degree > 729000000000000:
raise ValueError(f'Error constructing L-function for the Artin representation {self.origin_label}, as the conductor/degree is too large.')

self.level_factored = factor(self.level)
self.mu_fe = self.artin.mu_fe()
self.nu_fe = self.artin.nu_fe()
Expand Down Expand Up @@ -1320,7 +1328,7 @@ def __init__(self, **args):
# Check for compulsory arguments
if "t" in args and "family" in args:
args["label"] = args["family"] + "_" + args["t"]
validate_required_args ('Unable to construct hypergeometric motive L-function.', args, 'label')
validate_required_args('Unable to construct hypergeometric motive L-function.', args, 'label')
self._Ltype = "hgmQ"

# Put the arguments into the object dictionary
Expand Down

0 comments on commit e004574

Please sign in to comment.