Sorry, something went wrong.
| 'code_debug_ranges': 1, | ||
| 'show_ref_count': 0, | ||
| 'dump_refs': 0, | ||
| 'cpu_count': -True, |
There was a problem hiding this comment.
cpu_count is still an int, so I think this change is wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Oops, fixed. I blindly replaced 0 with False and 1 with True :-)
Sorry, something went wrong.
| if (spec->type == PyConfig_MEMBER_BOOL | ||
| || spec->type == PyConfig_MEMBER_UINT) | ||
| { | ||
| if (value < 0) { | ||
| config_dict_invalid_value(spec->name); | ||
| return -1; | ||
| } | ||
| } |
There was a problem hiding this comment.
Would it be worth also verifying that value <= 1 for BOOL?
Sorry, something went wrong.
There was a problem hiding this comment.
Currently, PyConfig_Read() doesn't normalize boolean values to (0, 1). I prefer to tolerate values larger than 1 for now.
The main reason for this change is to return bool in _PyConfig_AsDict().
Sorry, something went wrong.
_PyConfig_AsDict() now returns bool objects for options using the new PyConfig_MEMBER_BOOL type.
Update tests for these changes.