Whole file

benmoran56/esper

The author described this change as Fix World.clear_database() not accounting for lazily deleted entities.. It counts as a record because the check below fails on the code as it stood at 32b47987d and passes on 05dee82b0, with nothing else changed between the two runs.

Fix saved2018-01-06
Sharing licenceMIT · LICENSE
Change size+1 0

What the code was meant to do, written into the code itself as a save note

Fix World.clear_database() not accounting for lazily deleted entities.

The change

3939 def clear_database(self):
4040 """Remove all Entities and Components from the World."""
4141 self._next_entity_id = 0
42+ self._dead_entities.clear()
4243 self._components.clear()
4344 self._entities.clear()
4445

The check that tells the two apart

failpass·tests/test_world.py::test_clear_database

Check file tests/test_world.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it32b47987d0a1ed37fa753ac9f1f1b618580655ab
Broken version dated2017-10-22
Moduleesper
Units changedWorld
Fingerprintb72f1b9eaf8151f7
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in benmoran56/esper