8000 #30: re-futurize · Powercoder64/ffmpeg-python@84355d4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 84355d4

Browse files
committed
kkroening#30: re-futurize
1 parent 3e68bc8 commit 84355d4

File tree

6 files changed

+10
-3
lines changed

6 files changed

+10
-3
lines changed

ffmpeg/_ffmpeg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import unicode_literals
22

3+
from past.builtins import basestring
34
from ._utils import basestring
45

56
from .nodes import (

ffmpeg/_run.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from __future__ import unicode_literals
22

3+
from builtins import str
4+
from past.builtins import basestring
35
from .dag import get_outgoing_edges, topo_sort
46
from functools import reduce
57
from ._utils import basestring

ffmpeg/_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
from __future__ import unicode_literals
2+
from builtins import str
3+
from past.builtins import basestring
24
import hashlib
35
import sys
46

57
if sys.version_info.major == 2:
68
# noinspection PyUnresolvedReferences,PyShadowingBuiltins
7-
str = unicode
9+
str = str
810

911

1012
# `past.builtins.basestring` module can't be imported on Python3 in some environments (Ubuntu).

ffmpeg/dag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def incoming_edge_map(self):
7575

7676
def get_incoming_edges(downstream_node, incoming_edge_map):
7777
edges = []
78-
for downstream_label, upstream_info in incoming_edge_map.items():
78+
for downstream_label, upstream_info in list(incoming_edge_map.items()):
7979
upstream_node, upstream_label, upstream_selector = upstream_info
8080
edges += [DagEdge(downstream_node, downstream_label, upstream_node, upstream_label, upstream_selector)]
8181
return edges
@@ -97,7 +97,7 @@ class KwargReprNode(DagNode):
9797
@property
9898
def __upstream_hashes(self):
9999
hashes = []
100-
for downstream_label, upstream_info in self.incoming_edge_map.items():
100+
for downstream_label, upstream_info in list(self.incoming_edge_map.items()):
101101
upstream_node, upstream_label, upstream_selector = upstream_info
102102
hashes += [hash(x) for x in [downstream_label, upstream_node, upstream_label, upstream_selector]]
103103
return hashes

ffmpeg/nodes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import unicode_literals
22

3+
from past.builtins import basestring
34
from .dag import KwargReprNode
45
from ._utils import escape_chars, get_hash_int
56
from builtins import object

ffmpeg/tests/test_ffmpeg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import unicode_literals
22

3+
from builtins import str
34
from builtins import bytes
45
from builtins import range
56
import ffmpeg

0 commit comments

Comments
 (0)
0