old_contents: import re
  from os import path
  import subprocess
  from setuptools import find_packages, setup
  
  version_file = path.join(path.dirname(path.abspath(__file__)), "pydocstring", "_version.py")
  
  try:
      # Get the version from git if we're in source
      describe = subprocess.check_output(["git", "describe", "--long"])
      version, commits, chash = describe.decode("utf-8").split("-")
      if version[0] == "v":
          version = version[1:]
      version_text = """
  # Autogenerated by setup.py, do not touch this file
  public_version = '{0}'
  build_identifier = '+{1}-{2}'
  """.format(version.strip(), commits.strip(), chash.strip())
      with open(version_file, "w") as vf:
          assert vf.write(version_text), len(version_text)
  except:
      # if we're not in source, check the _version.py file exists, and get the version from there
      assert path.exists(version_file)
      with open(version_file) as vf:
          version_text = vf.read()
      version = re.match(r"public_version = '(.*)'", version_text).group(1)
  
  classifiers=[
      'Development Status :: 2 - Pre-Alpha',
      'Environment :: Console',
      'Environment :: Plugins',
      'Environment :: Win32 (MS Windows)',
      'Intended Audience :: Developers',
      'License :: OSI Approved :: MIT License',
      'Programming Language :: Python :: 2.7',
      'Programming Language :: Python :: 3.2',
      'Programming Language :: Python :: 3.3',
      'Programming Language :: Python :: 3.4',
      'Programming Language :: Python :: 3.5',
      'Programming Language :: Python :: 3.6',
      'Topic :: Software Development :: Documentation',
  ]
  
  
  setup(
      name='pydocstring',
      version=version,
      url='https://github.com/robodair/pydocstring',
      author='Alisdair Robertson',
      author_email='alisdair.w.robertson@gmail.com',
      description=('Package providing autocompletion capabilities for python docstrings'),
      license='MIT',
      packages=find_packages(exclude=('tests')),
      classifiers=classifiers,
  )
  
new_contents: import re
  from os import path
  import subprocess
  from setuptools import find_packages, setup
  
  version_file = path.join(path.dirname(path.abspath(__file__)), "pydocstring", "_version.py")
  
  try:
      # Get the version from git if we're in source
      describe = subprocess.check_output(["git", "describe", "--long"])
      version, commits, chash = describe.decode("utf-8").split("-")
      if version[0] == "v":
          version = version[1:]
      version_text = """
  # Autogenerated by setup.py, do not touch this file
  public_version = '{0}'
  build_identifier = '+{1}-{2}'
  """.format(version.strip(), commits.strip(), chash.strip())
      with open(version_file, "w") as vf:
          vf.write(version_text)
  except subprocess.CalledProcessError:
      # if we're not in source, check the _version.py file exists, and get the version from there
      assert path.exists(version_file)
      with open(version_file) as vf:
          version_text = vf.read()
      version = re.match(r"public_version = '(.*)'", version_text).group(1)
  
  classifiers=[
      'Development Status :: 2 - Pre-Alpha',
      'Environment :: Console',
      'Environment :: Plugins',
      'Environment :: Win32 (MS Windows)',
      'Intended Audience :: Developers',
      'License :: OSI Approved :: MIT License',
      'Programming Language :: Python :: 2.7',
      'Programming Language :: Python :: 3.2',
      'Programming Language :: Python :: 3.3',
      'Programming Language :: Python :: 3.4',
      'Programming Language :: Python :: 3.5',
      'Programming Language :: Python :: 3.6',
      'Topic :: Software Development :: Documentation',
  ]
  
  
  setup(
      name='pydocstring',
      version=version,
      url='https://github.com/robodair/pydocstring',
      author='Alisdair Robertson',
      author_email='alisdair.w.robertson@gmail.com',
      description=('Package providing autocompletion capabilities for python docstrings'),
      license='MIT',
      packages=find_packages(exclude=('tests')),
      classifiers=classifiers,
  )
  
subject: Remove assert that is invalid in python2