tempita dependency is abandonware and doesn't build on Setuptools v58.0.0

Bug #1942768 reported by Nicola Soranzo
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
sqlalchemy-migrate
New
Undecided
Unassigned

Bug Description

sqlalchemy-migrate has a dependency on Tempita ( https://pypi.org/project/Tempita/ ), which is abandoware (last release was in 2013). Tempita uses the use_2to3=True option of setup() in its setup.py , a features which Setuptools has removed in v58.0.0 ( https://github.com/pypa/setuptools/blob/main/CHANGES.rst#v5800 ).

As a consequence, Tempita is installed with Python2 syntax under Python3 and breaks sqlalchemy-migrate:

from tempita import Template as TempitaTemplate
E File "/home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.7/site-packages/tempita/__init__.py", line 295
E except SyntaxError, e:
E ^
E SyntaxError: invalid syntax

Revision history for this message
Michael Howitz (mh-gocept) wrote :

This issue prevents from installing `sqlalchemy-migrate` on a new machine using a relatively recent setuptools version.

Are there any ideas or plans to fix this issue?

Revision history for this message
Nicola Soranzo (nsoranzo) wrote (last edit ):
Download full text (4.9 KiB)

@mh-gocept How are you trying to install sqlalchemy-migrate? A wheel for Tempita 0.5.2 was added to PyPI in September 2021, see https://github.com/pypa/setuptools/issues/2788#issuecomment-921962154
So `pip install sqlalchemy-migrate` works fine for me currently, unless you are using the `--no-binary` option:

```
soranzon@n140522:/tmp$ rm -rf ~/.cache/pip
soranzon@n140522:/tmp$ virtualenv sqlam_venv
created virtual environment CPython3.8.10.final.0-64 in 84ms
  creator CPython3Posix(dest=/tmp/sqlam_venv, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, pkg_resources=latest, via=copy, app_data_dir=/usr/users/ga002/soranzon/.local/share/virtualenv/seed-app-data/v1.0.1.debian.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
soranzon@n140522:/tmp$ . sqlam_venv/bin/activate
(sqlam_venv) soranzon@n140522:/tmp$ pip install --upgrade pip setuptools
Collecting pip
  Downloading pip-22.0.3-py3-none-any.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB 4.3 MB/s
Collecting setuptools
  Downloading setuptools-60.8.2-py3-none-any.whl (1.1 MB)
     |████████████████████████████████| 1.1 MB 5.0 MB/s
Installing collected packages: pip, setuptools
  Attempting uninstall: pip
    Found existing installation: pip 20.0.2
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
  Attempting uninstall: setuptools
    Found existing installation: setuptools 44.0.0
    Uninstalling setuptools-44.0.0:
      Successfully uninstalled setuptools-44.0.0
Successfully installed pip-22.0.3 setuptools-60.8.2
(sqlam_venv) soranzon@n140522:/tmp$ pip install --no-binary :all: sqlalchemy-migrate
Collecting sqlalchemy-migrate
  Downloading sqlalchemy-migrate-0.13.0.tar.gz (131 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 131.4/131.4 KB 3.8 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting pbr>=1.8
  Downloading pbr-5.8.1.tar.gz (127 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 127.5/127.5 KB 4.5 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting SQLAlchemy>=0.9.6
  Downloading SQLAlchemy-1.4.31.tar.gz (8.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.0/8.0 MB 4.5 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting decorator
  Downloading decorator-5.1.1.tar.gz (35 kB)
  Preparing metadata (setup.py) ... done
Collecting six>=1.7.0
  Downloading six-1.16.0.tar.gz (34 kB)
  Preparing metadata (setup.py) ... done
Collecting sqlparse
  Downloading sqlparse-0.4.2.tar.gz (67 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.8/67.8 KB 4.2 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting Tempita>=0.4
  Downloading Tempita-0.5.2.tar.gz (12 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in Tempita setup command: use_2to3 is invalid.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while gene...

Read more...

Revision history for this message
Michael Howitz (mh-gocept) wrote :

@nsoranzo Thank you for the heads-up on this issue.
I am using `zc.buildout` to install the dependencies and it does not seem to pick up the wheel but still uses the sdist. But I now have an idea how to tackle this problem locally. Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.