Patchwork [03,of,10,V2] util: remove compressors dict (API)

login
register
mail settings
Submitter Gregory Szorc
Date Nov. 8, 2016, 3:13 a.m.
Message ID <8b1e72914d246af5703e.1478574831@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/17389/
State Accepted
Headers show

Comments

Gregory Szorc - Nov. 8, 2016, 3:13 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1478572491 28800
#      Mon Nov 07 18:34:51 2016 -0800
# Node ID 8b1e72914d246af5703ea5bad9bd3cb051463164
# Parent  9c4c59fa0b44412bd59170f850463c68497b43da
util: remove compressors dict (API)

We no longer have any in-tree consumers of this object. Use
util.compengines instead.

Patch

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -3070,15 +3070,6 @@  class _noopengine(compressionengine):
 
 compengines.register(_noopengine())
 
-compressors = {
-    None: nocompress,
-    # lambda to prevent early import
-    'BZ': lambda: bz2.BZ2Compressor(),
-    'GZ': lambda: zlib.compressobj(),
-    }
-# also support the old form by courtesies
-compressors['UN'] = compressors[None]
-
 def _makedecompressor(decompcls):
     def generator(f):
         d = decompcls()