From ea08b952801b9af9bc45ae9918fcf5ab9bcb5aaf Mon Sep 17 00:00:00 2001 From: Konstantin Lopuhin Date: Mon, 19 Jun 2017 16:45:29 +0300 Subject: [PATCH] Remove Jython gc branch: it's not supported --- scrapy/utils/python.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/scrapy/utils/python.py b/scrapy/utils/python.py index d28d71bd3..72f8f4311 100644 --- a/scrapy/utils/python.py +++ b/scrapy/utils/python.py @@ -360,14 +360,7 @@ def global_object_name(obj): return "%s.%s" % (obj.__module__, obj.__name__) -if sys.platform.startswith('java'): - def garbage_collect(): - # Some JVM GCs will execute finalizers in a different thread, meaning - # we need to wait for that to complete before we go on looking for the - # effects of that. - gc.collect() - time.sleep(0.1) -elif hasattr(sys, "pypy_version_info"): +if hasattr(sys, "pypy_version_info"): def garbage_collect(): # Collecting weakreferences can take two collections on PyPy. gc.collect()