summaryrefslogtreecommitdiff
path: root/magic
Commit message (Collapse)AuthorAgeFilesLines
* Revert "added path for local homebrew installation (#267)"HEADmasterAdam Hupp2023-03-301-11/+2
| | | | This reverts commit cd3929fa7cbc2e383629d0893fc08bcb68a7614c.
* Revert "remove python3-ism from loader"Adam Hupp2023-03-301-2/+1
| | | | This reverts commit c7a2e7bc7c387af23b3c896bf05003cf2bd8646b.
* remove python3-ism from loaderAdam Hupp2023-01-101-1/+2
|
* added path for local homebrew installation (#267)Manuele2022-10-241-2/+11
| | | | * added path for local homebrew installation * used brew --prefix to detect local path
* Add "magic-1.dll" to the list of DLL files to search for on Windowsvalpogus2022-06-161-1/+1
| | | | This is the name of the DLL file generated when using vcpkg to build libmagic: https://github.com/microsoft/vcpkg/tree/master/ports/libmagic
* Support os.PathLike typesAdam Hupp2021-10-042-2/+20
| | | | See https://github.com/ahupp/python-magic/pull/251
* 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.
* fix alpine library loadingAdam Hupp2021-06-031-0/+5
|
* Cleanup library loadingAdam Hupp2021-06-011-35/+40
| | | | | | | | Simplify library loading so it's clearer what should happen for each platform. There is a very small chance this is a regression if you were somehow relying on windows DLL names on a non-windows platform. Also resolves https://github.com/ahupp/python-magic/pull/245
* add py.typed sentinal per ↵Adam Hupp2021-05-211-0/+0
| | | | https://www.python.org/dev/peps/pep-0561/#packaging-type-information
* Check for cookie attribute before trying to delete itJochen Sprickerhof2021-05-161-1/+1
| | | | | | | | | __del__ is called regardless of whether __init__ passed, so the cookie attribute may not exits. This can be seen with: python3 -c "import magic; magic.Magic(foo=None)" Also discussed in https://github.com/ahupp/python-magic/pull/222#issuecomment-675354824
* Revert "Fix bug in Magic when destructor called too early"Jochen Sprickerhof2021-05-161-2/+0
| | | | This reverts commit 16972c2c6fda3573860f5f8b0f2c03b757e71d3c.
* Fix typo (compatability --> compatibility)EtiennePelletier2021-05-101-1/+1
|
* Fix yet another import error0.4.22Adam Hupp2021-02-161-0/+1
| | | | | | | Seems to hit windows, probably OSX. We have great test coverage across linux distros, not so much elsewhere. Tested on my windows box by manually installing the wheel file.
* Factor out dll loader so it can be used by both compat and standard libraryAdam Hupp2021-02-163-43/+43
| | | | https://github.com/ahupp/python-magic/issues/232
* add more doc pointers for compat mode, and enable PendingDeprecationWarningAdam Hupp2021-01-151-13/+11
|
* prefix add_compat with an underscore to avoid namespace pollutionAdam Hupp2021-01-151-2/+2
|
* remove from_open_file, since its duplicative with from_descriptor and hasnt ↵Adam Hupp2021-01-151-8/+0
| | | | been released yet
* move typing stubs next to implementationAdam Hupp2021-01-151-0/+86
|
* cpAdam Hupp2021-01-151-1/+2
|
* temorarily remove dropped support for python2Adam Hupp2021-01-151-2/+9
|
* Reformat according to PEPSchoolGuy2021-01-132-53/+59
| | | | I achieved this via the PyCharm Reformat Shortcut
* various cleanups proposed by debian folksAdam Hupp2018-01-141-3/+7
|
* Merge in compatability mode with libmagicAdam Hupp2017-12-042-1/+331
| | | | | | | | | | | | | 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.
* add from_open_file to match libmagic binding featuresetAdam Hupp2017-12-041-0/+11
|
* Convert to a package so we can add more filesAdam Hupp2017-12-031-0/+426