Author demian.brecht
Recipients demian.brecht, ezio.melotti, orsenthil, python-dev, r.david.murray, terry.reedy
Date 2013-04-30.07:15:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Issue 8280 reports the error by way of urlopen(). In light of that, would it not make more sense to have the *Opener be responsible for determining which parts of the url should be used?

i.e., line ~1255:

r.url = req.get_full_url()

might instead be

r.url = req.full_url.split('#')[0]

To me, it would make more sense to have the client code (in this case, meaning the consumer of the Request object, which is the *Opener) be smart enough to know what parts of the url should be used in the HTTP request than to have the Request object have inconsistencies in the set and subsequent get values for full_url.

I wouldn't have an issue at all with adding a new patch that (on top of implementing full_url):

1. Adds identical tests to get_full_url for full_url
2. Changes the client code in *Opener (and anywhere else known to exhibit the same behaviour) to strip the URL fragment for the HTTP request

I don't believe that this change would be any more of a backwards compatibility risk than what's currently in the patch as the logic in terms of urlopen is kept. The risk of dependencies on fragment-less full_urls however, would remain.
Date User Action Args
2013-04-30 07:15:33demian.brechtsetrecipients: + demian.brecht, terry.reedy, orsenthil, ezio.melotti, r.david.murray, python-dev
2013-04-30 07:15:33demian.brechtsetmessageid: <>
2013-04-30 07:15:33demian.brechtlinkissue17272 messages
2013-04-30 07:15:32demian.brechtcreate