{
  "schemaVersion": "ebb.rule.v1",
  "id": "python.symbol.urllib.request.urlopen-cafile",
  "ecosystem": "python",
  "purl": "pkg:generic/python",
  "affectedVersions": "vers:pypi/>=3.13",
  "event": "removed",
  "severity": "high",
  "title": "The cafile, capath and cadefault parameters of urllib.request.urlopen have been removed",
  "summary": "Python 3.13 removed the cafile, capath and cadefault parameters of urllib.request.urlopen, so using it raises an error.",
  "replacement": "the context parameter with an ssl.SSLContext",
  "sources": [
    {
      "title": "What's New in Python 3.13",
      "url": "https://docs.python.org/3/whatsnew/3.13.html",
      "accessedAt": "2026-10-21"
    }
  ],
  "provenance": {
    "observedAt": "2026-10-21",
    "reviewedAt": "2026-10-21",
    "reviewer": "arminazimi"
  },
  "migration": {
    "constraints": [
      "Keep the behavior of the code unchanged; check the replacement's argument and return-value differences."
    ],
    "steps": [
      {
        "id": "replace-symbol",
        "title": "Replace the usage",
        "instructions": "Replace each reported use of the cafile, capath and cadefault parameters of urllib.request.urlopen with the context parameter with an ssl.SSLContext.",
        "targets": "usages"
      }
    ],
    "verification": [
      {
        "command": "python -W error::DeprecationWarning -m pytest",
        "purpose": "Run the tests with deprecation warnings as errors when pytest is used."
      }
    ]
  }
}
