gh-71682: Make pprint.pformat always order sets#22977
Conversation
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
…ython into bugfix/pprint-set-ordering
| del context[objid] | ||
| return format % ", ".join(components), readable, recursive | ||
|
|
||
| if (issubclass(typ, set) and r is set.__repr__) or \ |
There was a problem hiding this comment.
Sorry, but this block is almost a complete duplicate of the one above (please fix that).
There was a problem hiding this comment.
I have merged this section with the above one. Please let me know if this is satisfactory. I originally separated them to follow the layout of the function and separate out new code from old code.
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
…ython into bugfix/pprint-set-ordering
|
This PR is stale because it has been open for 30 days with no activity. |
|
I would like to see this get merged in. Is there anything I can do to help get this merged? |
MaxwellDupre
left a comment
There was a problem hiding this comment.
I see test results say:
Ran 35 tests in 0.123s
OK (expected failures=1)
Looks ok to me.
|
Looks like the only merge conflict is both "Ben Bonenfant" and "David Bonner" have been added to the |
|
@freddrake could you merge this PR if feasible, please (as a pprint expert and a core dev)? |
|
As a bugfix, can this still land in 3.13? |
|
I appreciate the continued interest in this PR. I'm happy to do whatever is necessary to get this merged, but I'm not sure what else I can do besides wait for a core team member to give it review. |
|
This PR is stale because it has been open for 30 days with no activity. |
This makes the
pprint.pformatperform the default ordering on allsetandfrozensetobjects. This was determined to be a bug, since these objects are ordered if they violate the maximum width of the output, but was never fixed.Reference: https://bugs.python.org/issue27495
https://bugs.python.org/issue27495