[ 
https://issues.apache.org/jira/browse/MESOS-7163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16480727#comment-16480727
 ] 

Armand Grillet commented on MESOS-7163:
---------------------------------------

interface:
{code}
RefactoringTool: Refactored ./src/mesos/interface/__init__.py
--- ./src/mesos/interface/__init__.py   (original)
+++ ./src/mesos/interface/__init__.py   (refactored)
@@ -20,7 +20,7 @@

 """Python bindings for Mesos."""

-from __future__ import print_function
+

 import sys
{code}

lib:
{code}
RefactoringTool: Refactored ./mesos/exceptions.py
--- ./mesos/exceptions.py       (original)
+++ ./mesos/exceptions.py       (refactored)
@@ -18,7 +18,7 @@
 Exceptions Classes
 """

-from __future__ import absolute_import
+


 class MesosException(Exception):
RefactoringTool: Refactored ./mesos/http.py
--- ./mesos/http.py     (original)
+++ ./mesos/http.py     (refactored)
@@ -20,9 +20,9 @@
 Classes and functions for interacting with the Mesos HTTP RESTful API
 """

-from __future__ import absolute_import
-
-from urlparse import urlparse
+
+
+from urllib.parse import urlparse
 from copy import deepcopy

 import requests
@@ -84,7 +84,7 @@
     default timeout for connections, default headers to be included in each
     request, and auth.
     """
-    SUCCESS_CODES = frozenset(xrange(200, 300))
+    SUCCESS_CODES = frozenset(range(200, 300))
     ERROR_CODE_MAP = {c.STATUS_CODE: c for c in (
         MesosBadRequestException,
         MesosAuthenticationException,
RefactoringTool: No changes to ./tests/__init__.py
RefactoringTool: Refactored ./tests/conftest.py
--- ./tests/conftest.py (original)
+++ ./tests/conftest.py (refactored)
@@ -18,7 +18,7 @@
 PyTest configuration
 """

-from __future__ import absolute_import
+

 import mock
 import pytest
RefactoringTool: No changes to ./tests/test_exceptions.py
RefactoringTool: Refactored ./tests/test_http.py
--- ./tests/test_http.py        (original)
+++ ./tests/test_http.py        (refactored)
@@ -16,7 +16,7 @@

 # pylint: 
disable=missing-docstring,protected-access,too-many-locals,too-many-arguments

-from __future__ import absolute_import
+

 from collections import namedtuple

RefactoringTool: Refactored ./tests/test_mesos.py
--- ./tests/test_mesos.py       (original)
+++ ./tests/test_mesos.py       (refactored)
@@ -18,7 +18,7 @@
 Tests for the mesos package
 """

-from __future__ import absolute_import
+

 import mesos
{code}
That seems to be it.

> python: Produce python3 compatible python bindings
> --------------------------------------------------
>
>                 Key: MESOS-7163
>                 URL: https://issues.apache.org/jira/browse/MESOS-7163
>             Project: Mesos
>          Issue Type: Bug
>          Components: python api
>            Reporter: Anthony Sottile
>            Priority: Minor
>
> We're looking to migrate a codebase using mesos to use python3.  Some of the 
> mesos python apis already seem to work though the cpython bindings will need 
> some tweaking.
> This is probably blocked on producing source distributions, I'll link that 
> ticket.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to