mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 19:24:57 +08:00
Reapply RustPython patches
This commit is contained in:
1 parent
3058d99fd5
commit
b51f6de0c8
1 file changed
+12
Vendored
+12
@@ -501,6 +501,8 @@ def requires_lzma(reason='requires lzma'):
|
||||
import lzma
|
||||
except ImportError:
|
||||
lzma = None
|
||||
# XXX: RUSTPYTHON; xz is not supported yet
|
||||
lzma = None
|
||||
return unittest.skipUnless(lzma, reason)
|
||||
|
||||
def has_no_debug_ranges():
|
||||
@@ -808,6 +810,8 @@ def gc_collect():
|
||||
longer than expected. This function tries its best to force all garbage
|
||||
objects to disappear.
|
||||
"""
|
||||
return # TODO: RUSTPYTHON
|
||||
|
||||
import gc
|
||||
gc.collect()
|
||||
gc.collect()
|
||||
@@ -815,6 +819,9 @@ def gc_collect():
|
||||
|
||||
@contextlib.contextmanager
|
||||
def disable_gc():
|
||||
yield # TODO: RUSTPYTHON
|
||||
return # TODO: RUSTPYTHON
|
||||
|
||||
import gc
|
||||
have_gc = gc.isenabled()
|
||||
gc.disable()
|
||||
@@ -826,6 +833,9 @@ def disable_gc():
|
||||
|
||||
@contextlib.contextmanager
|
||||
def gc_threshold(*args):
|
||||
yield # TODO: RUSTPYTHON
|
||||
return # TODO: RUSTPYTHON
|
||||
|
||||
import gc
|
||||
old_threshold = gc.get_threshold()
|
||||
gc.set_threshold(*args)
|
||||
@@ -1888,6 +1898,8 @@ def _check_tracemalloc():
|
||||
|
||||
|
||||
def check_free_after_iterating(test, iter, cls, args=()):
|
||||
return # TODO: RUSTPYTHON; GC is not supported yet
|
||||
|
||||
done = False
|
||||
def wrapper():
|
||||
class A(cls):
|
||||
|
||||
Reference in new issue
Block a user