Message8947
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) |
|
Date |
User |
Action |
Args |
2014-09-02 21:26:00 | zyasoft | set | messageid: <1409693160.91.0.0679569453631.issue1631@psf.upfronthosting.co.za> |
2014-09-02 21:26:00 | zyasoft | set | recipients:
+ zyasoft, fwierzbicki, amak, doublep, santa4nt |
2014-09-02 21:26:00 | zyasoft | link | issue1631 messages |
2014-09-02 21:26:00 | zyasoft | create | |
|