{"action":"closed","issue":{"url":"https://api.github.com/repos/Pylons/pyramid/issues/3247","repository_url":"https://api.github.com/repos/Pylons/pyramid","labels_url":"https://api.github.com/repos/Pylons/pyramid/issues/3247/labels{/name}","comments_url":"https://api.github.com/repos/Pylons/pyramid/issues/3247/comments","events_url":"https://api.github.com/repos/Pylons/pyramid/issues/3247/events","html_url":"https://github.com/Pylons/pyramid/issues/3247","id":306433340,"number":3247,"title":"Request.copy() removes Pyramid-added attributes","user":{"login":"rbu","id":65913,"avatar_url":"https://avatars2.githubusercontent.com/u/65913?v=4","gravatar_id":"","url":"https://api.github.com/users/rbu","html_url":"https://github.com/rbu","followers_url":"https://api.github.com/users/rbu/followers","following_url":"https://api.github.com/users/rbu/following{/other_user}","gists_url":"https://api.github.com/users/rbu/gists{/gist_id}","starred_url":"https://api.github.com/users/rbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbu/subscriptions","organizations_url":"https://api.github.com/users/rbu/orgs","repos_url":"https://api.github.com/users/rbu/repos","events_url":"https://api.github.com/users/rbu/events{/privacy}","received_events_url":"https://api.github.com/users/rbu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-03-19T11:58:41Z","updated_at":"2018-04-18T15:05:52Z","closed_at":"2018-04-18T15:05:52Z","author_association":"CONTRIBUTOR","body":"Pyramid's documentation [states that ```Request.copy``` can be used to make a copy of a request](https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/webob.html#methods). The method returns a ```pyramid.request.Request```, but that copy is missing essential request attributes such as ```registry```.\r\n\r\nBackground:\r\nThe method is purely ```webob.copy``` which only make a copy of environment and body. Pyramid does not override it to copy attributes it sets itself.\r\n\r\n## Expected behavior:\r\n```py\r\nr1 = get_current_request()\r\nr2 = r1.copy()\r\nassert r1.registry is r2.registry\r\n```\r\n\r\n## Actual behavior:\r\nRaises ```AttributeError: 'Request' object has no attribute 'registry'``` (from ```r2.registry```)\r\n"}}
{"actor":{"display_login":"tseaver"}}