mirror of
https://github.com/kkroening/ffmpeg-python.git
synced 2025-08-10 13:10:03 +08:00
Drop builtins
import
This commit is contained in:
parent
d23ad83290
commit
7611a29ae6
@ -1,7 +1,6 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from .dag import get_outgoing_edges, topo_sort
|
from .dag import get_outgoing_edges, topo_sort
|
||||||
from ._utils import basestring, convert_kwargs_to_cmd_line_args
|
from ._utils import basestring, convert_kwargs_to_cmd_line_args
|
||||||
from builtins import str
|
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
import collections
|
import collections
|
||||||
import copy
|
import copy
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from builtins import str
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@ -33,14 +32,10 @@ def with_metaclass(meta, *bases):
|
|||||||
|
|
||||||
|
|
||||||
if sys.version_info.major >= 3:
|
if sys.version_info.major >= 3:
|
||||||
|
|
||||||
class basestring(with_metaclass(BaseBaseString)):
|
class basestring(with_metaclass(BaseBaseString)):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# noinspection PyUnresolvedReferences,PyCompatibility
|
basestring = basestring
|
||||||
from builtins import basestring
|
|
||||||
|
|
||||||
|
|
||||||
def _recursive_repr(item):
|
def _recursive_repr(item):
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from builtins import str
|
|
||||||
from .dag import get_outgoing_edges
|
from .dag import get_outgoing_edges
|
||||||
from ._run import topo_sort
|
from ._run import topo_sort
|
||||||
import tempfile
|
import tempfile
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from ._utils import get_hash, get_hash_int
|
from ._utils import get_hash, get_hash_int
|
||||||
from builtins import object
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ from .dag import KwargReprNode
|
|||||||
from ._utils import basestring
|
from ._utils import basestring
|
||||||
from ._utils import escape_chars
|
from ._utils import escape_chars
|
||||||
from ._utils import get_hash_int
|
from ._utils import get_hash_int
|
||||||
from builtins import object
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from builtins import bytes
|
|
||||||
from builtins import range
|
|
||||||
from builtins import str
|
|
||||||
import ffmpeg
|
import ffmpeg
|
||||||
import os
|
import os
|
||||||
import pytest
|
import pytest
|
||||||
@ -689,9 +686,7 @@ def test_pipe():
|
|||||||
cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||||
)
|
)
|
||||||
|
|
||||||
in_data = bytes(
|
in_data = bytearray([random.randint(0, 255) for _ in range(frame_size * frame_count)])
|
||||||
bytearray([random.randint(0, 255) for _ in range(frame_size * frame_count)])
|
|
||||||
)
|
|
||||||
p.stdin.write(in_data) # note: this could block, in which case need to use threads
|
p.stdin.write(in_data) # note: this could block, in which case need to use threads
|
||||||
p.stdin.close()
|
p.stdin.close()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user