Closed
Conversation
Owner
|
I'm concerned that this will be a backwards-incompatible change. In what cases does this change the output? Do you end up with something like 'text/plain; charset=utf-8"? |
Owner
|
My best guess is that magic.h changed after I copied the definitions into python. |
ahupp
added a commit
that referenced
this pull request
May 5, 2020
Not going to change the value of MAGIC_MIME until a major version bump, but at least add the missing MAGIC_MIME_TYPE constant and use where it should be. #70
Owner
|
I've pushed a fix for this (will go in next major release) that updates the constants but preserves the library behavior. |
jenniferlb63
added a commit
to jenniferlb63/python-magic
that referenced
this pull request
Aug 6, 2023
Not going to change the value of MAGIC_MIME until a major version bump, but at least add the missing MAGIC_MIME_TYPE constant and use where it should be. ahupp/python-magic#70
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In https://github.com/file/file/blob/master/src/magic.h.in#L44 , the macro are defined as follows:
But in https://github.com/ahupp/python-magic/blob/master/magic.py#L279 , variables are defined as follows:
So is this a bug? Fix it: