jep 4.2.1__tar.gz → 4.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. {jep-4.2.1/src/main/python/jep.egg-info → jep-4.2.2}/PKG-INFO +7 -6
  2. {jep-4.2.1 → jep-4.2.2}/README.rst +6 -2
  3. {jep-4.2.1 → jep-4.2.2}/pom.xml +2 -2
  4. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyembed.h +1 -1
  5. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/maininterpreter.c +3 -2
  6. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/pyembed.c +13 -4
  7. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjtype.c +30 -11
  8. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/ClassList.java +5 -2
  9. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/MainInterpreter.java +2 -2
  10. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/PyConfig.java +25 -11
  11. {jep-4.2.1 → jep-4.2.2}/src/main/python/jep/version.py +1 -1
  12. {jep-4.2.1 → jep-4.2.2/src/main/python/jep.egg-info}/PKG-INFO +7 -6
  13. {jep-4.2.1 → jep-4.2.2}/src/main/python/jep.egg-info/SOURCES.txt +1 -0
  14. jep-4.2.2/src/test/java/jep/test/util/SubInterpreterThread.java +41 -0
  15. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_regressions.py +14 -0
  16. {jep-4.2.1 → jep-4.2.2}/AUTHORS +0 -0
  17. {jep-4.2.1 → jep-4.2.2}/LICENSE +0 -0
  18. {jep-4.2.1 → jep-4.2.2}/MANIFEST.in +0 -0
  19. {jep-4.2.1 → jep-4.2.2}/commands/__init__.py +0 -0
  20. {jep-4.2.1 → jep-4.2.2}/commands/_msvccompiler.py +0 -0
  21. {jep-4.2.1 → jep-4.2.2}/commands/build_ext.py +0 -0
  22. {jep-4.2.1 → jep-4.2.2}/commands/clean.py +0 -0
  23. {jep-4.2.1 → jep-4.2.2}/commands/dist.py +0 -0
  24. {jep-4.2.1 → jep-4.2.2}/commands/install_lib.py +0 -0
  25. {jep-4.2.1 → jep-4.2.2}/commands/java.py +0 -0
  26. {jep-4.2.1 → jep-4.2.2}/commands/javadoc.py +0 -0
  27. {jep-4.2.1 → jep-4.2.2}/commands/link_util.py +0 -0
  28. {jep-4.2.1 → jep-4.2.2}/commands/msvc9compiler.py +0 -0
  29. {jep-4.2.1 → jep-4.2.2}/commands/python.py +0 -0
  30. {jep-4.2.1 → jep-4.2.2}/commands/scripts.py +0 -0
  31. {jep-4.2.1 → jep-4.2.2}/commands/test.py +0 -0
  32. {jep-4.2.1 → jep-4.2.2}/commands/util.py +0 -0
  33. {jep-4.2.1 → jep-4.2.2}/release_notes/1.0-notes.rst +0 -0
  34. {jep-4.2.1 → jep-4.2.2}/release_notes/1.1-notes.rst +0 -0
  35. {jep-4.2.1 → jep-4.2.2}/release_notes/2.0-notes.rst +0 -0
  36. {jep-4.2.1 → jep-4.2.2}/release_notes/2.1-notes.rst +0 -0
  37. {jep-4.2.1 → jep-4.2.2}/release_notes/2.2-notes.rst +0 -0
  38. {jep-4.2.1 → jep-4.2.2}/release_notes/2.3-notes.rst +0 -0
  39. {jep-4.2.1 → jep-4.2.2}/release_notes/2.4-notes.rst +0 -0
  40. {jep-4.2.1 → jep-4.2.2}/release_notes/3.0-notes.rst +0 -0
  41. {jep-4.2.1 → jep-4.2.2}/release_notes/3.1-notes.rst +0 -0
  42. {jep-4.2.1 → jep-4.2.2}/release_notes/3.2-notes.rst +0 -0
  43. {jep-4.2.1 → jep-4.2.2}/release_notes/3.3-notes.rst +0 -0
  44. {jep-4.2.1 → jep-4.2.2}/release_notes/3.4-notes.rst +0 -0
  45. {jep-4.2.1 → jep-4.2.2}/release_notes/3.5-notes.rst +0 -0
  46. {jep-4.2.1 → jep-4.2.2}/release_notes/3.6-notes.rst +0 -0
  47. {jep-4.2.1 → jep-4.2.2}/release_notes/3.7-notes.rst +0 -0
  48. {jep-4.2.1 → jep-4.2.2}/release_notes/3.8-notes.rst +0 -0
  49. {jep-4.2.1 → jep-4.2.2}/release_notes/3.9-notes.rst +0 -0
  50. {jep-4.2.1 → jep-4.2.2}/release_notes/4.0-notes.rst +0 -0
  51. {jep-4.2.1 → jep-4.2.2}/release_notes/4.1-notes.rst +0 -0
  52. {jep-4.2.1 → jep-4.2.2}/release_notes/4.2-notes.rst +0 -0
  53. {jep-4.2.1 → jep-4.2.2}/setup.cfg +0 -0
  54. {jep-4.2.1 → jep-4.2.2}/setup.py +0 -0
  55. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/Jep.h +0 -0
  56. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/convert_j2p.h +0 -0
  57. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/convert_p2j.h +0 -0
  58. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/AnnotatedElement.h +0 -0
  59. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/ArrayList.h +0 -0
  60. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/AutoCloseable.h +0 -0
  61. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/BigInteger.h +0 -0
  62. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Boolean.h +0 -0
  63. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Buffer.h +0 -0
  64. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Byte.h +0 -0
  65. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/ByteBuffer.h +0 -0
  66. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/ByteOrder.h +0 -0
  67. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/CharBuffer.h +0 -0
  68. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Character.h +0 -0
  69. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Class.h +0 -0
  70. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/ClassLoader.h +0 -0
  71. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Collection.h +0 -0
  72. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Collections.h +0 -0
  73. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Comparable.h +0 -0
  74. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Double.h +0 -0
  75. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/DoubleBuffer.h +0 -0
  76. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Entry.h +0 -0
  77. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Executable.h +0 -0
  78. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Field.h +0 -0
  79. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Float.h +0 -0
  80. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/FloatBuffer.h +0 -0
  81. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/HashMap.h +0 -0
  82. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/IntBuffer.h +0 -0
  83. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Integer.h +0 -0
  84. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Iterable.h +0 -0
  85. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Iterator.h +0 -0
  86. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/JPyCallable.h +0 -0
  87. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/JPyMethod.h +0 -0
  88. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/JPyObject.h +0 -0
  89. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/JepException.h +0 -0
  90. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/List.h +0 -0
  91. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Long.h +0 -0
  92. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/LongBuffer.h +0 -0
  93. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Map.h +0 -0
  94. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Member.h +0 -0
  95. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Method.h +0 -0
  96. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Modifier.h +0 -0
  97. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Number.h +0 -0
  98. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Object.h +0 -0
  99. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Proxy.h +0 -0
  100. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Short.h +0 -0
  101. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/ShortBuffer.h +0 -0
  102. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/String.h +0 -0
  103. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/java_access/Throwable.h +0 -0
  104. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/jep_exceptions.h +0 -0
  105. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/jep_numpy.h +0 -0
  106. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/jep_platform.h +0 -0
  107. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/jep_util.h +0 -0
  108. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjarray.h +0 -0
  109. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjautocloseable.h +0 -0
  110. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjbuffer.h +0 -0
  111. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjclass.h +0 -0
  112. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjcollection.h +0 -0
  113. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjconstructor.h +0 -0
  114. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjfield.h +0 -0
  115. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjiterable.h +0 -0
  116. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjiterator.h +0 -0
  117. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjlist.h +0 -0
  118. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjmap.h +0 -0
  119. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjmethod.h +0 -0
  120. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjmonitor.h +0 -0
  121. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjmultimethod.h +0 -0
  122. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjnumber.h +0 -0
  123. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjobject.h +0 -0
  124. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/pyjtype.h +0 -0
  125. {jep-4.2.1 → jep-4.2.2}/src/main/c/Include/winconfig.h +0 -0
  126. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/convert_j2p.c +0 -0
  127. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/convert_p2j.c +0 -0
  128. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/AnnotatedElement.c +0 -0
  129. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/ArrayList.c +0 -0
  130. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/AutoCloseable.c +0 -0
  131. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/BigInteger.c +0 -0
  132. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Boolean.c +0 -0
  133. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Buffer.c +0 -0
  134. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Byte.c +0 -0
  135. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/ByteBuffer.c +0 -0
  136. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/ByteOrder.c +0 -0
  137. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/CharBuffer.c +0 -0
  138. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Character.c +0 -0
  139. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Class.c +0 -0
  140. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/ClassLoader.c +0 -0
  141. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Collection.c +0 -0
  142. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Collections.c +0 -0
  143. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Comparable.c +0 -0
  144. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Double.c +0 -0
  145. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/DoubleBuffer.c +0 -0
  146. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Entry.c +0 -0
  147. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Executable.c +0 -0
  148. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Field.c +0 -0
  149. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Float.c +0 -0
  150. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/FloatBuffer.c +0 -0
  151. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/HashMap.c +0 -0
  152. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/IntBuffer.c +0 -0
  153. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Integer.c +0 -0
  154. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Iterable.c +0 -0
  155. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Iterator.c +0 -0
  156. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/JPyCallable.c +0 -0
  157. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/JPyMethod.c +0 -0
  158. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/JPyObject.c +0 -0
  159. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/JepException.c +0 -0
  160. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/List.c +0 -0
  161. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Long.c +0 -0
  162. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/LongBuffer.c +0 -0
  163. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Map.c +0 -0
  164. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Member.c +0 -0
  165. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Method.c +0 -0
  166. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Modifier.c +0 -0
  167. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Number.c +0 -0
  168. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Object.c +0 -0
  169. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Proxy.c +0 -0
  170. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Short.c +0 -0
  171. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/ShortBuffer.c +0 -0
  172. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/String.c +0 -0
  173. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/java_access/Throwable.c +0 -0
  174. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/jep.c +0 -0
  175. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/jep_exceptions.c +0 -0
  176. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/jep_numpy.c +0 -0
  177. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/jep_util.c +0 -0
  178. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/python/invocationhandler.c +0 -0
  179. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/python/jep_object.c +0 -0
  180. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/python/jpycallable.c +0 -0
  181. {jep-4.2.1 → jep-4.2.2}/src/main/c/Jep/python/pypointer.c +0 -0
  182. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjarray.c +0 -0
  183. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjautocloseable.c +0 -0
  184. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjbuffer.c +0 -0
  185. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjclass.c +0 -0
  186. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjcollection.c +0 -0
  187. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjconstructor.c +0 -0
  188. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjfield.c +0 -0
  189. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjiterable.c +0 -0
  190. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjiterator.c +0 -0
  191. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjlist.c +0 -0
  192. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjmap.c +0 -0
  193. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjmethod.c +0 -0
  194. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjmonitor.c +0 -0
  195. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjmultimethod.c +0 -0
  196. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjnumber.c +0 -0
  197. {jep-4.2.1 → jep-4.2.2}/src/main/c/Objects/pyjobject.c +0 -0
  198. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/AbstractNDArray.java +0 -0
  199. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/AllowPythonClassEnquirer.java +0 -0
  200. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/ClassEnquirer.java +0 -0
  201. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/DirectNDArray.java +0 -0
  202. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/Interpreter.java +0 -0
  203. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/Jep.java +0 -0
  204. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/JepAccess.java +0 -0
  205. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/JepConfig.java +0 -0
  206. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/JepException.java +0 -0
  207. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/LibraryLocator.java +0 -0
  208. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/NDArray.java +0 -0
  209. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/NamingConventionClassEnquirer.java +0 -0
  210. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/Proxy.java +0 -0
  211. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/PyMethod.java +0 -0
  212. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/Run.java +0 -0
  213. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/SharedInterpreter.java +0 -0
  214. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/SubInterpreter.java +0 -0
  215. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/SubInterpreterOptions.java +0 -0
  216. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/python/InvocationHandler.java +0 -0
  217. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/python/MemoryManager.java +0 -0
  218. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/python/PyBuiltins.java +0 -0
  219. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/python/PyCallable.java +0 -0
  220. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/python/PyObject.java +0 -0
  221. {jep-4.2.1 → jep-4.2.2}/src/main/java/jep/python/PyPointer.java +0 -0
  222. {jep-4.2.1 → jep-4.2.2}/src/main/python/jep/__init__.py +0 -0
  223. {jep-4.2.1 → jep-4.2.2}/src/main/python/jep/console.py +0 -0
  224. {jep-4.2.1 → jep-4.2.2}/src/main/python/jep/java_import_hook.py +0 -0
  225. {jep-4.2.1 → jep-4.2.2}/src/main/python/jep/jdbc.py +0 -0
  226. {jep-4.2.1 → jep-4.2.2}/src/main/python/jep/redirect_streams.py +0 -0
  227. {jep-4.2.1 → jep-4.2.2}/src/main/python/jep/shared_modules_hook.py +0 -0
  228. {jep-4.2.1 → jep-4.2.2}/src/main/python/jep.egg-info/dependency_links.txt +0 -0
  229. {jep-4.2.1 → jep-4.2.2}/src/main/python/jep.egg-info/not-zip-safe +0 -0
  230. {jep-4.2.1 → jep-4.2.2}/src/main/python/jep.egg-info/top_level.txt +0 -0
  231. {jep-4.2.1 → jep-4.2.2}/src/main/resources/jep/classlist_10.txt +0 -0
  232. {jep-4.2.1 → jep-4.2.2}/src/main/resources/jep/classlist_11.txt +0 -0
  233. {jep-4.2.1 → jep-4.2.2}/src/main/resources/jep/classlist_8.txt +0 -0
  234. {jep-4.2.1 → jep-4.2.2}/src/main/resources/jep/classlist_9.txt +0 -0
  235. {jep-4.2.1 → jep-4.2.2}/src/main/scripts/jep +0 -0
  236. {jep-4.2.1 → jep-4.2.2}/src/main/scripts/jep.bat +0 -0
  237. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/Test.java +0 -0
  238. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestAllowPythonEnquirer.java +0 -0
  239. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestCloseWithThreads.java +0 -0
  240. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestCompiledScript.java +0 -0
  241. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestDefaultMethods.java +0 -0
  242. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestExceptionCause.java +0 -0
  243. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestExec.java +0 -0
  244. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestGetByteArray.java +0 -0
  245. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestGetCollectionBoxing.java +0 -0
  246. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestGetJPyObject.java +0 -0
  247. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestGetTempValue.java +0 -0
  248. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestGetWithClass.java +0 -0
  249. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestInvoke.java +0 -0
  250. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestIteratorable.java +0 -0
  251. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestOverload.java +0 -0
  252. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestPreInitVariables.java +0 -0
  253. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestPyBuiltins.java +0 -0
  254. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestPyJObject.java +0 -0
  255. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestPyJType.java +0 -0
  256. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestRedirectStreams.java +0 -0
  257. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestSharedArgv.java +0 -0
  258. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestSharedInterpreter.java +0 -0
  259. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestSharedModules.java +0 -0
  260. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestSharedModulesThreads.java +0 -0
  261. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/TestSubInterpOptions.java +0 -0
  262. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/closeable/TestAutoCloseable.java +0 -0
  263. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/numpy/TestNumpy.java +0 -0
  264. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/numpy/TestNumpyArrayToString.java +0 -0
  265. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/numpy/TestNumpyProdShared.java +0 -0
  266. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/synchronization/TestCrossLangSync.java +0 -0
  267. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/types/TestFieldTypes.java +0 -0
  268. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/types/TestMethodTypes.java +0 -0
  269. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/types/TestStaticFieldTypes.java +0 -0
  270. {jep-4.2.1 → jep-4.2.2}/src/test/java/jep/test/types/TestStaticMethodTypes.java +0 -0
  271. {jep-4.2.1 → jep-4.2.2}/src/test/python/__init__.py +0 -0
  272. {jep-4.2.1 → jep-4.2.2}/src/test/python/data/read_file.txt +0 -0
  273. {jep-4.2.1 → jep-4.2.2}/src/test/python/jep_pipe.py +0 -0
  274. {jep-4.2.1 → jep-4.2.2}/src/test/python/lib/fakenetty.jar +0 -0
  275. {jep-4.2.1 → jep-4.2.2}/src/test/python/lib/sqlitejdbc-v056.jar +0 -0
  276. {jep-4.2.1 → jep-4.2.2}/src/test/python/runtests.py +0 -0
  277. {jep-4.2.1 → jep-4.2.2}/src/test/python/subprocess/invoke_args.py +0 -0
  278. {jep-4.2.1 → jep-4.2.2}/src/test/python/subprocess/iter_itr_crash.py +0 -0
  279. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_allow_python_enquirer.py +0 -0
  280. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_array.py +0 -0
  281. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_autocloseable.py +0 -0
  282. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_call.py +0 -0
  283. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_compare.py +0 -0
  284. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_convert.py +0 -0
  285. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_dir.py +0 -0
  286. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_exceptions.py +0 -0
  287. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_exec.py +0 -0
  288. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_getvalue.py +0 -0
  289. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_import.py +0 -0
  290. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_invoke.py +0 -0
  291. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_iterators.py +0 -0
  292. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_jdbc.py +0 -0
  293. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_jproxy.py +0 -0
  294. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_lists.py +0 -0
  295. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_maps.py +0 -0
  296. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_numbers.py +0 -0
  297. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_numpy.py +0 -0
  298. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_object.py +0 -0
  299. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_overload.py +0 -0
  300. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_preinits.py +0 -0
  301. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_pybuiltins.py +0 -0
  302. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_python_memory.py +0 -0
  303. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_redirect_streams.py +0 -0
  304. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_run_script.py +0 -0
  305. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_shared_interpreter.py +0 -0
  306. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_shared_modules.py +0 -0
  307. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_sub_interp_options.py +0 -0
  308. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_synchronized.py +0 -0
  309. {jep-4.2.1 → jep-4.2.2}/src/test/python/test_types.py +0 -0
@@ -1,13 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jep
3
- Version: 4.2.1
3
+ Version: 4.2.2
4
4
  Summary: Jep embeds CPython in Java
5
5
  Home-page: https://github.com/ninia/jep
6
6
  Author: Jep Developers
7
7
  Author-email: jep-project@googlegroups.com
8
8
  License: zlib/libpng
9
9
  Keywords: java
10
- Platform: UNKNOWN
11
10
  Classifier: License :: OSI Approved :: zlib/libpng License
12
11
  Classifier: Development Status :: 5 - Production/Stable
13
12
  Classifier: Intended Audience :: Developers
@@ -67,8 +66,12 @@ Some benefits of embedding CPython in a JVM:
67
66
 
68
67
  Installation
69
68
  ------------
70
- Simply run ``pip install jep`` or download the source and run ``pip install .``.
71
- Building and installing require the JDK, Python, and optionally numpy to be installed beforehand.
69
+ Simply run ``pip install --no-cache-dir --no-build-isolation jep`` or download
70
+ the source and run ``pip install .``. Building and installing require the JDK,
71
+ Python, setuptools, and optionally numpy to be installed beforehand. The
72
+ ``--no-cache-dir`` and ``--no-build-isolation`` options are not strictly
73
+ required, however those settings enable Jep to make customizations for your
74
+ environment such as enabling numpy specific behavior if numpy is installed.
72
75
 
73
76
  Dependencies
74
77
  ------------
@@ -100,5 +103,3 @@ been resolved.
100
103
 
101
104
 
102
105
  *Jep Team*
103
-
104
-
@@ -39,8 +39,12 @@ Some benefits of embedding CPython in a JVM:
39
39
 
40
40
  Installation
41
41
  ------------
42
- Simply run ``pip install jep`` or download the source and run ``pip install .``.
43
- Building and installing require the JDK, Python, and optionally numpy to be installed beforehand.
42
+ Simply run ``pip install --no-cache-dir --no-build-isolation jep`` or download
43
+ the source and run ``pip install .``. Building and installing require the JDK,
44
+ Python, setuptools, and optionally numpy to be installed beforehand. The
45
+ ``--no-cache-dir`` and ``--no-build-isolation`` options are not strictly
46
+ required, however those settings enable Jep to make customizations for your
47
+ environment such as enabling numpy specific behavior if numpy is installed.
44
48
 
45
49
  Dependencies
46
50
  ------------
@@ -6,7 +6,7 @@
6
6
 
7
7
  <groupId>black.ninia</groupId>
8
8
  <artifactId>jep</artifactId>
9
- <version>4.2.1</version>
9
+ <version>4.2.2</version>
10
10
  <packaging>jar</packaging>
11
11
 
12
12
  <name>Java Embedded Python</name>
@@ -39,7 +39,7 @@
39
39
  <scm>
40
40
  <connection>scm:git:git://github.com/ninia/jep.git</connection>
41
41
  <developerConnection>scm:git:ssh://github.com:ninia/jep.git</developerConnection>
42
- <url>https://github.com/ninia/jep/tree/v4.2.1</url>
42
+ <url>https://github.com/ninia/jep/tree/v4.2.2</url>
43
43
  </scm>
44
44
 
45
45
  <properties>
@@ -44,7 +44,7 @@ typedef struct __JepThread JepThread;
44
44
 
45
45
 
46
46
  void pyembed_preinit(JNIEnv*, jint, jint, jint, jint, jint, jint, jint,
47
- jstring);
47
+ jstring, jstring);
48
48
  void pyembed_startup(JNIEnv*, jobjectArray);
49
49
  void pyembed_shutdown(JavaVM*);
50
50
  void pyembed_shared_import(JNIEnv*, jstring);
@@ -47,11 +47,12 @@ JNIEXPORT void JNICALL Java_jep_MainInterpreter_setInitParams
47
47
  jint optimizeFlag,
48
48
  jint dontWriteBytecodeFlag,
49
49
  jint hashRandomizationFlag,
50
- jstring pythonHome)
50
+ jstring pythonHome,
51
+ jstring programName)
51
52
  {
52
53
  pyembed_preinit(env, noSiteFlag, noUserSiteDirectory, ignoreEnvironmentFlag,
53
54
  verboseFlag, optimizeFlag, dontWriteBytecodeFlag,
54
- hashRandomizationFlag, pythonHome);
55
+ hashRandomizationFlag, pythonHome, programName);
55
56
  }
56
57
 
57
58
  /*
@@ -239,7 +239,8 @@ void pyembed_preinit(JNIEnv *env,
239
239
  jint optimizeFlag,
240
240
  jint dontWriteBytecodeFlag,
241
241
  jint hashRandomizationFlag,
242
- jstring pythonHome)
242
+ jstring pythonHome,
243
+ jstring programName)
243
244
  {
244
245
  if (noSiteFlag >= 0) {
245
246
  Py_NoSiteFlag = noSiteFlag;
@@ -270,6 +271,14 @@ void pyembed_preinit(JNIEnv *env,
270
271
  // Python documentation says that the string should not be changed for
271
272
  // the duration of the program so it can never be freed.
272
273
  }
274
+ if (programName) {
275
+ const char* nameAsUTF = (*env)->GetStringUTFChars(env, programName, NULL);
276
+ wchar_t* nameForPython = Py_DecodeLocale(nameAsUTF, NULL);
277
+ (*env)->ReleaseStringUTFChars(env, programName, nameAsUTF);
278
+ Py_SetProgramName(nameForPython);
279
+ // Python documentation says that the string should not be changed for
280
+ // the duration of the program so it can never be freed.
281
+ }
273
282
  }
274
283
 
275
284
  /*
@@ -561,7 +570,7 @@ void pyembed_shared_import(JNIEnv *env, jstring module)
561
570
  intptr_t pyembed_thread_init(JNIEnv *env, jobject cl, jobject caller,
562
571
  jboolean hasSharedModules, jboolean usesubinterpreter,
563
572
  jboolean isolated, jint useMainObmalloc, jint allowFork,
564
- jint allowExec, jint allowThreads, jint allowDaemonThreads,
573
+ jint allowExec, jint allowThreads, jint allowDaemonThreads,
565
574
  jint checkMultiInterpExtensions, jint ownGIL)
566
575
  {
567
576
  JepThread *jepThread;
@@ -587,8 +596,8 @@ intptr_t pyembed_thread_init(JNIEnv *env, jobject cl, jobject caller,
587
596
  PyEval_AcquireThread(mainThreadState);
588
597
 
589
598
  #if PY_MAJOR_VERSION > 3 || PY_MINOR_VERSION >= 12
590
- PyInterpreterConfig config;
591
- if (isolated) {
599
+ PyInterpreterConfig config;
600
+ if (isolated) {
592
601
  config = (PyInterpreterConfig) _PyInterpreterConfig_INIT;
593
602
  } else {
594
603
  config = (PyInterpreterConfig) _PyInterpreterConfig_LEGACY_INIT;
@@ -32,6 +32,13 @@ static PyTypeObject PyJType_Type;
32
32
  static PyTypeObject* pyjtype_get_cached(JNIEnv*, PyObject*, jclass);
33
33
  static int addMethods(JNIEnv*, PyObject*, jclass);
34
34
 
35
+ /*
36
+ * Flag to indicate if methods have been added to static types. Most types are
37
+ * reinitialized for each interpreter but static types are shared between
38
+ * interpreters and must be initialized only once.
39
+ */
40
+ static int staticTypesInitialized = 0;
41
+
35
42
  /*
36
43
  * Populate pyjmethods for a type and add it to the cache. This is for custom
37
44
  * types with extra logic in c since we are not able to add pyjmethods before
@@ -127,12 +134,24 @@ static int populateCustomTypeDict(JNIEnv *env, PyObject* fqnToPyType)
127
134
  &PyJObject_Type)) {
128
135
  return -1;
129
136
  }
130
- /* TODO In python 3.8 buffer protocol was added to spec so pybuffer type can use a spec */
131
- if (!addCustomTypeToTypeDict(env, fqnToPyType, JBUFFER_TYPE, &PyJBuffer_Type)) {
132
- return -1;
133
- }
134
- if (!addCustomTypeToTypeDict(env, fqnToPyType, JOBJECT_TYPE, &PyJObject_Type)) {
135
- return -1;
137
+ if (staticTypesInitialized) {
138
+ if (PyDict_SetItemString(fqnToPyType, PyJBuffer_Type.tp_name,
139
+ (PyObject * ) &PyJBuffer_Type)) {
140
+ return -1;
141
+ }
142
+ if (PyDict_SetItemString(fqnToPyType, PyJObject_Type.tp_name,
143
+ (PyObject * ) &PyJObject_Type)) {
144
+ return -1;
145
+ }
146
+ } else {
147
+ /* TODO In python 3.8 buffer protocol was added to spec so pybuffer type can use a spec */
148
+ if (!addCustomTypeToTypeDict(env, fqnToPyType, JBUFFER_TYPE, &PyJBuffer_Type)) {
149
+ return -1;
150
+ }
151
+ if (!addCustomTypeToTypeDict(env, fqnToPyType, JOBJECT_TYPE, &PyJObject_Type)) {
152
+ return -1;
153
+ }
154
+ staticTypesInitialized = 1;
136
155
  }
137
156
  return 0;
138
157
  }
@@ -297,10 +316,10 @@ static int addMethods(JNIEnv* env, PyObject* dict, jclass clazz)
297
316
  if (isAbstract) {
298
317
  if (oneAbstractPyJMethod) {
299
318
  /*
300
- * If there is already one abstract method and this method is also
301
- * abstract then this isn't a functional interface and there is no need
302
- * to keep track of abstract methods.
303
- */
319
+ * If there is already one abstract method and this method is also
320
+ * abstract then this isn't a functional interface and there is no need
321
+ * to keep track of abstract methods.
322
+ */
304
323
  functionalInterface = JNI_FALSE;
305
324
  oneAbstractPyJMethod = NULL;
306
325
  } else {
@@ -440,7 +459,7 @@ static PyTypeObject* pyjtype_get_new(JNIEnv *env, PyObject *fqnToPyType,
440
459
  * See https://docs.python.org/3/library/functions.html#type
441
460
  */
442
461
  type = (PyTypeObject*) PyObject_CallFunctionObjArgs((PyObject*) &PyJType_Type,
443
- shortName, bases, dict, NULL);
462
+ shortName, bases, dict, NULL);
444
463
  }
445
464
  Py_DECREF(bases);
446
465
  Py_DECREF(dict);
@@ -127,8 +127,11 @@ public class ClassList implements ClassEnquirer {
127
127
  String[] relativePaths = classpath.split(" ");
128
128
 
129
129
  for (String relativePath : relativePaths) {
130
- String path = file.getParent() + File.separator
131
- + relativePath;
130
+ String path = relativePath;
131
+ String parent = file.getParent();
132
+ if (parent != null) {
133
+ path = parent + File.separator + relativePath;
134
+ }
132
135
  if (!seen.contains(path)) {
133
136
  queue.add(path);
134
137
  seen.add(path);
@@ -138,7 +138,7 @@ public final class MainInterpreter implements AutoCloseable {
138
138
  setInitParams(pyConfig.noSiteFlag, pyConfig.noUserSiteDirectory,
139
139
  pyConfig.ignoreEnvironmentFlag, pyConfig.verboseFlag,
140
140
  pyConfig.optimizeFlag, pyConfig.dontWriteBytecodeFlag,
141
- pyConfig.hashRandomizationFlag, pyConfig.pythonHome);
141
+ pyConfig.hashRandomizationFlag, pyConfig.pythonHome, pyConfig.programName);
142
142
  }
143
143
 
144
144
  thread = new Thread("JepMainInterpreter") {
@@ -293,7 +293,7 @@ public final class MainInterpreter implements AutoCloseable {
293
293
  private static native void setInitParams(int noSiteFlag,
294
294
  int noUserSiteDiretory, int ignoreEnvironmentFlag, int verboseFlag,
295
295
  int optimizeFlag, int dontWriteBytecodeFlag,
296
- int hashRandomizationFlag, String pythonHome);
296
+ int hashRandomizationFlag, String pythonHome, String programName);
297
297
 
298
298
  private static native void initializePython(String[] mainInterpreterArgv);
299
299
 
@@ -36,9 +36,9 @@ package jep;
36
36
  public class PyConfig {
37
37
 
38
38
  /*
39
- * -1 is used to indicate not set, in which case we will not set it in
40
- * the native code and the setting will be Python's default. A value of 0
41
- * or greater will cause the value to be set in the native code.
39
+ * -1 is used to indicate not set, in which case we will not set it in the
40
+ * native code and the setting will be Python's default. A value of 0 or
41
+ * greater will cause the value to be set in the native code.
42
42
  */
43
43
 
44
44
  protected int noSiteFlag = -1;
@@ -57,6 +57,8 @@ public class PyConfig {
57
57
 
58
58
  protected String pythonHome;
59
59
 
60
+ protected String programName;
61
+
60
62
  /**
61
63
  * Set the Py_NoSiteFlag variable on the python interpreter. This
62
64
  * corresponds to the python "-S" flag and will prevent the "site" module
@@ -155,7 +157,7 @@ public class PyConfig {
155
157
  }
156
158
 
157
159
  /**
158
- * Set the home location on the python interpreter. THis is the location of
160
+ * Set the home location on the python interpreter. This is the location of
159
161
  * the standard python libraries. This corresponds to the environment
160
162
  * variable PYTHONHOME.
161
163
  *
@@ -168,15 +170,27 @@ public class PyConfig {
168
170
  return this;
169
171
  }
170
172
 
173
+ /**
174
+ * Set the Py_SetProgramName variable on the python interpreter. This is
175
+ * used to initialize executable and in early error messages during python
176
+ * initialization.
177
+ *
178
+ * @param programName
179
+ * the name of the executable python program.
180
+ * @return a reference to this PyConfig
181
+ */
182
+ public PyConfig setProgramName(String programName) {
183
+ this.programName = programName;
184
+ return this;
185
+ }
186
+
171
187
  @Override
172
188
  public String toString() {
173
- return "PyConfig [noSiteFlag=" + noSiteFlag + ", noUserSiteDirectory="
174
- + noUserSiteDirectory + ", ignoreEnvironmentFlag="
175
- + ignoreEnvironmentFlag + ", verboseFlag=" + verboseFlag
176
- + ", optimizeFlag=" + optimizeFlag + ", dontWriteBytecodeFlag="
177
- + dontWriteBytecodeFlag + ", hashRandomizationFlag="
178
- + hashRandomizationFlag + ", pythonHome=" + pythonHome + "]";
189
+ return "PyConfig [noSiteFlag=" + noSiteFlag + ", noUserSiteDirectory=" + noUserSiteDirectory
190
+ + ", ignoreEnvironmentFlag=" + ignoreEnvironmentFlag + ", verboseFlag=" + verboseFlag
191
+ + ", optimizeFlag=" + optimizeFlag + ", dontWriteBytecodeFlag=" + dontWriteBytecodeFlag
192
+ + ", hashRandomizationFlag=" + hashRandomizationFlag + ", pythonHome=" + pythonHome + ", programName="
193
+ + programName + "]";
179
194
  }
180
195
 
181
-
182
196
  }
@@ -23,5 +23,5 @@
23
23
  # distribution.
24
24
  #
25
25
 
26
- __VERSION__ = '4.2.1'
26
+ __VERSION__ = '4.2.2'
27
27
  VERSION = __VERSION__
@@ -1,13 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jep
3
- Version: 4.2.1
3
+ Version: 4.2.2
4
4
  Summary: Jep embeds CPython in Java
5
5
  Home-page: https://github.com/ninia/jep
6
6
  Author: Jep Developers
7
7
  Author-email: jep-project@googlegroups.com
8
8
  License: zlib/libpng
9
9
  Keywords: java
10
- Platform: UNKNOWN
11
10
  Classifier: License :: OSI Approved :: zlib/libpng License
12
11
  Classifier: Development Status :: 5 - Production/Stable
13
12
  Classifier: Intended Audience :: Developers
@@ -67,8 +66,12 @@ Some benefits of embedding CPython in a JVM:
67
66
 
68
67
  Installation
69
68
  ------------
70
- Simply run ``pip install jep`` or download the source and run ``pip install .``.
71
- Building and installing require the JDK, Python, and optionally numpy to be installed beforehand.
69
+ Simply run ``pip install --no-cache-dir --no-build-isolation jep`` or download
70
+ the source and run ``pip install .``. Building and installing require the JDK,
71
+ Python, setuptools, and optionally numpy to be installed beforehand. The
72
+ ``--no-cache-dir`` and ``--no-build-isolation`` options are not strictly
73
+ required, however those settings enable Jep to make customizations for your
74
+ environment such as enabling numpy specific behavior if numpy is installed.
72
75
 
73
76
  Dependencies
74
77
  ------------
@@ -100,5 +103,3 @@ been resolved.
100
103
 
101
104
 
102
105
  *Jep Team*
103
-
104
-
@@ -264,6 +264,7 @@ src/test/java/jep/test/types/TestFieldTypes.java
264
264
  src/test/java/jep/test/types/TestMethodTypes.java
265
265
  src/test/java/jep/test/types/TestStaticFieldTypes.java
266
266
  src/test/java/jep/test/types/TestStaticMethodTypes.java
267
+ src/test/java/jep/test/util/SubInterpreterThread.java
267
268
  src/test/python/__init__.py
268
269
  src/test/python/jep_pipe.py
269
270
  src/test/python/runtests.py
@@ -0,0 +1,41 @@
1
+ package jep.test.util;
2
+
3
+ import jep.Interpreter;
4
+ import jep.JepException;
5
+ import jep.SubInterpreter;
6
+
7
+ /**
8
+ * This is just a thread that runs some Python statements in a subinterpreter.
9
+ * It can be run from a Python unittest to verify SubInterpreter behavior
10
+ * without writing Java code.
11
+ */
12
+ public class SubInterpreterThread extends Thread {
13
+
14
+ private final String[] pythonStatements;
15
+
16
+ private JepException exception;
17
+
18
+ public SubInterpreterThread(String... pythonStatements) {
19
+ this.pythonStatements = pythonStatements;
20
+ }
21
+
22
+ @Override
23
+ public void run() {
24
+ try (Interpreter interpreter = new SubInterpreter()) {
25
+ for (String statement : this.pythonStatements) {
26
+ interpreter.exec(statement);
27
+ }
28
+ } catch (JepException e) {
29
+ this.exception = e;
30
+ }
31
+ }
32
+
33
+ public boolean hasException() {
34
+ return exception != null;
35
+ }
36
+
37
+ public JepException getException() {
38
+ return exception;
39
+ }
40
+
41
+ }
@@ -35,3 +35,17 @@ class TestRegressions(unittest.TestCase):
35
35
  self.assertEqual('ParentClassWithMethod', ChildTestingMethodInheritance().checkPrecedence())
36
36
  ClassInheritingDefault = jep.findClass('jep.test.TestPyJType$ClassInheritingDefault')
37
37
  self.assertEqual('InterfaceWithDefault', ClassInheritingDefault().checkPrecedence())
38
+
39
+ def test_object_method_count(self):
40
+ # There was a bug where each new sub-interpreter would add all the
41
+ # Object methods onto multimethods on the Object type so the
42
+ # multimethod would grow with each new sub-interpreter.
43
+ from java.lang import Object
44
+ self.assertEqual(3, len(Object.wait.__methods__))
45
+ for i in range(3):
46
+ SubInterpreterThread = jep.findClass('jep.test.util.SubInterpreterThread')
47
+ thread = SubInterpreterThread();
48
+ thread.start();
49
+ thread.join();
50
+ from java.lang import Object
51
+ self.assertEqual(3, len(Object.wait.__methods__))
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes