Remove six dependency

This commit is contained in:
Mads Marquart
2019-08-28 21:26:59 +02:00
parent 330473a092
commit 6fb6e707ba
2 changed files with 2 additions and 11 deletions

View File

@@ -52,7 +52,6 @@ Repository = "https://github.com/carpedm20/fbchat/"
[tool.flit.metadata.requires-extra] [tool.flit.metadata.requires-extra]
test = [ test = [
"pytest~=4.0", "pytest~=4.0",
"six~=1.0",
] ]
docs = [ docs = [
"sphinx~=2.0", "sphinx~=2.0",

View File

@@ -4,13 +4,11 @@ from __future__ import unicode_literals
import threading import threading
import logging import logging
import six
import pytest import pytest
from os import environ from os import environ
from random import randrange from random import randrange
from contextlib import contextmanager from contextlib import contextmanager
from six import viewitems
from fbchat import Client from fbchat import Client
from fbchat.models import ThreadType, EmojiSize, FBchatFacebookError, Sticker from fbchat.models import ThreadType, EmojiSize, FBchatFacebookError, Sticker
@@ -63,13 +61,7 @@ class ClientThread(threading.Thread):
self.client.stopListening() self.client.stopListening()
if six.PY2: class CaughtValue(threading.Event):
event_class = threading._Event
else:
event_class = threading.Event
class CaughtValue(event_class):
def set(self, res): def set(self, res):
self.res = res self.res = res
super(CaughtValue, self).set() super(CaughtValue, self).set()
@@ -85,7 +77,7 @@ def random_hex(length=20):
def subset(a, **b): def subset(a, **b):
print(a) print(a)
print(b) print(b)
return viewitems(b) <= viewitems(a) return b.items() <= a.items()
def load_variable(name, cache): def load_variable(name, cache):