# HG changeset patch # User Pierre-Yves David # Date 1508848248 -7200 # Node ID 0ed75e700ad80d88f4682a7ee7e0289fe272ba67 # Parent 20a0792c177396eb1ab1e6786e31204f9bdc4054 compat: drop compatibility for 'streamres' prior to 4.1 We no longer support these version. diff -r 20a0792c1773 -r 0ed75e700ad8 hgext3rd/evolve/obsexchange.py --- a/hgext3rd/evolve/obsexchange.py Tue Oct 24 14:24:29 2017 +0200 +++ b/hgext3rd/evolve/obsexchange.py Tue Oct 24 14:30:48 2017 +0200 @@ -182,17 +182,6 @@ obsdata.seek(0) return obsdata -# The wireproto.streamres API changed, handling chunking and compression -# directly. Handle either case. -if util.safehasattr(wireproto.abstractserverproto, 'groupchunks'): - # We need to handle chunking and compression directly - def streamres(d, proto): - return wireproto.streamres(proto.groupchunks(d)) -else: - # Leave chunking and compression to streamres - def streamres(d, proto): - return wireproto.streamres(reader=d, v1compressible=True) - def srv_pullobsmarkers(repo, proto, others): """serves a binary stream of markers. @@ -209,7 +198,7 @@ finaldata.write('%20i' % len(obsdata)) finaldata.write(obsdata) finaldata.seek(0) - return streamres(finaldata, proto) + return wireproto.streamres(reader=finaldata, v1compressible=True) ############################################### ### Support for old legacy exchange methods ###