{"action":"created","comment":{"url":"https://api.github.com/repos/astropy/astropy/pulls/comments/31867310","id":31867310,"diff_hunk":"@@ -44,77 +45,23 @@ def _auto_names(n_cols):\n      np.isfinite, np.isinf, np.isnan, np.sign, np.signbit])\n \n \n-COLUMN_ATTRS = set(['name', 'unit', 'dtype', 'format', 'description', 'meta', 'parent_table'])\n-\n-def col_setattr(col, attr, value):\n-    \"\"\"\n-    Set one of the column attributes.\n-\n-    Warning: this function is subject to change or removal.\n-    \"\"\"\n-    if attr not in COLUMN_ATTRS:\n-        raise AttributeError(\"attribute must be one of {0}\".format(COLUMN_ATTRS))\n-\n-    # The unit and dtype attributes are considered universal and do NOT get\n-    # stored in _astropy_column_attrs.  For BaseColumn instances use the usual setattr.\n-    if isinstance(col, BaseColumn):\n-        setattr(col, attr, value)\n-    else:\n-        # If no _astropy_column_attrs or it is None then convert to dict\n-        if getattr(col, '_astropy_column_attrs', None) is None:\n-            col._astropy_column_attrs = {}\n-        if attr == 'parent_table':\n-            value = None if value is None else weakref.ref(value)\n-        col._astropy_column_attrs[attr] = value\n-\n-def col_getattr(col, attr, default=None):\n-    \"\"\"\n-    Get one of the column attributes\n-\n-    Warning: this function is subject to change or removal.\n-    \"\"\"\n-    if attr not in COLUMN_ATTRS:\n-        raise AttributeError(\"attribute must be one of {0}\".format(COLUMN_ATTRS))\n-\n-    # The unit and dtype attributes are considered universal and do NOT get\n-    # stored in _astropy_column_attrs.  For BaseColumn instances use the usual setattr.\n-    if (isinstance(col, BaseColumn) or\n-            (isinstance(col, Quantity) and attr in ('dtype', 'unit'))):\n-        value = getattr(col, attr, default)\n-    else:\n-        # If col does not have _astropy_column_attrs or it is None (meaning\n-        # nothing has been set yet) then return default, otherwise look for\n-        # the attribute in the astropy_column_attrs dict.\n-        if getattr(col, '_astropy_column_attrs', None) is None:\n-            value = default\n-        else:\n-            value = col._astropy_column_attrs.get(attr, default)\n-\n-        # Weak ref for parent table\n-        if attr == 'parent_table' and callable(value):\n-            value = value()\n-\n-        # Mixins have a default dtype of Object if nothing else was set\n-        if attr == 'dtype' and value is None:\n-            value = np.dtype('O')\n-\n-    return value\n-\n def _col_update_attrs_from(newcol, col, exclude_attrs=['name', 'parent_table']):\n     \"\"\"\n-    Update _astropy_column_attrs from mixin `col` to `newcol`.  Does nothing\n-    for BaseColumn cols\n+    Copy info from mixin `col` to `newcol`.  Does nothing for BaseColumn cols.\n \n     Warning: this function is subject to change or removal.\n     \"\"\"\n     if isinstance(newcol, BaseColumn):\n         return\n \n-    attrs = COLUMN_ATTRS - set(exclude_attrs)\n+    if not hasattr(newcol, 'info'):\n+        newcol.__class__.info = DataInfo(BaseInfo)","path":"astropy/table/column.py","position":81,"original_position":81,"commit_id":"b877fa30cbf75191ce0c646cedfdf7eba304c886","original_commit_id":"b877fa30cbf75191ce0c646cedfdf7eba304c886","user":{"login":"taldcroft","id":348089,"avatar_url":"https://avatars.githubusercontent.com/u/348089?v=3","gravatar_id":"","url":"https://api.github.com/users/taldcroft","html_url":"https://github.com/taldcroft","followers_url":"https://api.github.com/users/taldcroft/followers","following_url":"https://api.github.com/users/taldcroft/following{/other_user}","gists_url":"https://api.github.com/users/taldcroft/gists{/gist_id}","starred_url":"https://api.github.com/users/taldcroft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taldcroft/subscriptions","organizations_url":"https://api.github.com/users/taldcroft/orgs","repos_url":"https://api.github.com/users/taldcroft/repos","events_url":"https://api.github.com/users/taldcroft/events{/privacy}","received_events_url":"https://api.github.com/users/taldcroft/received_events","type":"User","site_admin":false},"body":"The `__init__` for `DataInfo` takes the class not an instance.","created_at":"2015-06-06T11:36:08Z","updated_at":"2015-06-06T11:36:08Z","html_url":"https://github.com/astropy/astropy/pull/3731#discussion_r31867310","pull_request_url":"https://api.github.com/repos/astropy/astropy/pulls/3731","_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments/31867310"},"html":{"href":"https://github.com/astropy/astropy/pull/3731#discussion_r31867310"},"pull_request":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3731"}}},"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/3731","id":34131962,"html_url":"https://github.com/astropy/astropy/pull/3731","diff_url":"https://github.com/astropy/astropy/pull/3731.diff","patch_url":"https://github.com/astropy/astropy/pull/3731.patch","issue_url":"https://api.github.com/repos/astropy/astropy/issues/3731","number":3731,"state":"open","locked":false,"title":"Create ColumnInfo class for mixin columns","user":{"login":"taldcroft","id":348089,"avatar_url":"https://avatars.githubusercontent.com/u/348089?v=3","gravatar_id":"","url":"https://api.github.com/users/taldcroft","html_url":"https://github.com/taldcroft","followers_url":"https://api.github.com/users/taldcroft/followers","following_url":"https://api.github.com/users/taldcroft/following{/other_user}","gists_url":"https://api.github.com/users/taldcroft/gists{/gist_id}","starred_url":"https://api.github.com/users/taldcroft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taldcroft/subscriptions","organizations_url":"https://api.github.com/users/taldcroft/orgs","repos_url":"https://api.github.com/users/taldcroft/repos","events_url":"https://api.github.com/users/taldcroft/events{/privacy}","received_events_url":"https://api.github.com/users/taldcroft/received_events","type":"User","site_admin":false},"body":"This is an initial implementation for #3518 to create `ColumnInfo` (aka `ColumnAttribute`) class for mixin columns.\r\n\r\nOne point is that for classes with built-in mixin support the `info` attribute is a class property wrapping `_info` as a `ColumnInfo` object, while for external classes (e.g. pandas Series), `info` is just a plain attribute which is a `ColumnInfo` object.  \r\n\r\nCurrently all the calls to `col_setattr` and `col_getattr` have been left in place, but those methods are now trivial calls to inspect the `col.info` object.  Will get around to doing the replacement once @mhvk is happy with the direction in this PR.\r\n\r\nCloses #3518.\r\n\r\n","created_at":"2015-04-26T23:14:28Z","updated_at":"2015-06-06T11:36:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7aa8c640f9c4dab1bdf68a7524a83aa5b5b6cada","assignee":{"login":"mhvk","id":2789820,"avatar_url":"https://avatars.githubusercontent.com/u/2789820?v=3","gravatar_id":"","url":"https://api.github.com/users/mhvk","html_url":"https://github.com/mhvk","followers_url":"https://api.github.com/users/mhvk/followers","following_url":"https://api.github.com/users/mhvk/following{/other_user}","gists_url":"https://api.github.com/users/mhvk/gists{/gist_id}","starred_url":"https://api.github.com/users/mhvk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhvk/subscriptions","organizations_url":"https://api.github.com/users/mhvk/orgs","repos_url":"https://api.github.com/users/mhvk/repos","events_url":"https://api.github.com/users/mhvk/events{/privacy}","received_events_url":"https://api.github.com/users/mhvk/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/astropy/astropy/milestones/20","html_url":"https://github.com/astropy/astropy/milestones/v1.1.0","labels_url":"https://api.github.com/repos/astropy/astropy/milestones/20/labels","id":907426,"number":20,"title":"v1.1.0","description":"","creator":{"login":"eteq","id":346587,"avatar_url":"https://avatars.githubusercontent.com/u/346587?v=3","gravatar_id":"","url":"https://api.github.com/users/eteq","html_url":"https://github.com/eteq","followers_url":"https://api.github.com/users/eteq/followers","following_url":"https://api.github.com/users/eteq/following{/other_user}","gists_url":"https://api.github.com/users/eteq/gists{/gist_id}","starred_url":"https://api.github.com/users/eteq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eteq/subscriptions","organizations_url":"https://api.github.com/users/eteq/orgs","repos_url":"https://api.github.com/users/eteq/repos","events_url":"https://api.github.com/users/eteq/events{/privacy}","received_events_url":"https://api.github.com/users/eteq/received_events","type":"User","site_admin":false},"open_issues":38,"closed_issues":35,"state":"open","created_at":"2014-12-17T20:05:23Z","updated_at":"2015-06-05T18:17:12Z","due_on":"2015-07-23T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/astropy/astropy/pulls/3731/commits","review_comments_url":"https://api.github.com/repos/astropy/astropy/pulls/3731/comments","review_comment_url":"https://api.github.com/repos/astropy/astropy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/3731/comments","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/b877fa30cbf75191ce0c646cedfdf7eba304c886","head":{"label":"taldcroft:table-colinfo","ref":"table-colinfo","sha":"b877fa30cbf75191ce0c646cedfdf7eba304c886","user":{"login":"taldcroft","id":348089,"avatar_url":"https://avatars.githubusercontent.com/u/348089?v=3","gravatar_id":"","url":"https://api.github.com/users/taldcroft","html_url":"https://github.com/taldcroft","followers_url":"https://api.github.com/users/taldcroft/followers","following_url":"https://api.github.com/users/taldcroft/following{/other_user}","gists_url":"https://api.github.com/users/taldcroft/gists{/gist_id}","starred_url":"https://api.github.com/users/taldcroft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taldcroft/subscriptions","organizations_url":"https://api.github.com/users/taldcroft/orgs","repos_url":"https://api.github.com/users/taldcroft/repos","events_url":"https://api.github.com/users/taldcroft/events{/privacy}","received_events_url":"https://api.github.com/users/taldcroft/received_events","type":"User","site_admin":false},"repo":{"id":2571537,"name":"astropy","full_name":"taldcroft/astropy","owner":{"login":"taldcroft","id":348089,"avatar_url":"https://avatars.githubusercontent.com/u/348089?v=3","gravatar_id":"","url":"https://api.github.com/users/taldcroft","html_url":"https://github.com/taldcroft","followers_url":"https://api.github.com/users/taldcroft/followers","following_url":"https://api.github.com/users/taldcroft/following{/other_user}","gists_url":"https://api.github.com/users/taldcroft/gists{/gist_id}","starred_url":"https://api.github.com/users/taldcroft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taldcroft/subscriptions","organizations_url":"https://api.github.com/users/taldcroft/orgs","repos_url":"https://api.github.com/users/taldcroft/repos","events_url":"https://api.github.com/users/taldcroft/events{/privacy}","received_events_url":"https://api.github.com/users/taldcroft/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/taldcroft/astropy","description":"Main AstroPy repository","fork":true,"url":"https://api.github.com/repos/taldcroft/astropy","forks_url":"https://api.github.com/repos/taldcroft/astropy/forks","keys_url":"https://api.github.com/repos/taldcroft/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taldcroft/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taldcroft/astropy/teams","hooks_url":"https://api.github.com/repos/taldcroft/astropy/hooks","issue_events_url":"https://api.github.com/repos/taldcroft/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/taldcroft/astropy/events","assignees_url":"https://api.github.com/repos/taldcroft/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/taldcroft/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/taldcroft/astropy/tags","blobs_url":"https://api.github.com/repos/taldcroft/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taldcroft/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taldcroft/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/taldcroft/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taldcroft/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/taldcroft/astropy/languages","stargazers_url":"https://api.github.com/repos/taldcroft/astropy/stargazers","contributors_url":"https://api.github.com/repos/taldcroft/astropy/contributors","subscribers_url":"https://api.github.com/repos/taldcroft/astropy/subscribers","subscription_url":"https://api.github.com/repos/taldcroft/astropy/subscription","commits_url":"https://api.github.com/repos/taldcroft/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/taldcroft/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/taldcroft/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/taldcroft/astropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/taldcroft/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/taldcroft/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taldcroft/astropy/merges","archive_url":"https://api.github.com/repos/taldcroft/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taldcroft/astropy/downloads","issues_url":"https://api.github.com/repos/taldcroft/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/taldcroft/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/taldcroft/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/taldcroft/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taldcroft/astropy/labels{/name}","releases_url":"https://api.github.com/repos/taldcroft/astropy/releases{/id}","created_at":"2011-10-13T18:44:28Z","updated_at":"2015-01-27T03:15:49Z","pushed_at":"2015-06-04T19:33:20Z","git_url":"git://github.com/taldcroft/astropy.git","ssh_url":"git@github.com:taldcroft/astropy.git","clone_url":"https://github.com/taldcroft/astropy.git","svn_url":"https://github.com/taldcroft/astropy","homepage":"astropy.org","size":38511,"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":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"astropy:master","ref":"master","sha":"cd766e183b79e6b1387da3a814c06a524007ac2e","user":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"repo":{"id":2081289,"name":"astropy","full_name":"astropy/astropy","owner":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/astropy/astropy","description":"Repository for the Astropy core package","fork":false,"url":"https://api.github.com/repos/astropy/astropy","forks_url":"https://api.github.com/repos/astropy/astropy/forks","keys_url":"https://api.github.com/repos/astropy/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astropy/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astropy/astropy/teams","hooks_url":"https://api.github.com/repos/astropy/astropy/hooks","issue_events_url":"https://api.github.com/repos/astropy/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/astropy/astropy/events","assignees_url":"https://api.github.com/repos/astropy/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/astropy/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/astropy/astropy/tags","blobs_url":"https://api.github.com/repos/astropy/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astropy/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astropy/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/astropy/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/astropy/astropy/languages","stargazers_url":"https://api.github.com/repos/astropy/astropy/stargazers","contributors_url":"https://api.github.com/repos/astropy/astropy/contributors","subscribers_url":"https://api.github.com/repos/astropy/astropy/subscribers","subscription_url":"https://api.github.com/repos/astropy/astropy/subscription","commits_url":"https://api.github.com/repos/astropy/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/astropy/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/astropy/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/astropy/astropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/astropy/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/astropy/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astropy/astropy/merges","archive_url":"https://api.github.com/repos/astropy/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astropy/astropy/downloads","issues_url":"https://api.github.com/repos/astropy/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/astropy/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/astropy/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/astropy/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astropy/astropy/labels{/name}","releases_url":"https://api.github.com/repos/astropy/astropy/releases{/id}","created_at":"2011-07-21T01:33:49Z","updated_at":"2015-06-06T09:01:56Z","pushed_at":"2015-06-05T20:09:58Z","git_url":"git://github.com/astropy/astropy.git","ssh_url":"git@github.com:astropy/astropy.git","clone_url":"https://github.com/astropy/astropy.git","svn_url":"https://github.com/astropy/astropy","homepage":"www.astropy.org","size":68614,"stargazers_count":580,"watchers_count":580,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":393,"mirror_url":null,"open_issues_count":529,"forks":393,"open_issues":529,"watchers":580,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3731"},"html":{"href":"https://github.com/astropy/astropy/pull/3731"},"issue":{"href":"https://api.github.com/repos/astropy/astropy/issues/3731"},"comments":{"href":"https://api.github.com/repos/astropy/astropy/issues/3731/comments"},"review_comments":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3731/comments"},"review_comment":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3731/commits"},"statuses":{"href":"https://api.github.com/repos/astropy/astropy/statuses/b877fa30cbf75191ce0c646cedfdf7eba304c886"}}}}