FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-93096: Make `mimetypes` CLI tool public by arhadthedev · Pull Request #93097 · python/cpython · GitHub

/ cpython Public

gh-93096: Make mimetypes CLI tool public - #93097

Merged
hugovk merged 68 commits into
python:mainfrom
arhadthedev:normalize-mimetypes-cli
Mar 13, 2025
Merged

gh-93096: Make mimetypes CLI tool public#93097
hugovk merged 68 commits into
python:mainfrom
arhadthedev:normalize-mimetypes-cli

Conversation

arhadthedev commented May 23, 2022
edited
Loading

Copy link
Copy Markdown
Member

gh-93096

arhadthedev requested a review from a team as a code owner May 23, 2022 09:05
arhadthedev marked this pull request as draft May 23, 2022 10:43
arhadthedev marked this pull request as ready for review May 23, 2022 15:45
arhadthedev marked this pull request as draft May 23, 2022 17:14
Comment thread Lib/mimetypes.py Outdated
Comment thread Lib/mimetypes.py Outdated
AA-Turner added type-feature A feature request or enhancement stdlib Standard Library Python modules in the Lib/ directory topic-email labels May 23, 2022
Comment thread Lib/test/test_mimetypes.py Outdated
arhadthedev deleted the normalize-mimetypes-cli branch May 26, 2022 05:12
arhadthedev restored the normalize-mimetypes-cli branch May 26, 2022 05:13
arhadthedev reopened this May 26, 2022

sobolevn commented Feb 7, 2024

Copy link
Copy Markdown
Member

@arhadthedev do you have time to finish it any time soon? :)

Copy link
Copy Markdown

Notice that IANA currently uses the "media types" term:

[RFC2046] specifies that Media Types (formerly known as MIME types) and Media
Subtypes will be assigned and listed by the IANA.

Just an idea, feel free to ignore it: sometimes the following approach may be used to estimate --help message. Try to read man page generated by help2man. Perhaps epilog may be added to ArgumentParser constructor, however I am unsure concerning recommendations within the Python project.

hugovk marked this pull request as ready for review March 8, 2025 21:06

hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@arhadthedev Thank you for your work!

Comment thread Lib/mimetypes.py Outdated
Comment thread Lib/test/test_mimetypes.py Outdated
hugovk merged commit 328f8b8 into python:main Mar 13, 2025

picnixz commented Mar 15, 2025

Copy link
Copy Markdown
Member

Not sure if it's my configuration or not, but test_guess_type_conflicting_with_mimetypes fails on my openSUSE 15.5. I think the reason is that my /etc/mime.types contains:

image/x-pict                                     pict pict1 pict2 pic pct

hugovk commented Mar 15, 2025

Copy link
Copy Markdown
Member

Right, from the commits looks like it took a while for @arhadthedev to find a good candidate. Let's update it.

@picnixz Can you find another that's not in your /etc/mime.types?

picnixz commented Mar 15, 2025
edited
Loading

Copy link
Copy Markdown
Member

I'm no more on my Linux session, but I'll do it tomorrow. Can't we mock the array containing the files where everything is looked up?

hugovk commented Mar 15, 2025

Copy link
Copy Markdown
Member

Yes, that sounds better than having to worry what different systems happen to have.

plashchynski pushed a commit to plashchynski/cpython that referenced this pull request Mar 17, 2025
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stdlib Standard Library Python modules in the Lib/ directory topic-email type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants


Back | FazBrowse Home | New Git URL