{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/10601","labels_url":"https://api.github.com/repos/pydata/pandas/issues/10601/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/10601/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/10601/events","html_url":"https://github.com/pydata/pandas/issues/10601","id":95387146,"number":10601,"title":"BUG in dealing with deprecated argument in convert_objects ","user":{"login":"jorisvandenbossche","id":1020496,"avatar_url":"https://avatars.githubusercontent.com/u/1020496?v=3","gravatar_id":"","url":"https://api.github.com/users/jorisvandenbossche","html_url":"https://github.com/jorisvandenbossche","followers_url":"https://api.github.com/users/jorisvandenbossche/followers","following_url":"https://api.github.com/users/jorisvandenbossche/following{/other_user}","gists_url":"https://api.github.com/users/jorisvandenbossche/gists{/gist_id}","starred_url":"https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorisvandenbossche/subscriptions","organizations_url":"https://api.github.com/users/jorisvandenbossche/orgs","repos_url":"https://api.github.com/users/jorisvandenbossche/repos","events_url":"https://api.github.com/users/jorisvandenbossche/events{/privacy}","received_events_url":"https://api.github.com/users/jorisvandenbossche/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/Bug","name":"Bug","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/pydata/pandas/milestones/34","html_url":"https://github.com/pydata/pandas/milestones/0.17.0","labels_url":"https://api.github.com/repos/pydata/pandas/milestones/34/labels","id":1033710,"number":34,"title":"0.17.0","description":"","creator":{"login":"jreback","id":953992,"avatar_url":"https://avatars.githubusercontent.com/u/953992?v=3","gravatar_id":"","url":"https://api.github.com/users/jreback","html_url":"https://github.com/jreback","followers_url":"https://api.github.com/users/jreback/followers","following_url":"https://api.github.com/users/jreback/following{/other_user}","gists_url":"https://api.github.com/users/jreback/gists{/gist_id}","starred_url":"https://api.github.com/users/jreback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreback/subscriptions","organizations_url":"https://api.github.com/users/jreback/orgs","repos_url":"https://api.github.com/users/jreback/repos","events_url":"https://api.github.com/users/jreback/events{/privacy}","received_events_url":"https://api.github.com/users/jreback/received_events","type":"User","site_admin":false},"open_issues":189,"closed_issues":120,"state":"open","created_at":"2015-03-23T10:47:38Z","updated_at":"2015-07-16T09:08:33Z","due_on":"2015-07-31T04:00:00Z","closed_at":null},"comments":1,"created_at":"2015-07-16T09:08:28Z","updated_at":"2015-07-16T14:45:37Z","closed_at":null,"body":"cc @bashtage\r\n\r\nThe deprecation warning is triggered, but the value of the keyword argument should also be adapted so it still works with the new code I think (from a failure in the docs)\r\n\r\n```\r\nIn [1]: from datetime import datetime\r\n\r\nIn [2]: s = pd.Series([datetime(2001,1,1,0,0), 'foo', 1.0, 1,\r\n   ...:                pd.Timestamp('20010104'), '20010105'], dtype='O')\r\n\r\nIn [5]: s.convert_objects(convert_dates='coerce')\r\nc:\\users\\vdbosscj\\scipy\\pandas-joris\\pandas\\util\\decorators.py:81: FutureWarning\r\n: the 'convert_dates' keyword is deprecated, use 'datetime' instead\r\n  warnings.warn(msg, FutureWarning)\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n<ipython-input-5-b962b638ac86> in <module>()\r\n----> 1 s.convert_objects(convert_dates='coerce')\r\n\r\nc:\\users\\vdbosscj\\scipy\\pandas-joris\\pandas\\util\\decorators.pyc in wrapper(*args\r\n, **kwargs)\r\n     86                 else:\r\n     87                     kwargs[new_arg_name] = new_arg_value\r\n---> 88             return func(*args, **kwargs)\r\n     89         return wrapper\r\n     90     return _deprecate_kwarg\r\n\r\nc:\\users\\vdbosscj\\scipy\\pandas-joris\\pandas\\util\\decorators.pyc in wrapper(*args\r\n, **kwargs)\r\n     86                 else:\r\n     87                     kwargs[new_arg_name] = new_arg_value\r\n---> 88             return func(*args, **kwargs)\r\n     89         return wrapper\r\n     90     return _deprecate_kwarg\r\n\r\nc:\\users\\vdbosscj\\scipy\\pandas-joris\\pandas\\util\\decorators.pyc in wrapper(*args\r\n, **kwargs)\r\n     86                 else:\r\n     87                     kwargs[new_arg_name] = new_arg_value\r\n---> 88             return func(*args, **kwargs)\r\n     89         return wrapper\r\n     90     return _deprecate_kwarg\r\n\r\nc:\\users\\vdbosscj\\scipy\\pandas-joris\\pandas\\core\\generic.py in convert_objects(s\r\nelf, datetime, numeric, timedelta, coerce, copy)\r\n   2468                                timedelta=timedelta,\r\n   2469                                coerce=coerce,\r\n-> 2470                                copy=copy)).__finalize__(self)\r\n   2471\r\n   2472     #-------------------------------------------------------------------\r\n---\r\n\r\nc:\\users\\vdbosscj\\scipy\\pandas-joris\\pandas\\core\\internals.py in convert(self, *\r\n*kwargs)\r\n   3459         \"\"\" convert the whole block as one \"\"\"\r\n   3460         kwargs['by_item'] = False\r\n-> 3461         return self.apply('convert', **kwargs)\r\n   3462\r\n   3463     @property\r\n\r\nc:\\users\\vdbosscj\\scipy\\pandas-joris\\pandas\\core\\internals.py in apply(self, f,\r\naxes, filter, do_integrity_check, **kwargs)\r\n   2467                                                  copy=align_copy)\r\n   2468\r\n-> 2469             applied = getattr(b, f)(**kwargs)\r\n   2470\r\n   2471             if isinstance(applied, list):\r\n\r\nc:\\users\\vdbosscj\\scipy\\pandas-joris\\pandas\\core\\internals.py in convert(self, d\r\natetime, numeric, timedelta, coerce, copy, by_item)\r\n   1493                 timedelta=timedelta,\r\n   1494                 coerce=coerce,\r\n-> 1495                 copy=copy\r\n   1496             ).reshape(self.values.shape)\r\n   1497             blocks.append(make_block(values,\r\n\r\nc:\\users\\vdbosscj\\scipy\\pandas-joris\\pandas\\core\\common.py in _possibly_convert_\r\nobjects(values, datetime, numeric, timedelta, coerce, copy)\r\n   1897     \"\"\" if we have an object dtype, try to coerce dates and/or numbers \"\r\n\"\"\r\n   1898\r\n-> 1899     conversion_count = sum((datetime, numeric, timedelta))\r\n   1900     if conversion_count == 0:\r\n   1901         import warnings\r\n\r\nTypeError: unsupported operand type(s) for +: 'int' and 'str'\r\n```\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/121978163","html_url":"https://github.com/pydata/pandas/issues/10601#issuecomment-121978163","issue_url":"https://api.github.com/repos/pydata/pandas/issues/10601","id":121978163,"user":{"login":"bashtage","id":5585221,"avatar_url":"https://avatars.githubusercontent.com/u/5585221?v=3","gravatar_id":"","url":"https://api.github.com/users/bashtage","html_url":"https://github.com/bashtage","followers_url":"https://api.github.com/users/bashtage/followers","following_url":"https://api.github.com/users/bashtage/following{/other_user}","gists_url":"https://api.github.com/users/bashtage/gists{/gist_id}","starred_url":"https://api.github.com/users/bashtage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bashtage/subscriptions","organizations_url":"https://api.github.com/users/bashtage/orgs","repos_url":"https://api.github.com/users/bashtage/repos","events_url":"https://api.github.com/users/bashtage/events{/privacy}","received_events_url":"https://api.github.com/users/bashtage/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T14:45:37Z","updated_at":"2015-07-16T14:45:37Z","body":"I agree that this requires some messy handling until the old style is killed.  "}}