{"action":"closed","number":45,"pull_request":{"url":"https://api.github.com/repos/keleshev/schema/pulls/45","id":17329241,"html_url":"https://github.com/keleshev/schema/pull/45","diff_url":"https://github.com/keleshev/schema/pull/45.diff","patch_url":"https://github.com/keleshev/schema/pull/45.patch","issue_url":"https://api.github.com/repos/keleshev/schema/issues/45","number":45,"state":"closed","locked":false,"title":"added nested prioritisation for dict validation","user":{"login":"nerdvegas","id":1632842,"avatar_url":"https://avatars.githubusercontent.com/u/1632842?v=3","gravatar_id":"","url":"https://api.github.com/users/nerdvegas","html_url":"https://github.com/nerdvegas","followers_url":"https://api.github.com/users/nerdvegas/followers","following_url":"https://api.github.com/users/nerdvegas/following{/other_user}","gists_url":"https://api.github.com/users/nerdvegas/gists{/gist_id}","starred_url":"https://api.github.com/users/nerdvegas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerdvegas/subscriptions","organizations_url":"https://api.github.com/users/nerdvegas/orgs","repos_url":"https://api.github.com/users/nerdvegas/repos","events_url":"https://api.github.com/users/nerdvegas/events{/privacy}","received_events_url":"https://api.github.com/users/nerdvegas/received_events","type":"User","site_admin":false},"body":"Consider the schema:\r\n\r\n```\r\ns = Schema({Optional('foo'): int, Optional(basestring): object})\r\n```\r\nHere we would like to have dict validation that ensures 'foo' is integer, but also allows any other extra, unvalidated items. It doesn't work though, because both schema keys have the same priority, and a 'foo' dict entry can be consumed by the Optional(basestring) schema.\r\n\r\nThis pull request contains a simple change so that prioritisation takes schema contents into account. For example, since a string instance would be used for validation before basestring (non-types before types), it follows that Optional(string instance) now takes precedence over Optional(basestring).\r\n\r\n","created_at":"2014-06-19T01:20:01Z","updated_at":"2015-03-04T18:45:17Z","closed_at":"2015-03-04T18:45:17Z","merged_at":null,"merge_commit_sha":"a169ebd5ae0bf012a0d25a3237774a5076f64e46","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/keleshev/schema/pulls/45/commits","review_comments_url":"https://api.github.com/repos/keleshev/schema/pulls/45/comments","review_comment_url":"https://api.github.com/repos/keleshev/schema/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keleshev/schema/issues/45/comments","statuses_url":"https://api.github.com/repos/keleshev/schema/statuses/0e1f04b84af7dc15c26fd434767f81b6e2d2a69d","head":{"label":"nerdvegas:master","ref":"master","sha":"0e1f04b84af7dc15c26fd434767f81b6e2d2a69d","user":{"login":"nerdvegas","id":1632842,"avatar_url":"https://avatars.githubusercontent.com/u/1632842?v=3","gravatar_id":"","url":"https://api.github.com/users/nerdvegas","html_url":"https://github.com/nerdvegas","followers_url":"https://api.github.com/users/nerdvegas/followers","following_url":"https://api.github.com/users/nerdvegas/following{/other_user}","gists_url":"https://api.github.com/users/nerdvegas/gists{/gist_id}","starred_url":"https://api.github.com/users/nerdvegas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerdvegas/subscriptions","organizations_url":"https://api.github.com/users/nerdvegas/orgs","repos_url":"https://api.github.com/users/nerdvegas/repos","events_url":"https://api.github.com/users/nerdvegas/events{/privacy}","received_events_url":"https://api.github.com/users/nerdvegas/received_events","type":"User","site_admin":false},"repo":{"id":20983186,"name":"schema","full_name":"nerdvegas/schema","owner":{"login":"nerdvegas","id":1632842,"avatar_url":"https://avatars.githubusercontent.com/u/1632842?v=3","gravatar_id":"","url":"https://api.github.com/users/nerdvegas","html_url":"https://github.com/nerdvegas","followers_url":"https://api.github.com/users/nerdvegas/followers","following_url":"https://api.github.com/users/nerdvegas/following{/other_user}","gists_url":"https://api.github.com/users/nerdvegas/gists{/gist_id}","starred_url":"https://api.github.com/users/nerdvegas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerdvegas/subscriptions","organizations_url":"https://api.github.com/users/nerdvegas/orgs","repos_url":"https://api.github.com/users/nerdvegas/repos","events_url":"https://api.github.com/users/nerdvegas/events{/privacy}","received_events_url":"https://api.github.com/users/nerdvegas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nerdvegas/schema","description":"Schema validation just got Pythonic","fork":true,"url":"https://api.github.com/repos/nerdvegas/schema","forks_url":"https://api.github.com/repos/nerdvegas/schema/forks","keys_url":"https://api.github.com/repos/nerdvegas/schema/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nerdvegas/schema/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nerdvegas/schema/teams","hooks_url":"https://api.github.com/repos/nerdvegas/schema/hooks","issue_events_url":"https://api.github.com/repos/nerdvegas/schema/issues/events{/number}","events_url":"https://api.github.com/repos/nerdvegas/schema/events","assignees_url":"https://api.github.com/repos/nerdvegas/schema/assignees{/user}","branches_url":"https://api.github.com/repos/nerdvegas/schema/branches{/branch}","tags_url":"https://api.github.com/repos/nerdvegas/schema/tags","blobs_url":"https://api.github.com/repos/nerdvegas/schema/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nerdvegas/schema/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nerdvegas/schema/git/refs{/sha}","trees_url":"https://api.github.com/repos/nerdvegas/schema/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nerdvegas/schema/statuses/{sha}","languages_url":"https://api.github.com/repos/nerdvegas/schema/languages","stargazers_url":"https://api.github.com/repos/nerdvegas/schema/stargazers","contributors_url":"https://api.github.com/repos/nerdvegas/schema/contributors","subscribers_url":"https://api.github.com/repos/nerdvegas/schema/subscribers","subscription_url":"https://api.github.com/repos/nerdvegas/schema/subscription","commits_url":"https://api.github.com/repos/nerdvegas/schema/commits{/sha}","git_commits_url":"https://api.github.com/repos/nerdvegas/schema/git/commits{/sha}","comments_url":"https://api.github.com/repos/nerdvegas/schema/comments{/number}","issue_comment_url":"https://api.github.com/repos/nerdvegas/schema/issues/comments{/number}","contents_url":"https://api.github.com/repos/nerdvegas/schema/contents/{+path}","compare_url":"https://api.github.com/repos/nerdvegas/schema/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nerdvegas/schema/merges","archive_url":"https://api.github.com/repos/nerdvegas/schema/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nerdvegas/schema/downloads","issues_url":"https://api.github.com/repos/nerdvegas/schema/issues{/number}","pulls_url":"https://api.github.com/repos/nerdvegas/schema/pulls{/number}","milestones_url":"https://api.github.com/repos/nerdvegas/schema/milestones{/number}","notifications_url":"https://api.github.com/repos/nerdvegas/schema/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nerdvegas/schema/labels{/name}","releases_url":"https://api.github.com/repos/nerdvegas/schema/releases{/id}","created_at":"2014-06-19T01:04:19Z","updated_at":"2014-07-07T10:52:23Z","pushed_at":"2014-06-19T01:30:15Z","git_url":"git://github.com/nerdvegas/schema.git","ssh_url":"git@github.com:nerdvegas/schema.git","clone_url":"https://github.com/nerdvegas/schema.git","svn_url":"https://github.com/nerdvegas/schema","homepage":"","size":201,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"keleshev:master","ref":"master","sha":"b81c544263a59d5bb3caa37d7628cb00e7d08288","user":{"login":"keleshev","id":619158,"avatar_url":"https://avatars.githubusercontent.com/u/619158?v=3","gravatar_id":"","url":"https://api.github.com/users/keleshev","html_url":"https://github.com/keleshev","followers_url":"https://api.github.com/users/keleshev/followers","following_url":"https://api.github.com/users/keleshev/following{/other_user}","gists_url":"https://api.github.com/users/keleshev/gists{/gist_id}","starred_url":"https://api.github.com/users/keleshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keleshev/subscriptions","organizations_url":"https://api.github.com/users/keleshev/orgs","repos_url":"https://api.github.com/users/keleshev/repos","events_url":"https://api.github.com/users/keleshev/events{/privacy}","received_events_url":"https://api.github.com/users/keleshev/received_events","type":"User","site_admin":false},"repo":{"id":5473383,"name":"schema","full_name":"keleshev/schema","owner":{"login":"keleshev","id":619158,"avatar_url":"https://avatars.githubusercontent.com/u/619158?v=3","gravatar_id":"","url":"https://api.github.com/users/keleshev","html_url":"https://github.com/keleshev","followers_url":"https://api.github.com/users/keleshev/followers","following_url":"https://api.github.com/users/keleshev/following{/other_user}","gists_url":"https://api.github.com/users/keleshev/gists{/gist_id}","starred_url":"https://api.github.com/users/keleshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keleshev/subscriptions","organizations_url":"https://api.github.com/users/keleshev/orgs","repos_url":"https://api.github.com/users/keleshev/repos","events_url":"https://api.github.com/users/keleshev/events{/privacy}","received_events_url":"https://api.github.com/users/keleshev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/keleshev/schema","description":"Schema validation just got Pythonic","fork":false,"url":"https://api.github.com/repos/keleshev/schema","forks_url":"https://api.github.com/repos/keleshev/schema/forks","keys_url":"https://api.github.com/repos/keleshev/schema/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keleshev/schema/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keleshev/schema/teams","hooks_url":"https://api.github.com/repos/keleshev/schema/hooks","issue_events_url":"https://api.github.com/repos/keleshev/schema/issues/events{/number}","events_url":"https://api.github.com/repos/keleshev/schema/events","assignees_url":"https://api.github.com/repos/keleshev/schema/assignees{/user}","branches_url":"https://api.github.com/repos/keleshev/schema/branches{/branch}","tags_url":"https://api.github.com/repos/keleshev/schema/tags","blobs_url":"https://api.github.com/repos/keleshev/schema/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keleshev/schema/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keleshev/schema/git/refs{/sha}","trees_url":"https://api.github.com/repos/keleshev/schema/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keleshev/schema/statuses/{sha}","languages_url":"https://api.github.com/repos/keleshev/schema/languages","stargazers_url":"https://api.github.com/repos/keleshev/schema/stargazers","contributors_url":"https://api.github.com/repos/keleshev/schema/contributors","subscribers_url":"https://api.github.com/repos/keleshev/schema/subscribers","subscription_url":"https://api.github.com/repos/keleshev/schema/subscription","commits_url":"https://api.github.com/repos/keleshev/schema/commits{/sha}","git_commits_url":"https://api.github.com/repos/keleshev/schema/git/commits{/sha}","comments_url":"https://api.github.com/repos/keleshev/schema/comments{/number}","issue_comment_url":"https://api.github.com/repos/keleshev/schema/issues/comments{/number}","contents_url":"https://api.github.com/repos/keleshev/schema/contents/{+path}","compare_url":"https://api.github.com/repos/keleshev/schema/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keleshev/schema/merges","archive_url":"https://api.github.com/repos/keleshev/schema/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keleshev/schema/downloads","issues_url":"https://api.github.com/repos/keleshev/schema/issues{/number}","pulls_url":"https://api.github.com/repos/keleshev/schema/pulls{/number}","milestones_url":"https://api.github.com/repos/keleshev/schema/milestones{/number}","notifications_url":"https://api.github.com/repos/keleshev/schema/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keleshev/schema/labels{/name}","releases_url":"https://api.github.com/repos/keleshev/schema/releases{/id}","created_at":"2012-08-19T18:56:20Z","updated_at":"2015-03-04T18:44:30Z","pushed_at":"2015-03-04T18:44:30Z","git_url":"git://github.com/keleshev/schema.git","ssh_url":"git@github.com:keleshev/schema.git","clone_url":"https://github.com/keleshev/schema.git","svn_url":"https://github.com/keleshev/schema","homepage":"","size":397,"stargazers_count":548,"watchers_count":548,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":26,"forks":42,"open_issues":26,"watchers":548,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keleshev/schema/pulls/45"},"html":{"href":"https://github.com/keleshev/schema/pull/45"},"issue":{"href":"https://api.github.com/repos/keleshev/schema/issues/45"},"comments":{"href":"https://api.github.com/repos/keleshev/schema/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/keleshev/schema/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/keleshev/schema/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keleshev/schema/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/keleshev/schema/statuses/0e1f04b84af7dc15c26fd434767f81b6e2d2a69d"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":2,"review_comments":0,"commits":2,"additions":10,"deletions":7,"changed_files":1}}