James R. Barlow
7da4e6ca7f
Address some linter warnings
2022-09-21 00:05:12 -07:00
James R. Barlow
f37decf3b3
Remove old pdfminer.six shim
2022-09-20 23:02:17 -07:00
James R. Barlow
2ebc36fcec
Merge branch 'feature/drop-3.7'
2022-09-20 22:32:59 -07:00
James R. Barlow
1709e23701
pipeline: add further typing details
2022-09-19 20:19:15 -07:00
James R. Barlow
2e55cb5980
helpers: improve typing of Resolution
2022-09-19 20:03:54 -07:00
James R. Barlow
6dbaebdc0c
Merge branch 'master' into feature/drop-3.7
2022-09-15 23:00:27 -07:00
James R. Barlow
2c99c89e45
ghostscript: document why we treat gs 9.56.0 differently
2022-09-15 22:51:04 -07:00
James R. Barlow
a1c7826336
dep5: mention mawi
2022-08-06 15:47:45 -07:00
James R. Barlow
8412de9344
Merge branch 'master' into feature/drop-3.7
2022-08-06 14:04:23 -07:00
James R. Barlow
ef70c9499e
Don't deprecate falsy filter_page_image
2022-08-05 01:07:46 -07:00
James R. Barlow
47dcb6fcd0
Revert "Remove deprecated falsy handling of filter_page_image"
...
This reverts commit c9389c7713 .
2022-08-05 01:01:09 -07:00
James R. Barlow
88d2949e6b
Abolish setup.cfg and migrate to pyproject.toml
2022-08-04 05:00:46 -07:00
James R. Barlow
c9389c7713
Remove deprecated falsy handling of filter_page_image
2022-08-04 04:21:15 -07:00
James R. Barlow
4d2f499f97
Remove optional status of coloredlogs
...
Everything optional is a possible complication.
Better to remove the option.
2022-08-04 04:15:56 -07:00
James R. Barlow
4104904a1e
Document reason for suppress some third party deprecation warnings
2022-08-04 04:13:02 -07:00
James R. Barlow
1a0a797ca6
Remove our @deprecated decorator and use standard package
2022-08-04 04:00:25 -07:00
James R. Barlow
670ce2b969
Remove support for non-callable version checker
2022-08-04 03:58:10 -07:00
James R. Barlow
7e97981114
hocrtx: unused imports
2022-08-04 03:56:44 -07:00
James R. Barlow
53db866ef9
Remove deprecated exception PdfMergeFailedError
2022-08-04 03:54:55 -07:00
James R. Barlow
4b9ea40a0c
spdx: move identifiers to files that support them
...
If the apparent license changed, take this commit as correct.
2022-08-04 03:26:54 -07:00
James R. Barlow
d619fac0bd
unpaper: tidy file
2022-08-02 15:30:20 -07:00
James R. Barlow
acc70036cc
Set minimum Tesseract to 4.1.1
2022-08-02 15:20:29 -07:00
James R. Barlow
8a8c06c79c
Update pre-commit for py3.8+
2022-08-02 15:05:43 -07:00
James R. Barlow
67773da309
Drop support for Ghostscript <9.50
2022-08-02 15:01:10 -07:00
James R. Barlow
9ffe829a10
Remove external importlib_metadata since Python 3.8 provides it directly
2022-08-02 14:48:11 -07:00
James R. Barlow
8a3b82e364
Make Python 3.8 minimum requirement
2022-08-02 14:46:01 -07:00
James R. Barlow
580822a6a2
Fix Windows ghostscript path scanning
2022-08-02 14:39:23 -07:00
James R. Barlow
9f3a52fd12
windows: compare Ghostscript versions properly
2022-08-01 13:58:24 -07:00
James R. Barlow
52e829d845
windows: tidy path shimming
2022-08-01 13:23:57 -07:00
James R. Barlow
2b2e5c271a
Don't lru_cache versions
...
lru_cache could interfere with testing and we don't have evidence this
is slow enough to justify optimizing.
2022-08-01 13:23:31 -07:00
James R. Barlow
8ca9fa4ade
tesseract: typing
2022-08-01 02:47:21 -07:00
James R. Barlow
ba372e5841
Reorganize validation to fix exception when Tesseract not installed
...
The existing logic would call an OCR plugin's get_languages function before
allowing the plugin to check if its dependencies were available. This caused
an exception if Tesseract was installed, when we were supposed to issue
an error message advising the user to install Tesseract.
2022-08-01 02:04:09 -07:00
James R. Barlow
c7fcbe9075
Improve Linux install advice
2022-08-01 01:59:40 -07:00
James R. Barlow
80ed2117cc
Change to SPDX license tracking
2022-07-28 01:10:07 -07:00
James R. Barlow
27f7b9f255
Fix missing TypeAlias on <3.10
2022-07-25 16:32:55 -07:00
James R. Barlow
6f31a92ffb
_windows: Avoid messy next()/StopIteration in generator
2022-07-23 15:40:05 -07:00
James R. Barlow
da2276788c
Fix _windows module typing
2022-07-23 15:32:14 -07:00
James R. Barlow
dc6f1a266a
Modernize type annotations
2022-07-23 00:39:24 -07:00
James R. Barlow
9c8ddd853d
Typing adjustments
2022-07-23 00:07:50 -07:00
James R. Barlow and H. Felix Wittmann
6b425aaebe
Add shim for cancel_futures in older Pythons
...
Thanks @hfwittmann
Closes #993
Co-authored-by: H. Felix Wittmann <hfwittmann@users.noreply.github.com >
2022-07-17 16:02:45 -07:00
James R. Barlow
b9bffa97ba
Fix ABCMeta typing
2022-07-12 02:20:22 -07:00
James R. Barlow
b1f2d257e2
Typing improvements
2022-07-09 02:24:19 -07:00
James R. Barlow
24a08e5170
hocrtransform: suppress deprecation warning from importing reportlab
2022-07-07 02:09:47 -07:00
James R. Barlow
adf97fd82c
pipeline: eliminate useless test
2022-07-07 02:08:14 -07:00
James R. Barlow
a5efc4af9b
unpaper: replace input pnm with png
...
Unpaper or its underlying libraries don't seem to accept pnms with an
odd integer width. Although it's not clear if this is the issue at all.
In any case, keeping the image a PNG works around the issue. unpaper
only accepted PNM input in the past, which is why we send it PNM.
Since it now accepts PNG, we might as well use PNG.
Unpaper can write PNG as output too, but this added a few seconds to
the test suite was not committed.
Related issues:
https://github.com/ocrmypdf/OCRmyPDF/issues/887
https://github.com/ocrmypdf/OCRmyPDF/issues/665
https://github.com/unpaper/unpaper/issues/82
2022-07-03 15:32:16 -07:00
James R. Barlow
b062c9e8c0
pluginspec: hint that optimize may need to implement initialize
...
[ci skip]
2022-06-19 01:35:30 -07:00
James R. Barlow
8c58e95c3a
Add new initialize hookspec to make suppress plugins easier
2022-06-19 00:31:42 -07:00
James R. Barlow
e4c45e3d3b
Plugins should ideally not import from ocrmypdf._*
2022-06-18 16:03:55 -07:00
James R. Barlow
d8753dc790
Fix Windows issue if no exception
2022-06-13 01:46:59 -07:00
James R. Barlow
17a5b8b43c
Refactor reporting of optimization failures
2022-06-13 01:30:15 -07:00