Whole file

r1chardj0n3s/parse

The author described this change as fix type conversion error with dotted names. It counts as a record because the check below fails on the code as it stood at 3891beae6 and passes on 3f0bf88f8, with nothing else changed between the two runs.

Fix saved2012-09-29
Sharing licenceMIT · LICENSE
Change size+4 3

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

fix type conversion error with dotted names

The change

236236
237237 **Version history (in brief)**:
238238
239+- 1.5.2 fix type conversion error with dotted names (thanks Sebastian Thiel)
239240 - 1.5.1 implement handling of named datetime fields
240241 - 1.5 add handling of dotted field names (thanks Sebastian Thiel)
241242 - 1.4.1 fix parsing of "0" in int conversion (thanks James Rowe)
270271 This code is copyright 2011 eKit.com Inc (http://www.ekit.com/)
271272 See the end of the source file for the license of use.
272273 '''
273-__version__ = '1.5.1'
274+__version__ = '1.5.2'
274275
275276 # yes, I now have two problems
276277 import re
594595 for k in self._named_fields:
595596 korig = self._group_to_name_map[k]
596597 name_map[korig] = k
597- if korig in self._type_conversions:
598- named_fields[korig] = self._type_conversions[korig](groupdict[k], m)
598+ if k in self._type_conversions:
599+ named_fields[korig] = self._type_conversions[k](groupdict[k], m)
599600 else:
600601 named_fields[korig] = groupdict[k]
601602

The check that tells the two apart

failpass·test_parse.py::TestBugs::test_dotted_type_conversion_pull_8

Check file test_parse.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 it3891beae6c912a0ad1c398ecb49859eb5adacf37
Broken version dated2012-09-28
Moduleparse
Units changedParser
Fingerprint03d66971edbcd205
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 r1chardj0n3s/parse