mirror of
https://github.com/django/django.git
synced 2025-01-03 15:06:09 +00:00
Fixed runtests.py crash on PyPy.
The gc.set_threshold() call was made conditional to non-PyPy implementations. The method is not available in PyPy3, and GC is much less aggressive there, so the adjustment probably is not necessary.
This commit is contained in:
parent
6af83d2ee6
commit
09b4a4e2c1
@ -52,7 +52,8 @@ warnings.simplefilter("error", RuntimeWarning)
|
||||
# references, which are a minority, so the garbage collection threshold can be
|
||||
# larger than the default threshold of 700 allocations + deallocations without
|
||||
# much increase in memory usage.
|
||||
gc.set_threshold(100_000)
|
||||
if not hasattr(sys, "pypy_version_info"):
|
||||
gc.set_threshold(100_000)
|
||||
|
||||
RUNTESTS_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user