Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion Lib/test/test_ast_jy.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,31 @@ def test_empty_init(self):
#ast.stmt()
#ast.unaryop()

class TestAstList(unittest.TestCase):
"""Supplementary tests for org.python.core.AstList"""

def test_concat(self):
# Issue gh-356 Java IndexOOB error on append
body = ast.parse('x=1; global y; y+=x*2').body # _ast.AstList
p = [ast.Pass(), ast.Break()] # PyList
x = body + p
self.assertEqual(x[-2:], p)

def test_append(self):
# Issue gh-356 Java IndexOOB error on append
body = ast.parse('x=1; global y; y+=x*2').body # _ast.AstList
p = [ast.Pass(), ast.Break()] # PyList
body += p
self.assertEqual(body[-2:], p)


#==============================================================================

def test_main(verbose=None):
test_classes = [TestCompile]
test_classes = [
TestCompile,
TestAstList
]
test_support.run_unittest(*test_classes)

if __name__ == "__main__":
Expand Down
3 changes: 2 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ New Features
to the classpath on top of jython.jar without name conflict. In many cases
this should suffice to retain workability of a legacy setup if needed.

- Upgrade of jffi to 1.3.14 eliminates the need for sun.misc.Unsafe, which is
- Upgrade of jffi to 1.3.15 eliminates the need for sun.misc.Unsafe, which is
deprecated for removal in Java 26. See https://github.com/jnr/jffi/issues/165

Jython 2.7.5a1 Bugs fixed
- [ GH-404 ] Windows code page 65001 (UTF-8) not supported by Jython
- [ GH-384 ] Console encoding inferred incorrectly on Java 21
- [ GH-382 ] Java EE Servlet Namespace Has Been Changed From javax.servlet to jakarta.servlet
- [ GH-356 ] _ast.astlist.__add__ leads to Java exception
- [ GH-84 ] PyServlet Will Need To Use The jakarta.servlet Namespace #84

==============================================================================
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Jython: Python for the Java Platform
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.python/jython-standalone/badge.svg)](https://search.maven.org/artifact/org.python/jython-standalone/)
[![Maven Central](https://maven-badges.sml.io/maven-central/org.python/jython-standalone/badge.svg)](https://search.maven.org/artifact/org.python/jython-standalone/)
[![Javadocs](https://www.javadoc.io/badge/org.python/jython-standalone.svg)](https://www.javadoc.io/doc/org.python/jython-standalone)
[![APIdia](https://apidia.net/java/Jython/badge.svg)](https://apidia.net/java/Jython)

Expand Down
Loading
Loading