pyhocon
pyhocon copied to clipboard
Parsing bug when key start with months prefix with pyparsing>=3.0.0
import pyhocon
parser = pyhocon.ConfigFactory()
conf2 = """
x: {
months_key1: 6
months_key2: 1
}
"""
result = parser.parse_string(conf2)
assert result.get("x").get("months_key1") == 6
assert result.get("x").get("months_key2") == 1
This code pass with pyparsing <3.0.0 and fails with pyparsing>3.0.0 because the months is not interpreted as part of the other key but as time specifier