[New-bugs-announce] [issue46624] random.randrange removed support for non-integer types after just one release of deprecation

Miro Hrončok report at bugs.python.org
Thu Feb 3 05:52:01 EST 2022


New submission from Miro Hrončok <miro at hroncok.cz>:

In https://github.com/python/cpython/commit/5afa0a411243210a30526c7459a0ccff5cb88494 the support for non-integer types was removed from random.randrange().

This change is not backward-compatible and it breaks 3rd party code, for example:

simplewrap: https://bugzilla.redhat.com/show_bug.cgi?id=2050093
numpy-stl: https://bugzilla.redhat.com/show_bug.cgi?id=2050092 == https://github.com/WoLpH/numpy-stl/issues/188

That support was only deprecated in Python 3.10 and it needs to remain deprecated for at least two Python releases. Please revert this change from Python 3.11 and wait for at least Python 3.12.

See https://www.python.org/dev/peps/pep-0387/#making-incompatible-changes

When you do remove this from Python 3.12, please make sure to document it in the What's new document.

Thank you.

----------
components: Library (Lib)
messages: 412436
nosy: hroncok, pablogsal, rhettinger
priority: normal
severity: normal
status: open
title: random.randrange removed support for non-integer types after just one release of deprecation
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46624>
_______________________________________


More information about the New-bugs-announce mailing list