|
1 | | -from future.moves.urllib.parse import quote |
| 1 | +from urllib.parse import quote |
2 | 2 |
|
3 | 3 | try: import simplejson as json |
4 | 4 | except ImportError: import json |
5 | 5 |
|
6 | | -import six |
7 | 6 | from .utils import build_where_clause, build_choose_clause |
8 | 7 | from .client import QuickBooks |
9 | 8 | from .exceptions import QuickbooksException |
@@ -70,14 +69,9 @@ def to_dict(obj, classkey=None): |
70 | 69 | elif hasattr(obj, "__iter__") and not isinstance(obj, str): |
71 | 70 | return [to_dict(v, classkey) for v in obj] |
72 | 71 | elif hasattr(obj, "__dict__"): |
73 | | - if six.PY2: |
74 | | - data = dict([(key, to_dict(value, classkey)) |
75 | | - for key, value in obj.__dict__.iteritems() |
76 | | - if not callable(value) and not key.startswith('_')]) |
77 | | - else: |
78 | | - data = dict([(key, to_dict(value, classkey)) |
79 | | - for key, value in obj.__dict__.items() |
80 | | - if not callable(value) and not key.startswith('_')]) |
| 72 | + data = dict([(key, to_dict(value, classkey)) |
| 73 | + for key, value in obj.__dict__.items() |
| 74 | + if not callable(value) and not key.startswith('_')]) |
81 | 75 |
|
82 | 76 | if classkey is not None and hasattr(obj, "__class__"): |
83 | 77 | data[classkey] = obj.__class__.__name__ |
|
0 commit comments