Skip to content

Patch to add imp.get_codingspec() #47842

Closed

Description

@brettcannon
BPO 3592
Nosy @brettcannon, @tiran, @benjaminp
Files
  • reviewed_get_encodingspec.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2010-08-09.21:01:28.990>
    created_at = <Date 2008-08-18.21:13:51.462>
    labels = ['type-feature', 'library']
    title = 'Patch to add imp.get_codingspec()'
    updated_at = <Date 2010-08-09.21:01:28.989>
    user = 'https://github.com/brettcannon'

    bugs.python.org fields:

    activity = <Date 2010-08-09.21:01:28.989>
    actor = 'brett.cannon'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-08-09.21:01:28.990>
    closer = 'brett.cannon'
    components = ['Library (Lib)']
    creation = <Date 2008-08-18.21:13:51.462>
    creator = 'brett.cannon'
    dependencies = []
    files = ['11149']
    hgrepos = []
    issue_num = 3592
    keywords = ['patch']
    message_count = 3.0
    messages = ['71379', '71380', '113412']
    nosy_count = 3.0
    nosy_names = ['brett.cannon', 'christian.heimes', 'benjamin.peterson']
    pr_nums = []
    priority = 'low'
    resolution = 'out of date'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue3592'
    versions = ['Python 3.2']

    Activity

    1. brettcannon commented on Aug 18, 2008

      @brettcannon
      MemberAuthor

      Attached is a patch to add imp.get_codingspec(); a function that returns
      the encoding of a source file.

      The motivation is to remove the import of the re module in linecache to
      speed up interpreter startup.

    2. added
      stdlib
      type-feature
      on Aug 18, 2008
    3. brettcannon commented on Aug 18, 2008

      @brettcannon
      MemberAuthor

      It should be noted the original patch by Christian had a check for bad
      tokenizing. Turns out that if you have that in several tests fail,
      including test_modulefinder. This might mean there is a deeper problem
      in the parser.

    4. benjaminp commented on Aug 9, 2010

      @benjaminp
      Contributor

      We don't need this. We have tokenize.detect_encoding().

    5. transferred this issue fromon Apr 10, 2022
    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

      stdlibtype-feature

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions