)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"0e82df775d30d8c214fb27630011470d435228f6","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Deprecate strtime"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patches deprecated strtime() as it\u0027s a either useless or a very bad"},{"line_number":10,"context_line":"idea to use it."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It\u0027s useless because it\u0027s 3 lines wrapper around utcnow(),"},{"line_number":13,"context_line":"datetime.strftime() and isotime() which does not bring as it can be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9a0c5dc1_e4b798f3","line":10,"updated":"2015-05-13 12:34:32.000000000","message":"IMO the main issue is that strtime() omits the timezone offset when formatting an aware datetime object (with a known timezone). For this reason, it\u0027s error prone, especially with your other change modifying utcnow() to return aware datetime object.","commit_id":"4faec358ad6dc0183c5f82283d5ce698b5ca73b1"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"0e82df775d30d8c214fb27630011470d435228f6","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It\u0027s useless because it\u0027s 3 lines wrapper around utcnow(),"},{"line_number":13,"context_line":"datetime.strftime() and isotime() which does not bring as it can be"},{"line_number":14,"context_line":"replaced by one line of code in all cases."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"It\u0027s a bad idea because contrary to what one could expect:"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9a0c5dc1_4489c425","line":14,"updated":"2015-05-13 12:34:32.000000000","message":"Well, OpenStack must reuse the Python stdlib as much as possible, especially when it\u0027s good enough.","commit_id":"4faec358ad6dc0183c5f82283d5ce698b5ca73b1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"b91bc234b55c9d2303d63d823bf7406e49bebb50","unresolved":false,"context_lines":[{"line_number":10,"context_line":"idea to use it."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It\u0027s useless because it\u0027s 3 lines wrapper around utcnow(),"},{"line_number":13,"context_line":"datetime.strftime() and isotime() which does not bring as it can be"},{"line_number":14,"context_line":"replaced by one line of code in all cases."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"It\u0027s a bad idea because contrary to what one could expect:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"7a016987_28fbbc48","line":13,"updated":"2015-05-31 15:18:18.000000000","message":"this sentence needs rewording... either \"bring\" is the wrong word or there\u0027s a word missing after \"bring\".","commit_id":"a067ec4e7e696ea8f322e87910e48f64cecf78df"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"0a14ae8c599a4f250af68c2181971ccba35c4e74","unresolved":false,"context_lines":[{"line_number":10,"context_line":"idea to use it."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It\u0027s useless because it\u0027s 3 lines wrapper around utcnow(),"},{"line_number":13,"context_line":"datetime.strftime() and isotime() which does not bring as it can be"},{"line_number":14,"context_line":"replaced by one line of code in all cases."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"It\u0027s a bad idea because contrary to what one could expect:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"7a016987_069904c4","line":13,"in_reply_to":"7a016987_28fbbc48","updated":"2015-06-01 10:50:12.000000000","message":"Done","commit_id":"a067ec4e7e696ea8f322e87910e48f64cecf78df"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"b91bc234b55c9d2303d63d823bf7406e49bebb50","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It\u0027s useless because it\u0027s 3 lines wrapper around utcnow(),"},{"line_number":13,"context_line":"datetime.strftime() and isotime() which does not bring as it can be"},{"line_number":14,"context_line":"replaced by one line of code in all cases."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"It\u0027s a bad idea because contrary to what one could expect:"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"7a016987_a8e68cad","line":14,"updated":"2015-05-31 15:18:18.000000000","message":"what\u0027s the line of code?","commit_id":"a067ec4e7e696ea8f322e87910e48f64cecf78df"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"0a14ae8c599a4f250af68c2181971ccba35c4e74","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"It\u0027s useless because it\u0027s 3 lines wrapper around utcnow(),"},{"line_number":13,"context_line":"datetime.strftime() and isotime() which does not bring as it can be"},{"line_number":14,"context_line":"replaced by one line of code in all cases."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"It\u0027s a bad idea because contrary to what one could expect:"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"7a016987_46f13c00","line":14,"in_reply_to":"7a016987_a8e68cad","updated":"2015-06-01 10:50:12.000000000","message":"Examples are provided in the docstring for the user to upgrade.","commit_id":"a067ec4e7e696ea8f322e87910e48f64cecf78df"}],"oslo_utils/timeutils.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"914a254362be8b791faa49b5cfb06ebbe8233e53","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    \"\"\""},{"line_number":63,"context_line":"    warnings.warn("},{"line_number":64,"context_line":"        \"strtime is deprecated, use either isotime() or datetime.strftime()\","},{"line_number":65,"context_line":"        DeprecationWarning)"},{"line_number":66,"context_line":"    if not at:"},{"line_number":67,"context_line":"        at \u003d utcnow()"},{"line_number":68,"context_line":"    return at.strftime(fmt)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a930d6b_01005000","line":65,"updated":"2015-01-21 23:35:38.000000000","message":"Do u want to put the stacklevel in here or not? stacklevel\u003d2 should do it I think.","commit_id":"3cfa24b4348817a2a2196b320bb535d7535e1e2d"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"4b2a5a344c21af73335ada63959af92cff8a2e9a","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"@removals.remove("},{"line_number":58,"context_line":"    message\u003d\"use either oslo_utils.timeutils.isotime \""},{"line_number":59,"context_line":"    \"or datetime.strftime instead\","},{"line_number":60,"context_line":"    version\u003d\"1.3\","},{"line_number":61,"context_line":"    removal_version\u003d\"?\","},{"line_number":62,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a0c5dc1_088d5131","line":59,"updated":"2015-05-12 12:42:23.000000000","message":"strtime(t) is the same than t.isoformat(), you may also mention this method.\n\n\u003e\u003e\u003e import datetime\n\u003e\u003e\u003e from oslo_utils.timeutils import isotime, strtime\n\u003e\u003e\u003e t\u003ddatetime.datetime.now()\n\u003e\u003e\u003e t.isoformat() \u003d\u003d strtime(t)\nTrue\n\n\nI\u0027m not sure that isotime() is a good suggestion since it returns a different result, it contains the timezone:\n\n\u003e\u003e\u003e isotime(t)\n\u00272015-05-12T14:35:49Z\u0027\n\nBy the way, isotime() is *wrong*: for unaware datetime, the timezone can be different than UTC (it\u0027s usually the locale timezone).\n\n\ndatetime.datetime.utcnow() gets the current date/time in UTC timezone, but sadly it returns an unaware datetime object.\n\nHopefully, Python 3.2 added timezone.utc and has a better support for UTC datetime objects. Example:\n\n\u003e\u003e\u003e datetime.datetime.utcnow().isoformat()\n\u00272015-05-12T12:38:48.140768\u0027\n\u003e\u003e\u003e datetime.datetime.now(tz\u003ddatetime.timezone.utc).isoformat()\n\u00272015-05-12T12:38:37.044719+00:00\u0027\n\nThe second object is an \"aware\" object, it contains a timezeone. The first object has no timezone.","commit_id":"324b5e5335b413c97fdb50af6250613ed0b2479a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"dc89790a945f95d44d46e5db6f62d8acc9b64060","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"@removals.remove("},{"line_number":58,"context_line":"    message\u003d\"use either oslo_utils.timeutils.isotime \""},{"line_number":59,"context_line":"    \"or datetime.strftime instead\","},{"line_number":60,"context_line":"    version\u003d\"1.3\","},{"line_number":61,"context_line":"    removal_version\u003d\"?\","},{"line_number":62,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a0c5dc1_28eed58b","line":59,"in_reply_to":"9a0c5dc1_088d5131","updated":"2015-05-12 12:47:26.000000000","message":"A timestamp without timezone is pretty useless. So I maintain what I said that I recommend isotime().\n\nWe don\u0027t want to handle datetime without timezone in OpenStack IMHO.","commit_id":"324b5e5335b413c97fdb50af6250613ed0b2479a"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"691f1f06d9a083068cb6d14dd1f892d7aff1b8f6","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"@removals.remove("},{"line_number":58,"context_line":"    message\u003d\"use either oslo_utils.timeutils.isotime \""},{"line_number":59,"context_line":"    \"or datetime.strftime instead\","},{"line_number":60,"context_line":"    version\u003d\"1.3\","},{"line_number":61,"context_line":"    removal_version\u003d\"?\","},{"line_number":62,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a0c5dc1_ee7b257a","line":59,"in_reply_to":"9a0c5dc1_28eed58b","updated":"2015-05-12 13:15:22.000000000","message":"\u003e A timestamp without timezone is pretty useless. So I maintain what I said that I recommend isotime().\n\nAdding a wrong timezone is worse than not omitting the timezone for unaware datetime objects.\n\n\u003e We don\u0027t want to handle datetime without timezone in OpenStack IMHO.\n\nI\u0027m quite sure that most datetime in OpenStack are unaware. I just checked oslo.utils: utcnow() returns an unaware datetime object.\n\nI propose this plan:\n\n- Enhance utcnow() to return an aware datetime object\n- *Fix* isotime() to only add the timezone for aware objects\n\nDeprecating strtime() can be done in parallel, but only if you suggest to use isoformat() and strtime() methods. If you prefer to suggest to use isotime(), the deprecation should be the last part of the plan.\n\nPython 3 has a better support for aware datetime objects, for example it has datetime.timezone.utc which is very useful. For Python 2, it\u0027s possible to hack sometimes if you only care of the UTC timezone. In the past, I wrote this class which basically implements datetime.timezone.utc:\n\nhttps://bitbucket.org/haypo/hachoir/src/f9c997b6fcd3abcd0b265f1307d7aea572827667/hachoir-metadata/hachoir_metadata/timezone.py?at\u003ddefault#cl-3","commit_id":"324b5e5335b413c97fdb50af6250613ed0b2479a"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"62940621cf725e6dcf2a3f21971ff1bef8f68586","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"@removals.remove("},{"line_number":58,"context_line":"    message\u003d\"use either oslo_utils.timeutils.isotime \""},{"line_number":59,"context_line":"    \"or datetime.strftime instead\","},{"line_number":60,"context_line":"    version\u003d\"1.3\","},{"line_number":61,"context_line":"    removal_version\u003d\"?\","},{"line_number":62,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a0c5dc1_8573674d","line":59,"in_reply_to":"9a0c5dc1_ee7b257a","updated":"2015-05-12 14:04:29.000000000","message":"You are mixing 2 different problems. The fact that isotime() has an edge case where indeed it returns Z when no timezone is passed is irrelevant to this patch.","commit_id":"324b5e5335b413c97fdb50af6250613ed0b2479a"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"0e82df775d30d8c214fb27630011470d435228f6","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    \"\"\"Returns formatted utcnow."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    .. deprecated:: \u003e 1.5.0"},{"line_number":67,"context_line":"       Use either :func:`isotime` or :func:`datetime.strftime` instead."},{"line_number":68,"context_line":"    \"\"\""},{"line_number":69,"context_line":"    if not at:"},{"line_number":70,"context_line":"        at \u003d utcnow()"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a0c5dc1_440664cf","line":67,"updated":"2015-05-13 12:34:32.000000000","message":"Hum, strtime() gets the current time when it\u0027s called without parameters. You may document how to replace it:\n\n strtime() \u003d\u003e utcnow().isoformat()\n strtime(fmt\u003d...) \u003d\u003e utcnow().strftime(fmt)\n strtime(at) \u003d\u003e at.isoformat()\n strtime(at, fmt) \u003d\u003e at.strftime(fmt)\n\nPlease mention at least utcnow() in the docstring.","commit_id":"4faec358ad6dc0183c5f82283d5ce698b5ca73b1"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"9b8c094ea223e7ea235e977dbdede65d4ce9cd9a","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    \"\"\"Returns formatted utcnow."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    .. deprecated:: \u003e 1.5.0"},{"line_number":67,"context_line":"       Use either :func:`isotime` or :func:`datetime.strftime` instead."},{"line_number":68,"context_line":"    \"\"\""},{"line_number":69,"context_line":"    if not at:"},{"line_number":70,"context_line":"        at \u003d utcnow()"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a0c5dc1_98aefc83","line":67,"in_reply_to":"9a0c5dc1_440664cf","updated":"2015-05-13 12:56:32.000000000","message":"Done","commit_id":"4faec358ad6dc0183c5f82283d5ce698b5ca73b1"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"037183ba992c481efdba6e8ff6fd2b93fdafeef3","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"@removals.remove("},{"line_number":58,"context_line":"    message\u003d\"use either datetime.datetime.isotime() \""},{"line_number":59,"context_line":"    \"or datetime.datetime.strftime() instead\","},{"line_number":60,"context_line":"    version\u003d\"1.6\","},{"line_number":61,"context_line":"    removal_version\u003d\"?\","}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_718c837f","line":58,"updated":"2015-05-13 13:53:22.000000000","message":"datetime.datetime.isotime() doesn\u0027t exist. I guess that you mean isotime() of the current module?","commit_id":"80ad5ae67df46ddba69928220abef76b6abe63c9"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"25359f98f885d8d23838efa61cda7ecbf4c05eab","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"@removals.remove("},{"line_number":58,"context_line":"    message\u003d\"use either datetime.datetime.isotime() \""},{"line_number":59,"context_line":"    \"or datetime.datetime.strftime() instead\","},{"line_number":60,"context_line":"    version\u003d\"1.6\","},{"line_number":61,"context_line":"    removal_version\u003d\"?\","}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_91bff7fa","line":58,"in_reply_to":"9a0c5dc1_718c837f","updated":"2015-05-13 13:54:56.000000000","message":"I don\u0027t understand. You propose to deprecate isotime() in https://review.openstack.org/#/c/182602/\n\nAnd here you suggest to use isotime()?\n\nMaybe you mean utcnow()?","commit_id":"80ad5ae67df46ddba69928220abef76b6abe63c9"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"6679b3ec7f95ca87d79d2e80db2b78053f9c402c","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"@removals.remove("},{"line_number":58,"context_line":"    message\u003d\"use either datetime.datetime.isotime() \""},{"line_number":59,"context_line":"    \"or datetime.datetime.strftime() instead\","},{"line_number":60,"context_line":"    version\u003d\"1.6\","},{"line_number":61,"context_line":"    removal_version\u003d\"?\","}],"source_content_type":"text/x-python","patch_set":7,"id":"9a0c5dc1_fd7162a9","line":58,"in_reply_to":"9a0c5dc1_91bff7fa","updated":"2015-05-13 15:06:46.000000000","message":"I meant isoformat.","commit_id":"80ad5ae67df46ddba69928220abef76b6abe63c9"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"b91bc234b55c9d2303d63d823bf7406e49bebb50","unresolved":false,"context_lines":[{"line_number":30,"context_line":"# ISO 8601 extended time format with microseconds"},{"line_number":31,"context_line":"_ISO8601_TIME_FORMAT_SUBSECOND \u003d \u0027%Y-%m-%dT%H:%M:%S.%f\u0027"},{"line_number":32,"context_line":"_ISO8601_TIME_FORMAT \u003d \u0027%Y-%m-%dT%H:%M:%S\u0027"},{"line_number":33,"context_line":"PERFECT_TIME_FORMAT \u003d _ISO8601_TIME_FORMAT_SUBSECOND"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"_MAX_DATETIME_SEC \u003d 59"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a016987_c8c1c8e5","line":33,"updated":"2015-05-31 15:18:18.000000000","message":"This field needs a docstring if we expect it to be used.","commit_id":"a067ec4e7e696ea8f322e87910e48f64cecf78df"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"b91bc234b55c9d2303d63d823bf7406e49bebb50","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    return at.strftime(fmt)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"def parse_strtime(timestr, fmt\u003dPERFECT_TIME_FORMAT):"},{"line_number":97,"context_line":"    \"\"\"Turn a formatted time back into a datetime.\"\"\""},{"line_number":98,"context_line":"    return datetime.datetime.strptime(timestr, fmt)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a016987_e897e4e9","line":96,"updated":"2015-05-31 15:18:18.000000000","message":"seems like this should be deprecated too","commit_id":"a067ec4e7e696ea8f322e87910e48f64cecf78df"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"0a14ae8c599a4f250af68c2181971ccba35c4e74","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    return at.strftime(fmt)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"def parse_strtime(timestr, fmt\u003dPERFECT_TIME_FORMAT):"},{"line_number":97,"context_line":"    \"\"\"Turn a formatted time back into a datetime.\"\"\""},{"line_number":98,"context_line":"    return datetime.datetime.strptime(timestr, fmt)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a016987_c6bc0c08","line":96,"in_reply_to":"7a016987_e897e4e9","updated":"2015-06-01 10:50:12.000000000","message":"Maybe in a later patch, for now we need it for compatibility purpose, as they are things out there (e.g. old versions) generating strtime timestamps.\n\nBut it\u0027ll likely be replaceable by parse_isotime() indeed.","commit_id":"a067ec4e7e696ea8f322e87910e48f64cecf78df"}]}
