Repository navigation
Commit b586b0b
committed
gh-160936: Clear all cached loggers unconditionally in _clear_cache
Skipping loggers that are not in loggerDict kept them in the set forever, and per-item discard left the set's table large after a bulk clear, so later setLevel() calls stayed slower than on main. Clear every tracked logger and empty the set instead. This also fixes a stale isEnabledFor cache on loggers that are not registered with the manager.1 parent d60e39c commit b586b0b
3 files changed
Lines changed: 26 additions & 5 deletions
File tree
- Lib
- logging
- test
- Misc/NEWS.d/next/Library
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1475 | 1475 | | |
1476 | 1476 | | |
1477 | 1477 | | |
1478 | | - | |
1479 | | - | |
1480 | | - | |
1481 | | - | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
1482 | 1481 | | |
1483 | 1482 | | |
1484 | 1483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6398 | 6398 | | |
6399 | 6399 | | |
6400 | 6400 | | |
| 6401 | + | |
| 6402 | + | |
| 6403 | + | |
| 6404 | + | |
| 6405 | + | |
| 6406 | + | |
| 6407 | + | |
| 6408 | + | |
| 6409 | + | |
| 6410 | + | |
| 6411 | + | |
| 6412 | + | |
| 6413 | + | |
| 6414 | + | |
| 6415 | + | |
| 6416 | + | |
| 6417 | + | |
| 6418 | + | |
| 6419 | + | |
6401 | 6420 | | |
6402 | 6421 | | |
6403 | 6422 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments