Remove six
dependency
This commit is contained in:
@@ -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",
|
||||||
|
@@ -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):
|
||||||
|
Reference in New Issue
Block a user