Skip to content

email.charset.SHORTEST is not in the stub #2830

Closed

Description

@jolaf
from email.charset import SHORTEST

Causes mypy to complain:
Module 'email.charset' has no attribute 'SHORTEST'

However:

$ python
>>> from email.charset import SHORTEST
>>> SHORTEST
3

Activity

  1. jolaf commented on Mar 7, 2019

    @jolaf
    ContributorAuthor

    Probably the cause is a bug in Python documentation:
    https://bugs.python.org/issue33449

  2. srittau commented on Mar 7, 2019

    @srittau
    Collaborator

    This affects only the Python 2 stubs. Patches welcome!

  3. jolaf commented on Mar 7, 2019

    @jolaf
    ContributorAuthor

    Nope, I've actually encountered the problem with Python 3.

  4. srittau commented on Mar 7, 2019

    @srittau
    Collaborator

    It was fixed in #2768 for Python 3, but the Python 2 version still needs this fix.

  5. jolaf commented on Mar 11, 2019

    @jolaf
    ContributorAuthor

    Here's the patch for Python 2: #2854

  6. added a commit that references this issue on Mar 11, 2019
    e4e19d6
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions