{
  "id": "python/setuptools-invalid-classifier",
  "signature": "error in mypkg setup command: 'classifiers' must be a list of strings, got: 'Programming Language :: Python :: 3.11'",
  "signature_zh": "mypkg setup 命令出错：'classifiers' 必须是字符串列表，得到：'Programming Language :: Python :: 3.11'",
  "regex": "error\\ in\\ mypkg\\ setup\\ command:\\ 'classifiers'\\ must\\ be\\ a\\ list\\ of\\ strings,\\ got:\\ 'Programming\\ Language\\ ::\\ Python\\ ::\\ 3\\.11'",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "A single classifier string was assigned to classifiers instead of a list, or a comma-separated string was used in setup.cfg/pyproject.toml.",
  "root_cause_type": "generic",
  "root_cause_zh": "将单个分类器字符串赋值给 classifiers，而不是列表；或在 setup.cfg/pyproject.toml 中使用了逗号分隔的字符串。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Produces one bogus classifier containing commas instead of three valid ones.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Loses PyPI metadata used for search and compatibility filtering.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.98,
      "how": "# setup.cfg\n[metadata]\nclassifiers =\n    Programming Language :: Python :: 3\n    Programming Language :: Python :: 3.11\n\n# pyproject.toml\nclassifiers = [\n  \"Programming Language :: Python :: 3\",\n  \"Programming Language :: Python :: 3.11\",\n]",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.92,
      "how": "python -m pip install trove-classifiers\npython - <<'PY'\nfrom trove_classifiers import classifiers\nfor c in [\"Programming Language :: Python :: 3.11\"]:\n    assert c in classifiers, c\nprint('ok')\nPY",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-16",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}