Skip to content

urllib3.fields.format_header_param is deprecated #2619

Closed

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)

Activity

  1. Badiboy commented on Aug 20, 2026

    @Badiboy
    Collaborator

    The PR was closed due to:

    1. Error not reproduced
    2. PR stayed in "Draft" for a month (as far as I remeber).

    If you still think PR is actual - I can re-open it or re-create it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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