Drop Python 3.4 compatibility
This commit is contained in:
@@ -9,10 +9,6 @@ cache:
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
sudo: required
|
||||
language: python
|
||||
python: 3.4
|
||||
- os: linux
|
||||
sudo: required
|
||||
language: python
|
||||
|
||||
@@ -3,6 +3,13 @@ RELEASE NOTES
|
||||
|
||||
OCRmyPDF uses `semantic versioning <http://semver.org/>`_.
|
||||
|
||||
next
|
||||
====
|
||||
|
||||
- Python 3.4 compatibility dropped
|
||||
- Remove deprecated API functions: ocrmypdf.main
|
||||
- Remove OCRmyPDF.sh script
|
||||
|
||||
|
||||
v4.5.3
|
||||
======
|
||||
|
||||
@@ -139,7 +139,7 @@ Install or upgrade the required Homebrew packages, if any are missing:
|
||||
brew install libxml2 libffi leptonica
|
||||
brew install unpaper # optional
|
||||
|
||||
Python 3.4, 3.5 and 3.6 are supported.
|
||||
Python 3.5 and 3.6 are supported.
|
||||
|
||||
Install the required Tesseract OCR engine with the language packs you plan to use:
|
||||
|
||||
@@ -290,7 +290,7 @@ where /c/Users/sampleuser is a Unix representation of the Windows path C:\\Users
|
||||
Installing HEAD revision from sources
|
||||
-------------------------------------
|
||||
|
||||
If you have ``git`` and Python 3.4 or newer installed, you can install from source. When the ``pip`` installer runs,
|
||||
If you have ``git`` and Python 3.5 or newer installed, you can install from source. When the ``pip`` installer runs,
|
||||
it will alert you if dependencies are missing.
|
||||
|
||||
To install the HEAD revision from sources in the current Python 3 environment:
|
||||
|
||||
@@ -9,13 +9,6 @@ import sys
|
||||
import PyPDF2 as pypdf
|
||||
from collections import namedtuple
|
||||
|
||||
try:
|
||||
from math import isclose
|
||||
except ImportError:
|
||||
def isclose(a, b, rel_tol=1e-9):
|
||||
"Python 3.4 does not have math.isclose()"
|
||||
diff = abs(b - a)
|
||||
return diff <= abs(rel_tol * b) or diff <= abs(rel_tol * a)
|
||||
|
||||
matrix_mult = pypdf.pdf.utils.matrixMultiply
|
||||
|
||||
|
||||
@@ -122,10 +122,6 @@ def generate_pdfa_ps(target_filename, pdfmark, icc='sRGB'):
|
||||
f.write(ps)
|
||||
|
||||
|
||||
# The old name is generate_pdfa_def -- now deprecated
|
||||
generate_pdfa_def = generate_pdfa_ps
|
||||
|
||||
|
||||
def file_claims_pdfa(filename):
|
||||
"""Determines if the file claims to be PDF/A compliant
|
||||
|
||||
|
||||
@@ -571,7 +571,6 @@ def test_non_square_resolution(renderer, spoof_tesseract_cache,
|
||||
assert in_pageinfo[0]['yres'] == out_pageinfo[0]['yres']
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.version_info < (3, 5), reason="needs math.isclose")
|
||||
@pytest.mark.parametrize('renderer', [
|
||||
'hocr',
|
||||
'tesseract'
|
||||
@@ -814,7 +813,6 @@ def test_form_xobject(spoof_tesseract_noop, resources, outpdf):
|
||||
env=spoof_tesseract_noop)
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.version_info < (3, 5), reason="needs math.isclose")
|
||||
@pytest.mark.parametrize('renderer', [
|
||||
'hocr',
|
||||
'tesseract',
|
||||
|
||||
@@ -35,7 +35,6 @@ def test_single_page_text(outdir):
|
||||
assert len(page['images']) == 0
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.version_info < (3, 5), reason="needs Path.read_bytes")
|
||||
def test_single_page_image(outdir):
|
||||
filename = outdir / 'image-mono.pdf'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user