diff --git a/.travis.yml b/.travis.yml index 7639912..b096836 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ python: - "2.7" - "3.4" - "3.5" + - "3.6" # command to install dependencies install: # install htcondor diff --git a/condorpy/job.py b/condorpy/job.py index 4f765d6..d34100a 100644 --- a/condorpy/job.py +++ b/condorpy/job.py @@ -78,7 +78,7 @@ def __init__(self, attributes = attributes or OrderedDict() attributes['job_name'] = name attributes.update(kwargs) - for attr, value in attributes.items(): + for attr, value in list(attributes.items()): self.set(attr, value) def __str__(self): @@ -154,7 +154,7 @@ def status(self): status_dict = self.statuses # determine job status status = "Various" - for key, val in status_dict.iteritems(): + for key, val in status_dict.items(): if val == self.num_jobs: status = key return status @@ -331,7 +331,7 @@ def quote_join_function_template(join_string, escape_func): value = 'true' elif isinstance(value, list) or isinstance(value, tuple): join_function = join_function_template(', ', str) - for key in join_functions.keys(): + for key in list(join_functions.keys()): if attr.endswith(key): join_function = join_functions[key] value = join_function(value) @@ -379,7 +379,7 @@ def _update_status(self, sub_job_num=None): #initialize status dictionary status_dict = dict() - for val in CONDOR_JOB_STATUSES.itervalues(): + for val in CONDOR_JOB_STATUSES.values(): status_dict[val] = 0 for status_code_str in out: @@ -395,7 +395,7 @@ def _update_status(self, sub_job_num=None): def _list_attributes(self): attribute_list = [] - for k, v in self.attributes.items(): + for k, v in list(self.attributes.items()): if v: attribute_list.append(k + ' = ' + str(v)) return attribute_list diff --git a/condorpy/node.py b/condorpy/node.py index 6a2d8b8..3a06131 100644 --- a/condorpy/node.py +++ b/condorpy/node.py @@ -527,7 +527,7 @@ def list_vars(self): result = '' if self.vars: result = 'VARS %s' % (self.job.name,) - for key, value in self.vars.iteritems(): + for key, value in self.vars.items(): result += ' %s="%s"' % (key, value) result += '\n' return result diff --git a/condorpy/workflow.py b/condorpy/workflow.py index 6476b7b..fe6f84c 100644 --- a/condorpy/workflow.py +++ b/condorpy/workflow.py @@ -57,7 +57,7 @@ def __str__(self): if self.max_jobs: max_jobs_list = '' - for category, max_jobs in self.max_jobs.iteritems(): + for category, max_jobs in self.max_jobs.items(): max_jobs_list += 'MAXJOBS {0} {1}\n'.format(category, str(max_jobs)) result.append(max_jobs_list) @@ -184,7 +184,7 @@ def _update_statuses(self, sub_job_num=None): # initialize status dictionary status_dict = dict() - for val in CONDOR_JOB_STATUSES.itervalues(): + for val in CONDOR_JOB_STATUSES.values(): status_dict[val] = 0 for node in self.node_set: diff --git a/docs/source/conf.py b/docs/source/conf.py index 49eef3a..942fb9a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -49,9 +49,9 @@ master_doc = 'index' # General information about the project. -project = u'condorpy' -copyright = u'2015, Scott Christensen' -author = u'Scott Christensen' +project = 'condorpy' +copyright = '2015, Scott Christensen' +author = 'Scott Christensen' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -225,8 +225,8 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'condorpy.tex', u'condorpy Documentation', - u'Scott Christensen', 'manual'), + (master_doc, 'condorpy.tex', 'condorpy Documentation', + 'Scott Christensen', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -255,7 +255,7 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'condorpy', u'condorpy Documentation', + (master_doc, 'condorpy', 'condorpy Documentation', [author], 1) ] @@ -269,7 +269,7 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'condorpy', u'condorpy Documentation', + (master_doc, 'condorpy', 'condorpy Documentation', author, 'condorpy', 'One line description of project.', 'Miscellaneous'), ]