anybox.testing.datetime breaks pandas
Created originally on Bitbucket by Anonymous
In a new virtualenv, type:
#!bash
pip install pandas anybox.testing.datetime
python -c "import anybox.testing.datetime; import pandas"
The result currently is:
lib/python2.7/site-packages/pandas/_libs/__init__.py:3: RuntimeWarning: datetime.datetime size changed, may indicate binary incompatibility. Expected 64, got 48
from .tslib import iNaT, NaT, Timestamp, Timedelta, OutOfBoundsDatetime
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "lib/python2.7/site-packages/pandas/__init__.py", line 26, in <module>
from pandas._libs import (hashtable as _hashtable,
File "lib/python2.7/site-packages/pandas/_libs/__init__.py", line 3, in <module>
from .tslib import iNaT, NaT, Timestamp, Timedelta, OutOfBoundsDatetime
File "pandas/_libs/tslib.pyx", line 895, in init pandas._libs.tslib (pandas/_libs/tslib.c:119406)
File "pandas/_libs/tslib.pyx", line 815, in pandas._libs.tslib.NaTType.__new__ (pandas/_libs/tslib.c:16544)
TypeError: __new__() takes exactly one argument (4 given)
Notice that the error doesn't happen if you invert the import order.
Currently this bug breaks running Odoo tests run with test_odoo
from anybox.recipe.odoo
if an addon imports pandas
at the module level.