Steap <[email protected]> added the comment:
It seems like this regression has not completely been fixed: there are still
issues with "None":
$ python3.6 -c 'import configparser; configparser.ConfigParser(defaults={"a":
None})'
$ python3.7 -c 'import configparser; configparser.ConfigParser(defaults={"a":
1})'
$ python3.7 -c 'import configparser; configparser.ConfigParser(defaults={"a":
None})'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.7/configparser.py", line 638, in __init__
self._read_defaults(defaults)
File "/usr/lib/python3.7/configparser.py", line 1216, in _read_defaults
self.read_dict({self.default_section: defaults})
File "/usr/lib/python3.7/configparser.py", line 753, in read_dict
self.set(section, key, value)
File "/usr/lib/python3.7/configparser.py", line 1197, in set
self._validate_value_types(option=option, value=value)
File "/usr/lib/python3.7/configparser.py", line 1182, in _validate_value_types
raise TypeError("option values must be strings")
TypeError: option values must be strings
Should "None" not be used, or should this bug be reopened?
----------
nosy: +Steap
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue33802>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com