{"action":"opened","issue":{"url":"https://api.github.com/repos/jgm/cmark/issues/83","labels_url":"https://api.github.com/repos/jgm/cmark/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/jgm/cmark/issues/83/comments","events_url":"https://api.github.com/repos/jgm/cmark/issues/83/events","html_url":"https://github.com/jgm/cmark/issues/83","id":107426701,"number":83,"title":"Failed tests on CPython 3.5.0","user":{"login":"zmwangx","id":4149852,"avatar_url":"https://avatars.githubusercontent.com/u/4149852?v=3","gravatar_id":"","url":"https://api.github.com/users/zmwangx","html_url":"https://github.com/zmwangx","followers_url":"https://api.github.com/users/zmwangx/followers","following_url":"https://api.github.com/users/zmwangx/following{/other_user}","gists_url":"https://api.github.com/users/zmwangx/gists{/gist_id}","starred_url":"https://api.github.com/users/zmwangx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmwangx/subscriptions","organizations_url":"https://api.github.com/users/zmwangx/orgs","repos_url":"https://api.github.com/users/zmwangx/repos","events_url":"https://api.github.com/users/zmwangx/events{/privacy}","received_events_url":"https://api.github.com/users/zmwangx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-21T00:22:01Z","updated_at":"2015-09-21T00:22:01Z","closed_at":null,"body":"Some of the tests are not compatible with CPython 3.5.0. With latest release 0.22.0 (and probably also master, since there's only one, unrelated commit since the latest release), four out of the six `make test` tests fail:\r\n\r\n```\r\n\t  2 - html_normalization (Failed)\r\n\t  3 - spectest_library (Failed)\r\n\t  5 - spectest_executable (Failed)\r\n\t  6 - smartpuncttest_executable (Failed)\r\n```\r\n\r\nA sample test log is here: https://gist.github.com/a13cfb20c900e16a8bf0.\r\n\r\nMost of the failures are due to the removed `HTMLParseError` in Python 3.5, and that one is easy to fix. See my proposed changes in #84. After applying my patch, tests 3, 5, and 6 all pass, but there's still a non-trivial failure in `html_normalization`'s doctest (log is here: https://gist.github.com/12b71e2ef22ef4b9d635):\r\n\r\n```python-traceback\r\nCommand: \"/usr/local/bin/python3\" \"-m\" \"doctest\" \"/tmp/commonmark20150920-37576-vpuo15/cmark-0.22.0/test/normalize.py\"\r\nDirectory: /tmp/commonmark20150920-37576-vpuo15/cmark-0.22.0/build/testdir\r\n\"html_normalization\" start time: Sep 20 16:36 PDT\r\nOutput:\r\n----------------------------------------------------------\r\n**********************************************************************\r\nFile \"/tmp/commonmark20150920-37576-vpuo15/cmark-0.22.0/test/normalize.py\", line 170, in normalize.normalize_html\r\nFailed example:\r\n    normalize_html(\"&forall;&amp;&gt;&lt;&quot;\")\r\nExpected:\r\n    '\\u2200&amp;&gt;&lt;&quot;'\r\nGot:\r\n    '∀&><\"'\r\n**********************************************************************\r\n1 items had failures:\r\n   1 of  10 in normalize.normalize_html\r\n***Test Failed*** 1 failures.\r\n```\r\n\r\nLooks like somehow the HTML entities have been decoded. I think it is related to the Python 3.5 change to `HTMLParser`: the `convert_charrefs` argument to `__init__`, introduced in Python 3.4, is now default to `True`. But I've tried passing `convert_charrefs=False` to `__init__`; that doesn't immediately fix the problem. I haven't got time to read through `normalize.py`, so perhaps someone else has to look at what's wrong with it.\r\n\r\n---\r\n\r\nP.S. Quoting from https://docs.python.org/3.5/whatsnew/3.5.html:\r\n\r\n> The deprecated “strict” mode and argument of HTMLParser, HTMLParser.error(), and the HTMLParserError exception have been removed. (Contributed by Ezio Melotti in issue 15114.) The convert_charrefs argument of HTMLParser is now True by default. (Contributed by Berker Peksag in issue 21047.)"}}