From 01b1ec7f4bf4eed821271ee7b062964670af44c6 Mon Sep 17 00:00:00 2001 From: NCPlayz Date: Sun, 11 Oct 2020 19:45:07 +0100 Subject: [PATCH] 2020.10.11 --- CHANGELOG.rst | 11 +++++++++++ README.rst | 1 + discord/ext/alternatives/__init__.py | 4 ++-- discord/ext/alternatives/binary_checks.py | 2 ++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6b53be4..143aac0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,17 @@ Changelog ========= +.. _id_20201011: + +``2020.10.11`` +-------------- + +- Added ``binary_checks``. +- Add a ``py_allow`` function for restricting Python versions. +- Fix issues with `literal_converter` +- Fix a name error with ``converter_dict`` +- Simplify ``converter_dict`` to work with ``typing.Union`` + .. _id_20200730: ``2020.07.30`` diff --git a/README.rst b/README.rst index 050f3b6..7efe782 100644 --- a/README.rst +++ b/README.rst @@ -33,6 +33,7 @@ Available Experiments - ``asset_converter`` - Implements a converter for ``Asset``. - ``bot_send_help`` - Implements ``Bot.send_help``. +- ``binary_checks`` - Implements `OR`, `AND`, `NOT` operators for command checks. - ``command_suffix`` - Implements ``Bot.command_suffix`` and ``Context.suffix``. - ``command_piping`` - Implements piping for ``return`` in command callbacks - ``converter_dict`` - Implements ``Bot.converters``. diff --git a/discord/ext/alternatives/__init__.py b/discord/ext/alternatives/__init__.py index 7f61b68..7a98a3e 100644 --- a/discord/ext/alternatives/__init__.py +++ b/discord/ext/alternatives/__init__.py @@ -14,7 +14,7 @@ from collections import namedtuple -__version__ = "2020.07.30" +__version__ = "2020.10.11" _VersionInfo = namedtuple("_VersionInfo", "major minor micro releaselevel serial") -version_info = _VersionInfo(major=2020, minor=7, micro=30, releaselevel="stable", serial=0) +version_info = _VersionInfo(major=2020, minor=10, micro=11, releaselevel="stable", serial=0) diff --git a/discord/ext/alternatives/binary_checks.py b/discord/ext/alternatives/binary_checks.py index b0faa17..a3617b4 100644 --- a/discord/ext/alternatives/binary_checks.py +++ b/discord/ext/alternatives/binary_checks.py @@ -27,7 +27,9 @@ async def no(ctx): """ from discord.ext import commands import inspect +from ._common import py_allow +py_allow(3, 9, 0) class CheckDecorator: def __init__(self, predicate):