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 zach.ware
Recipients larry, zach.ware
Date 2014-01-24.16:02:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390579377.01.0.888294922653.issue20381@psf.upfronthosting.co.za>
In-reply-to
Content
The fix for #20189 broke simple expression defaults.  Specifically, with the latest #20172 patch applied, Clinic fails on winreg.c at winreg line 1351 with this traceback:

Error in file "PC\winreg.c" on line 1351:
Exception raised during parsing:
Traceback (most recent call last):
  File "Tools\clinic\clinic.py", line 1541, in parse
    parser.parse(block)
  File "Tools\clinic\clinic.py", line 2942, in parse
    self.state(line)
  File "Tools\clinic\clinic.py", line 3482, in state_parameter_docstring
    return self.next(self.state_parameter, line)
  File "Tools\clinic\clinic.py", line 2975, in next
    self.state(line)
  File "Tools\clinic\clinic.py", line 3321, in state_parameter
    bad = default != repr(eval(default))
  File "<string>", line 1, in <module>
NameError: name 'winreg' is not defined

In this case, 'default' is 'winreg.KEY_WRITE'.  The 'default != repr(eval(default))' check cannot succeed with such a default even if winreg were defined, as it will return an int, 131078.
History
Date User Action Args
2014-01-24 16:02:57zach.waresetrecipients: + zach.ware, larry
2014-01-24 16:02:57zach.waresetmessageid: <1390579377.01.0.888294922653.issue20381@psf.upfronthosting.co.za>
2014-01-24 16:02:56zach.warelinkissue20381 messages
2014-01-24 16:02:56zach.warecreate