Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean metadata (importlib_metadata 4.0) #88092

Closed
jaraco opened this issue Apr 23, 2021 · 2 comments
Closed

Clean metadata (importlib_metadata 4.0) #88092

jaraco opened this issue Apr 23, 2021 · 2 comments
Assignees
Labels
3.10 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@jaraco
Copy link
Member

jaraco commented Apr 23, 2021

BPO 43926
Nosy @jaraco
PRs
  • bpo-43926: Cleaner metadata with PEP 566 JSON support. #25565
  • 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 = 'https://github.com/jaraco'
    closed_at = <Date 2021-05-03.01:26:11.294>
    created_at = <Date 2021-04-23.20:45:44.450>
    labels = ['type-feature', 'library', '3.10']
    title = 'Clean metadata (importlib_metadata 4.0)'
    updated_at = <Date 2021-05-03.01:26:11.293>
    user = 'https://github.com/jaraco'

    bugs.python.org fields:

    activity = <Date 2021-05-03.01:26:11.293>
    actor = 'jaraco'
    assignee = 'jaraco'
    closed = True
    closed_date = <Date 2021-05-03.01:26:11.294>
    closer = 'jaraco'
    components = ['Library (Lib)']
    creation = <Date 2021-04-23.20:45:44.450>
    creator = 'jaraco'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43926
    keywords = ['patch']
    message_count = 2.0
    messages = ['391733', '392732']
    nosy_count = 1.0
    nosy_names = ['jaraco']
    pr_nums = ['25565']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue43926'
    versions = ['Python 3.10']

    @jaraco
    Copy link
    Member Author

    jaraco commented Apr 23, 2021

    importlib_metadata 4.0 introduced these important changes to the metadata function:

    PackageMetadata as returned by metadata()
    and Distribution.metadata() now provides normalized
    metadata honoring PEP-566:

    • If a long description is provided in the payload of the
      RFC 822 value, it can be retrieved as the Description
      field.
    • Any multi-line values in the metadata will be returned as
      such.
    • For any multi-line values, line continuation characters
      are removed. This backward-incompatible change means
      that any projects relying on the RFC 822 line continuation
      characters being present must be tolerant to them having
      been removed.
    • Add a json property that provides the metadata
      converted to a JSON-compatible form per PEP-566.

    These changes would be a nice addition to Python 3.10.

    @jaraco jaraco added the 3.10 only security fixes label Apr 23, 2021
    @jaraco jaraco self-assigned this Apr 23, 2021
    @jaraco jaraco added stdlib Python modules in the Lib dir type-feature A feature request or enhancement 3.10 only security fixes labels Apr 23, 2021
    @jaraco jaraco self-assigned this Apr 23, 2021
    @jaraco jaraco added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Apr 23, 2021
    @jaraco
    Copy link
    Member Author

    jaraco commented May 2, 2021

    New changeset 37e0c78 by Jason R. Coombs in branch 'master':
    bpo-43926: Cleaner metadata with PEP-566 JSON support. (GH-25565)
    37e0c78

    @jaraco jaraco closed this as completed May 3, 2021
    @jaraco jaraco closed this as completed May 3, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant