One function
_get_codec_info in CourtBouillon/webencodings
The author described this change as “Fix passing an Encoding to decode and related functions.”. It counts as a record because the check below fails on the code as it stood at 34a91e3b4 and passes on f335f4564, with nothing else changed between the two runs.
ProjectCourtBouillon/webencodings
Fix saved2013-06-29
Sharing licenceBSD-3-Clause · LICENSE
Change size+1 −1
What the code was meant to do, written into the code itself as a docstring
Accept either an encoding object or label. :param encoding: An :class:`Encoding` object or a label string. :returns: A :class:`codecs.CodecInfo` object. :raises: :exc:`~exceptions.LookupError` for an unknown label.
The change
| 7 | 7 | :raises: :exc:`~exceptions.LookupError` for an unknown label. | |
| 8 | 8 | ||
| 9 | 9 | """ | |
| 10 | - | if not hasattr(encoding, '_decoder'): | |
| 10 | + | if not hasattr(encoding, 'codec_info'): | |
| 11 | 11 | result = lookup(encoding) | |
| 12 | 12 | if result is None: | |
| 13 | 13 | raise LookupError('Unknown encoding label: %r' % encoding) |
The check that tells the two apart
fail→pass·webencodings/tests.py::test_decode
Check file webencodings/tests.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 it34a91e3b42cdd074b6efc3178b80b1b45919dcd6
Broken version dated2012-12-25
Modulewebencodings.__init__
Units changed_get_codec_info
Fingerprint89b70416e85b96fb
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.