Skip to content

setup.py claims Python 2.6/2.7/3.5 support but code uses f-strings (3.6+) #116

Description

@chirag127

Problem

setup.py classifiers advertise Python 2.6/2.7/3.5 but source uses f-string syntax that fails to parse on <3.6, and there is no python_requires gate.

Steps

  1. python3.5 -m pip install translate==3.8.0
  2. python3.5 -c "from translate import Translator; Translator(to_lang='es', provider='deepl', secret_access_key='x')"

Expected

Either install refuses on unsupported interpreter (via python_requires) or import succeeds.

Actual

SyntaxError at translate/providers/deepl.py:29:

self.headers.update({'Authorization': f'DeepL-Auth-Key {self.secret_access_key}'})

f-strings are 3.6+.

Cite

  • setup.py:87-89 — classifiers Python :: 2.6, 2.7, 3.5
  • translate/providers/deepl.py:29 — f-string usage
  • setup.py — no python_requires kwarg to setup()

Environment

translate 3.8.0 (from translate/version.py), setup.py on master @ 2025-11-03.

Fix: add python_requires='>=3.6' and drop stale classifiers.

Thanks for maintaining terryyin/translate-python!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions