Hi Kakuma-San, Thank you for reviewing my patch.
On 2016年06月07日 08:30, fumihiko kakuma wrote: > On Fri, 3 Jun 2016 13:20:05 +0900 > IWASE Yusuke <[email protected]> wrote: > >> diff --git a/ryu/services/protocols/bgp/api/base.py >> b/ryu/services/protocols/bgp/api/base.py >> index 489e318..d0c0d79 100644 >> --- a/ryu/services/protocols/bgp/api/base.py >> +++ b/ryu/services/protocols/bgp/api/base.py >> @@ -208,7 +208,7 @@ def call(symbol, **kwargs): >> LOG.info("API method %s called with args: %s", symbol, str(kwargs)) >> >> # TODO(PH, JK) improve the way api function modules are loaded >> - import all # noqa >> + from . import all # noqa >> if not is_call_registered(symbol): >> message = 'Did not find any method registered by symbol %s' % >> symbol >> raise MethodNotFound(message) > > It may be better to add "from __future__ import absolute_import" statement > to enforce explicit relative imports. Yes, I think it's better. But this statement takes effect only the module which is defined, so, in the other module without this statement, it has no effect. Does anyone know how to globally enforce the explicit relative imports? > >> diff --git a/ryu/services/protocols/bgp/utils/circlist.py >> b/ryu/services/protocols/bgp/utils/circlist.py >> index d22ec21..4a04f4f 100644 >> --- a/ryu/services/protocols/bgp/utils/circlist.py >> +++ b/ryu/services/protocols/bgp/utils/circlist.py >> @@ -13,7 +13,9 @@ >> # See the License for the specific language governing permissions and >> # limitations under the License. >> >> -from six.moves import intern >> +import six >> +if six.PY3: >> + from sys import intern > > Is this intended to work with six>=1.4.0 ? Sorry, I mistook. The existing code works correctly. (py35) $ pip show six --- Metadata-Version: 2.0 Name: six Version: 1.10.0 Summary: Python 2 and 3 compatibility utilities Home-page: http://pypi.python.org/pypi/six/ ... (py35) $ (py35) $ python Python 3.5.1+ (default, Mar 30 2016, 22:46:26) [GCC 5.3.1 20160330] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from six.moves import intern I fixed this because PyCharm code inspection said: Cannot find reference 'moves' in 'six.py' (at line 16) but this was due to the dynamic dispatch of 'six.moves'. I'll update my patches! Thanks, Iwase ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
