Re: Jython 2.7 b4 soft launch take 3

Jim Baker <[email protected]>
Newsgroups gmane.comp.lang.jython.devel
Message-ID <CAOhO=aPqFkvhsiDT+kRxr6qPm0sDqqgvR4Q8HBLLPyRg0qSkyQ@mail.gmail.com>
There were lots of fixes in beta 4. Here are some that I would like to
highlight:

   - Perhaps my favorite fix is a simple one: tab completion is now
   built-in to the Jython console, much like it is in Python 3.4. This is due
   to our upgrade to JLine 2.
   - The standard Python installation tool, pip, is now supported out of
   the box for platforms. You can run $ jython -m ensurepip and pip and
   setuptools will be installed in the Jython bin directory. Please note, this
   functionality is not yet supported on Windows, but should be once #1491 is
   complete.
   - Garbage collection now has traverseproc support, much like CPython,
   which means gc is something we can observe to support the CPython Extension
   API (with JyNI.org), or for debugging.
   - A new support library, jythonlib, which exposes Jython internals such
   as notifying when bytecode is loaded; or allowing Python dict objects,
   including subclasses of dict, to use an alternative Java-based
   implementation of ConcurrentMap, such as Guava's MapMaker. See for example:
   https://github.com/jythontools/jython/blob/master/Lib/weakref.py#L36;
   this allowed us to fix thread safety bugs in weakref collections (which
   inherently must be thread safe).
   - Significant cleanup of edge cases, especially around math, complex
   math, and str/unicode handling when working with Java. The latter bug fix (
   http://bugs.jython.org/issue2037) required fixing a number of other bugs
   where Jython integrates with the OS.

I have appended NEWS for 2.7.0 beta 4 to the end of this email. *Backwards
breaking changes are noted*. We might have broken something as well. I
suggest you try out beta 4!

Here are the bugs I would like to see addressed for RC1. They represent
being able to use Jython for a number of common scenarios, most importantly
on Windows:

   - http://bugs.jython.org/issue1491 - Native launcher for Windows - build
   a jython.exe instead of relying on buggy jython.bat. We will be using
   CPython plus a tool to create Windows exe's, such as py2exe. I already have
   this mostly written. This will also support setuptools creation of stub
   entry points for Windows.
   - http://bugs.jython.org/issue2251 - Complete ensurepip support by
   supporting for windows, requires #1491 above
   - http://bugs.jython.org/issue1879, http://bugs.jython.org/issue2058 -
   Underlying issue is that we need to implement
   https://www.python.org/dev/peps/pep-0302/#optional-extensions-to-the-importer-protocol
   - http://bugs.jython.org/issue2226 - Conform definition of unicode
   whitespace to CPython for re matching
   - http://bugs.jython.org/issue2029 - Compiler flags for codeop.Compile,
   for IPython support
   - http://bugs.jython.org/issue1572 - sys-package-mgr should not print
   import action unless verbose
   - http://bugs.jython.org/issue1841 - It's not clear to me we have a
   complete solution for this bug. Your opinions requested.

Other bugs, especially high priority bugs, will go into the backlog for
2.7.1. We plan to go to a regular release cycle, possibly every 6 months,
timed with respect to PyCon. I will be attending PyCon and will be giving a
talk about Jython 2.7.0 there:
https://us.pycon.org/2015/schedule/presentation/351/ I will also be giving
a talk on weak references, motivated by our cleanup of that support,
https://us.pycon.org/2015/schedule/presentation/468/ We also plan to have a
very active Jython sprint at PyCon.

Some goals for 2.7.1 include moving development to https://github.com/jython;
and using a POM based build (http://bugs.jython.org/issue2182). This should
help speed up development and especially contributions.

There are about 240 other bugs that have been reported in
http://bugs.jython.org/, so there's a lot to do.

Here's the excerpt from NEWS. For more details on these commits, please see
https://hg.python.org/jython

Jython 2.7b4
  Bugs Fixed
    - [ 2032 ] Fixed typo in compiler/pycodegen.py
    - [ 2190 ] Raise ValueError when unichr() is called with isolated
surrogate codepoint
    - [ 1057 ] Finalizer support (__del__) for new style classes
    - [ 2192 ] Server requests were hanging using jython, django and
django-jython
    - [ 2204 ] Minimum (core) install will now suport Jython console
    - [ 2184 ] inspect.callargs, including anonymous tuples in function
params
    - [ 2100 ] Fix deficiencies in PyUnicode beyond the BMP
    - Fix bug in supporting meta path importers for six
    - [ 2183 ] Rework function attributes support
    - [ 2115 ] Allow bound methods as arg for single method interface param
    - [ 2163 ] Refactor Py, PySystemState to init constants early
    - [ 2217 ] Update serial release to 3 for sys.version_info
    - [ 2090, 1494 ] Behaviour of long in the JSR-223 engine
    - [ 2196 ] Do not emit duplicate entries in building standalone jar
    - [ 1708 ] Ensure regrtest runs in a C locale to avoid failures
    - [ 2037 ] Prevent non-byte values appearing in str()
    - [ 2205 ] Guard via module import lock all entry points from Java into
import
    - [ 1631 ] Fully proxy java.util.Map objects as Python dicts
    - [ 2215 ] Fully proxy java.util.List objects as Python lists
    - [ 2242 ] select.select and related socket.connect_ex fixes
    - [ 2241 ] Fully proxy java.util.Set objects as Python sets
    - [ 2239, 1825 ] os.getenv, os.listdir may return unicode instead of
bytes
    - [ 2110 ] Update Java Native Runtime jars
    - [ 2236 ] Interactive parser does not accept try ... except E as e:
syntax
    - [ 2232 ] Visit class decorators when visiting class def in scopes
compilation
    - [ 2247 ] dict.pop should not add additional quoting in KeyError
    - [ 2238 ] os.system now uses a simpler wrapping of ProcessBuilder
    - [ 1561 ] Raises NotImplementedError if abstract method from Java is
not implemented
    - [ 2221 ] Implement Popen.pid
    - [ 2150 ] Fix regrtest to support -x to exclude tests
    - [ 1152612 ] All dict methods for __dict__ except views
    - [ 1762054 ] Add webbrowser module
    - [ 2252 ] Args in sys.argv are now unicode if characters > 127
    - [ 2092 ] Upgrade to JLine2 and add tab completion support
    - [ 2236 ] Interactive parser does not accept try ... except E as e:
syntax
    - [ 2237 ] Fully conformant math and cmath support
    - [ 2244 ] More robust testing of math and cmath modules
    - [ 2224 ] id(...) now persists object resurrection and a pattern is
provided to solve similar issues
               (i.e. attributes bound to a PyObject via a WeakHashMap) in
an analogue way (See JyAttribute.java).

  New features
    - Full support of Python buffer protocol, along with Java ByteBuffer
support
    - Add index to PyUnicode facilitating O(1) access to strings beyond the
BMP.
    - java.util.{Map, List, Set} are now treated as subclasses of the
      corresponding Python abstract base classes
    - jythonlib module to simplify usage of Java internals from Python;
      weakref collections now directly use corresponding collections from
      Google Guava and java.util
    - CPython's _json.c was ported to Java to speed up JSON
encoding/decoding
    - Upgraded third party libraries
    - Initial support for ensurepip module
    - Callbacks can be registered/unregistered to be notified when
      bytecode is loaded, using jythonlib.bytecodetools
    - Jython now features an optional, but recommended-to-implement
traverseproc-mechanism
      like CPython. This enables some new gc-features to optionally emulate
CPython-specific
      gc-behavior. See doc in gc.java and Traverseproc.java.

  Potentially backwards breaking changes, removing silent errors:

    - remove method on proxied List objects now follows Python
      sematics: a ValueError is raised if the item is not found in the
      java.util.List. In the past, Java semantics were used, with a
      boolean returned indicating if the item was removed or
      not. Given how this interacted with Jython, such remove
      invocations were in the past silent, and perhaps were actually a
      bug.

    - d[key_not_present], if d implement java.util.Map, no longer
      returns None, but raises KeyError, which means this behavior now
      matches standard dict semantics.

    - Abstract methods of an inherited class or interface from Java now
raise
      NotImplementedError, instead of returning None (in Java, null) or some
      "zero", if they are not implemented in the extending Python class.

    - os.getenv, os.listdir, sys.argv now return unicode instead of
      str values if a given value is not ascii, thus allowing such
      values to be passed through to Java, eg
      java.io.File(sys.argv[1]). Earlier such behavior was potentially
      silently failing in Python functions, but passing through to
      Java because of bug 2037. This behavior conforms with Python
      3.x, which uses Unicode.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/

_______________________________________________
Jython-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jython-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.