Skip to content

request.accept_language.best_match will be deprecated #17969

Open
@di

Description

@di

Per https://github.com/Pylons/webob/blob/39d5af3c797e7b867f152c2e8c979de42d029403/src/webob/acceptparse.py#L4358-L4374:

This is currently maintained for backward compatibility, and will be
deprecated in the future.

We may want to replace this with request.accept_language.lookup instead.

A potential issue is that at https://github.com/pypi/infra/blob/d5374e6e92f5a09729d649a0a587935d19f2d76f/terraform/warehouse/vcl/main.vcl#L168 we use the language_lookup function, this might behave slightly differently than best_match or slightly differently than lookup (unsure). The former might result in a current bug, and the latter might produce a bug if we use lookup instead, in which the locale we negotiate differs from what we set in VCL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions