Make use aenum instead of the default enum

This commit is contained in:
Mads Marquart
2018-12-12 22:39:31 +01:00
parent 2f8d0728ba
commit 381227af66
4 changed files with 5 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
# -*- coding: UTF-8 -*- # -*- coding: UTF-8 -*-
from __future__ import unicode_literals from __future__ import unicode_literals
import enum import aenum
class FBchatException(Exception): class FBchatException(Exception):
@@ -523,7 +523,7 @@ class Plan(object):
def __unicode__(self): def __unicode__(self):
return '<Plan ({}): {} time={}, location={}, location_id={}>'.format(self.uid, repr(self.title), self.time, repr(self.location), repr(self.location_id)) return '<Plan ({}): {} time={}, location={}, location_id={}>'.format(self.uid, repr(self.title), self.time, repr(self.location), repr(self.location_id))
class Enum(enum.Enum): class Enum(aenum.Enum):
"""Used internally by fbchat to support enumerations""" """Used internally by fbchat to support enumerations"""
def __repr__(self): def __repr__(self):
# For documentation: # For documentation:

View File

@@ -1,3 +1,3 @@
requests requests
beautifulsoup4 beautifulsoup4
enum34; python_version < '3.4' aenum

View File

@@ -43,9 +43,6 @@ include_package_data = True
packages = find: packages = find:
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4.0 python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4.0
install_requires = install_requires =
aenum
requests requests
beautifulsoup4 beautifulsoup4
# May not work in pip with bdist_wheel
# See https://wheel.readthedocs.io/en/latest/#defining-conditional-dependencies
# It is therefore defined in setup.py
# enum34; python_version < '3.4'

View File

@@ -5,4 +5,4 @@ from __future__ import unicode_literals
from setuptools import setup from setuptools import setup
setup(extras_require={':python_version < "3.4"': ['enum34']}) setup()