Skip to content

Commit

Permalink
Removed six
Browse files Browse the repository at this point in the history
  • Loading branch information
orangejenny committed Sep 17, 2024
1 parent f0b5f4b commit 64f436f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 17 deletions.
1 change: 0 additions & 1 deletion couchdb_cluster_admin/describe.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
get_shard_allocation,
indent,
)
from six.moves import map


def print_shard_table(shard_allocation_docs):
Expand Down
16 changes: 7 additions & 9 deletions couchdb_cluster_admin/doc_models.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from __future__ import absolute_import
from collections import defaultdict
from jsonobject import JsonObject, ListProperty, DictProperty, StringProperty, IntegerProperty
from six.moves import map
import six


class ConfigInjectionMixin(object):
Expand All @@ -22,8 +20,8 @@ def set_config(self, config):
class MembershipDoc(ConfigInjectionMixin, JsonObject):
_allow_dynamic_properties = False

cluster_nodes = ListProperty(six.text_type, required=True)
all_nodes = ListProperty(six.text_type, required=True)
cluster_nodes = ListProperty(str, required=True)
all_nodes = ListProperty(str, required=True)

def get_printable(self):
return (
Expand All @@ -41,10 +39,10 @@ class ShardAllocationDoc(ConfigInjectionMixin, JsonObject):
_id = StringProperty()
_rev = StringProperty(exclude_if_none=True)

by_node = DictProperty(ListProperty(six.text_type))
changelog = ListProperty(ListProperty(six.text_type))
by_node = DictProperty(ListProperty(str))
changelog = ListProperty(ListProperty(str))
shard_suffix = ListProperty(int)
by_range = DictProperty(ListProperty(six.text_type))
by_range = DictProperty(ListProperty(str))

@property
def usable_shard_suffix(self):
Expand Down Expand Up @@ -126,6 +124,6 @@ def get_printable(self, include_shard_names=True, db_name_len=20):


class AllocationSpec(JsonObject):
databases = ListProperty(six.text_type)
nodes = ListProperty(six.text_type)
databases = ListProperty(str)
nodes = ListProperty(str)
copies = IntegerProperty()
1 change: 0 additions & 1 deletion couchdb_cluster_admin/suggest_shard_allocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from .describe import print_shard_table
from .file_plan import read_plan_file
from .doc_models import ShardAllocationDoc, AllocationSpec
from six.moves import range


class _NodeAllocation(object):
Expand Down
5 changes: 1 addition & 4 deletions couchdb_cluster_admin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
from requests import HTTPError

from .doc_models import MembershipDoc, ShardAllocationDoc
import six
from six.moves import range
from six.moves import input

NodeDetails = namedtuple('NodeDetails', 'ip port node_local_port couchdb_version username password socks_port')

Expand Down Expand Up @@ -133,7 +130,7 @@ class Config(JsonObject):
control_node_local_port = IntegerProperty()
couchdb_version = StringProperty()
username = StringProperty()
aliases = DictProperty(six.text_type)
aliases = DictProperty(str)

def set_password(self, password):
self._password = password
Expand Down
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,5 @@ pyyaml==6.0.2
# via couchdb-cluster-admin (setup.py)
requests==2.27.1
# via couchdb-cluster-admin (setup.py)
six==1.12.0
# via jsonobject
urllib3==1.26.5
# via requests

0 comments on commit 64f436f

Please sign in to comment.