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

http.server doesn't guess n-quads, n-triples, notation3 and TriG MIME types #86324

Closed
DylanVanAssche mannequin opened this issue Oct 26, 2020 · 6 comments
Closed

http.server doesn't guess n-quads, n-triples, notation3 and TriG MIME types #86324

DylanVanAssche mannequin opened this issue Oct 26, 2020 · 6 comments
Labels
3.11 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@DylanVanAssche
Copy link
Mannequin

DylanVanAssche mannequin commented Oct 26, 2020

BPO 42158
Nosy @merwok, @ambv, @miss-islington, @DylanVanAssche
PRs
  • bpo-42158: Add MIME types for n-triples, n-quads, n3 and trig #23230
  • [3.10] bpo-42158: Add MIME types for n-triples, n-quads, n3 and trig (GH-23230) #29663
  • [3.9] bpo-42158: Add MIME types for n-triples, n-quads, n3 and trig (GH-23230) #29664
  • 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 2021-11-20.15:55:43.644>
    created_at = <Date 2020-10-26.17:56:56.349>
    labels = ['type-feature', 'library', '3.11']
    title = "http.server doesn't guess n-quads, n-triples, notation3 and TriG MIME types"
    updated_at = <Date 2021-11-20.15:55:43.642>
    user = 'https://github.com/DylanVanAssche'

    bugs.python.org fields:

    activity = <Date 2021-11-20.15:55:43.642>
    actor = 'lukasz.langa'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-11-20.15:55:43.644>
    closer = 'lukasz.langa'
    components = ['Library (Lib)']
    creation = <Date 2020-10-26.17:56:56.349>
    creator = 'DylanVanAssche'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 42158
    keywords = ['patch']
    message_count = 6.0
    messages = ['379676', '379677', '380291', '406664', '406665', '406666']
    nosy_count = 4.0
    nosy_names = ['eric.araujo', 'lukasz.langa', 'miss-islington', 'DylanVanAssche']
    pr_nums = ['23230', '29663', '29664']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue42158'
    versions = ['Python 3.11']

    @DylanVanAssche
    Copy link
    Mannequin Author

    DylanVanAssche mannequin commented Oct 26, 2020

    guess_format() from lib/mimetypes.py doesn't guess correctly the following MIME types:

    In these cases the default MIME type is returned: application/octet-stream

    @DylanVanAssche DylanVanAssche mannequin added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Oct 26, 2020
    @DylanVanAssche DylanVanAssche mannequin changed the title guess_format() MIME type doesn't guess n-quads, n-triples, notation3 and TriG http.server MIME type doesn't guess n-quads, n-triples, notation3 and TriG MIME types Oct 26, 2020
    @DylanVanAssche DylanVanAssche mannequin changed the title guess_format() MIME type doesn't guess n-quads, n-triples, notation3 and TriG http.server MIME type doesn't guess n-quads, n-triples, notation3 and TriG MIME types Oct 26, 2020
    @DylanVanAssche DylanVanAssche mannequin changed the title http.server MIME type doesn't guess n-quads, n-triples, notation3 and TriG MIME types http.server doesn't guess n-quads, n-triples, notation3 and TriG MIME types Oct 26, 2020
    @DylanVanAssche DylanVanAssche mannequin changed the title http.server MIME type doesn't guess n-quads, n-triples, notation3 and TriG MIME types http.server doesn't guess n-quads, n-triples, notation3 and TriG MIME types Oct 26, 2020
    @DylanVanAssche
    Copy link
    Mannequin Author

    DylanVanAssche mannequin commented Oct 26, 2020

    Adding the MIME types to /etc/mime.types fixes this issue, but I'm not sure if that's the right 'fix'

    @merwok
    Copy link
    Member

    merwok commented Nov 3, 2020

    Editing /etc/mime.types is one way of customizing the types returned; another one is to make a pull request to add them to the list inside the mimetypes module.

    @merwok merwok removed 3.7 (EOL) end of life 3.8 only security fixes labels Nov 3, 2020
    @ambv
    Copy link
    Contributor

    ambv commented Nov 20, 2021

    New changeset ef53058 by Dylan Van Assche in branch 'main':
    bpo-42158: Add MIME types for n-triples, n-quads, n3 and trig (GH-23230)
    ef53058

    @ambv
    Copy link
    Contributor

    ambv commented Nov 20, 2021

    There was a little discussion on #67419 whether the change should also go to 3.10 and 3.9 given it's not a bugfix.

    Eric unearthed a similar discussion here:
    https://bugs.python.org/issue13952#msg152752

    where R. David opted for skipping backports on the grounds that the change is a new feature. Given R. David's conservative approach (which I share), I merged this change to 3.11 alone. Unless a backwards incompatibility is demonstrated, we won't be backporting to 3.10 and 3.9.

    @ambv
    Copy link
    Contributor

    ambv commented Nov 20, 2021

    Thanks for pursuing this, Eric! ✨ 🍰 ✨

    @ambv ambv added 3.11 only security fixes and removed 3.9 only security fixes 3.10 only security fixes labels Nov 20, 2021
    @ambv ambv closed this as completed Nov 20, 2021
    @ambv ambv added 3.11 only security fixes and removed 3.9 only security fixes 3.10 only security fixes labels Nov 20, 2021
    @ambv ambv closed this as completed Nov 20, 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.11 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

    2 participants