summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* bump to 0.4.20Adam Hupp2021-01-153-6/+9
|
* remove contributors because its far out of date0.4.19Adam Hupp2021-01-151-15/+0
|
* fix typo in COMPAT.mdAdam Hupp2021-01-151-1/+2
|
* restore more 2.7 compatAdam Hupp2021-01-151-1/+1
|
* add more doc pointers for compat mode, and enable PendingDeprecationWarningAdam Hupp2021-01-152-17/+19
|
* restore python 2.7 to setup.py, to preserve back compatAdam Hupp2021-01-151-0/+1
|
* document libmagic compat layerAdam Hupp2021-01-151-0/+16
|
* 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-152-17/+0
| | | | been released yet
* changelog for 0.4.19Adam Hupp2021-01-151-0/+22
|
* move typing stubs next to implementationAdam Hupp2021-01-151-0/+0
|
* skip magic_descriptor tests in centos 7Adam Hupp2021-01-154-4/+22
|
* cpAdam Hupp2021-01-151-1/+2
|
* temorarily remove dropped support for python2Adam Hupp2021-01-151-2/+9
|
* bump version to 0.4.19Adam Hupp2021-01-151-1/+1
|
* Revert "Remove Python2 from the tests"Adam Hupp2021-01-159-3/+10
| | | | This reverts commit 4a810b4f30f161b889d59cf2a207820fc0c731b7.
* Merge branch 'master' into redo-compatAdam Hupp2021-01-155-8/+20
|\
| * Merge pull request #231 from eumiro/readme-shellAdam Hupp2021-01-131-5/+15
| |\ | | | | | | Make the shell snippets more readable in README.md
| | * Make the shell snippets more readable in README.mdMiroslav Šedivý2021-01-131-5/+15
| |/
| * Merge pull request #229 from eumiro/py39Adam Hupp2021-01-134-1/+4
| |\ | | | | | | Add support for Python 3.9
| | * Add support for Python 3.9Miroslav Šedivý2021-01-114-1/+4
| |/
* | CI: Fix test execution on TravisSchoolGuy2021-01-131-4/+4
| | | | | | | | We are already running a matrix. Thus we don't need our wrapper script
* | Reformat according to PEPSchoolGuy2021-01-136-98/+109
| | | | | | | | I achieved this via the PyCharm Reformat Shortcut
* | Fix path of the test pdfSchoolGuy2021-01-131-2/+1
| |
* | Remove Python2 from the testsSchoolGuy2021-01-139-9/+4
| |
* | fix libmagic testAdam Hupp2018-01-141-1/+5
| |
* | various cleanups proposed by debian folksAdam Hupp2018-01-141-3/+7
| |
* | Merge in compatability mode with libmagicAdam Hupp2017-12-046-10/+404
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-042-0/+17
| |
* | Convert to a package so we can add more filesAdam Hupp2017-12-031-0/+0
|/
* Merge pull request #227 from psrok1/magic-descriptorAdam Hupp2020-12-113-0/+43
|\ | | | | Added support for magic_descriptor routine
| * Added support for magic_descriptor routinepsrok12020-12-073-0/+43
|/
* complete commentAdam Hupp2020-11-061-1/+2
|
* Handle undecodable characters in descriptionAdam Hupp2020-11-061-1/+2
| | | | | | | | | | | | We've historically expected that the return values from libmagic are ascii, since they are constant strings or stuff like dates/numbers. In some cases, however, it will return information like the title of the document in the doc's native character set, which is unknown to us. This produces decode errors. I have not been able to get a document that triggers this behavior, but the safest change is to decode with 'backslashreplace', which escapes undecodable characters with a backslash.
* Handle libmagic versions that don't support MAGIC_EXTENSIONAdam Hupp2020-11-062-5/+14
| | | | | | | | | | extension support was added to libmagic in 2015 in 9190a18d09f25fb0ca6abe1fcbdba780f5077e45. This change: - updates the test to handle various verions that return garbage / empty string.s - throws an exception in magic.Magic if extension support is requested and we know its not supported.
* Merge pull request #224 from darkbarker/extension-supportAdam Hupp2020-10-232-1/+12
|\ | | | | MAGIC_EXTENSION support (file --extension)
| * MAGIC_EXTENSION support (file --extension)darkbarker2020-10-222-1/+12
|/
* Update README.mdAdam Hupp2020-10-011-1/+1
|
* support changed mime types in testAdam Hupp2020-09-151-4/+8
|
* Fix tests with file 5.39Luca Weiss2020-09-071-4/+6
|
* add docker tests for archlinuxAdam Hupp2020-09-072-2/+7
|
* Fallback to default behavior on setparam failureAdam Hupp2020-08-131-1/+6
| | | | | | Some versions of libmagic (unclear which) fail the setparam call in the Magic constructor. This this is just resolving a corner case to begin with, silently continue on if this happens.
* Merge pull request #222 from koreno/patch-1Adam Hupp2020-08-131-0/+2
|\ | | | | Fix bug in Magic when destructor called too early
| * Fix bug in Magic when destructor called too earlyOfer Koren2020-08-141-0/+2
|/ | | | | | | | | | Potentially `magic_open` may fail, and when python attempts to gc the Magic instance it fails with: ``` Exception ignored in: <function Magic.__del__ at 0x7f595ba06430> Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/magic.py", line 129, in __del__ if self.cookie and magic_close: AttributeError: 'Magic' object has no attribute 'cookie' ```
* Update README.mdAdam Hupp2020-08-131-7/+4
|
* Merge pull request #220 from coiax/stubAdam Hupp2020-08-132-1/+91
|\ | | | | 🐑 Create basic stub file for magic.py
| * 🐑 Create basic stub file for magic.pyJack Edge2020-08-102-1/+91
|/ | | | | | | | | | | A stubfile was initially generated using `stubgen`, and then refined in order to increase the accuracy of the core API methods. Both `from_file` and `from_path`, both as independent functions and class instace methods, have been annotated appropriately (taking `Union[str, bytes]` and returning `Text`. Resolves #174.
* Add CHANGELOG for 0.4.17 and .18Adam Hupp2020-05-071-0/+32
|
* bump version to 0.4.180.4.18Adam Hupp2020-05-051-1/+1
|
* Make magic_[version|setparam|getparam] optionalAdam Hupp2020-05-052-20/+43
| | | | | These aren't present in ancient versions of libmagic, so only fetch optionally and throw NotImplementedError if called.