Repository navigation
Commit 5d54424
committed
Implement the rest of the code review feedback and fix bugs
- Removed `_weak_config` and the config reference cycle entirely in order to prevent hanging on PyPy garbage collection. Instead of the backend holding a reference to its owning config, the backend stores its own exceptions and the config checks its own stored exception plus the backend's stored exception.
- Refactored backend iteration so that it does not hold a lock indefinitely in order to prevent deadlock on PyPy.
- Fixed order of levels returned by `DefaultConfig._default_write_order()`.
- Refactored backend entries to support round-tripping non-decodable binary data and modified a few test assertions to test this round-trip.
- Renamed `Config._get_entry` to `Config.get_entry` and documented it, because without it there's not currently a public way to get a single entry with a binary (non-decodable) value without iterating the single entry as a multivar.
- Fixed incorrect and incomplete documentation in `Config.__getitem__`.
- Fixed type of first argument for FFI stub of `GitConfigIteratorC.next` (for real this time ... I forgot to `git add` the change last time).
- Removed `del_` stub and added comment about why there's no `del` stub.
- Added clarifying comments to `clear()` to explain why it's safe.1 parent 0eb09ba commit 5d54424
3 files changed
Lines changed: 120 additions & 79 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
236 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
237 | 240 | | |
238 | 241 | | |
239 | 242 | | |
| |||
0 commit comments