File tree 3 files changed +15
-6
lines changed
3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,12 @@ v3.9.0
19
19
config, resulting in a ~20% performance improvement when
20
20
loading entry points.
21
21
22
+ v3.8.2
23
+ ======
24
+
25
+ * #293: Re-enabled lazy evaluation of path lookup through
26
+ a FreezableDefaultDict.
27
+
22
28
v3.8.1
23
29
======
24
30
Original file line number Diff line number Diff line change 15
15
import contextlib
16
16
import collections
17
17
18
- from ._collections import freezable_defaultdict
18
+ from ._collections import FreezableDefaultDict
19
19
from ._compat import (
20
20
NullFinder ,
21
21
Protocol ,
@@ -710,8 +710,8 @@ class Lookup:
710
710
def __init__ (self , path : FastPath ):
711
711
base = os .path .basename (path .root ).lower ()
712
712
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 )
715
715
716
716
for child in path .children ():
717
717
low = child .lower ()
Original file line number Diff line number Diff line change 1
1
import collections
2
2
3
3
4
- class freezable_defaultdict (collections .defaultdict ):
4
+ # from jaraco.collections 3.3
5
+ class FreezableDefaultDict (collections .defaultdict ):
5
6
"""
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.
7
10
8
- >>> dd = freezable_defaultdict (list)
11
+ >>> dd = FreezableDefaultDict (list)
9
12
>>> dd[0].append('1')
10
13
>>> dd.freeze()
11
14
>>> dd[1]
You can’t perform that action at this time.
0 commit comments