You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/travis/build/pydata/pandas/pandas/tseries/tests/test_period.py:420: DeprecationWarning: parsing timezone aware datetimes is deprecated; this will raise an error in the future
full build here
note this is only on the numpy-dev builds (last 2)
@shoyer recent change to show a deprecation warning on passing tz-aware strings to numpy here is now causing loads of tests to show these.
so in order to keep backward compat I suppose we need a wrapper function
In [1]: np.__version__
Out[1]: '1.12.0.dev0+a38942a'
In [2]: np.datetime64('2007-01-01 09:00:00.001Z')
/Users/jreback/miniconda/envs/numpy_dev/bin/ipython:1: DeprecationWarning: parsing timezone aware datetimes is deprecated; this will raise an error in the future
#!/bin/bash /Users/jreback/miniconda/envs/numpy_dev/bin/python.app
Out[2]: numpy.datetime64('2007-01-01T09:00:00.001')
In [3]: np.datetime64('2007-01-01 09:00:00.001')
Out[3]: numpy.datetime64('2007-01-01T09:00:00.001')
In [4]: np.datetime64('2007-01-01 09:00:00.001').item()
Out[4]: datetime.datetime(2007, 1, 1, 9, 0, 0, 1000)
current numpy
In [2]: np.__version__
Out[2]: '1.10.2'
In [3]: np.datetime64('2007-01-01 09:00:00.001Z')
Out[3]: numpy.datetime64('2007-01-01T04:00:00.001-0500')
In [5]: np.datetime64('2007-01-01 09:00:00.001Z').item()
Out[5]: datetime.datetime(2007, 1, 1, 9, 0, 0, 1000)
so maybe
np_datetime64_compat(....) that can then introspect our defined _np_version_under1p11 (define in pandas/__init__.py) and add a 'Z' if needed (pre-suppose that we change the input formats to 2007-01-01 09:00:00.001') for clarity.
The text was updated successfully, but these errors were encountered:
Hmm. I wonder if we should adjust numpy to not issue a deprecation warning when the "Z" specifier is provided? Folks will be using that for quite a while for backwards compat, and it's actually 100% forwards compat in the typical case where you're time zone naive as UTC only...
it IS technically wrong I think though. a 'Z' implies by definition a tz-aware date (that is UTC). Since numpy doesn't support aware, then I guess it is clear what it is.
But you are right, it is no harm. OTOH, if you don't issue a DeprecationWarning then no-one will ever fix it.
full build here
note this is only on the numpy-dev builds (last 2)
@shoyer recent change to show a deprecation warning on passing tz-aware strings to numpy here is now causing loads of tests to show these.
so in order to keep backward compat I suppose we need a wrapper function
current numpy
so maybe
np_datetime64_compat(....)
that can then introspect our defined_np_version_under1p11
(define inpandas/__init__.py
) and add a 'Z' if needed (pre-suppose that we change the input formats to2007-01-01 09:00:00.001'
) for clarity.The text was updated successfully, but these errors were encountered: