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

gh-93096: Make mimetypes CLI tool public #93097

Merged
merged 68 commits into from
Mar 13, 2025

Conversation

arhadthedev
Copy link
Member

@arhadthedev arhadthedev commented May 23, 2022

gh-93096

@arhadthedev arhadthedev requested a review from a team as a code owner May 23, 2022 09:05
@arhadthedev arhadthedev marked this pull request as draft May 23, 2022 10:43
@arhadthedev arhadthedev marked this pull request as ready for review May 23, 2022 15:45
@arhadthedev arhadthedev marked this pull request as draft May 23, 2022 17:14
@AA-Turner AA-Turner added type-feature A feature request or enhancement stdlib Python modules in the Lib dir topic-email labels May 23, 2022
@arhadthedev arhadthedev deleted the normalize-mimetypes-cli branch May 26, 2022 05:12
@arhadthedev arhadthedev restored the normalize-mimetypes-cli branch May 26, 2022 05:13
@arhadthedev arhadthedev reopened this May 26, 2022
@sobolevn
Copy link
Member

sobolevn commented Feb 7, 2024

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

@maxnikulin
Copy link

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 hugovk marked this pull request as ready for review March 8, 2025 21:06
Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

@arhadthedev Thank you for your work!

hugovk added 3 commits March 11, 2025 00:31
@hugovk hugovk merged commit 328f8b8 into python:main Mar 13, 2025
39 checks passed
@picnixz
Copy link
Member

picnixz commented Mar 15, 2025

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
Copy link
Member

hugovk commented Mar 15, 2025

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
Copy link
Member

picnixz commented Mar 15, 2025

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
Copy link
Member

hugovk commented Mar 15, 2025

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir topic-email type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants