compat: drop compatibility for 'streamres' prior to 4.1
We no longer support these version.
--- 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 ###