-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-99482: remove jython
compatibility parts from stdlib and tests
#99484
Changes from 1 commit
d4bf940
26304bb
cabb0ad
41d3c43
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
|
||
from test.support import os_helper | ||
from test.support import ( | ||
STDLIB_DIR, is_jython, swap_attr, swap_item, cpython_only, is_emscripten, | ||
STDLIB_DIR, swap_attr, swap_item, cpython_only, is_emscripten, | ||
is_wasi) | ||
from test.support.import_helper import ( | ||
forget, make_legacy_pyc, unlink, unload, DirsOnSysPath, CleanImport) | ||
|
@@ -163,10 +163,7 @@ def test_import(self): | |
def test_with_extension(ext): | ||
# The extension is normally ".py", perhaps ".pyw". | ||
source = TESTFN + ext | ||
if is_jython: | ||
pyc = TESTFN + "$py.class" | ||
else: | ||
pyc = TESTFN + ".pyc" | ||
pyc = TESTFN + ".pyc" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am removing Jython compat from tests, because there are lots and lots of new tests since 2.7 New syntax, new corner cases, etc. If Jython ever run our new suite, there will be a lot of things to fix / adapt on their side. |
||
|
||
with open(source, "w", encoding='utf-8') as f: | ||
print("# This tests Python's ability to import a", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -321,7 +321,7 @@ def raises_oserror(*a): | |
|
||
def test_java_ver(self): | ||
res = platform.java_ver() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not touching |
||
if sys.platform == 'java': | ||
if sys.platform == 'java': # Is never actually checked in CI | ||
self.assertTrue(all(res)) | ||
|
||
def test_win32_ver(self): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not required, because there's
@cpython_only
decorator.