From 7ea85f876792517e6c9a8f0aa2bc31f6b8eb1b36 Mon Sep 17 00:00:00 2001 From: Python3pkg Date: Sun, 21 May 2017 10:52:02 -0700 Subject: [PATCH] Convert to Python3 --- doc/conf.py | 16 ++++++++-------- pastebin_python/__init__.py | 2 +- pastebin_python/pastebin.py | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 201cb17..ea5a460 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -40,8 +40,8 @@ master_doc = 'index' # General information about the project. -project = u'pastebin_python' -copyright = u'2013, Ferdinand Silva' +project = 'pastebin_python' +copyright = '2013, Ferdinand Silva' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -183,8 +183,8 @@ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'pastebin_python.tex', u'pastebin\\_python Documentation', - u'Ferdinand Silva', 'manual'), + ('index', 'pastebin_python.tex', 'pastebin\\_python Documentation', + 'Ferdinand Silva', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -213,8 +213,8 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'pastebin_python', u'pastebin_python Documentation', - [u'Ferdinand Silva'], 1) + ('index', 'pastebin_python', 'pastebin_python Documentation', + ['Ferdinand Silva'], 1) ] # If true, show URL addresses after external links. @@ -227,8 +227,8 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'pastebin_python', u'pastebin_python Documentation', - u'Ferdinand Silva', 'pastebin_python', 'One line description of project.', + ('index', 'pastebin_python', 'pastebin_python Documentation', + 'Ferdinand Silva', 'pastebin_python', 'One line description of project.', 'Miscellaneous'), ] diff --git a/pastebin_python/__init__.py b/pastebin_python/__init__.py index b2f7c81..b55a6d4 100644 --- a/pastebin_python/__init__.py +++ b/pastebin_python/__init__.py @@ -3,7 +3,7 @@ .. moduleauthor:: Ferdinand Silva """ -from pastebin import PastebinPython +from .pastebin import PastebinPython __version__ = "1.2" __app_name__ = "pastebin_python" diff --git a/pastebin_python/pastebin.py b/pastebin_python/pastebin.py index a95d33d..d4e86cc 100644 --- a/pastebin_python/pastebin.py +++ b/pastebin_python/pastebin.py @@ -8,9 +8,9 @@ import re import requests from xml.dom.minidom import parseString -from pastebin_options import OPTION_PASTE, OPTION_LIST, OPTION_TRENDS, OPTION_DELETE, OPTION_USER_DETAILS -from pastebin_constants import PASTEBIN_API_POST_URL, PASTEBIN_API_LOGIN_URL, PASTEBIN_RAW_URL -from pastebin_exceptions import PastebinBadRequestException, PastebinNoPastesException, PastebinFileException, PastebinHTTPErrorException +from .pastebin_options import OPTION_PASTE, OPTION_LIST, OPTION_TRENDS, OPTION_DELETE, OPTION_USER_DETAILS +from .pastebin_constants import PASTEBIN_API_POST_URL, PASTEBIN_API_LOGIN_URL, PASTEBIN_RAW_URL +from .pastebin_exceptions import PastebinBadRequestException, PastebinNoPastesException, PastebinFileException, PastebinHTTPErrorException class PastebinPython(object): @@ -88,7 +88,7 @@ def createPaste(self, api_paste_code, api_paste_name='', api_paste_format='', ap localVar = locals() - for k, v in localVar.items(): + for k, v in list(localVar.items()): if re.search('^api_',k) and v != "": postData[k] = v