mirror of
https://github.com/django/django.git
synced 2025-11-29 15:01:18 +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
1 changed files with 2 additions and 1 deletions
|
|
@ -52,7 +52,8 @@ warnings.simplefilter("error", RuntimeWarning)
|
||||||
# references, which are a minority, so the garbage collection threshold can be
|
# references, which are a minority, so the garbage collection threshold can be
|
||||||
# larger than the default threshold of 700 allocations + deallocations without
|
# larger than the default threshold of 700 allocations + deallocations without
|
||||||
# much increase in memory usage.
|
# 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__))
|
RUNTESTS_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue