mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-99482: remove jython
compatibility parts from stdlib and tests (#99484)
This commit is contained in:
parent
c5726b727e
commit
745545b5bb
20 changed files with 134 additions and 232 deletions
|
@ -505,6 +505,7 @@ def requires_debug_ranges(reason='requires co_positions / debug_ranges'):
|
|||
requires_legacy_unicode_capi = unittest.skipUnless(unicode_legacy_string,
|
||||
'requires legacy Unicode C API')
|
||||
|
||||
# Is not actually used in tests, but is kept for compatibility.
|
||||
is_jython = sys.platform.startswith('java')
|
||||
|
||||
is_android = hasattr(sys, 'getandroidapilevel')
|
||||
|
@ -736,8 +737,6 @@ def gc_collect():
|
|||
"""
|
||||
import gc
|
||||
gc.collect()
|
||||
if is_jython:
|
||||
time.sleep(0.1)
|
||||
gc.collect()
|
||||
gc.collect()
|
||||
|
||||
|
|
|
@ -11,11 +11,7 @@ import warnings
|
|||
|
||||
|
||||
# Filename used for testing
|
||||
if os.name == 'java':
|
||||
# Jython disallows @ in module names
|
||||
TESTFN_ASCII = '$test'
|
||||
else:
|
||||
TESTFN_ASCII = '@test'
|
||||
TESTFN_ASCII = '@test'
|
||||
|
||||
# Disambiguate TESTFN for parallel testing, while letting it remain a valid
|
||||
# module name.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue