summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-07-05 06:16:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-07-05 06:16:09 +0000
commitccd26edc31c2725b3f58877b19d12c036bca8e7d (patch)
tree9cccbd7de4adf034d8d643b42e262e7e019e6995
parentAdding upstream version 0.6.0. (diff)
downloadpydyf-ccd26edc31c2725b3f58877b19d12c036bca8e7d.tar.xz
pydyf-ccd26edc31c2725b3f58877b19d12c036bca8e7d.zip
Adding upstream version 0.7.0.upstream/0.7.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--.github/workflows/tests.yml9
-rw-r--r--.gitignore1
-rw-r--r--docs/changelog.rst35
-rwxr-xr-xpydyf/__init__.py6
-rw-r--r--pyproject.toml1
5 files changed, 47 insertions, 5 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index d2057b0..89003af 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -8,9 +8,14 @@ jobs:
strategy:
matrix:
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:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
diff --git a/.gitignore b/.gitignore
index 95a1136..ecd9e60 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
/docs/_build
/tests/results
+/dist/
__pycache__
.coverage
diff --git a/docs/changelog.rst b/docs/changelog.rst
index f652602..e116ac8 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -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
-------------
diff --git a/pydyf/__init__.py b/pydyf/__init__.py
index 2e589fe..3d0b122 100755
--- a/pydyf/__init__.py
+++ b/pydyf/__init__.py
@@ -9,7 +9,7 @@ from codecs import BOM_UTF16_BE
from hashlib import md5
from math import ceil, log
-VERSION = __version__ = '0.6.0'
+VERSION = __version__ = '0.7.0'
def _to_bytes(item):
@@ -549,11 +549,11 @@ class PDF:
object_.generation))
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(
object_.generation for object_ in self.objects)
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_stream = b''.join(
value.to_bytes(length, 'big')
diff --git a/pyproject.toml b/pyproject.toml
index a3dbea1..e26cbfe 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -23,6 +23,7 @@ classifiers = [
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
+ 'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
]