This is an archive of the discontinued Mercurial Phabricator instance.

hgweb: adapt to socket._fileobject changes in Python 3
ClosedPublic

Authored by durin42 on Mar 4 2018, 9:19 PM.

Details

Summary

These are the only uses of socket._fileobject in the codebase, so
let's just do something inline here rather than adding something to
pycompat.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

durin42 created this revision.Mar 4 2018, 9:19 PM
yuja requested changes to this revision.Mar 6 2018, 4:37 AM
yuja added a subscriber: yuja.

As long as self.request is a socket object, we can use request.makefile() on Python 2.

This revision now requires changes to proceed.Mar 6 2018, 4:37 AM
durin42 updated this revision to Diff 6673.Mar 6 2018, 1:42 PM

Oh, good catch. Fixed and passes tests on 2.7. :)

yuja accepted this revision.Mar 8 2018, 7:35 AM
This revision is now accepted and ready to land.Mar 8 2018, 7:35 AM
This revision was automatically updated to reflect the committed changes.