Author demian.brecht
Recipients demian.brecht, ezio.melotti, orsenthil, r.david.murray, terry.reedy
Date 2013-03-18.15:28:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1363620497.15.0.850599967702.issue17272@psf.upfronthosting.co.za>
In-reply-to
Content
No worries.

The change is not backwards incompatible. test_urllib2 test pass without any modification (I'm getting a segfault in test_heapq atm so can't run the full suite). I've simply moved the side effects cause by __init__ to a setter so that full_url may be set after instantiation and will still incur the same results as after initial creation.

The biggest problem with this particular attribute and the way that it's currently handled is inconsistent with the rest of the class. The only other attribute that incurs side effects when set (data) is implemented with @property getter and setters. When set, it incurs side effects on the headers (removing Content-Length). Unless I'm missing something, other attributes are directly mutable and do not incur side effects on instance state when set.

In my mind, if full_url is publicly accessible, then it should be publicly accessible /and/ settable. It currently is not without causing invalid state within a given Request instance.
History
Date User Action Args
2013-03-18 15:28:17demian.brechtsetrecipients: + demian.brecht, terry.reedy, orsenthil, ezio.melotti, r.david.murray
2013-03-18 15:28:17demian.brechtsetmessageid: <1363620497.15.0.850599967702.issue17272@psf.upfronthosting.co.za>
2013-03-18 15:28:17demian.brechtlinkissue17272 messages
2013-03-18 15:28:16demian.brechtcreate