Commit 83addc7
committed
Charles Waldman writes:
"""
Problem description:
Run the following script:
import test.test_cpickle
for x in xrange(1000000):
reload(test.test_cpickle)
Watch Python's memory use go up up and away!
In the course of debugging this I also saw that cPickle is
inconsistent with pickle - if you attempt a pickle.load or pickle.dump
on a closed file, you get a ValueError, whereas the corresponding
cPickle operations give an IOError. Since cPickle is advertised as
being compatible with pickle, I changed these exceptions to match.
"""1 parent 2dd8ddd commit 83addc7
1 file changed
Lines changed: 11 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2151 | 2151 | | |
2152 | 2152 | | |
2153 | 2153 | | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
2154 | 2157 | | |
2155 | | - | |
2156 | | - | |
2157 | | - | |
2158 | | - | |
2159 | | - | |
2160 | | - | |
| 2158 | + | |
| 2159 | + | |
2161 | 2160 | | |
2162 | 2161 | | |
2163 | 2162 | | |
2164 | 2163 | | |
2165 | | - | |
2166 | | - | |
| 2164 | + | |
| 2165 | + | |
2167 | 2166 | | |
2168 | 2167 | | |
2169 | 2168 | | |
| |||
4054 | 4053 | | |
4055 | 4054 | | |
4056 | 4055 | | |
4057 | | - | |
4058 | | - | |
4059 | | - | |
4060 | | - | |
| 4056 | + | |
| 4057 | + | |
4061 | 4058 | | |
4062 | 4059 | | |
4063 | 4060 | | |
| |||
4066 | 4063 | | |
4067 | 4064 | | |
4068 | 4065 | | |
4069 | | - | |
4070 | | - | |
| 4066 | + | |
| 4067 | + | |
4071 | 4068 | | |
4072 | 4069 | | |
4073 | 4070 | | |
| |||
0 commit comments