[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-22 Thread Ethan Furman
Change by Ethan Furman : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread Ethan Furman
Change by Ethan Furman : -- priority: release blocker -> normal resolution: -> fixed stage: patch review -> resolved ___ Python tracker ___

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread Ethan Furman
Ethan Furman added the comment: New changeset 62a6594e66ca955073be2f4e5a40291a39252ef3 by Ethan Furman in branch 'main': bpo-40066: [Enum] fix tests (GH-30643) https://github.com/python/cpython/commit/62a6594e66ca955073be2f4e5a40291a39252ef3 --

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: I created https://github.com/python/core-workflow/issues/424 "Should we make the Docs CI mandatory on the Python main branch?". -- ___ Python tracker

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +28846 pull_request: https://github.com/python/cpython/pull/30643 ___ Python tracker ___

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread Ethan Furman
Ethan Furman added the comment: vstinner wrote: -- >>self.assertEqual(repr(type), '') > For this one, I suggest to replace the value with "..." doctest pattern. That bit of code is from the unittest suite, not the doctest suite. I went with:

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: >self.assertEqual(repr(type), '') For this one, I suggest to replace the value with "..." doctest pattern. -- ___ Python tracker ___

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread Ethan Furman
Ethan Furman added the comment: New changeset 83d544b9292870eb44f6fca37df0aa351c4ef83a by Kumar Aditya in branch 'main': bpo-40066: [Enum] skip failing doc test (GH-30637) https://github.com/python/cpython/commit/83d544b9292870eb44f6fca37df0aa351c4ef83a --

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread Ethan Furman
Ethan Furman added the comment: After merging in doc fix by kumaraditya303, I'll update tests so Solaris passes. -- ___ Python tracker ___

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread Kumar Aditya
Change by Kumar Aditya : -- nosy: +kumaraditya303 nosy_count: 15.0 -> 16.0 pull_requests: +28840 pull_request: https://github.com/python/cpython/pull/30637 ___ Python tracker

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: Sorry, I had to revert the change since it broke the CI and it prevented to merge new PRs. Tell me if I can help to get this test fixed and to get this change merged again. By the way, the PR 30582 was merged even if the Docs CI failed. --

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 42a64c03ec5c443f2a5c2ee4284622f5d1f5326c by Victor Stinner in branch 'main': Revert "bpo-40066: [Enum] update str() and format() output (GH-30582)" (GH-30632) https://github.com/python/cpython/commit/42a64c03ec5c443f2a5c2ee4284622f5d1f5326c

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner nosy_count: 14.0 -> 15.0 pull_requests: +28835 pull_request: https://github.com/python/cpython/pull/30632 ___ Python tracker ___

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread Jakub Kulik
Jakub Kulik added the comment: This also broke our Solaris build with the following error: == FAIL: testGetaddrinfo (test.test_socket.GeneralModuleTests) --

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-16 Thread Christian Heimes
Christian Heimes added the comment: GH-30582 broke doc tests in 3.11 branch: File "library/enum.rst", line ?, in default Failed example: Color(0) Exception raised: Traceback (most recent call last): File "/home/runner/work/cpython/cpython/Lib/doctest.py", line 1346, in __run

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-15 Thread Ethan Furman
Ethan Furman added the comment: New changeset acf7403f9baea3ae1119fc6b4a3298522188bf96 by Ethan Furman in branch 'main': bpo-40066: [Enum] update str() and format() output (GH-30582) https://github.com/python/cpython/commit/acf7403f9baea3ae1119fc6b4a3298522188bf96 --

[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-13 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +28780 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30582 ___ Python tracker ___

[issue40066] Enum: modify __repr__, __str__; update docs

2021-06-30 Thread Michael Cuthbert
Michael Cuthbert added the comment: It may be helpful for the enum module to come with transitional functions like "pre310_str()" "pre310_repr()" "pre310_flag_str()" etc. so that people who are writing doctests that need to function on both < 3.10 and 3.10+ can temporarily do a

[issue40066] Enum: modify __repr__, __str__; update docs

2021-04-13 Thread Ethan Furman
Ethan Furman added the comment: Thank you for the feedback. The new str() and repr() make more sense for Flag-based enumerations, and I'm hesitant to have different formats for Enum- vs Flag-based enums. Would it be helpful to have another base Enum class to derive from that maintained

[issue40066] Enum: modify __repr__, __str__; update docs

2021-04-13 Thread Florian Bruhin
Florian Bruhin added the comment: I'm probably a bit late to the party as well, but as some additional datapoints: - This broke the tests for my project and I ended up adding a wrapper to stringify enums (since I actually prefer having the enum type in debug logs and such):

[issue40066] Enum: modify __repr__, __str__; update docs

2021-04-12 Thread Stefan Behnel
Stefan Behnel added the comment: > why /shouldn't/ we make the change? It breaks doctests, and probably some other unit tests, too, e.g. for output formatting. What should we suggest users to do? Replace >>> get_flag(…) by >>> get_flag(…) == app_enums.TrickyFlag or

[issue40066] Enum: modify __repr__, __str__; update docs

2021-04-08 Thread Ethan Furman
Change by Ethan Furman : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue40066] Enum: modify __repr__, __str__; update docs

2021-04-08 Thread Florian Bruhin
Change by Florian Bruhin : -- nosy: +The Compiler ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40066] Enum: modify __repr__, __str__; update docs

2021-03-31 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +23862 pull_request: https://github.com/python/cpython/pull/25118 ___ Python tracker ___

[issue40066] Enum: modify __repr__, __str__; update docs

2021-03-31 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +23861 pull_request: https://github.com/python/cpython/pull/25116 ___ Python tracker ___

[issue40066] Enum: modify __repr__, __str__; update docs

2021-03-30 Thread Ethan Furman
Ethan Furman added the comment: New changeset b775106d940e3d77c8af7967545bb9a5b7b162df by Ethan Furman in branch 'master': bpo-40066: Enum: modify `repr()` and `str()` (GH-22392) https://github.com/python/cpython/commit/b775106d940e3d77c8af7967545bb9a5b7b162df --

[issue40066] Enum: modify __repr__, __str__; update docs

2021-03-25 Thread Ethan Furman
Change by Ethan Furman : -- components: +Library (Lib) title: Enum._convert should change __repr__ and/or __str__ to use module name instead of class name -> Enum: modify __repr__, __str__; update docs ___ Python tracker