Skip to content
Commits on Source (2)
bedops (2.4.36+dfsg-2) UNRELEASED; urgency=medium
* Team upload.
* Use 2to3 to port python files from python2 to python3
Closes: #936197
-- Shayan Doust <hello@shayandoust.me> Fri, 13 Sep 2019 15:10:57 +0100
bedops (2.4.36+dfsg-1) unstable; urgency=medium
* Team upload.
......
Description: port python files using python2 to python3
Author: Shayan Doust <hello@shayandoust.me>
Bug-Debian: https://bugs.debian.org/936197
Last-Update: 2019-09-13
---
Index: bedops/applications/bed/sort-bed/src/update-sort-bed-migrate-candidates.py
===================================================================
--- bedops.orig/applications/bed/sort-bed/src/update-sort-bed-migrate-candidates.py 2019-09-13 15:06:08.879696791 +0100
+++ bedops/applications/bed/sort-bed/src/update-sort-bed-migrate-candidates.py 2019-09-13 15:06:08.871696823 +0100
@@ -19,7 +19,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-from __future__ import absolute_import, division, print_function, unicode_literals
+
import sys
import os
Index: bedops/applications/bed/sort-bed/src/update-sort-bed-slurm.py
===================================================================
--- bedops.orig/applications/bed/sort-bed/src/update-sort-bed-slurm.py 2019-09-13 15:06:08.879696791 +0100
+++ bedops/applications/bed/sort-bed/src/update-sort-bed-slurm.py 2019-09-13 15:06:08.871696823 +0100
@@ -19,7 +19,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-from __future__ import absolute_import, division, print_function, unicode_literals
+
import sys
import os
Index: bedops/applications/bed/sort-bed/src/update-sort-bed-starch-slurm.py
===================================================================
--- bedops.orig/applications/bed/sort-bed/src/update-sort-bed-starch-slurm.py 2019-09-13 15:06:08.879696791 +0100
+++ bedops/applications/bed/sort-bed/src/update-sort-bed-starch-slurm.py 2019-09-13 15:06:08.871696823 +0100
@@ -19,7 +19,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-from __future__ import absolute_import, division, print_function, unicode_literals
+
import sys
import os
Index: bedops/applications/bed/starch/src/starch-diff.py
===================================================================
--- bedops.orig/applications/bed/starch/src/starch-diff.py 2019-09-13 15:06:08.879696791 +0100
+++ bedops/applications/bed/starch/src/starch-diff.py 2019-09-13 15:06:08.871696823 +0100
@@ -19,7 +19,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-from __future__ import absolute_import, division, print_function, unicode_literals
+
import sys
import os
@@ -77,7 +77,7 @@
all_tests_pass = True
- selected_chromosome = unicode(args.chr)
+ selected_chromosome = str(args.chr)
if args.debug: logger.info('Selected chromosome [%s]' % (selected_chromosome))
archive_paths = list()
@@ -132,11 +132,11 @@
all_chromosomes[chromosome] = 0
all_chromosomes[chromosome] += 1
- common_chromosomes = [k for k, v in all_chromosomes.iteritems() if v == num_files]
+ common_chromosomes = [k for k, v in all_chromosomes.items() if v == num_files]
common_chromosomes.sort()
if args.debug: logger.info('Common chromosomes [%s]' % (','.join(common_chromosomes)))
- uncommon_chromosomes = [k for k, v in all_chromosomes.iteritems() if v != num_files]
+ uncommon_chromosomes = [k for k, v in all_chromosomes.items() if v != num_files]
uncommon_chromosomes.sort()
if args.debug: logger.info('Uncommon chromosomes [%s]' % (','.join(uncommon_chromosomes)))
Index: bedops/applications/bed/starch/test/nested_and_duplicate_elements/src/hasDuplicateElements.py
===================================================================
--- bedops.orig/applications/bed/starch/test/nested_and_duplicate_elements/src/hasDuplicateElements.py 2019-09-13 15:06:08.879696791 +0100
+++ bedops/applications/bed/starch/test/nested_and_duplicate_elements/src/hasDuplicateElements.py 2019-09-13 15:06:08.871696823 +0100
@@ -10,35 +10,35 @@
chr1_proc_out, chr1_proc_err = chr1_proc.communicate()
chr1_proc_out.strip('\n')
if int(chr1_proc_out) == 0:
- print "[STARCH] ERROR: chr1 is reporting it doesn't have a duplicate element, but it does!"
+ print("[STARCH] ERROR: chr1 is reporting it doesn't have a duplicate element, but it does!")
sys.exit(os.EX_USAGE)
chr2_proc = subprocess.Popen([unstarch, 'chr2', flag, archive], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
chr2_proc_out, chr2_proc_err = chr2_proc.communicate()
chr2_proc_out.strip('\n')
if int(chr2_proc_out) == 1:
- print "[STARCH] ERROR: chr2 is reporting it has a duplicate element, but it doesn't!"
+ print("[STARCH] ERROR: chr2 is reporting it has a duplicate element, but it doesn't!")
sys.exit(os.EX_USAGE)
chr3_proc = subprocess.Popen([unstarch, 'chr3', flag, archive], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
chr3_proc_out, chr3_proc_err = chr3_proc.communicate()
chr3_proc_out.strip('\n')
if int(chr3_proc_out) == 1:
- print "[STARCH] ERROR: chr3 is reporting it has a duplicate element, but it doesn't!"
+ print("[STARCH] ERROR: chr3 is reporting it has a duplicate element, but it doesn't!")
sys.exit(os.EX_USAGE)
chrAll_proc = subprocess.Popen([unstarch, 'all', flag, archive], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
chrAll_proc_out, chrAll_proc_err = chrAll_proc.communicate()
chrAll_proc_out.strip('\n')
if int(chrAll_proc_out) == 0:
- print "[STARCH] ERROR: 'all' chromosome usage is reporting the archive doesn't have a duplicate element, but there is a duplicate element in chr1!"
+ print("[STARCH] ERROR: 'all' chromosome usage is reporting the archive doesn't have a duplicate element, but there is a duplicate element in chr1!")
sys.exit(os.EX_USAGE)
chrOmit_proc = subprocess.Popen([unstarch, flag, archive], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
chrOmit_proc_out, chrOmit_proc_err = chrOmit_proc.communicate()
chrOmit_proc_out.strip('\n')
if int(chrOmit_proc_out) == 0:
- print "[STARCH] ERROR: omitted chromosome usage is reporting the archive doesn't have a duplicate element, but there is a duplicate element in chr1!"
+ print("[STARCH] ERROR: omitted chromosome usage is reporting the archive doesn't have a duplicate element, but there is a duplicate element in chr1!")
sys.exit(os.EX_USAGE)
sys.exit(os.EX_OK)
Index: bedops/applications/bed/starch/test/nested_and_duplicate_elements/src/hasNestedElements.py
===================================================================
--- bedops.orig/applications/bed/starch/test/nested_and_duplicate_elements/src/hasNestedElements.py 2019-09-13 15:06:08.879696791 +0100
+++ bedops/applications/bed/starch/test/nested_and_duplicate_elements/src/hasNestedElements.py 2019-09-13 15:06:08.871696823 +0100
@@ -10,35 +10,35 @@
chr1_proc_out, chr1_proc_err = chr1_proc.communicate()
chr1_proc_out.strip('\n')
if int(chr1_proc_out) == 1:
- print "[STARCH] ERROR: chr1 is reporting it has a nested element, but it doesn't have one!"
+ print("[STARCH] ERROR: chr1 is reporting it has a nested element, but it doesn't have one!")
sys.exit(os.EX_USAGE)
chr2_proc = subprocess.Popen([unstarch, 'chr2', flag, archive], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
chr2_proc_out, chr2_proc_err = chr2_proc.communicate()
chr2_proc_out.strip('\n')
if int(chr2_proc_out) == 0:
- print "[STARCH] ERROR: chr2 is reporting it doesn't have a nested element, but it does!"
+ print("[STARCH] ERROR: chr2 is reporting it doesn't have a nested element, but it does!")
sys.exit(os.EX_USAGE)
chr3_proc = subprocess.Popen([unstarch, 'chr3', flag, archive], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
chr3_proc_out, chr3_proc_err = chr3_proc.communicate()
chr3_proc_out.strip('\n')
if int(chr3_proc_out) == 0:
- print "[STARCH] ERROR: chr3 is reporting it doesn't have a nested element, but it does!"
+ print("[STARCH] ERROR: chr3 is reporting it doesn't have a nested element, but it does!")
sys.exit(os.EX_USAGE)
chrAll_proc = subprocess.Popen([unstarch, 'all', flag, archive], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
chrAll_proc_out, chrAll_proc_err = chrAll_proc.communicate()
chrAll_proc_out.strip('\n')
if int(chrAll_proc_out) == 0:
- print "[STARCH] ERROR: 'all' chromosome usage is reporting the archive doesn't have a nested element, but there are nested elements in chr2 and chr3!"
+ print("[STARCH] ERROR: 'all' chromosome usage is reporting the archive doesn't have a nested element, but there are nested elements in chr2 and chr3!")
sys.exit(os.EX_USAGE)
chrOmit_proc = subprocess.Popen([unstarch, flag, archive], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
chrOmit_proc_out, chrOmit_proc_err = chrOmit_proc.communicate()
chrOmit_proc_out.strip('\n')
if int(chrOmit_proc_out) == 0:
- print "[STARCH] ERROR: omitted chromosome usage is reporting the archive doesn't have a nested element, but there are nested elements in chr2 and chr3!"
+ print("[STARCH] ERROR: omitted chromosome usage is reporting the archive doesn't have a nested element, but there are nested elements in chr2 and chr3!")
sys.exit(os.EX_USAGE)
sys.exit(os.EX_OK)
Index: bedops/docs/conf.py
===================================================================
--- bedops.orig/docs/conf.py 2019-09-13 15:06:08.879696791 +0100
+++ bedops/docs/conf.py 2019-09-13 15:06:08.875696807 +0100
@@ -42,8 +42,8 @@
master_doc = 'index'
# General information about the project.
-project = u'BEDOPS'
-copyright = u'2011-2019, Shane Neph, Alex Reynolds'
+project = 'BEDOPS'
+copyright = '2011-2019, Shane Neph, Alex Reynolds'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -200,8 +200,8 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
- ('index', 'BEDOPS.tex', u'BEDOPS Documentation',
- u'Shane Neph, Alex Reynolds', 'manual'),
+ ('index', 'BEDOPS.tex', 'BEDOPS Documentation',
+ 'Shane Neph, Alex Reynolds', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -230,8 +230,8 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- ('index', 'bedops', u'BEDOPS Documentation',
- [u'Shane Neph, Alex Reynolds'], 1)
+ ('index', 'bedops', 'BEDOPS Documentation',
+ ['Shane Neph, Alex Reynolds'], 1)
]
# If true, show URL addresses after external links.
@@ -244,8 +244,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- ('index', 'BEDOPS', u'BEDOPS Documentation',
- u'Shane Neph, Alex Reynolds', 'BEDOPS', 'One line description of project.',
+ ('index', 'BEDOPS', 'BEDOPS Documentation',
+ 'Shane Neph, Alex Reynolds', 'BEDOPS', 'One line description of project.',
'Miscellaneous'),
]
@@ -265,10 +265,10 @@
# -- Options for Epub output ---------------------------------------------------
# Bibliographic Dublin Core info.
-epub_title = u'BEDOPS'
-epub_author = u'Shane Neph, Alex Reynolds'
-epub_publisher = u'Shane Neph, Alex Reynolds'
-epub_copyright = u'2013, Shane Neph, Alex Reynolds'
+epub_title = 'BEDOPS'
+epub_author = 'Shane Neph, Alex Reynolds'
+epub_publisher = 'Shane Neph, Alex Reynolds'
+epub_copyright = '2013, Shane Neph, Alex Reynolds'
# The language of the text. It defaults to the language option
# or en if the language is not set.
2to3.patch
use_debian_libs
hardening.patch