bpo-38659: [Enum] add _simple_enum decorator by ethanfurman · Pull Request #25285 · python/cpython

gpshead

@ethanfurman

@ethanfurman

@ethanfurman

Instead of raising ValueError on mismatch, raise a TypeError instead.

@ethanfurman

- make simple_enum and test_simple_enum private
- add _old_convert_ to enable testing `IntEnum._convert_`
  and `IntFlag._convert_` transformations
- add tests for the `_convert_`s

@ethanfurman ethanfurman changed the title bpo-38659: [Enum] add simple_enum decorato bpo-38659: [Enum] add _simple_enum decorator

Apr 11, 2021

@sweeneyde

@mdickinson

@skirpichev

…thon#24818)

* coerce bytes separator to string

* Add news

* Update Misc/NEWS.d/next/Library/2021-03-11-00-31-41.bpo-42967.2PeQRw.rst
* Split PyType_Ready() into sub-functions.
* type_ready_mro() now checks if bases are static types earlier.
* Check tp_name earlier, in type_ready_checks().
* Add _PyType_IsReady() macro to check if a type is ready.
Static methods (@staticmethod) are now callable as regular functions.
)

Remove `RLock` from `BZ2File`. It makes `BZ2File` to thread unsafe, but
gzip and lzma don't use it too.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
The snake_case names have existed since Python 2.6, so there is
no reason to keep the old camelCase names around. One similar
method, threading.Thread.isAlive, was already removed in
Python 3.9 (bpo-37804).
The Python _pyio.open() function becomes a static method to behave as
io.open() built-in function: don't become a bound method when stored
as a class variable. It becomes possible since static methods are now
callable in Python 3.10. Moreover, _pyio.OpenWrapper becomes a simple
alias to _pyio.open.

init_set_builtins_open() now sets builtins.open to io.open, rather
than setting it to io.OpenWrapper, since OpenWrapper is now an alias
to open in the io and _pyio modules.

@cjw296

Signed-off-by: Christian Heimes <christian@python.org>

@tiran

* Add method localize to the locale module
* Update the documentation of the locale module

@ZackerySpytz

@ethanfurman

The configure --without-cycle-gc option has been removed in Python
2.3 by the commit cccd1e7. It's now
time to remove the last reference to it in the documentation.

ethanfurman added a commit that referenced this pull request

Apr 20, 2021

ethanfurman added a commit that referenced this pull request

Apr 20, 2021

@ethanfurman