{"action":"created","issue":{"url":"https://api.github.com/repos/mitsuhiko/babel/issues/106","labels_url":"https://api.github.com/repos/mitsuhiko/babel/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/mitsuhiko/babel/issues/106/comments","events_url":"https://api.github.com/repos/mitsuhiko/babel/issues/106/events","html_url":"https://github.com/mitsuhiko/babel/issues/106","id":38619547,"number":106,"title":"Broken testsuite","user":{"login":"nijel","id":212189,"avatar_url":"https://avatars.githubusercontent.com/u/212189?v=3","gravatar_id":"","url":"https://api.github.com/users/nijel","html_url":"https://github.com/nijel","followers_url":"https://api.github.com/users/nijel/followers","following_url":"https://api.github.com/users/nijel/following{/other_user}","gists_url":"https://api.github.com/users/nijel/gists{/gist_id}","starred_url":"https://api.github.com/users/nijel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nijel/subscriptions","organizations_url":"https://api.github.com/users/nijel/orgs","repos_url":"https://api.github.com/users/nijel/repos","events_url":"https://api.github.com/users/nijel/events{/privacy}","received_events_url":"https://api.github.com/users/nijel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-07-24T11:26:57Z","updated_at":"2015-01-08T14:58:02Z","closed_at":null,"body":"The Babel testsuite (and maybe the code as well, I did not check) is broken as it uses pytz API which is documented not to work. In short pytz timezones should not be used as tzinfo parameter to date/datetime functions, but rather the localize method should be used. See https://bugs.launchpad.net/pytz/+bug/1324158 for pytz bugreports and note in pytz documentation: http://pythonhosted.org//pytz/#introduction\r\n\r\n```\r\n[   42s] =================================== FAILURES ===================================\r\n[   42s] ___________________ DateTimeFormatTestCase.test_timezone_gmt ___________________\r\n[   42s] \r\n[   42s] self = <tests.test_dates.DateTimeFormatTestCase testMethod=test_timezone_gmt>\r\n[   42s] \r\n[   42s]     def test_timezone_gmt(self):\r\n[   42s]         tz = timezone('Europe/Berlin')\r\n[   42s]         t = time(15, 30, tzinfo=tz)\r\n[   42s]         fmt = dates.DateTimeFormat(t, locale='de_DE')\r\n[   42s] >       self.assertEqual('GMT+01:00', fmt['ZZZZ'])\r\n[   42s] E       AssertionError: 'GMT+01:00' != u'GMT+00:53'\r\n[   42s] \r\n[   42s] tests/test_dates.py:188: AssertionError\r\n[   42s] _________________ DateTimeFormatTestCase.test_timezone_rfc822 __________________\r\n[   42s] \r\n[   42s] self = <tests.test_dates.DateTimeFormatTestCase testMethod=test_timezone_rfc822>\r\n[   42s] \r\n[   42s]     def test_timezone_rfc822(self):\r\n[   42s]         tz = timezone('Europe/Berlin')\r\n[   42s]         t = time(15, 30, tzinfo=tz)\r\n[   42s]         fmt = dates.DateTimeFormat(t, locale='de_DE')\r\n[   42s] >       self.assertEqual('+0100', fmt['Z'])\r\n[   42s] E       AssertionError: '+0100' != u'+0053'\r\n[   42s] \r\n[   42s] tests/test_dates.py:182: AssertionError\r\n[   42s] ____________________________ test_get_timezone_gmt _____________________________\r\n[   42s] \r\n[   42s]     def test_get_timezone_gmt():\r\n[   42s]         dt = datetime(2007, 4, 1, 15, 30)\r\n[   42s]         assert dates.get_timezone_gmt(dt, locale='en') == u'GMT+00:00'\r\n[   42s]     \r\n[   42s]         tz = timezone('America/Los_Angeles')\r\n[   42s]         dt = datetime(2007, 4, 1, 15, 30, tzinfo=tz)\r\n[   42s] >       assert dates.get_timezone_gmt(dt, locale='en') == u'GMT-08:00'\r\n[   42s] E       assert 'GMT-08:07' == 'GMT-08:00'\r\n[   42s] E         - GMT-08:07\r\n[   42s] E         ?         ^\r\n[   42s] E         + GMT-08:00\r\n[   42s] E         ?         ^\r\n[   42s] \r\n[   42s] tests/test_dates.py:384: AssertionError\r\n[   42s] ===================== 3 failed, 320 passed in 1.98 seconds =====================\r\n```"},"comment":{"url":"https://api.github.com/repos/mitsuhiko/babel/issues/comments/69190012","html_url":"https://github.com/mitsuhiko/babel/issues/106#issuecomment-69190012","issue_url":"https://api.github.com/repos/mitsuhiko/babel/issues/106","id":69190012,"user":{"login":"benselme","id":174267,"avatar_url":"https://avatars.githubusercontent.com/u/174267?v=3","gravatar_id":"","url":"https://api.github.com/users/benselme","html_url":"https://github.com/benselme","followers_url":"https://api.github.com/users/benselme/followers","following_url":"https://api.github.com/users/benselme/following{/other_user}","gists_url":"https://api.github.com/users/benselme/gists{/gist_id}","starred_url":"https://api.github.com/users/benselme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benselme/subscriptions","organizations_url":"https://api.github.com/users/benselme/orgs","repos_url":"https://api.github.com/users/benselme/repos","events_url":"https://api.github.com/users/benselme/events{/privacy}","received_events_url":"https://api.github.com/users/benselme/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T14:58:02Z","updated_at":"2015-01-08T14:58:02Z","body":"Dupe of #133, fixed by #134 "}}