changelog.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>8. Changelog &mdash; Py4J</title>
  7. <link rel="stylesheet" href="_static/py4jdoc.css" type="text/css" />
  8. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: './',
  12. VERSION: '0.8.1',
  13. COLLAPSE_MODINDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: 'true'
  16. };
  17. </script>
  18. <script type="text/javascript" src="_static/jquery.js"></script>
  19. <script type="text/javascript" src="_static/underscore.js"></script>
  20. <script type="text/javascript" src="_static/doctools.js"></script>
  21. <link rel="author" title="About these documents" href="about.html" />
  22. <link rel="top" title="Py4J" href="index.html" />
  23. <link rel="prev" title="7. Contributing to Py4J" href="contributing.html" />
  24. <script type="text/javascript">
  25. var _gaq = _gaq || [];
  26. _gaq.push(['_setAccount', 'UA-18626179-1']);
  27. _gaq.push(['_trackPageview']);
  28. (function() {
  29. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  30. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  31. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  32. })();
  33. </script>
  34. </head>
  35. <body>
  36. <div class="page">
  37. <div class="banner">Py4J - A Bridge between Python and Java</div>
  38. <div class="related">
  39. <h3>Navigation</h3>
  40. <ul>
  41. <li class="right" style="margin-right: 5px">
  42. <a href="genindex.html" title="General Index"
  43. accesskey="I">index</a></li>
  44. <li class="right" >
  45. <a href="py-modindex.html" title="Python Module Index"
  46. >modules</a> |</li>
  47. <li class="right" >
  48. <a href="contributing.html" title="7. Contributing to Py4J"
  49. accesskey="P">previous</a> |</li>
  50. <li><a href="index.html">Home</a> |</li>
  51. <li><a href="download.html">Download</a> |</li>
  52. <li><a href="contents.html">Doc</a> |</li>
  53. <li><a href="https://blog.py4j.org">Blog</a> |</li>
  54. <li><a href="https://github.com/bartdag/py4j">github</a> |</li>
  55. <li><a href="about.html">About</a> &raquo;</li>
  56. </ul>
  57. </div>
  58. <div class="sphinxsidebar">
  59. <div class="sphinxsidebarwrapper">
  60. <h3><a href="contents.html">On This Page</a></h3>
  61. <ul>
  62. <li><a class="reference internal" href="#">8. Changelog</a><ul>
  63. <li><a class="reference internal" href="#py4j-0-9">8.1. Py4J 0.9</a></li>
  64. <li><a class="reference internal" href="#py4j-0-8-2-1">8.2. Py4J 0.8.2.1</a></li>
  65. <li><a class="reference internal" href="#py4j-0-8-2">8.3. Py4J 0.8.2</a></li>
  66. <li><a class="reference internal" href="#py4j-0-8-1">8.4. Py4J 0.8.1</a></li>
  67. <li><a class="reference internal" href="#py4j-0-8">8.5. Py4J 0.8</a></li>
  68. <li><a class="reference internal" href="#py4j-0-7">8.6. Py4J 0.7</a></li>
  69. <li><a class="reference internal" href="#py4j-0-6">8.7. Py4J 0.6</a></li>
  70. <li><a class="reference internal" href="#py4j-0-5">8.8. Py4J 0.5</a></li>
  71. <li><a class="reference internal" href="#py4j-0-4">8.9. Py4J 0.4</a></li>
  72. <li><a class="reference internal" href="#py4j-0-3">8.10. Py4J 0.3</a></li>
  73. <li><a class="reference internal" href="#py4j-0-2">8.11. Py4J 0.2</a></li>
  74. <li><a class="reference internal" href="#py4j-0-1">8.12. Py4J 0.1</a></li>
  75. </ul>
  76. </li>
  77. </ul>
  78. <h4>Previous topic</h4>
  79. <p class="topless"><a href="contributing.html"
  80. title="previous chapter">7. Contributing to Py4J</a></p>
  81. <h3>This Page</h3>
  82. <ul class="this-page-menu">
  83. <li><a href="_sources/changelog.txt"
  84. rel="nofollow">Show Source</a></li>
  85. </ul>
  86. <div id="searchbox" style="display: none">
  87. <h3>Quick search</h3>
  88. <form class="search" action="search.html" method="get">
  89. <input type="text" name="q" size="18" />
  90. <input type="submit" value="Go" />
  91. <input type="hidden" name="check_keywords" value="yes" />
  92. <input type="hidden" name="area" value="default" />
  93. </form>
  94. <p class="searchtip" style="font-size: 90%">
  95. Enter search terms or a module, class or function name.
  96. </p>
  97. </div>
  98. <script type="text/javascript">$('#searchbox').show(0);</script>
  99. </div>
  100. </div>
  101. <div class="document">
  102. <div class="documentwrapper">
  103. <div class="bodywrapper">
  104. <div class="body">
  105. <div class="section" id="changelog">
  106. <h1>8. Changelog<a class="headerlink" href="#changelog" title="Permalink to this headline">¶</a></h1>
  107. <p>The changelog describes in plain English the changes that occurred between Py4J
  108. releases.</p>
  109. <div class="section" id="py4j-0-9">
  110. <h2>8.1. Py4J 0.9<a class="headerlink" href="#py4j-0-9" title="Permalink to this headline">¶</a></h2>
  111. <ul class="simple">
  112. <li>Python side: constructor parameters have been deprecated in favor of
  113. GatewayParameters and CallbackServerParameters. This was necessary because
  114. the number of configuration options is growing fast. Old parameters will be
  115. supported until Py4J 1.0 (at least two more minor versions).</li>
  116. <li>Python side: IDEs and interactive interpreters such as IPython can now get
  117. help text/autocompletion for Java classes, objects, and members. This makes
  118. Py4J an ideal tool to explore complex Java APIs (e.g., the Eclipse API).
  119. Thanks to &#64;jonahkichwacoders</li>
  120. <li>Python side: the callback gateway server (necessary for Java to call back
  121. Python functions) can be daemonized and can be started after the main
  122. JavaGateway is started.</li>
  123. <li>Python side: py4j.java_gateway.launch_gateway has now a cleaner
  124. implementation that discards stdout and stderr output by default. It is also
  125. possible to redirect the output from these channels to separate files,
  126. deques, or queues. Thanks to &#64;davidcsterratt for finding the root cause and
  127. work on the fix.</li>
  128. <li>It is now possible to install Py4J from git with pip: pip install
  129. git+https://github.com/bartdag/py4j.git</li>
  130. <li>The Eclipse components of Py4J have been moved to another repository. Existing
  131. forks and pull requests can still use the &#64;before-eclipse-split branch until
  132. Py4J reaches 1.0. Fixes won&#8217;t be backported to this branch, but pull requests
  133. will be merged by the main maintainer to &#64;master if requested.</li>
  134. <li>Major cleanup of Python source code to make it fully flake8 (pep8 + pyflakes)
  135. compliant. This should be easier to contribute now.</li>
  136. <li>Major test cleanup effort to make Python tests more reliable. Testing Py4J is
  137. difficult because there are many versions of Python and Java to test and
  138. Python 2.6 lacks many interesting test features. Effort to make tests even
  139. more robust will continue in the next milestone.</li>
  140. <li>We introduced a <a class="reference internal" href="contributing.html"><em>contributing guide and an implicit contributor license
  141. agreement</em></a> that indicates that anyone contributing to Py4J
  142. keeps the copyright of the contribution but gives a non-revokable right to
  143. license the code using Py4J&#8217;s license (3-clause BSD). The copyright statement
  144. has been changed to &#8220;Copyright (c) 2009-2015, Barthelemy Dagenais and
  145. individual contributors. All rights reserved.&#8221; to make it clear that
  146. individual contributors retain copyrights of their contributions. An
  147. AUTHORS.txt file has been added to the repository to keep track of
  148. contributors: if your name is not in the file and you have contributed to
  149. Py4J, do not hesitate to write on the mailing list or open a pull request.</li>
  150. <li>Cleaned up the doc that was referring to broken links or refactored classes.
  151. Long-time users may want to review the <a class="reference internal" href="advanced_topics.html"><em>advanced topics</em></a> page.</li>
  152. <li>Added support for <a class="reference external" href="https://pypi.python.org/pypi/wheel">Python Wheels</a>.</li>
  153. <li>We have a new website: <a class="reference external" href="https://www.py4j.org">https://www.py4j.org</a></li>
  154. <li>We have a new blog: <a class="reference external" href="https://blog.py4j.org">https://blog.py4j.org</a></li>
  155. <li>Eclipse features have moved to: <a class="reference external" href="http://eclipse.py4j.org">http://eclipse.py4j.org</a></li>
  156. <li>We have a <a class="reference external" href="https://groups.google.com/a/py4j.org/forum/#!forum/py4j/join">new mailing list</a>.</li>
  157. <li><a class="reference external" href="https://github.com/bartdag/py4j/issues?q=is%3Aissue+milestone%3A0.9+is%3Aclosed">github 0.9 milestone</a></li>
  158. </ul>
  159. </div>
  160. <div class="section" id="py4j-0-8-2-1">
  161. <h2>8.2. Py4J 0.8.2.1<a class="headerlink" href="#py4j-0-8-2-1" title="Permalink to this headline">¶</a></h2>
  162. <ul class="simple">
  163. <li>Fixed a test that used an assert method that does not exist in Python 2.6</li>
  164. </ul>
  165. </div>
  166. <div class="section" id="py4j-0-8-2">
  167. <h2>8.3. Py4J 0.8.2<a class="headerlink" href="#py4j-0-8-2" title="Permalink to this headline">¶</a></h2>
  168. <ul class="simple">
  169. <li>Fixed constructors not being able to pass proxy (python classes implementing
  170. Java interfaces)</li>
  171. <li>Java 6 compatibility was restored in compiled jar file.</li>
  172. <li>Fixed unit tests for JDK 8</li>
  173. <li>Added a few extra paths to find_jar_path</li>
  174. <li><a class="reference external" href="https://github.com/bartdag/py4j/issues?milestone=11&amp;state=closed">github 0.8.2 milestone</a></li>
  175. </ul>
  176. </div>
  177. <div class="section" id="py4j-0-8-1">
  178. <h2>8.4. Py4J 0.8.1<a class="headerlink" href="#py4j-0-8-1" title="Permalink to this headline">¶</a></h2>
  179. <ul class="simple">
  180. <li>Fixed a bug in type inference when interface hierarchy is deeper than
  181. abstract class hierarchy.</li>
  182. <li>Added a utility method <code class="docutils literal"><span class="pre">is_instance_of</span></code> in py4j.java_gateway to determine
  183. if a JavaObject is an instance of a class.</li>
  184. <li>Released Py4J in central Maven repository.</li>
  185. <li><a class="reference external" href="https://github.com/bartdag/py4j/issues?milestone=8&amp;page=1&amp;state=closed">github 0.8.1 milestone</a></li>
  186. </ul>
  187. </div>
  188. <div class="section" id="py4j-0-8">
  189. <h2>8.5. Py4J 0.8<a class="headerlink" href="#py4j-0-8" title="Permalink to this headline">¶</a></h2>
  190. <ul class="simple">
  191. <li>Major fix to the Java byte[] support. Thanks to &#64;agronholm for spotting
  192. this subtle but major issue and thanks to &#64;fdinto from The Atlantic for
  193. providing a patch!</li>
  194. <li>Ability to fail early if the py4j.java_gateway.JavaGateway cannot connect to
  195. the JVM.</li>
  196. <li>Added support for long primitives, BigDecimal, enum types, and inner classes
  197. on the Java side.</li>
  198. <li>Set saner log levels</li>
  199. <li>Many small bug fixes and API enhancements (backward compatible).</li>
  200. <li>Wrote a section in the FAQ about security concerns and precautions with Py4J.</li>
  201. <li>Added support of <a class="reference external" href="https://travis-ci.org/bartdag/py4j">Travis-CI</a> and
  202. cleaned up the test suite to remove hardcoded paths.</li>
  203. <li><a class="reference external" href="https://github.com/bartdag/py4j/issues?milestone=7&amp;page=1&amp;state=closed">github 0.8 milestone</a></li>
  204. </ul>
  205. </div>
  206. <div class="section" id="py4j-0-7">
  207. <h2>8.6. Py4J 0.7<a class="headerlink" href="#py4j-0-7" title="Permalink to this headline">¶</a></h2>
  208. <ul class="simple">
  209. <li>Major refactoring to support Python 3. Thanks to Alex Grönholm for his
  210. patch.</li>
  211. <li>The build and setup files have been totally changed. Py4J no longer requires
  212. Paver to build and everything is done through ant. The setup.py file only
  213. uses distutils.</li>
  214. <li>Added support for Java byte[]: byte array are passed by value and converted
  215. to bytearray or bytes.</li>
  216. <li>Py4J package name changed from Py4J to py4j.</li>
  217. <li>Bug fixes in the Python callback server and unicode support.</li>
  218. <li><a class="reference external" href="https://github.com/bartdag/py4j/issues/labels/v0.7">github 0.7 milestone</a></li>
  219. </ul>
  220. </div>
  221. <div class="section" id="py4j-0-6">
  222. <h2>8.7. Py4J 0.6<a class="headerlink" href="#py4j-0-6" title="Permalink to this headline">¶</a></h2>
  223. <ul class="simple">
  224. <li>Added new exception <code class="docutils literal"><span class="pre">Py4JJavaError</span></code> that enables Python client programs to access
  225. instance of Java exception thrown in the Java client code.</li>
  226. <li>Improved Py4J setup: no more warnings displayed when installing Py4J.</li>
  227. <li>Bug fixes and API additions.</li>
  228. <li><a class="reference external" href="https://github.com/bartdag/py4j/issues/labels/v0.6">github 0.6 milestone</a></li>
  229. </ul>
  230. </div>
  231. <div class="section" id="py4j-0-5">
  232. <h2>8.8. Py4J 0.5<a class="headerlink" href="#py4j-0-5" title="Permalink to this headline">¶</a></h2>
  233. <ul class="simple">
  234. <li>Added the ability to import packages (e.g., <code class="docutils literal"><span class="pre">java_import(gateway.jvm,</span> <span class="pre">'java.io.*')</span></code>)</li>
  235. <li>Added support for pattern filtering in <code class="docutils literal"><span class="pre">JavaGateway.help()</span></code> (e.g., <code class="docutils literal"><span class="pre">gateway.help(obj,'get*Foo*Bar')</span></code>)</li>
  236. <li>Added support for automatic conversion of Python collections (list, set,
  237. dictionary) to Java collections. User <code class="docutils literal"><span class="pre">JavaGateway(auto_convert=True)</span></code> or
  238. an explicit convertor.</li>
  239. <li>Created two Eclipse features: one embeds the Py4J
  240. Java library. The other
  241. provides a default GatewayServer that is started when Eclipse starts. Both
  242. features are available on the new Py4J Eclipse update site:
  243. <code class="docutils literal"><span class="pre">http://www.py4j.org/py4j_eclipse</span></code></li>
  244. <li>Redesigned the module decomposition of Py4J: there are no more mandatory circular dependencies among modules.</li>
  245. <li><a class="reference external" href="https://github.com/bartdag/py4j/issues/labels/v0.5">github 0.5 milestone</a></li>
  246. </ul>
  247. </div>
  248. <div class="section" id="py4j-0-4">
  249. <h2>8.9. Py4J 0.4<a class="headerlink" href="#py4j-0-4" title="Permalink to this headline">¶</a></h2>
  250. <ul class="simple">
  251. <li>Polishing of existing features: fields can be set (not just read), None is accepted as a method parameter, methods are sorted alhabetically in gateway.help(), etc.</li>
  252. <li>Java Exception Stack Trace are now propagated to Python side.</li>
  253. <li>Changed <strong>interfaces</strong> member in Callback classes to <strong>implements</strong>.</li>
  254. <li>Internal refactoring to adopt clearer terminology and make Py4J protocol extensible.</li>
  255. <li>Many bug fixes: most are related to the callback feature.</li>
  256. <li><a class="reference external" href="https://github.com/bartdag/py4j/issues/labels/v0.4">github 0.4 milestone</a></li>
  257. </ul>
  258. </div>
  259. <div class="section" id="py4j-0-3">
  260. <h2>8.10. Py4J 0.3<a class="headerlink" href="#py4j-0-3" title="Permalink to this headline">¶</a></h2>
  261. <ul class="simple">
  262. <li>Added support for Java arrays and set.</li>
  263. <li>Added support for callbacks: Java objects can now call back Python objects.</li>
  264. <li>Completely redesigned threading and connection model of Py4J to allow multiple threads and callbacks on both side.</li>
  265. <li>Refactored the memory management to ensure best effort garbage collection.</li>
  266. <li><a class="reference external" href="https://github.com/bartdag/py4j/issues/labels/v0.3">github 0.3 milestone</a></li>
  267. </ul>
  268. </div>
  269. <div class="section" id="py4j-0-2">
  270. <h2>8.11. Py4J 0.2<a class="headerlink" href="#py4j-0-2" title="Permalink to this headline">¶</a></h2>
  271. <ul class="simple">
  272. <li>It is now possible to call constructors and reference static members: use the <cite>jvm</cite> member of a <cite>JavaGateway</cite> object.</li>
  273. <li>Java Map is converted to a Python Dictionary.</li>
  274. <li>Field access is supported through the <code class="docutils literal"><span class="pre">get_field</span></code> function or the <code class="docutils literal"><span class="pre">auto_field=True</span></code> member of <cite>JavaGateway</cite>.</li>
  275. <li>Obtain an interactive help page with <code class="docutils literal"><span class="pre">JavaGateway.help(object)</span></code>.</li>
  276. <li>Set is only accessible through the Java Set interface for now.</li>
  277. <li>Arrays can be referenced, but individual items can only be accessed with this workaround: <code class="docutils literal"><span class="pre">gateway.jvm.java.lang.reflect.Array.get(object,index)</span></code>.</li>
  278. <li>Complete rewrite of the reflection engine on the Java side for more flexibility.</li>
  279. <li>Improved memory model: no more memory leak caused by Py4J.</li>
  280. <li>New concurrency model: Py4J is now thread-safe.</li>
  281. <li><a class="reference external" href="https://github.com/bartdag/py4j/issues/labels/v0.2">github 0.2 milestone</a></li>
  282. </ul>
  283. </div>
  284. <div class="section" id="py4j-0-1">
  285. <h2>8.12. Py4J 0.1<a class="headerlink" href="#py4j-0-1" title="Permalink to this headline">¶</a></h2>
  286. <ul class="simple">
  287. <li>This is the first release.</li>
  288. <li>Basic features like connecting to a JVM and calling methods are implemented.</li>
  289. <li>Java List is converted to a Python List.</li>
  290. <li>Field access, constructors, and static classes are <strong>NOT</strong> accessible yet.</li>
  291. <li>Dictionary and Set are only accessible through the Java Map and Set interface for now.</li>
  292. <li>Arrays can be referenced, but individual items cannot be accessed yet.</li>
  293. <li><a class="reference external" href="https://github.com/bartdag/py4j/issues/labels/v0.1">github 0.1 milestone</a></li>
  294. </ul>
  295. </div>
  296. </div>
  297. </div>
  298. <div class="helpbar">
  299. <h3>Questions/Feedback?</h3>
  300. <ul>
  301. <li>Try the <a href="faq.html">FAQ</a> -- It answers many questions.</li>
  302. <li>Search for information in the <a href="https://groups.google.com/a/py4j.org/forum/#!forum/py4j">archives of the py4j-users mailing list</a>, or <a href="https://groups.google.com/a/py4j.org/forum/#!forum/py4j/join">post a question</a>.</li>
  303. <li>If you notice errors with this documentation, <a href="https://github.com/bartdag/py4j/issues">open a ticket</a> and let us know. Please, only open a ticket for feedback or improvements on the docs. To get help, use the links above!</li>
  304. </ul>
  305. </div>
  306. </div>
  307. </div>
  308. <div class="clearer"></div>
  309. </div>
  310. <div class="related">
  311. <h3>Navigation</h3>
  312. <ul>
  313. <li class="right" style="margin-right: 5px">
  314. <a href="genindex.html" title="General Index"
  315. >index</a></li>
  316. <li class="right" >
  317. <a href="py-modindex.html" title="Python Module Index"
  318. >modules</a> |</li>
  319. <li class="right" >
  320. <a href="contributing.html" title="7. Contributing to Py4J"
  321. >previous</a> |</li>
  322. <li><a href="index.html">Home</a> |</li>
  323. <li><a href="download.html">Download</a> |</li>
  324. <li><a href="contents.html">Doc</a> |</li>
  325. <li><a href="https://blog.py4j.org">Blog</a> |</li>
  326. <li><a href="https://github.com/bartdag/py4j">github</a> |</li>
  327. <li><a href="about.html">About</a> &raquo;</li>
  328. </ul>
  329. </div>
  330. <div class="footer">
  331. &copy; Copyright 2009-2013, Barthélémy Dagenais.
  332. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.3.1.
  333. </div>
  334. </div>
  335. </body>
  336. </html>