Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ dependencies = [
"autowrapt>=1.0",
"fysom>=2.1.2",
"requests>=2.6.0",
"six>=1.12.0",
"urllib3>=1.26.5",
"opentelemetry-api>=1.27.0",
"opentelemetry-semantic-conventions>=0.48b0",
Expand Down
5 changes: 2 additions & 3 deletions src/instana/span/base_span.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# (c) Copyright IBM Corp. 2024

from typing import TYPE_CHECKING, Type
import six

from instana.log import logger
from instana.util import DictionaryOfStan
Expand Down Expand Up @@ -83,12 +82,12 @@ def _validate_attribute(self, key, value):

try:
# Attribute keys must be some type of text or string type
if isinstance(key, (six.text_type, six.string_types)):
if isinstance(key, str):
validated_key = key[0:1024] # Max key length of 1024 characters

if isinstance(
value,
(bool, float, int, list, dict, six.text_type, six.string_types),
(bool, float, int, list, dict, str),
):
validated_value = value
else:
Expand Down
7 changes: 3 additions & 4 deletions tests/clients/test_google-cloud-pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from typing import Generator

import pytest
import six
from google.api_core.exceptions import AlreadyExists
from google.cloud.pubsub_v1 import PublisherClient, SubscriberClient
from google.cloud.pubsub_v1.publisher import exceptions
Expand Down Expand Up @@ -51,7 +50,7 @@ def test_publish(self) -> None:
)
time.sleep(2.0) # for sanity
result = future.result()
assert isinstance(result, six.string_types)
assert isinstance(result, str)

spans = self.recorder.queued_spans()
gcps_span, test_span = spans[0], spans[1]
Expand Down Expand Up @@ -80,7 +79,7 @@ def test_publish_as_root_exit_span(self) -> None:
)
time.sleep(2.0) # for sanity
result = future.result()
assert isinstance(result, six.string_types)
assert isinstance(result, str)

spans = self.recorder.queued_spans()
assert len(spans) == 1
Expand Down Expand Up @@ -161,7 +160,7 @@ def test_subscribe(self) -> None:
future = self.publisher.publish(
self.topic_path, b"Test Message to PubSub", origin="instana"
)
assert isinstance(future.result(), six.string_types)
assert isinstance(future.result(), str)

time.sleep(2.0) # for sanity

Expand Down
2 changes: 1 addition & 1 deletion tests/clients/test_google-cloud-storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from opentelemetry.trace import SpanKind

from mock import patch, Mock
from six.moves import http_client
from http import client as http_client

from google.cloud import storage
from google.api_core import iam, page_iterator
Expand Down
Loading