Whole file
joke2k/faker
The author described this change as “Squash merge fix/mutable-default-providers into master”. It counts as a record because the check below fails on the code as it stood at 36bff22c3 and passes on a801a34f5, with nothing else changed between the two runs.
Projectjoke2k/faker
Fix saved2026-03-12
Sharing licenceMIT · LICENSE.txt
Change size+2 −4
What the code was meant to do, written into the code itself as a save note
Squash merge fix/mutable-default-providers into master
The change
| 45 | 45 | ||
| 46 | 46 | config["locale"] = locale | |
| 47 | 47 | config["use_weighting"] = use_weighting | |
| 48 | - | providers = providers or PROVIDERS | |
| 49 | - | ||
| 50 | - | providers += includes | |
| 48 | + | _providers = (providers or PROVIDERS) + includes | |
| 51 | 49 | ||
| 52 | 50 | faker = generator or Generator(**config) | |
| 53 | 51 | ||
| 54 | - | for prov_name in providers: | |
| 52 | + | for prov_name in _providers: | |
| 55 | 53 | if prov_name == "faker.providers": | |
| 56 | 54 | continue | |
| 57 | 55 |
The check that tells the two apart
fail→pass·tests/test_factory.py::FactoryTestCase::test_includes_does_not_mutate_default_providers
Check file tests/test_factory.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 it36bff22c37b943e6c523407fec4dccc2242b36e2
Broken version dated2026-03-04
Modulefaker.factory
Units changedFactory
Fingerprint32fa6fd87854de6c
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.