{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift/issues/248","labels_url":"https://api.github.com/repos/apple/swift/issues/248/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift/issues/248/comments","events_url":"https://api.github.com/repos/apple/swift/issues/248/events","html_url":"https://github.com/apple/swift/pull/248","id":120585264,"number":248,"title":"Remove duplicate build preset declarations","user":{"login":"RLovelett","id":335572,"avatar_url":"https://avatars.githubusercontent.com/u/335572?v=3","gravatar_id":"","url":"https://api.github.com/users/RLovelett","html_url":"https://github.com/RLovelett","followers_url":"https://api.github.com/users/RLovelett/followers","following_url":"https://api.github.com/users/RLovelett/following{/other_user}","gists_url":"https://api.github.com/users/RLovelett/gists{/gist_id}","starred_url":"https://api.github.com/users/RLovelett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RLovelett/subscriptions","organizations_url":"https://api.github.com/users/RLovelett/orgs","repos_url":"https://api.github.com/users/RLovelett/repos","events_url":"https://api.github.com/users/RLovelett/events{/privacy}","received_events_url":"https://api.github.com/users/RLovelett/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-05T20:26:15Z","updated_at":"2015-12-07T23:17:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/248","html_url":"https://github.com/apple/swift/pull/248","diff_url":"https://github.com/apple/swift/pull/248.diff","patch_url":"https://github.com/apple/swift/pull/248.patch"},"body":"Python 3's [configparser](https://docs.python.org/3/library/configparser.html) does not parse in the same way that Python 2's did. Specifically, Python 3's does not allow duplicate sections (or in Swift parlance presets).\r\n\r\nPython 3 does provide a \"strict\" property that can be sent to the constructor to return to the behavior of Python 2 (e.g.,  `config = ConfigParser.SafeConfigParser(substitutions, allow_no_value=True, strict=False)`). However, this provides it's own set of complications in that the Python 2 version of the constructor does not.\r\n\r\nTherefore, instead of having a conditional in the runtime to detect which version of Python and build the correct initializer this patch normalizes the presets configuration file such that there are no more duplicates. This should work in both Python 2 and 3.\r\n\r\nAlso worth noting: this patch is insufficient by itself to make the build scripts work with Python 3. This patch is written with the [\"Incremental Development\"](https://swift.org/contributing/#contributing-code) theory in mind and in [preparation for other patches currently in progress, (i.e., #90)](https://github.com/apple/swift/pull/90)."},"comment":{"url":"https://api.github.com/repos/apple/swift/issues/comments/162702245","html_url":"https://github.com/apple/swift/pull/248#issuecomment-162702245","issue_url":"https://api.github.com/repos/apple/swift/issues/248","id":162702245,"user":{"login":"benlangmuir","id":3412956,"avatar_url":"https://avatars.githubusercontent.com/u/3412956?v=3","gravatar_id":"","url":"https://api.github.com/users/benlangmuir","html_url":"https://github.com/benlangmuir","followers_url":"https://api.github.com/users/benlangmuir/followers","following_url":"https://api.github.com/users/benlangmuir/following{/other_user}","gists_url":"https://api.github.com/users/benlangmuir/gists{/gist_id}","starred_url":"https://api.github.com/users/benlangmuir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benlangmuir/subscriptions","organizations_url":"https://api.github.com/users/benlangmuir/orgs","repos_url":"https://api.github.com/users/benlangmuir/repos","events_url":"https://api.github.com/users/benlangmuir/events{/privacy}","received_events_url":"https://api.github.com/users/benlangmuir/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T23:17:11Z","updated_at":"2015-12-07T23:17:11Z","body":"Why did you inline the settings into the presets?  For example, you added settings to `buildbot,tools=RA,stdlib=DA` that looks identical to what's already there because of `mixin_buildbot_tools_RA_stdlib_DA`."}}