Package: release.debian.org Severity: normal User: release.debian.org@packages.debian.org Usertags: unblock pikepdf 1.0.5+dfsg-3 was unblocked by nthykier but has not migrated: Migration status: Blocked. Can't migrate due to a non-migratable dependency. Check status below. Blocked by: gcc-8 48 days old (2 needed) People in #debian-release told me I should ask whether I can upload pikepdf to testing-proposed-updates to bypass this problem. (I guess with version number 1.0.5+dfsg-2+deb10u1 ?) -- System Information: Debian Release: 9.9 APT prefers stable APT policy: (900, 'stable'), (500, 'stable-updates'), (500, 'proposed-updates') Architecture: i386 (i686) Kernel: Linux 4.9.0-9-686-pae (SMP w/2 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) -- Sean Whitton
diff -Nru pikepdf-1.0.5+dfsg/debian/changelog pikepdf-1.0.5+dfsg/debian/changelog --- pikepdf-1.0.5+dfsg/debian/changelog 2019-02-27 22:33:07.000000000 +0000 +++ pikepdf-1.0.5+dfsg/debian/changelog 2019-04-29 02:23:41.000000000 +0100 @@ -1,3 +1,11 @@ +pikepdf (1.0.5+dfsg-3) unstable; urgency=medium + + * Cherry pick upstream commit 4d22fe4 as + Fix-issue-25-year-missing-leading-zero-on-some-platforms.patch + (Closes: #928042). + + -- Sean Whitton <spwhitton@spwhitton.name> Sun, 28 Apr 2019 18:23:41 -0700 + pikepdf (1.0.5+dfsg-2) unstable; urgency=medium * Team upload. diff -Nru pikepdf-1.0.5+dfsg/debian/patches/Fix-issue-25-year-missing-leading-zero-on-some-platforms.patch pikepdf-1.0.5+dfsg/debian/patches/Fix-issue-25-year-missing-leading-zero-on-some-platforms.patch --- pikepdf-1.0.5+dfsg/debian/patches/Fix-issue-25-year-missing-leading-zero-on-some-platforms.patch 1970-01-01 01:00:00.000000000 +0100 +++ pikepdf-1.0.5+dfsg/debian/patches/Fix-issue-25-year-missing-leading-zero-on-some-platforms.patch 2019-04-29 02:23:41.000000000 +0100 @@ -0,0 +1,51 @@ +From: "James R. Barlow" <jim@purplerock.ca> +Date: Tue, 12 Feb 2019 20:42:11 -0800 +Subject: Fix issue #25 - year missing leading zero on some platforms + +Closes #25 + +(cherry picked from commit 4d22fe47912c518e8b3348aedccdac3f11ed81d7) +--- + src/pikepdf/models/metadata.py | 7 +++++-- + tests/test_metadata.py | 3 ++- + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/src/pikepdf/models/metadata.py b/src/pikepdf/models/metadata.py +index 1a0eeb2..65934cd 100644 +--- a/src/pikepdf/models/metadata.py ++++ b/src/pikepdf/models/metadata.py +@@ -121,8 +121,11 @@ def encode_pdf_date(d: datetime) -> str: + the local time. + """ + +- pdfmark_date_fmt = r'%Y%m%d%H%M%S' +- s = d.strftime(pdfmark_date_fmt) ++ # The formatting of %Y is not consistent as described in ++ # https://bugs.python.org/issue13305 and underspecification in libc. ++ # So explicitly format the year with leading zeros ++ s = "{:04d}".format(d.year) ++ s += d.strftime(r'%m%d%H%M%S') + tz = d.strftime('%z') + if tz: + sign, tz_hours, tz_mins = tz[0], tz[1:3], tz[3:5] +diff --git a/tests/test_metadata.py b/tests/test_metadata.py +index 1d41878..41a879c 100644 +--- a/tests/test_metadata.py ++++ b/tests/test_metadata.py +@@ -3,7 +3,7 @@ from datetime import datetime, timezone, timedelta + import re + + import pytest +-from hypothesis import given ++from hypothesis import given, example + from hypothesis.strategies import integers + import pikepdf + from pikepdf import Pdf, Dictionary, Name, PasswordError, Stream +@@ -252,6 +252,7 @@ def test_date_docinfo_from_xmp(): + integers(0, 99), + integers(0, 99), + ) ++@example(1, 1, 1, 0, 0, 0) + def test_random_dates(year, month, day, hour, mins, sec): + date_args = year, month, day, hour, mins, sec + xmp = '{:04d}-{:02d}-{:02d}T{:02d}:{:02d}:{:02d}'.format(*date_args) diff -Nru pikepdf-1.0.5+dfsg/debian/patches/series pikepdf-1.0.5+dfsg/debian/patches/series --- pikepdf-1.0.5+dfsg/debian/patches/series 2019-02-27 17:39:34.000000000 +0000 +++ pikepdf-1.0.5+dfsg/debian/patches/series 2019-04-29 02:23:41.000000000 +0100 @@ -3,3 +3,4 @@ drop-setuptools_scm_git_archive-from-setup.py.patch fix_xmp_metadata_without_xmpmeta_wrapper.patch disable-test_docinfo_problems.patch +Fix-issue-25-year-missing-leading-zero-on-some-platforms.patch
Attachment:
signature.asc
Description: PGP signature