Closed yassFar closed 5 years ago
And replace relative import with absolute import:
File "/home/yfaris/dev/opcdaproxy/.env/local/lib/python2.7/site-packages/pyformance/reporters/hosted_graphite_reporter.py", line 7, in <module>
from .meters import Counter, Histogram, Meter, Timer
ImportError: No module named meters
Launched the test with python 3.6 on my machine, all test passed.
Closing for inactivity
This PR fix an
ImportError
for hosted_graphite_reporter.py wiht python >= 3.5:>>> import pyformance.reporters.hosted_graphite_reporter
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/yfaris/dev/opcdaproxy/.env3/lib/python3.5/site-packages/pyformance/reporters/hosted_graphite_reporter.py", line 4, in <module> import urllib2 ImportError: No module named 'urllib2'
This PR also change the method used to handle different import between different python version with a simpler one using the
six.moves
module.