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.

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

4545
4646 config["locale"] = locale
4747 config["use_weighting"] = use_weighting
48- providers = providers or PROVIDERS
49-
50- providers += includes
48+ _providers = (providers or PROVIDERS) + includes
5149
5250 faker = generator or Generator(**config)
5351
54- for prov_name in providers:
52+ for prov_name in _providers:
5553 if prov_name == "faker.providers":
5654 continue
5755

The check that tells the two apart

failpass·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.

Other bugs found in joke2k/faker