This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Steap
Recipients Steap, barry, lukasz.langa, miss-islington, ned.deily, vinay.sajip
Date 2018-08-06.15:39:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1533569948.01.0.56676864532.issue33802@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2018-08-06 15:39:08Steapsetrecipients: + Steap, barry, vinay.sajip, ned.deily, lukasz.langa, miss-islington
2018-08-06 15:39:08Steapsetmessageid: <1533569948.01.0.56676864532.issue33802@psf.upfronthosting.co.za>
2018-08-06 15:39:07Steaplinkissue33802 messages
2018-08-06 15:39:07Steapcreate