Skip to content

Commit

Permalink
Merge pull request #14 from stephenc-pace/loosen-importlib-pin
Browse files Browse the repository at this point in the history
pin importlib for earlier versions of python
  • Loading branch information
timbu committed Sep 26, 2023
2 parents 7548f17 + 1d21e94 commit 23502f9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
- id: fix-encoding-pragma
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.6.3
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/ambv/black
Expand Down
2 changes: 1 addition & 1 deletion nameko_opentelemetry/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
__version__ = "0.5.1"
__version__ = "0.5.2"
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
"opentelemetry-api",
"opentelemetry-instrumentation",
"opentelemetry-instrumentation-wsgi",
"importlib-metadata<=4.13.0", # Temporary pin,
# remove when https://github.com/celery/kombu/pull/1601
# is in the most recent version of kombu
"importlib-metadata<5 ; python_version<='3.7'",
],
extras_require={
"dev": list(PACKAGE_INFO["_instruments"])
Expand Down
6 changes: 3 additions & 3 deletions tests/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def test_no_match(self, container, web_session, memory_exporter):
spans = memory_exporter.get_finished_spans()
assert len(spans) == 1

assert spans[0].name == "HTTP GET"
assert "GET" in spans[0].name


class TestNoEntrypointFired:
Expand Down Expand Up @@ -121,7 +121,7 @@ def test_method_not_found(self, container, web_session, memory_exporter):

span = spans[0]

assert spans[0].name == "HTTP GET"
assert "GET" in spans[0].name

assert not span.status.is_ok
assert span.status.status_code == StatusCode.ERROR
Expand All @@ -139,7 +139,7 @@ def test_method_not_allowed(self, container, web_session, memory_exporter):

span = spans[0]

assert spans[0].name == "HTTP POST"
assert "POST" in spans[0].name

assert not span.status.is_ok
assert span.status.status_code == StatusCode.ERROR
Expand Down

0 comments on commit 23502f9

Please sign in to comment.