Merging upstream version 0.7.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e69e30697e
commit
e337ad61c4
5 changed files with 47 additions and 5 deletions
9
.github/workflows/tests.yml
vendored
9
.github/workflows/tests.yml
vendored
|
@ -8,9 +8,14 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
python-version: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.8']
|
python-version: ['3.11']
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
python-version: '3.7'
|
||||||
|
- os: ubuntu-latest
|
||||||
|
python-version: 'pypy-3.8'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
||||||
/docs/_build
|
/docs/_build
|
||||||
/tests/results
|
/tests/results
|
||||||
|
/dist/
|
||||||
__pycache__
|
__pycache__
|
||||||
.coverage
|
.coverage
|
||||||
|
|
|
@ -2,6 +2,41 @@ Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
|
||||||
|
Version 0.7.0
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Released on 2023-07-03.
|
||||||
|
|
||||||
|
Dependencies:
|
||||||
|
|
||||||
|
* Python 3.11 is supported and tested
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* Fix size of fields for xref
|
||||||
|
|
||||||
|
Backers and sponsors:
|
||||||
|
|
||||||
|
* Castedo Ellerman
|
||||||
|
* Spacinov
|
||||||
|
* Kobalt
|
||||||
|
* Grip Angebotssoftware
|
||||||
|
* Crisp BV
|
||||||
|
* Manuel Barkhau
|
||||||
|
* SimonSoft
|
||||||
|
* Menutech
|
||||||
|
* KontextWork
|
||||||
|
* NCC Group
|
||||||
|
* René Fritz
|
||||||
|
* TrainingSparkle
|
||||||
|
* Healthchecks.io
|
||||||
|
* Moritz Mahringer
|
||||||
|
* Yanal-Yvez Fargialla
|
||||||
|
* Synapsium
|
||||||
|
* Piotr Horzycki
|
||||||
|
* Hammerbacher
|
||||||
|
|
||||||
|
|
||||||
Version 0.6.0
|
Version 0.6.0
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ from codecs import BOM_UTF16_BE
|
||||||
from hashlib import md5
|
from hashlib import md5
|
||||||
from math import ceil, log
|
from math import ceil, log
|
||||||
|
|
||||||
VERSION = __version__ = '0.6.0'
|
VERSION = __version__ = '0.7.0'
|
||||||
|
|
||||||
|
|
||||||
def _to_bytes(item):
|
def _to_bytes(item):
|
||||||
|
@ -549,11 +549,11 @@ class PDF:
|
||||||
object_.generation))
|
object_.generation))
|
||||||
xref.append((1, self.current_position, 0))
|
xref.append((1, self.current_position, 0))
|
||||||
|
|
||||||
field2_size = ceil(log(self.current_position, 8))
|
field2_size = ceil(log(self.current_position + 1, 256))
|
||||||
max_generation = max(
|
max_generation = max(
|
||||||
object_.generation for object_ in self.objects)
|
object_.generation for object_ in self.objects)
|
||||||
field3_size = ceil(log(
|
field3_size = ceil(log(
|
||||||
max(max_generation, len(compressed_objects)), 8))
|
max(max_generation, len(compressed_objects)) + 1, 256))
|
||||||
xref_lengths = (1, field2_size, field3_size)
|
xref_lengths = (1, field2_size, field3_size)
|
||||||
xref_stream = b''.join(
|
xref_stream = b''.join(
|
||||||
value.to_bytes(length, 'big')
|
value.to_bytes(length, 'big')
|
||||||
|
|
|
@ -23,6 +23,7 @@ classifiers = [
|
||||||
'Programming Language :: Python :: 3.8',
|
'Programming Language :: Python :: 3.8',
|
||||||
'Programming Language :: Python :: 3.9',
|
'Programming Language :: Python :: 3.9',
|
||||||
'Programming Language :: Python :: 3.10',
|
'Programming Language :: Python :: 3.10',
|
||||||
|
'Programming Language :: Python :: 3.11',
|
||||||
'Programming Language :: Python :: Implementation :: CPython',
|
'Programming Language :: Python :: Implementation :: CPython',
|
||||||
'Programming Language :: Python :: Implementation :: PyPy',
|
'Programming Language :: Python :: Implementation :: PyPy',
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Reference in a new issue