summaryrefslogtreecommitdiff
path: root/magic/compat.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix compat mode handling with empty mime stringAdam Hupp2021-09-021-1/+6
| | | | | | I can't repro this, but PR #250 suggests that some versions of libmagic will return a mimetype that doesn't include a charset, leading to an exception. Fall back to an empty charset in this case.
* Factor out dll loader so it can be used by both compat and standard libraryAdam Hupp2021-02-161-8/+2
| | | | https://github.com/ahupp/python-magic/issues/232
* Reformat according to PEPSchoolGuy2021-01-131-0/+3
| | | | I achieved this via the PyCharm Reformat Shortcut
* Merge in compatability mode with libmagicAdam Hupp2017-12-041-0/+285
The libmagic distribution uses the same package name `magic` as python-magic, but has an incompatible API. This change merges in a copy of libmagic's bindings, wrapped to give deprecation warnings. This is intended to a) mitigate the short-term pain to users and packagers who need to figure out which to use, and b) give us a path to merging the two sets of bindings. I'd be happy for libmagic to take over this package if we could find a path to it.