Skip to content

Commit

Permalink
Merge pull request #95 from sapcc/remove_six
Browse files Browse the repository at this point in the history
remove six
  • Loading branch information
notque authored Aug 8, 2024
2 parents a5ffb49 + 26f8c54 commit 70a395e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
13 changes: 6 additions & 7 deletions auditmiddleware/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import json
import os
import re
import six
import socket
import uuid
import yaml
Expand Down Expand Up @@ -104,9 +103,9 @@ def str_map(param):
if not param:
return {}

for k, v in six.iteritems(param):
if v is not None and (not isinstance(k, six.string_types) or
not isinstance(v, six.string_types)):
for k, v in param.items():
if v is not None and (not isinstance(k, str) or
not isinstance(v, str)):
raise Exception("Invalid config entry %s:%s (not strings)",
k, v)

Expand Down Expand Up @@ -190,7 +189,7 @@ def _build_audit_map(self, res_dict, parent_type_uri=None):
"""
result = {}

for name, s in six.iteritems(res_dict):
for name, s in res_dict.items():
res_spec, rest_name = self._build_res_spec(name, parent_type_uri,
s)

Expand Down Expand Up @@ -492,10 +491,10 @@ def _create_event_from_payload(self, target_project, res_spec, res_id,
subpayload)

# extract custom attributes from the payload
for attr, typeURI in six.iteritems(res_spec.custom_attributes):
for attr, typeURI in res_spec.custom_attributes.items():
value = subpayload.get(attr)
if value:
if not isinstance(value, six.string_types):
if not isinstance(value, str):
value = json.dumps(value, separators=(',', ':'))
attach_val = Attachment(typeURI=typeURI, content=value,
name=attr)
Expand Down
2 changes: 1 addition & 1 deletion auditmiddleware/_notifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""Provides a oslo-messaging and a log-based messaging connector."""

import os
from six.moves import queue
import queue
import sys
from threading import Thread

Expand Down
1 change: 0 additions & 1 deletion lower-constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ requests-mock==1.2.0
requests==2.14.2
requestsexceptions==1.4.0
rfc3986==1.1.0
six==1.10.0
smmap2==2.0.3
stestr==2.0.0
stevedore==1.20.0
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
pycadf!=2.0.0,>=1.1.0 # Apache-2.0
PyYAML
requests>=2.14.2 # Apache-2.0
WebOb>=1.7.1 # MIT
six>=1.10.0
WebOb>=1.7.1 # MIT

0 comments on commit 70a395e

Please sign in to comment.