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
base: main
Are you sure you want to change the base?
Conversation
| @@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
I am not touching platform.java_ver(), because this is a user-facing API.
| def __repr__(self): | ||
| return b'byte-repr' | ||
| self.assertRaises(TypeError, repr, WrongRepr()) | ||
| # Test basic sanity of repr() |
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.
These diffs are ugly, I can do if True: instead with a comment.
| @@ -360,10 +360,9 @@ def test_capi3(): | |||
| self.assertRaises(SystemError, _testcapi.raise_exception, | |||
| InvalidException, 1) | |||
|
|
|||
| if not sys.platform.startswith('java'): | |||
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.
| pyc = TESTFN + "$py.class" | ||
| else: | ||
| pyc = TESTFN + ".pyc" | ||
| pyc = TESTFN + ".pyc" |
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.
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.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

I am marking this a draft for now, because we still wait for Jython's team response.
But, it is always easier to make decisions when you see the code :)