Skip to content

Commit e5f7d7a

Browse files
authored
Fix tests and other maintenance (#169)
1 parent b342c80 commit e5f7d7a

5 files changed

Lines changed: 13 additions & 7 deletions

File tree

dev-constraints.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
black==21.5b2
22
flake8==3.9.2
33
isort==5.8.0
4-
mypy==0.812
4+
mypy==0.910
55
pylint==2.8.3
6-
Sphinx==4.0.2
6+
Sphinx==4.3.1
7+
types-protobuf==3.18.2
8+
types-requests==2.26.1
9+
types-setuptools==57.4.4

docs-requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
-c dev-constraints.txt
22
Sphinx
33
sphinx-autodoc-typehints
4-
opentelemetry-api
5-
opentelemetry-sdk
4+
# unpin these entirely once the metrics SDK is available in a new version
5+
opentelemetry-api==1.10a0
6+
opentelemetry-sdk==1.10a0
67
-e ./opentelemetry-exporter-gcp-trace
78
-e ./opentelemetry-exporter-gcp-monitoring
89
-e ./opentelemetry-propagator-gcp

opentelemetry-exporter-gcp-trace/src/opentelemetry/exporter/cloud_trace/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
---
4949
"""
5050

51-
import collections
5251
import logging
5352
import re
53+
from collections.abc import Sequence as SequenceABC
5454
from typing import Any, Dict, List, Optional, Pattern, Sequence, Tuple
5555

5656
import google.auth
@@ -464,7 +464,7 @@ def _format_attribute_value(
464464
elif isinstance(value, float):
465465
value_type = "string_value"
466466
value = _get_truncatable_str_object("{:0.4f}".format(value), 256)
467-
elif isinstance(value, collections.Sequence):
467+
elif isinstance(value, SequenceABC):
468468
value_type = "string_value"
469469
value = _get_truncatable_str_object(
470470
",".join(str(x) for x in value), 256

opentelemetry-exporter-gcp-trace/tests/test_cloud_trace_exporter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,6 @@ def test_extract_multiple_links(self):
552552
"attribute_map": {
553553
"int_attr_value": AttributeValue(int_value=123)
554554
},
555-
"dropped_attributes_count": 1,
556555
},
557556
},
558557
]

tox.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ dev_deps =
2929
isort
3030
pylint
3131
mypy
32+
types-protobuf
33+
types-requests
34+
types-setuptools
3235

3336
; CircleCI won't show results if I put them in .test-results directly
3437
test_results_dir = {toxinidir}/.test-results/test-results

0 commit comments

Comments
 (0)