|
0 |
Author: Andreas Tille <tille@debian.org>
|
|
1 |
Last-Update: Sun, 01 Sep 2019 00:01:00 +0200
|
|
2 |
Bug-Debian: https://bugs.debian.org/936109
|
|
3 |
Description: Use 2to3 to convert from Python2 to Python3
|
|
4 |
|
|
5 |
--- a/data/scripts/align-convert.py
|
|
6 |
+++ b/data/scripts/align-convert.py
|
|
7 |
@@ -1,4 +1,4 @@
|
|
8 |
-#!/usr/bin/env python
|
|
9 |
+#!/usr/bin/python3
|
|
10 |
|
|
11 |
# Copyright (c) 2010-2015, Daniel S. Standage and CONTRIBUTORS
|
|
12 |
#
|
|
13 |
@@ -6,7 +6,7 @@
|
|
14 |
# the 'LICENSE' file in the AEGeAn source code distribution or
|
|
15 |
# online at https://github.com/standage/AEGeAn/blob/master/LICENSE.
|
|
16 |
|
|
17 |
-from __future__ import print_function
|
|
18 |
+
|
|
19 |
import re
|
|
20 |
import sys
|
|
21 |
|
|
22 |
@@ -24,14 +24,14 @@ class Peeker:
|
|
23 |
def __iter__(self):
|
|
24 |
return self
|
|
25 |
|
|
26 |
- def next(self):
|
|
27 |
+ def __next__(self):
|
|
28 |
if self.buffer:
|
|
29 |
return self.buffer.pop(0)
|
|
30 |
else:
|
|
31 |
return next(self.iter)
|
|
32 |
|
|
33 |
def __next__(self):
|
|
34 |
- return self.next()
|
|
35 |
+ return next(self)
|
|
36 |
|
|
37 |
def peek(self, n=0):
|
|
38 |
"""Return an item n entries ahead in the iteration."""
|
|
39 |
--- a/data/scripts/check-gff3.py
|
|
40 |
+++ b/data/scripts/check-gff3.py
|
|
41 |
@@ -1,4 +1,4 @@
|
|
42 |
-#!/usr/bin/env python
|
|
43 |
+#!/usr/bin/python3
|
|
44 |
|
|
45 |
# Copyright (c) 2010-2015, Daniel S. Standage and CONTRIBUTORS
|
|
46 |
#
|
|
47 |
@@ -8,7 +8,7 @@
|
|
48 |
#
|
|
49 |
# Usage: check-gff3.py < annot.gff3
|
|
50 |
|
|
51 |
-from __future__ import print_function
|
|
52 |
+
|
|
53 |
import re
|
|
54 |
import sys
|
|
55 |
|
|
56 |
@@ -50,7 +50,7 @@ for line in sys.stdin:
|
|
57 |
topleveltypes[values[2]] += 1
|
|
58 |
|
|
59 |
print('\n===== Types =====')
|
|
60 |
-featuretypes = counts.keys()
|
|
61 |
+featuretypes = list(counts.keys())
|
|
62 |
featuretypes.sort()
|
|
63 |
for featuretype in featuretypes:
|
|
64 |
count = counts[featuretype]
|
|
65 |
@@ -60,7 +60,7 @@ for featuretype in featuretypes:
|
|
66 |
print('%s (%lu total, %lu top-level)' % (featuretype, count, topcount))
|
|
67 |
|
|
68 |
print('\n===== Relationships (child --> parent) =====')
|
|
69 |
-childtypes = relationships.keys()
|
|
70 |
+childtypes = list(relationships.keys())
|
|
71 |
childtypes.sort()
|
|
72 |
for childtype in childtypes:
|
|
73 |
parenttypes = list(relationships[childtype].keys())
|
|
74 |
--- a/data/scripts/lpdriver.py
|
|
75 |
+++ b/data/scripts/lpdriver.py
|
|
76 |
@@ -1,4 +1,4 @@
|
|
77 |
-#!/usr/bin/env python
|
|
78 |
+#!/usr/bin/python3
|
|
79 |
|
|
80 |
# Copyright (c) 2010-2015, Daniel S. Standage and CONTRIBUTORS
|
|
81 |
#
|
|
82 |
@@ -6,7 +6,7 @@
|
|
83 |
# the 'LICENSE' file in the AEGeAn source code distribution or
|
|
84 |
# online at https://github.com/standage/AEGeAn/blob/master/LICENSE.
|
|
85 |
|
|
86 |
-from __future__ import print_function
|
|
87 |
+
|
|
88 |
import argparse
|
|
89 |
import os
|
|
90 |
import re
|
|
91 |
--- a/data/scripts/miloci.py
|
|
92 |
+++ b/data/scripts/miloci.py
|
|
93 |
@@ -1,4 +1,4 @@
|
|
94 |
-#!/usr/bin/env python
|
|
95 |
+#!/usr/bin/python3
|
|
96 |
|
|
97 |
# Copyright (c) 2010-2016, Daniel S. Standage and CONTRIBUTORS
|
|
98 |
#
|
|
99 |
@@ -6,7 +6,7 @@
|
|
100 |
# the 'LICENSE' file in the AEGeAn source code distribution or
|
|
101 |
# online at https://github.com/standage/AEGeAn/blob/master/LICENSE.
|
|
102 |
|
|
103 |
-from __future__ import print_function
|
|
104 |
+
|
|
105 |
import re
|
|
106 |
import sys
|
|
107 |
|
|
108 |
--- a/data/scripts/seq-reg.py
|
|
109 |
+++ b/data/scripts/seq-reg.py
|
|
110 |
@@ -1,4 +1,4 @@
|
|
111 |
-#!/usr/bin/env python
|
|
112 |
+#!/usr/bin/python3
|
|
113 |
|
|
114 |
# Copyright (c) 2010-2015, Daniel S. Standage and CONTRIBUTORS
|
|
115 |
#
|
|
116 |
@@ -6,7 +6,7 @@
|
|
117 |
# the 'LICENSE' file in the AEGeAn source code distribution or
|
|
118 |
# online at https://github.com/standage/AEGeAn/blob/master/LICENSE.
|
|
119 |
|
|
120 |
-from __future__ import print_function
|
|
121 |
+
|
|
122 |
import argparse
|
|
123 |
import os
|
|
124 |
import re
|
|
125 |
--- a/data/scripts/uloci.py
|
|
126 |
+++ b/data/scripts/uloci.py
|
|
127 |
@@ -1,4 +1,4 @@
|
|
128 |
-#!/usr/bin/env python
|
|
129 |
+#!/usr/bin/python3
|
|
130 |
|
|
131 |
# Copyright (c) 2010-2016, Daniel S. Standage and CONTRIBUTORS
|
|
132 |
#
|
|
133 |
@@ -6,7 +6,7 @@
|
|
134 |
# the 'LICENSE' file in the AEGeAn source code distribution or
|
|
135 |
# online at https://github.com/standage/AEGeAn/blob/master/LICENSE.
|
|
136 |
|
|
137 |
-from __future__ import print_function
|
|
138 |
+
|
|
139 |
import argparse
|
|
140 |
import re
|
|
141 |
import sys
|
|
142 |
--- a/data/scripts/version.py
|
|
143 |
+++ b/data/scripts/version.py
|
|
144 |
@@ -1,4 +1,4 @@
|
|
145 |
-#!/usr/bin/env python
|
|
146 |
+#!/usr/bin/python3
|
|
147 |
|
|
148 |
# Copyright (c) 2010-2016, Daniel S. Standage and CONTRIBUTORS
|
|
149 |
#
|
|
150 |
@@ -6,7 +6,7 @@
|
|
151 |
# the 'LICENSE' file in the AEGeAn source code distribution or
|
|
152 |
# online at https://github.com/standage/AEGeAn/blob/master/LICENSE.
|
|
153 |
|
|
154 |
-from __future__ import print_function
|
|
155 |
+
|
|
156 |
import re
|
|
157 |
import subprocess
|
|
158 |
import sys
|