Message8947

Author zyasoft
Recipients amak, doublep, fwierzbicki, santa4nt, zyasoft
Date 2014-09-02.21:26:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1409693160.91.0.0679569453631.issue1631@psf.upfronthosting.co.za>
In-reply-to
Content
Just wanted to follow up here in this bug: Santoso's PR is great and complete, however it's unfortunately exposing bugs in certain modules (such as threading) in Jython's stdlib implementation. These bugs rely on buggy behavior in the current support of java.util.Map.

I plan to address by adding a new jythonlib module that will allow for building dict, list, or set with arbitrary backing collections supporting respectively java.util.Map, java.util.List, and java.util.Set. An example is using Guava's MapMaker as a builder for dicts. Example:

import jythonlib
try:
    # jarjar-ed version
	from org.python.google.common.collect import MapMaker
except ImportError:
    # dev version from extlibs
	from com.google.common.collect import MapMaker

# note the use of the bound method
builder = jythonlib.dict_builder(MapMaker().concurrencyLevel(4).weakKeys().weakValues().makeMap)
# initialize a new dict using the above ConcurrentMap definition
d1 = builder(x=1, y=2, z=3)
History
Date User Action Args
2014-09-02 21:26:00zyasoftsetmessageid: <1409693160.91.0.0679569453631.issue1631@psf.upfronthosting.co.za>
2014-09-02 21:26:00zyasoftsetrecipients: + zyasoft, fwierzbicki, amak, doublep, santa4nt
2014-09-02 21:26:00zyasoftlinkissue1631 messages
2014-09-02 21:26:00zyasoftcreate