"vscode:/vscode.git/clone" did not exist on "46455328e48200c078b66451d2c7471c650cf7c5"
Unverified Commit a424509d authored by Edward Z. Yang's avatar Edward Z. Yang Committed by GitHub
Browse files

Make torchaudio work on Python 2. (#209)



- Apply __future__ imports uniformly (future division is the biggy, but absolute
  imports mattered too)
- Hotfix use of tempfile.TemporaryDirectory using a BC library (DO NOT
  add this library as a dependency to torchaudio; it's only for testing)
- Replace math.gcd with fractions.gcd
- Fix a weird pytest collection bug involving parametrized tests
- Turn on Python 2 and Python 3.7 in Travis.
Signed-off-by: default avatarEdward Z. Yang <ezyang@fb.com>
parent 67f9f302
from __future__ import print_function from __future__ import absolute_import, division, print_function, unicode_literals
import torch.utils.data as data import torch.utils.data as data
import os import os
import os.path import os.path
......
from __future__ import division from __future__ import absolute_import, division, print_function, unicode_literals
import math import math
import torch import torch
......
from __future__ import absolute_import, division, print_function, unicode_literals
# To use this file, the dependency (https://github.com/vesis84/kaldi-io-for-python) # To use this file, the dependency (https://github.com/vesis84/kaldi-io-for-python)
# needs to be installed. This is a light wrapper around kaldi_io that returns # needs to be installed. This is a light wrapper around kaldi_io that returns
# torch.Tensors. # torch.Tensors.
......
from __future__ import division, print_function from __future__ import absolute_import, division, print_function, unicode_literals
import torch import torch
import _torch_sox import _torch_sox
......
from __future__ import division, print_function from __future__ import absolute_import, division, print_function, unicode_literals
from warnings import warn from warnings import warn
import math import math
import torch import torch
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment