Skip to content

Commit 628bf28

Browse files
authored
Revert "MySQLdb Instrumentation (mysql-python) (#84)" (#86)
This reverts commit 9424b6a.
1 parent 9424b6a commit 628bf28

File tree

9 files changed

+16
-450
lines changed

9 files changed

+16
-450
lines changed

.travis.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
11
language: python
2-
32
python:
43
- "2.7"
54
- "3.3"
65
- "3.4"
76
- "3.5"
87
- "3.6"
9-
10-
before_install:
11-
- "pip install --upgrade pip"
12-
- "pip install --upgrade setuptools"
13-
- 'mysql -e 'CREATE DATABASE travis_ci_test;'
14-
158
install: "pip install -r requirements-test.txt"
16-
17-
189
script: nosetests -v

instana/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,4 @@ def load(module):
5656
# noqa: ignore=W0611
5757
from .instrumentation import urllib3 # noqa
5858
from .instrumentation import sudsjurko # noqa
59-
from .instrumentation import mysqlpython # noqa
6059
from .instrumentation.django import middleware # noqa

instana/instrumentation/mysqlpython.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

instana/instrumentation/pep0249.py

Lines changed: 0 additions & 147 deletions
This file was deleted.

instana/span.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def finish(self, finish_time=None):
1616
super(InstanaSpan, self).finish(finish_time)
1717

1818
def log_exception(self, e):
19-
if hasattr(e, 'message') and len(e.message):
19+
if hasattr(e, 'message'):
2020
self.log_kv({'message': e.message})
2121
elif hasattr(e, '__str__'):
2222
self.log_kv({'message': e.__str__()})

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@
2626
'test': [
2727
'nose>=1.0',
2828
'flask>=0.12.2',
29-
'lxml>=3.4',
30-
'MySQL-python>=1.2.5;python_version<="2.7"',
3129
'requests>=2.17.1',
3230
'urllib3[secure]>=1.15',
3331
'spyne>=2.9',
32+
'lxml>=3.4',
3433
'suds-jurko>=0.6'
3534
],
3635
},

tests/__init__.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@
1313
# Spawn our background Flask app that the tests will throw
1414
# requests at. Don't continue until the test app is fully
1515
# up and running.
16-
flask = threading.Thread(target=flaskalino.run)
17-
flask.daemon = True
18-
flask.name = "Background Flask app"
16+
timer = threading.Thread(target=flaskalino.run)
17+
timer.daemon = True
18+
timer.name = "Background Flask app"
1919
print("Starting background Flask app...")
20-
flask.start()
20+
timer.start()
2121

2222

2323
# Background Soap Server
2424
#
2525
# Spawn our background Flask app that the tests will throw
2626
# requests at. Don't continue until the test app is fully
2727
# up and running.
28-
soap = threading.Thread(target=soapserver.serve_forever)
29-
soap.daemon = True
30-
soap.name = "Background Soap server"
28+
timer = threading.Thread(target=soapserver.serve_forever)
29+
timer.daemon = True
30+
timer.name = "Background Soap server"
3131
print("Starting background Soap server...")
32-
soap.start()
32+
timer.start()
3333

3434

3535
time.sleep(1)

tests/apps/soapserver4132.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,18 @@ def client_fault(ctx):
4141

4242

4343

44-
# logging.basicConfig(level=logging.WARN)
45-
logging.getLogger('suds').setLevel(logging.WARN)
46-
logging.getLogger('suds.resolver').setLevel(logging.WARN)
47-
logging.getLogger('spyne.protocol.xml').setLevel(logging.WARN)
48-
logging.getLogger('spyne.model.complex').setLevel(logging.WARN)
49-
logging.getLogger('spyne.interface._base').setLevel(logging.WARN)
50-
logging.getLogger('spyne.interface.xml').setLevel(logging.WARN)
51-
logging.getLogger('spyne.util.appreg').setLevel(logging.WARN)
52-
5344
app = Application([StanSoapService], 'instana.tests.app.ask_question',
5445
in_protocol=Soap11(validator='lxml'), out_protocol=Soap11())
5546

5647
# Use Instana middleware so we can test context passing and Soap server traces.
5748
wsgi_app = iWSGIMiddleware(WsgiApplication(app))
5849
soapserver = make_server('127.0.0.1', 4132, wsgi_app)
5950

51+
logging.basicConfig(level=logging.WARN)
52+
logging.getLogger('suds').setLevel(logging.WARN)
53+
logging.getLogger('suds.resolver').setLevel(logging.WARN)
54+
logging.getLogger('spyne.protocol.xml').setLevel(logging.WARN)
55+
logging.getLogger('spyne.model.complex').setLevel(logging.WARN)
56+
6057
if __name__ == '__main__':
6158
soapserver.serve_forever()

0 commit comments

Comments
 (0)