Permalink
Browse files

Merge pull request #465 from a-tal/master

removed relative imports and importing urlparse from urllib.parse for py3+
  • Loading branch information...
gmr committed May 6, 2014
2 parents bc8c92b + 6cbab0c commit 7d6f2584f0d999082ba28db82400efd47ccc1c25
Showing with 15 additions and 10 deletions.
  1. +9 −9 pika/adapters/__init__.py
  2. +6 −1 pika/connection.py
View
@@ -20,27 +20,27 @@
with the libev event loop and employing nonblocking IO
"""
-from base_connection import BaseConnection
-from asyncore_connection import AsyncoreConnection
-from blocking_connection import BlockingConnection
-from select_connection import SelectConnection
-from select_connection import IOLoop
+from pika.adapters.base_connection import BaseConnection
+from pika.adapters.asyncore_connection import AsyncoreConnection
+from pika.adapters.blocking_connection import BlockingConnection
+from pika.adapters.select_connection import SelectConnection
+from pika.adapters.select_connection import IOLoop
# Dynamically handle 3rd party library dependencies for optional imports
try:
- from tornado_connection import TornadoConnection
+ from pika.adapters.tornado_connection import TornadoConnection
except ImportError:
TornadoConnection = None
try:
- from twisted_connection import TwistedConnection
- from twisted_connection import TwistedProtocolConnection
+ from pika.adapters.twisted_connection import TwistedConnection
+ from pika.adapters.twisted_connection import TwistedProtocolConnection
except ImportError:
TwistedConnection = None
TwistedProtocolConnection = None
try:
- from libev_connection import LibevConnection
+ from pika.adapters.libev_connection import LibevConnection
except ImportError:
LibevConnection = None
View
@@ -1,13 +1,18 @@
"""Core connection objects"""
import ast
+import sys
import collections
import logging
import math
import platform
import urllib
-import urlparse
import warnings
+if sys.version_info > (3,):
+ import urllib.parse as urlparse
+else:
+ import urlparse
+
from pika import __version__
from pika import callback
from pika import channel

0 comments on commit 7d6f258

Please sign in to comment.