Skip to content

Commit 5a50010

Browse files
authored
[Core][OpenCensus] Fix bug with unexpected kwargs (Azure#29869)
In OpenCensus, the `start_span` method only accepts a name argument. This fixes cases where a user might pass in additional arbitrary kwargs to `OpenCensusSpan` that are then passed to the `start_span` method, yielding an unexpected keyword error. Also bump minimum Python version to 3.7 and add support for 3.11. Signed-off-by: Paul Van Eck <[email protected]>
1 parent e351fad commit 5a50010

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

sdk/core/azure-core-tracing-opencensus/CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
### Breaking Changes
88

9-
### Key Bugs Fixed
9+
### Bugs Fixed
1010

11-
### Fixed
11+
- Fixed a bug where starting a span would fail if an unexpected keyword argument was passed in to `OpenCensusSpan`.
1212

1313
### Other Changes
1414

15-
- Python 2.7 is no longer supported. Please use Python version 3.6 or later.
15+
- Python 2.7 is no longer supported. Please use Python version 3.7 or later.
1616

1717
## 1.0.0b8 (2021-07-01)
1818

sdk/core/azure-core-tracing-opencensus/azure/core/tracing/ext/opencensus_span/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def __init__(self, span=None, name="span", **kwargs):
8282
raise ValueError("Kind {} is not supported in OpenCensus".format(value))
8383

8484
links = kwargs.pop("links", None)
85-
self._span_instance = span or tracer.start_span(name=name, **kwargs)
85+
self._span_instance = span or tracer.start_span(name=name)
8686
if kind is not None:
8787
self._span_instance.span_kind = kind
8888

sdk/core/azure-core-tracing-opencensus/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@
4444
"Programming Language :: Python",
4545
"Programming Language :: Python :: 3 :: Only",
4646
"Programming Language :: Python :: 3",
47-
"Programming Language :: Python :: 3.6",
4847
"Programming Language :: Python :: 3.7",
4948
"Programming Language :: Python :: 3.8",
5049
"Programming Language :: Python :: 3.9",
5150
"Programming Language :: Python :: 3.10",
51+
"Programming Language :: Python :: 3.11",
5252
"License :: OSI Approved :: MIT License",
5353
],
5454
zip_safe=False,
@@ -59,7 +59,7 @@
5959
package_data={
6060
"pytyped": ["py.typed"],
6161
},
62-
python_requires=">=3.6",
62+
python_requires=">=3.7",
6363
install_requires=[
6464
"opencensus>=0.6.0",
6565
"opencensus-ext-azure>=0.3.1",

0 commit comments

Comments
 (0)