GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mimetype default list make a wrong guess for illustrator file · Issue #87710 · python/cpython

mimetype default list make a wrong guess for illustrator file #87710

New issue
Copy link
New issue
Copy link
Closed
Closed
mimetype default list make a wrong guess for illustrator file#87710
Copy link
Assignees
StanFromIreland
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

Description

inkhey
mannequin
opened on Mar 18, 2021
Issue body actions
BPO 43544
Nosy @inkhey

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 = None
created_at = <Date 2021-03-18.15:49:43.313>
labels = ['3.8', '3.9', '3.10']
title = 'mimetype default list make a wrong guess for illustrator file'
updated_at = <Date 2021-03-20.01:55:14.300>
user = 'https://github.com/inkhey'

bugs.python.org fields:

activity = <Date 2021-03-20.01:55:14.300>
actor = 'terry.reedy'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = []
creation = <Date 2021-03-18.15:49:43.313>
creator = 'Inkhey'
dependencies = []
files = []
hgrepos = []
issue_num = 43544
keywords = []
message_count = 1.0
messages = ['389023']
nosy_count = 1.0
nosy_names = ['Inkhey']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue43544'
versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

Linked PRs

  • gh-87710: Update mime type for .ai #141239

Activity

  1. inkhey commented on Mar 18, 2021

    @inkhey
    inkheymannequin
    on Mar 18, 2021
    MannequinAuthor
    More actions

    mimetypes lib consider illustrator file ('.ai') as 'application/postscript' type. This is correct... but also wrong.

    Old illustrator file (illustrator 9) are real postscript file but modern one are technically pdf. So guessing .ai as postscript lead to wrong guessing if you're using some software that make decision based on mimetype, you can of course, check both file_extension and mimetype but this remove usefulness of mimetype.

  2. inkhey
    added
    3.7 (EOL)end of lifeend of life
    3.10 (EOL)end of lifeend of life
    3.8 (EOL)end of lifeend of life
    3.9 (EOL)end of lifeend of life
    on Mar 18, 2021
  3. terryjreedy
    removed
    3.7 (EOL)end of lifeend of life
    on Mar 20, 2021
  4. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  5. iritkatriel
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Nov 27, 2023
  6. StanFromIreland
    removed
    3.10 (EOL)end of lifeend of life
    3.9 (EOL)end of lifeend of life
    3.8 (EOL)end of lifeend of life
    on Oct 11, 2025
  7. picnixz
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Oct 11, 2025
  8. StanFromIreland
    self-assigned this
    on Nov 7, 2025
  9. StanFromIreland commented on Nov 8, 2025

    @StanFromIreland
    StanFromIreland
    on Nov 8, 2025
    Member
    More actions

    Unfortunately the user is a mannequin. This is quite problematic, since we don't check contents like other mimetype checkers, there is no way of knowing if it is a new .ai file or an old one.

    Although, since the last version of AI to produce postscript files was released 25 years ago (see here), it can be assumed that the majority of files are now the modern PDF variation, and so IMO it makes sense to update it.

  10. hugovk
    added a commit that references this issue on Nov 12, 2025

    gh-87710: Update mime type for ``.ai`` (#141239)

    88aeff8
  11. hugovk commented on Nov 12, 2025

    @hugovk
    hugovk
    on Nov 12, 2025
    Member
    More actions

    Thanks @inkhey and @StanFromIreland!

  12. hugovk
    closed this as completedon Nov 12, 2025
  13. aapa commented on Nov 12, 2025

    @aapa
    aapa
    on Nov 12, 2025
    More actions

    This Adobe documentation page (see the heading § Create PDF Compatible File option) seems to suggest that the PDF compatibility is an option, not a feature of the format itself. That would make the application/pdf filetype wrong. I don't have access to Adobe Illustrator to confirm what the resulting file looks like without the setting enabled, but this comment on Adobe Forums seems to suggest it's merely a PDF wrapper not viewable in any PDF standards supporting viewer. Yes, you probably still get more useful data out of it treating it as a PDF file instead of as a "traditional" Postscript file (I presume it would still have XMP data, for example), but it's still not PDF as defined by the PDF standards either. So something like application/vnd.adobe.illustrator or just the very nondescript but techically correct application/postscript would still be a better option IMO.

  14. StanFromIreland
    added a commit that references this issue on Dec 6, 2025

    pythongh-87710: Update mime type for ``.ai`` (python#141239)

    19acff4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @StanFromIreland
    StanFromIreland

Labels

stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.