ENH: update bundled ujson to latest v1.33
State: closed

This updates pandas JSON to use the latest ujson version. A fair few fixes and enhancements are included. Unfortunately however there were a lot of whitespace changes so it looks like a lot more than it actually is.

All tests pass on py27 and py33. Valgrind run of JSON tests with Python 2.7 is clean.

Also included are two fixes encountered during merging and pushed upstream to ultrajson:
https://github.com/esnme/ultrajson/pull/93
https://github.com/esnme/ultrajson/pull/94


Labels:

Comments:
@Komnomnomnom can you hook up to travis? (then recommit this)

@cpcloud can you give this a run on mac?

wish i could. i only have a black macbook which has arch linux on it and i don't think can be upgraded to a version of os x that uses clang by default...maybe one of @wesm, @rhstanton, @fonnesbeck, or @selasley?

@Komnomnomnom 

the existing ujson in master compiles and tests completey fine on amd64 (I use msvc10)

but this release fails several tests, then crashes the interpreter

```
PS H:\jreback\pandas> C:\python27\scripts\nosetests.exe .\pandas\io\tests\test_json\test_ujson.py -v
testArrayNumpyExcept (pandas.io.tests.test_json.test_ujson.NumpyJSONTests) ... ok
testArrayNumpyLabelled (pandas.io.tests.test_json.test_ujson.NumpyJSONTests) ... ok
testArrays (pandas.io.tests.test_json.test_ujson.NumpyJSONTests) ... ok
testBool (pandas.io.tests.test_json.test_ujson.NumpyJSONTests) ... ok
testBoolArray (pandas.io.tests.test_json.test_ujson.NumpyJSONTests) ... ok
testFloat (pandas.io.tests.test_json.test_ujson.NumpyJSONTests) ... ok
testFloatArray (pandas.io.tests.test_json.test_ujson.NumpyJSONTests) ... ok
testFloatMax (pandas.io.tests.test_json.test_ujson.NumpyJSONTests) ... ok
testInt (pandas.io.tests.test_json.test_ujson.NumpyJSONTests) ... ok
testIntArray (pandas.io.tests.test_json.test_ujson.NumpyJSONTests) ... ok
testIntMax (pandas.io.tests.test_json.test_ujson.NumpyJSONTests) ... ok
testDataFrame (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
testDataFrameNested (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
testDataFrameNumpy (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
testDataFrameNumpyLabelled (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
testIndex (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
testSeries (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
testSeriesNested (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
test_datetimeindex (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... FAIL
test_decodeArrayEmpty (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
test_decodeArrayFaultyUnicode (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... FAIL
test_decodeArrayLeadingCommaFail (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
test_decodeArrayOneItem (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
test_decodeArrayOnlyCommaFail (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
test_decodeArrayTrailingCommaFail (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... FAIL
test_decodeArrayUnmatchedBracketFail (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... FAIL
test_decodeArrayWithBigInt (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... FAIL
test_decodeBigValue (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
test_decodeFloatingPointAdditionalTests (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
test_decodeSmallValue (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
test_decodeTooBigValue (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... FAIL
test_decodeTooSmallValue (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... FAIL
test_decodeVeryTooBigValue (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... FAIL
test_decodeVeryTooSmallValue (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... FAIL
test_decodeWithTrailingNonWhitespaces (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... FAIL
test_decodeWithTrailingWhitespaces (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
test_encodeBigSet (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
test_encodeEmptySet (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... FAIL
test_encodeSet (pandas.io.tests.test_json.test_ujson.PandasJSONTests) ... ok
test_datetime_nanosecond_unit (pandas.io.tests.test_json.test_ujson.UltraJSONTests) ... ok
test_decimalDecodeTest (pandas.io.tests.test_json.test_ujson.UltraJSONTests) ... ok
test_decimalDecodeTestPrecise (pandas.io.tests.test_json.test_ujson.UltraJSONTests) ... ERROR
test_decodeArrayDepthTooBig (pandas.io.tests.test_json.test_ujson.UltraJSONTests) ... PS H:\jreback\pandas>
```

sorry...the build actually crashed 

```
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ipandas/src/ujson/python -Ipandas/src/ujson/lib -Ipandas/src/datetime
on27\lib\site-packages\numpy\core\include -IC:\python27\include -IC:\python27\PC /Tcpandas/src/ujson/python/ujson.c /Fobuild\temp.win-amd64-2.7\Release\pandas/src/ujson/python/ujso
ujson.c
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ipandas/src/ujson/python -Ipandas/src/ujson/lib -Ipandas/src/datetime
on27\lib\site-packages\numpy\core\include -IC:\python27\include -IC:\python27\PC /Tcpandas/src/ujson/python/objToJSON.c /Fobuild\temp.win-amd64-2.7\Release\pandas/src/ujson/python/
objToJSON.c
c:\python27\lib\site-packages\numpy\core\include\numpy\npy_deprecated_api.h(8) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_
pandas/src/ujson/python/objToJSON.c(153) : error C2275: 'PyObject' : illegal use of this type as an expression
        c:\python27\include\object.h(108) : see declaration of 'PyObject'
pandas/src/ujson/python/objToJSON.c(153) : error C2065: 'mod_frame' : undeclared identifier
pandas/src/ujson/python/objToJSON.c(155) : error C2065: 'mod_frame' : undeclared identifier
pandas/src/ujson/python/objToJSON.c(155) : warning C4047: '=' : 'int' differs in levels of indirection from 'PyObject *'
pandas/src/ujson/python/objToJSON.c(156) : error C2065: 'mod_frame' : undeclared identifier
pandas/src/ujson/python/objToJSON.c(158) : error C2065: 'mod_frame' : undeclared identifier
pandas/src/ujson/python/objToJSON.c(158) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
pandas/src/ujson/python/objToJSON.c(158) : warning C4024: 'PyObject_GetAttrString' : different types for formal and actual parameter 1
pandas/src/ujson/python/objToJSON.c(159) : error C2065: 'mod_frame' : undeclared identifier
pandas/src/ujson/python/objToJSON.c(159) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
pandas/src/ujson/python/objToJSON.c(159) : warning C4024: 'PyObject_GetAttrString' : different types for formal and actual parameter 1
pandas/src/ujson/python/objToJSON.c(160) : error C2065: 'mod_frame' : undeclared identifier
pandas/src/ujson/python/objToJSON.c(160) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
pandas/src/ujson/python/objToJSON.c(160) : warning C4024: 'PyObject_GetAttrString' : different types for formal and actual parameter 1
pandas/src/ujson/python/objToJSON.c(161) : error C2065: 'mod_frame' : undeclared identifier
pandas/src/ujson/python/objToJSON.c(161) : error C2065: 'mod_frame' : undeclared identifier
pandas/src/ujson/python/objToJSON.c(161) : error C2065: 'mod_frame' : undeclared identifier
pandas/src/ujson/python/objToJSON.c(312) : warning C4244: '=' : conversion from 'npy_intp' to 'int', possible loss of data
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64\cl.exe"' failed with exit status 2
PS H:\jreback\pandas>
```

I can try it out on a Mac if you walk me through how to checkout this branch and ensure that it builds with clang.

u might need to change `if (mod_frame)` to `if (mod_frame != NULL)` in `initObjToJSON`

@TomAugspurger

u should probably use [hub](http://github.com/defunkt/hub) but see below for the "quick-and-dirty" solution.

``` sh
# do this somewhere other than where you've cloned pandas master
git clone git://github.com/Komnomnomnom/pandas
git checkout ujson-update
python setup.py build_ext --inplace
```

Hmm worked fine for me before I sent the pull request (64-bit Arch Linux), I'll take a look

i can confirm that this builds fine on arch linux 64 as well

[Here's](https://gist.github.com/TomAugspurger/5806629) a gist for the build.

Running the tests now.

Looks like it's VC++ being bit of a stickler again for having variables declared at the beginning of functions. Should be an easy fix.

Should I be using tox for the tests?  I just started reading into it a bit.

```
Toms-MacBook-Pro:pandas tom$ sh test.sh
..........................SS.SSSSSSSSSSSSSSSSSSS..SSS.SSSSSSSSS....SSSS.................................................................S.................................................................................................................................................................................................................................................................................................................................................................................................................................................SSSS......................S........................................................SSSSSSSSSS..................SS....E...............................................................................................................................................................................S.......................SSSSSSS......................................................................................S.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S..................................................................................................................................................S................................................................................................................................................................../Users/tom/test_pandas/pandas/pandas/tests/test_frame.py:10443: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
  raise ValueError
..............................................................................................................................................................................................................................................................................................................................................................................................................................F................S................................................................F.........................................................................................................................................................................................................................................................................................................................................................................................................S.........................................................................................S.............................................................................................................................................................S..................S...S............SSS.........S............SS............SS.....SSSS.............................................................................................................................................................................................................................................................................................................................................................................................
======================================================================
ERROR: Failure: LookupError ('show' not found)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/loader.py", line 413, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/Users/tom/test_pandas/pandas/pandas/rpy/__init__.py", line 2, in <module>
    from common import importr, r, load_data
  File "/Users/tom/test_pandas/pandas/pandas/rpy/common.py", line 12, in <module>
    from rpy2.robjects.packages import importr
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/rpy2/robjects/__init__.py", line 17, in <module>
    from rpy2.robjects.robject import RObjectMixin, RObject
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/rpy2/robjects/robject.py", line 9, in <module>
    class RObjectMixin(object):
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/rpy2/robjects/robject.py", line 22, in RObjectMixin
    __show = rpy2.rinterface.baseenv.get("show")
LookupError: 'show' not found

======================================================================
FAIL: test_sort_datetimes (pandas.tests.test_frame.TestDataFrame)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/tom/test_pandas/pandas/pandas/tests/test_frame.py", line 8473, in test_sort_datetimes
    assert_frame_equal(df1,df2)
  File "/Users/tom/test_pandas/pandas/pandas/util/testing.py", line 230, in assert_frame_equal
    assert(left.index.equals(right.index))
AssertionError

======================================================================
FAIL: test_time_series_plot_color_with_empty_kwargs (pandas.tests.test_graphics.TestDataFrameGroupByPlots)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/tom/test_pandas/pandas/pandas/tests/test_graphics.py", line 811, in test_time_series_plot_color_with_empty_kwargs
    self.assert_(line_colors == ['b', 'g', 'r'])
AssertionError: False is not true

Name                         Stmts   Miss  Cover   Missing
----------------------------------------------------------
pandas                          20      0   100%   
pandas.compat                    0      0   100%   
pandas.compat.scipy             58     24    59%   64, 73-78, 220-242
pandas.core                      0      0   100%   
pandas.core.algorithms         139     20    86%   35, 81-87, 265, 274-279, 285, 318-326
pandas.core.api                 21      0   100%   
pandas.core.array               17      0   100%   
pandas.core.categorical         84     11    87%   76, 80-81, 116, 175, 196-198, 202-204
pandas.core.common            1108     91    92%   76, 97-103, 168-178, 181, 285, 293, 295, 549-552, 556, 560, 565-566, 574, 583, 598-600, 634, 685, 702-703, 726, 746-749, 817, 840, 936, 938-940, 943-945, 949-952, 954, 1005, 1025, 1046, 1071, 1147, 1172, 1174, 1184, 1194-1195, 1331-1333, 1546, 1585, 1635, 1640, 1645, 1694, 1703, 1712, 1840, 1874-1877, 1880, 1888-1891, 1894, 1902, 1945, 1960, 1982, 2030, 2053, 2111-2114
pandas.core.config             286     37    87%   78, 157, 167, 170, 191, 203, 207, 212, 234-236, 351, 403, 428, 612-636, 736-738
pandas.core.config_init         78      3    96%   193-195
pandas.core.daterange           21      0   100%   
pandas.core.datetools           25      0   100%   
pandas.core.expressions         93     18    81%   50-51, 96-101, 119, 121, 123, 129-134, 180
pandas.core.format            1037    190    82%   8-9, 350-353, 363, 390, 411, 599, 608-613, 649, 832, 843, 872, 886-890, 894, 897-899, 903, 906-910, 917-918, 922, 931, 935, 938, 940, 1108-1113, 1156-1165, 1168-1172, 1175-1203, 1206-1223, 1227-1240, 1244-1247, 1250-1290, 1293-1327, 1330-1333, 1441, 1500, 1519, 1584-1593, 1651-1677, 1681-1684, 1704-1705, 1708, 1740-1742
pandas.core.frame             2353     67    97%   569-572, 576-581, 648, 665, 739, 1009, 1054, 1058, 1061-1062, 1479-1496, 1546-1547, 2148, 2567, 3245, 3586-3587, 3591-3592, 3612, 3674, 3727-3758, 3958, 4464, 4745, 5448, 5483, 5770-5775, 5788
pandas.core.generic            425     24    94%   40-43, 46-49, 221-222, 245-246, 401-402, 527-528, 691-692, 731-732, 1088-1089, 1124-1125
pandas.core.groupby           1379     49    96%   62, 80, 90-100, 370, 455, 837-840, 1007, 1017-1018, 1229, 1572, 1580, 1822-1823, 1827, 1874, 2213-2227, 2270-2284, 2323, 2340, 2496
pandas.core.index             1418     20    99%   45, 102-103, 154, 279, 870, 954, 1170, 1270, 1534, 1576, 1585-1590, 2183, 2595-2596
pandas.core.indexing           655     32    95%   149, 203-205, 222, 246-248, 420-424, 448, 537-539, 679, 712, 752, 755, 771, 803, 821, 837, 846, 862, 865, 871, 873, 940-948
pandas.core.internals         1419     38    97%   39, 237-239, 389, 403, 475, 491, 527, 532, 548-556, 563, 571, 652, 696, 702, 788, 873, 882-883, 896, 901-902, 1145-1147, 1265, 1299, 1389, 2262, 2380, 2440, 2514
pandas.core.nanops             377      9    98%   109, 117, 176, 247-251, 511
pandas.core.panel              781     24    97%   115-131, 482, 599-604, 815-816, 1198-1199, 1324, 1370
pandas.core.panel4d              6      0   100%   
pandas.core.panelnd             62      1    98%   61
pandas.core.reshape            429      3    99%   641, 703, 788
pandas.core.series            1437     25    98%   109-111, 225, 335-337, 504, 603, 713, 737, 773, 843-844, 1073, 1086, 1106, 1217-1219, 2336-2339, 2667, 3282, 3373-3374
pandas.core.sparse               3      0   100%   
pandas.core.strings            290      6    98%   82, 444, 614-615, 678-679
pandas.info                      0      0   100%   
pandas.io                        2      0   100%   
pandas.io.api                    9      0   100%   
pandas.io.clipboard              1      0   100%   
pandas.io.common                35     11    69%   72-84
pandas.io.data                 403    238    41%   67-68, 96, 98-99, 116-119, 131-132, 151-152, 182-184, 197-198, 217-219, 228-235, 357-358, 365-367, 375-378, 382-383, 388, 429-430, 437-439, 447-450, 454-455, 470-471, 488, 491-519, 527-528, 532-536, 581, 624-660, 697-728, 767-798, 834-898, 936-1029
pandas.io.date_converters       36      0   100%   
pandas.io.excel                185    122    34%   46, 65, 73-74, 136-164, 183, 196, 218, 242-284, 295-305, 310-317, 331-347, 353, 368-376, 380-410, 416-450
pandas.io.html                 276     40    86%   17-18, 28-29, 36-37, 44-45, 105, 134, 360, 368-369, 455-459, 511, 544-545, 548-565, 568, 575, 578, 721, 723, 726, 732, 737-739
pandas.io.json                 270     23    91%   35, 66, 91-93, 175, 252-253, 277-278, 299-300, 328-334, 360-362, 389-391
pandas.io.parsers             1018     59    94%   497, 703, 713, 772-773, 808, 811, 883-885, 994, 1016, 1092-1099, 1171-1178, 1230, 1264, 1317-1319, 1333, 1351-1352, 1366-1368, 1432, 1435, 1634, 1657-1658, 1750, 1757-1758, 1825, 1879-1886, 1892, 1953-1954, 1957-1958, 1963-1964
pandas.io.pickle                17      6    65%   43-48
pandas.io.pytables            1985    106    95%   56, 195, 204, 337-338, 455-457, 504, 507, 518, 594, 612, 637, 660, 677, 768, 774-775, 949, 1040-1041, 1065, 1102, 1204, 1216, 1248-1249, 1328, 1337, 1440, 1446, 1476, 1479, 1596, 1624, 1632, 1636, 1645, 1653-1654, 1658, 1678-1682, 1716, 1802, 1905, 2000-2001, 2066, 2102, 2129, 2138-2139, 2249, 2256, 2271, 2430, 2432, 2438, 2479, 2494, 2500, 2664-2665, 2712, 2749, 2763, 2816, 2822, 2926, 3009, 3017-3018, 3024-3025, 3037, 3100, 3193-3194, 3248, 3255-3256, 3260-3263, 3301, 3320, 3371, 3466, 3480, 3566, 3576-3577, 3588, 3591-3592, 3610, 3712-3720
pandas.io.sql                  151     39    74%   62, 94-103, 124-132, 189-195, 198, 203, 239-245, 272-273, 276-277, 280, 293, 298, 319-322
pandas.io.stata                467    142    70%   122-124, 138-163, 186-191, 196, 255-258, 295, 300, 308, 318, 326, 332, 336-339, 343, 347, 360, 363, 388, 395-400, 405-406, 411-417, 453, 455, 460, 501, 548, 552, 556-559, 565, 572-575, 589, 596-600, 604-614, 634, 637, 641, 644-649, 668, 670, 674, 677-682, 742, 765-768, 773-774, 785, 807, 812-813, 858-860, 864-867, 871-895, 900-901
pandas.io.wb                    84     73    13%   33-78, 84-98, 104-114, 120-142, 182-187
pandas.sandbox                   0      0   100%   
pandas.sparse                    0      0   100%   
pandas.sparse.api                5      0   100%   
pandas.sparse.array            216      0   100%   
pandas.sparse.frame            475     10    98%   143, 402-403, 407-411, 451, 456, 494-495
pandas.sparse.list              59      0   100%   
pandas.sparse.panel            217      0   100%   
pandas.sparse.series           261      2    99%   136, 186
pandas.stats                     0      0   100%   
pandas.stats.api                 3      0   100%   
pandas.stats.common             25      0   100%   
pandas.stats.fama_macbeth      107      0   100%   
pandas.stats.interface          39      0   100%   
pandas.stats.math               47      0   100%   
pandas.stats.moments           323     36    89%   444, 447, 637-665, 670-677, 681-687
pandas.stats.ols               658      5    99%   51-52, 437, 447, 449
pandas.stats.plm               386      0   100%   
pandas.tools                     0      0   100%   
pandas.tools.describe            3      0   100%   
pandas.tools.merge             698     10    99%   115, 127-128, 141-142, 390, 552-553, 618, 812
pandas.tools.pivot             141      0   100%   
pandas.tools.plotting         1212     49    96%   22-23, 113, 121-124, 138, 280, 282, 361, 400, 543, 552, 556, 558, 571, 756, 785, 868, 912, 955, 978-979, 1042, 1078, 1294-1295, 1314-1315, 1318, 1390, 1419, 1460, 1469, 1721, 1740, 1783, 1880-1882, 1891, 1893, 1895, 1897, 2066, 2084, 2093, 2098
pandas.tools.rplot             404     88    78%   271, 273, 275, 277, 349, 409-424, 439-442, 456-464, 478-480, 494-502, 521-531, 547-566, 577, 579, 697, 775, 777, 784-785, 790, 819, 831, 848, 852, 859-863
pandas.tools.tile              115      1    99%   173
pandas.tseries                   0      0   100%   
pandas.tseries.api               6      0   100%   
pandas.tseries.converter       636     79    88%   42, 58, 61, 66, 92, 94, 107, 116, 155-156, 161, 178-180, 209, 284-285, 288, 294-295, 299-301, 318, 336-337, 346-369, 385, 504, 522, 552, 554, 556, 558, 562, 564, 566, 568, 572, 574, 576, 580, 582, 595, 613, 700-704, 767-771, 880, 896-903, 943, 962, 965, 970
pandas.tseries.frequencies     485      9    98%   37, 45, 435, 961, 1020-1023, 1074
pandas.tseries.index           992     33    97%   244, 300-301, 340, 343, 348, 358, 361, 365, 615-616, 856-857, 860-863, 962, 981, 1051, 1053, 1064, 1201, 1205, 1241, 1246, 1249-1250, 1253, 1399-1400, 1759, 1817
pandas.tseries.offsets         680     10    99%   272-273, 276, 289, 294-295, 301, 303, 314, 1087
pandas.tseries.period          666     12    98%   138, 284, 830, 1121, 1153, 1157-1158, 1165, 1170-1172, 1189-1190
pandas.tseries.plotting        145      5    97%   138, 140, 143-145
pandas.tseries.resample        222      1    99%   295
pandas.tseries.tools           225     29    87%   47-48, 119-125, 131, 140, 256, 285, 288-301, 303, 328-330, 335
pandas.tseries.util             38      0   100%   
pandas.util                      0      0   100%   
pandas.util.compat             258    188    27%   5-14, 23-24, 28-29, 51-59, 66-70, 77-80, 84-88, 92-96, 100-108, 115-131, 137, 141, 145, 149, 153-154, 158-159, 170-190, 201-207, 211-214, 231-237, 241, 249-252, 259-261, 264, 270, 274, 278, 287-288, 312, 315, 325-327, 340-342, 364-378, 382, 386-387, 412-419, 428-435, 444-452, 461-471, 474-475, 489, 496, 501-502
pandas.util.decorators          63     26    59%   11-13, 60, 70-72, 111, 117-124, 162-183
pandas.util.misc                 6      2    67%   9-10
pandas.util.py3compat           27     12    56%   6-15, 22, 34-35, 39-40
pandas.util.terminal            69     43    38%   31-33, 40, 45-66, 73-87, 99-100, 104-109, 111-115
pandas.version                   2      0   100%   
----------------------------------------------------------
TOTAL                        28874   2201    92%   
----------------------------------------------------------------------
Ran 3559 tests in 384.462s

FAILED (SKIP=84, errors=1, failures=2)
```

looks like u may have discovered a few bugs

rpy tests should skip, not sure about the datetime or plot tests (both pass on my machine)

The JSON tests passed though, thanks @TomAugspurger !

@jreback took a while but travis ci finally kicked in and looks ok. Can you try again with msvc (if not already covered by travis)?

@Komnomnomnom built on amd64 windows just fine (and tests al pass)

looks ready to merge?

@jreback sounds good! As long as @cpcloud and @TomAugspurger are happy with the clang build?

@TomAugspurger can you give another run with latest of this PR, just to make sure.....thxs

i'm ok with this, but that doesn't really mean a whole lot since i can't test with a mac. arch linux build is fine as i said b4...

@cpcloud 
cc @jtratner
next projects: http://about.travis-ci.org/blog/introducing-mac-ios-rubymotion-testing/

@jreback that looks interesting i guess only objective-c is allowed since that is all that exists in appleland

I look forward to the iOS port of pandas ;)
On Jun 18, 2013 7:40 PM, "Phillip Cloud" notifications@github.com wrote:

> @jreback https://github.com/jreback that looks interesting i guess only
> objective-c is allowed since that is all that exists in appleland
> 
> —
> Reply to this email directly or view it on GitHubhttps://github.com/pydata/pandas/pull/3946#issuecomment-19650898
> .

after I read it I realized mac is not so soon (and windows even farther off).....

no love for propriety from travis

Here's the relevant part of the build output for the json module, at least I think this is all of it.  I can post the whole thing if need be.

```
building 'pandas.json' extension
creating build/temp.macosx-10.8-x86_64-2.7/pandas/src/ujson
creating build/temp.macosx-10.8-x86_64-2.7/pandas/src/ujson/python
creating build/temp.macosx-10.8-x86_64-2.7/pandas/src/ujson/lib
cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ipandas/src/ujson/python -Ipandas/src/ujson/lib -Ipandas/src/datetime -Ipandas/src/klib -Ipandas/src -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pandas/src/ujson/python/ujson.c -o build/temp.macosx-10.8-x86_64-2.7/pandas/src/ujson/python/ujson.o
cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ipandas/src/ujson/python -Ipandas/src/ujson/lib -Ipandas/src/datetime -Ipandas/src/klib -Ipandas/src -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pandas/src/ujson/python/objToJSON.c -o build/temp.macosx-10.8-x86_64-2.7/pandas/src/ujson/python/objToJSON.o
In file included from pandas/src/ujson/python/objToJSON.c:40:
In file included from /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15:
In file included from /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:
In file included from /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728:
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: 
      "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API
      NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by #defining...
 ^
pandas/src/ujson/python/objToJSON.c:168:14: warning: unused function
      'PyIntToINT32' [-Wunused-function]
static void *PyIntToINT32(JSOBJ _obj, JSONTypeContext *tc, void...
             ^
2 warnings generated.
cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ipandas/src/ujson/python -Ipandas/src/ujson/lib -Ipandas/src/datetime -Ipandas/src/klib -Ipandas/src -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pandas/src/ujson/python/JSONtoObj.c -o build/temp.macosx-10.8-x86_64-2.7/pandas/src/ujson/python/JSONtoObj.o
In file included from pandas/src/ujson/python/JSONtoObj.c:41:
In file included from /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15:
In file included from /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:
In file included from /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728:
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: 
      "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API
      NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by #defining...
 ^
1 warning generated.
cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ipandas/src/ujson/python -Ipandas/src/ujson/lib -Ipandas/src/datetime -Ipandas/src/klib -Ipandas/src -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pandas/src/ujson/lib/ultrajsonenc.c -o build/temp.macosx-10.8-x86_64-2.7/pandas/src/ujson/lib/ultrajsonenc.o
cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ipandas/src/ujson/python -Ipandas/src/ujson/lib -Ipandas/src/datetime -Ipandas/src/klib -Ipandas/src -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pandas/src/ujson/lib/ultrajsondec.c -o build/temp.macosx-10.8-x86_64-2.7/pandas/src/ujson/lib/ultrajsondec.o
pandas/src/ujson/lib/ultrajsondec.c:78:13: warning: unused function 'ClearError'
      [-Wunused-function]
static void ClearError( struct DecoderState *ds)
            ^
1 warning generated.
cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ipandas/src/ujson/python -Ipandas/src/ujson/lib -Ipandas/src/datetime -Ipandas/src/klib -Ipandas/src -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pandas/src/datetime/np_datetime.c -o build/temp.macosx-10.8-x86_64-2.7/pandas/src/datetime/np_datetime.o
In file included from pandas/src/datetime/np_datetime.c:18:
In file included from /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15:
In file included from /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:
In file included from /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728:
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: 
      "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API
      NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by #defining...
 ^
pandas/src/datetime/np_datetime.c:516:53: warning: implicit conversion from
      enumeration type 'NPY_DATETIMEUNIT' to different enumeration type
      'PANDAS_DATETIMEUNIT' [-Wenum-conversion]
    return ((PyDatetimeScalarObject *) obj)->obmeta.base;
    ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included from pandas/src/datetime/np_datetime.c:10:
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7/datetime.h:188:25: warning: 
      unused variable 'PyDateTimeAPI' [-Wunused-variable]
static PyDateTime_CAPI *PyDateTimeAPI = NULL;
                        ^
3 warnings generated.
cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ipandas/src/ujson/python -Ipandas/src/ujson/lib -Ipandas/src/datetime -Ipandas/src/klib -Ipandas/src -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pandas/src/datetime/np_datetime_strings.c -o build/temp.macosx-10.8-x86_64-2.7/pandas/src/datetime/np_datetime_strings.o
In file included from pandas/src/datetime/np_datetime_strings.c:17:
In file included from /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15:
In file included from /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:
In file included from /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728:
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2: warning: 
      "Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API
      NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by #defining...
 ^
pandas/src/datetime/np_datetime_strings.c:127:1: warning: unused function
      'get_gmtime' [-Wunused-function]
get_gmtime(NPY_TIME_T *ts, struct tm *tms)
^
2 warnings generated.
cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/pandas/src/ujson/python/ujson.o build/temp.macosx-10.8-x86_64-2.7/pandas/src/ujson/python/objToJSON.o build/temp.macosx-10.8-x86_64-2.7/pandas/src/ujson/python/JSONtoObj.o build/temp.macosx-10.8-x86_64-2.7/pandas/src/ujson/lib/ultrajsonenc.o build/temp.macosx-10.8-x86_64-2.7/pandas/src/ujson/lib/ultrajsondec.o build/temp.macosx-10.8-x86_64-2.7/pandas/src/datetime/np_datetime.o build/temp.macosx-10.8-x86_64-2.7/pandas/src/datetime/np_datetime_strings.o -o /Users/tom/test_pandas/pandas/pandas/json.so
Toms-MacBook-Pro:pandas tom$ 
```

Should I rerun the tests?

@TomAugspurger did it work? Otherwise I can test on my mac.

Tests looked good on the newest commit.  Same as my previous one.

@jreback ok with this?