Skip to content

Python 2 Deprecated #477

@vincentqb

Description

@vincentqb

The 0.4.0 release of torchaudio was the last one supporting python 2, and master no longer officially supports python 2. We're looking to strip the code of python 2 references.

  • No longer use package six and backports for cross-compatibility
  • Convert to inline type hinting
  • No __future__ import
  • Change string formatting style
  • Remove mention of python 2.7 in setup.py
  • Remove older code path in _check_module_exists and no longer need to check python 3 is not used at the end of the file
  • Update unicode_decoder to python 3 only, here.
  • Replace calls to makedir_exist_ok to os.makedirs(.., exist_ok=True)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions