cpython/Misc/NEWS.d
Ethan Furman a02cb474f9
bpo-38659: [Enum] add _simple_enum decorator (GH-25497)
add:

* `_simple_enum` decorator to transform a normal class into an enum
* `_test_simple_enum` function to compare
* `_old_convert_` to enable checking `_convert_` generated enums

`_simple_enum` takes a normal class and converts it into an enum:

    @simple_enum(Enum)
    class Color:
        RED = 1
        GREEN = 2
        BLUE = 3

`_old_convert_` works much like` _convert_` does, using the original logic:

    # in a test file
    import socket, enum
    CheckedAddressFamily = enum._old_convert_(
            enum.IntEnum, 'AddressFamily', 'socket',
            lambda C: C.isupper() and C.startswith('AF_'),
            source=_socket,
            )

`_test_simple_enum` takes a traditional enum and a simple enum and
compares the two:

    # in the REPL or the same module as Color
    class CheckedColor(Enum):
        RED = 1
        GREEN = 2
        BLUE = 3

    _test_simple_enum(CheckedColor, Color)

    _test_simple_enum(CheckedAddressFamily, socket.AddressFamily)

Any important differences will raise a TypeError
2021-04-21 10:20:44 -07:00
..
next bpo-38659: [Enum] add _simple_enum decorator (GH-25497) 2021-04-21 10:20:44 -07:00
3.5.0.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.5.0a1.rst Fix typos mostly in comments, docs and test names (GH-15209) 2019-08-30 16:21:19 -04:00
3.5.0a2.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.5.0a3.rst bpo-35110: Fix unintentional spaces around hyphens and dashes. (GH-10231) 2018-10-31 02:26:06 +02:00
3.5.0a4.rst bpo-35042: Use the :pep: role where a PEP is specified (#10036) 2018-10-26 15:58:26 -07:00
3.5.0b1.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.5.0b2.rst bpo-35042: Use the :pep: role where a PEP is specified (#10036) 2018-10-26 15:58:26 -07:00
3.5.0b3.rst bpo-35110: Fix unintentional spaces around hyphens and dashes. (GH-10231) 2018-10-31 02:26:06 +02:00
3.5.0b4.rst bpo-35110: Fix unintentional spaces around hyphens and dashes. (GH-10231) 2018-10-31 02:26:06 +02:00
3.5.0rc1.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.5.0rc2.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.5.0rc3.rst bpo-35042: Use the :pep: role where a PEP is specified (#10036) 2018-10-26 15:58:26 -07:00
3.5.0rc4.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.5.1.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.5.1rc1.rst bpo-35110: Fix unintentional spaces around hyphens and dashes. (GH-10231) 2018-10-31 02:26:06 +02:00
3.5.2.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.5.2rc1.rst Fix typos in docs, comments and test assert messages (#14872) 2019-07-21 16:12:33 -04:00
3.5.3.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.5.3rc1.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.5.4.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.5.4rc1.rst Fix typos mostly in comments, docs and test names (GH-15209) 2019-08-30 16:21:19 -04:00
3.5.5.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.5.5rc1.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.6.0.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.6.0a1.rst Fix typos in docs, comments and test assert messages (#14872) 2019-07-21 16:12:33 -04:00
3.6.0a2.rst bpo-35042: Use the :pep: role where a PEP is specified (#10036) 2018-10-26 15:58:26 -07:00
3.6.0a3.rst bpo-35042: Use the :pep: role where a PEP is specified (#10036) 2018-10-26 15:58:26 -07:00
3.6.0a4.rst bpo-35042: Use the :pep: role where a PEP is specified (#10036) 2018-10-26 15:58:26 -07:00
3.6.0b1.rst Fix typos mostly in comments, docs and test names (GH-15209) 2019-08-30 16:21:19 -04:00
3.6.0b2.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.6.0b3.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.6.0b4.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.6.0rc1.rst Fix typos mostly in comments, docs and test names (GH-15209) 2019-08-30 16:21:19 -04:00
3.6.0rc2.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.6.1.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.6.1rc1.rst Fix typos mostly in comments, docs and test names (GH-15209) 2019-08-30 16:21:19 -04:00
3.6.2.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.6.2rc1.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.6.2rc2.rst bpo-34906: Doc: Fix typos (2) (GH-9735) 2018-10-06 16:35:53 +02:00
3.6.3.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.6.3rc1.rst Fix typos in docs, comments and test assert messages (#14872) 2019-07-21 16:12:33 -04:00
3.6.4.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.6.4rc1.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.6.5.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.6.5rc1.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.6.6.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.6.6rc1.rst bpo-35042: Use the :pep: role where a PEP is specified (#10036) 2018-10-26 15:58:26 -07:00
3.7.0.rst Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00
3.7.0a1.rst Fix typos mostly in comments, docs and test names (GH-15209) 2019-08-30 16:21:19 -04:00
3.7.0a2.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.7.0a3.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.7.0a4.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.7.0b1.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.7.0b2.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.7.0b3.rst bpo-34906: Doc: Fix typos (2) (GH-9735) 2018-10-06 16:35:53 +02:00
3.7.0b4.rst bpo-32523: Simplifying news entries with multiple paragraphs. (GH-8154) 2019-05-09 21:52:32 +02:00
3.7.0b5.rst bpo-35042: Use the :pep: role where a PEP is specified (#10036) 2018-10-26 15:58:26 -07:00
3.7.0rc1.rst bpo-35042: Use the :pep: role where a PEP is specified (#10036) 2018-10-26 15:58:26 -07:00
3.8.0a1.rst Fix typo in NEWS (GH23958) 2020-12-29 13:50:22 +02:00
3.8.0a2.rst Minor edits to news entries (ported from 3.7) (GH-12293) 2019-03-12 12:21:22 -04:00
3.8.0a3.rst IDLE: changelog correction and addition (GH-15042) 2019-07-31 01:35:30 -04:00
3.8.0a4.rst Fix typos mostly in comments, docs and test names (GH-15209) 2019-08-30 16:21:19 -04:00
3.8.0b1.rst Remove duplicated words words (GH-20413) 2020-05-26 01:04:14 -07:00
3.9.0a1.rst bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594) 2020-07-23 02:06:26 -04:00
3.9.0a2.rst Correct name of bytecode in change note. (GH-22723) 2020-10-19 13:20:33 +01:00
3.9.0a3.rst Python 3.9.0a3 2020-01-24 22:05:07 +01:00
3.9.0a4.rst Python 3.9.0a4 2020-02-25 22:06:39 +01:00
3.9.0a5.rst bpo-39871: Fix an error in a news entry (GH-21749) 2020-08-07 14:38:48 +09:00
3.9.0a6.rst Python 3.9.0a6 2020-04-27 22:44:04 +02:00
3.9.0b1.rst bpo-34956: edit and format better NEWS item in 3.9.0b1 changelog (GH-20255) 2020-05-20 05:41:26 -04:00
3.10.0a1.rst Delete PyGen_Send (#22663) 2020-10-12 12:10:42 -07:00
3.10.0a2.rst bpo-16396: fix BPO number in changelog (GH-23951) 2020-12-26 07:36:56 -08:00
3.10.0a3.rst Python 3.10.0a3 2020-12-07 19:34:10 +00:00
3.10.0a4.rst bpo-37319: Improve documentation, code and tests of randrange. (GH-19112) 2021-01-25 23:02:04 +02:00
3.10.0a5.rst Python 3.10.0a5 2021-02-02 20:41:05 +00:00
3.10.0a6.rst Python 3.10.0a6 2021-03-01 16:45:40 +00:00
3.10.0a7.rst Fix typo in 3.10.0a7.rst (GH-25340) 2021-04-11 09:50:42 +01:00