File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed
Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,12 @@ v3.9.0
1919 config, resulting in a ~20% performance improvement when
2020 loading entry points.
2121
22+ v3.8.2
23+ ======
24+
25+ * #293: Re-enabled lazy evaluation of path lookup through
26+ a FreezableDefaultDict.
27+
2228v3.8.1
2329======
2430
Original file line number Diff line number Diff line change 1515import contextlib
1616import collections
1717
18- from ._collections import freezable_defaultdict
18+ from ._collections import FreezableDefaultDict
1919from ._compat import (
2020 NullFinder ,
2121 Protocol ,
@@ -710,8 +710,8 @@ class Lookup:
710710 def __init__ (self , path : FastPath ):
711711 base = os .path .basename (path .root ).lower ()
712712 base_is_egg = base .endswith (".egg" )
713- self .infos = freezable_defaultdict (list )
714- self .eggs = freezable_defaultdict (list )
713+ self .infos = FreezableDefaultDict (list )
714+ self .eggs = FreezableDefaultDict (list )
715715
716716 for child in path .children ():
717717 low = child .lower ()
Original file line number Diff line number Diff line change 11import collections
22
33
4- class freezable_defaultdict (collections .defaultdict ):
4+ # from jaraco.collections 3.3
5+ class FreezableDefaultDict (collections .defaultdict ):
56 """
6- Mix-in to freeze a defaultdict.
7+ Often it is desirable to prevent the mutation of
8+ a default dict after its initial construction, such
9+ as to prevent mutation during iteration.
710
8- >>> dd = freezable_defaultdict (list)
11+ >>> dd = FreezableDefaultDict (list)
912 >>> dd[0].append('1')
1013 >>> dd.freeze()
1114 >>> dd[1]
You can’t perform that action at this time.
0 commit comments