Skip to content

urllib3.fields.format_header_param is deprecated #2619

Description

@jdavid

See https://urllib3.readthedocs.io/en/stable/reference/urllib3.fields.html#urllib3.fields.format_header_param

Deprecated since version 2.0.0: Renamed to format_multipart_header_param(). Will be removed in urllib3 v3.0.

This produces an AttributeError if urllib3.future is installed. I hit this issue when installed pyTelegramBotAPI and openmeteo-requests:

  • pyTelegramBotAPI pulls requests which pulls urllib3
  • openmeteo-requests pulls niquests which pulls urllib3.future
  • urllib3.future replaces urllib3 and does not provide the deprecated urllib3.fields.format_header_param, this produces the AttributeError

PR #2587 fixed this but it was closed:

  • Right now pyTelegramBotAPI works with urllib3 < 3 (and does not work with urllib3.future)
  • If the PR above is merged pyTelegramBotAPI will work with urllib3 >= 2.0 (2.0 was released in 2023)

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