From a9f214f690fdd32aa9bba0759edd4dc7eb6cd86f Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Mon, 30 Dec 2019 19:33:10 +1100 Subject: [PATCH] Update docs to reflect no more Python 2 support --- README.rst | 2 +- docs/setup.rst | 8 +------- enumchoicefield/utils.py | 5 ----- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/README.rst b/README.rst index 51effe1..ab0101e 100644 --- a/README.rst +++ b/README.rst @@ -9,7 +9,7 @@ Django EnumChoiceField .. image:: https://badge.fury.io/py/django-enumchoicefield.svg :target: https://pypi.org/project/django-enumchoicefield/ -A Django model field for native Python 3.4 Enums. +A Django model field for native Python Enums. .. code:: python diff --git a/docs/setup.rst b/docs/setup.rst index 9b1ebe2..5799200 100644 --- a/docs/setup.rst +++ b/docs/setup.rst @@ -4,7 +4,7 @@ Setup ===== -``django-enumchoicefield`` is compatible with Django 1.8 and higher, Python 2.7, +``django-enumchoicefield`` is compatible with Django 2.0 and higher, and Python 3.4 and higher. You can install ``django-enumchoicefield`` using pip: @@ -12,9 +12,3 @@ You can install ``django-enumchoicefield`` using pip: .. code-block:: console $ pip install django-enumchoicefield - -On Python 2.7, you will also need to install ``enum34``: - -.. code-block:: console - - $ pip install enum34 diff --git a/enumchoicefield/utils.py b/enumchoicefield/utils.py index f74c142..6ea1396 100644 --- a/enumchoicefield/utils.py +++ b/enumchoicefield/utils.py @@ -31,11 +31,6 @@ def order_enum(field, members): .annotate(my_order=order_enum('choice', MyEnum))\\ .order_by('my_order') - .. warning:: On Python 2, Enums may not have a consistent order, - depending upon how they were defined. - You can set an explicit order using ``__order__`` to fix this. - See the ``enum34`` docs for more information. - Any enum members not present in the list of members will be sorted to the end of the results.