Hello community, here is the log from the commit of package python-pikepdf for openSUSE:Factory checked in at 2020-03-17 13:08:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pikepdf (Old) and /work/SRC/openSUSE:Factory/.python-pikepdf.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pikepdf" Tue Mar 17 13:08:50 2020 rev:2 rq:785543 version:1.10.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pikepdf/python-pikepdf.changes 2020-02-18 15:18:58.332742618 +0100 +++ /work/SRC/openSUSE:Factory/.python-pikepdf.new.3160/python-pikepdf.changes 2020-03-17 13:09:08.157752463 +0100 @@ -1,0 +2,8 @@ +Mon Mar 16 09:39:13 UTC 2020 - Marketa Calabkova <[email protected]> + +- update to version 1.10.2 + * Fixed an issue where pages added from a foreign PDF were added as references + rather than copies. + * Documentation updates. + +------------------------------------------------------------------- Old: ---- pikepdf-1.10.1.tar.gz New: ---- pikepdf-1.10.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pikepdf.spec ++++++ --- /var/tmp/diff_new_pack.SysrIR/_old 2020-03-17 13:09:08.805752961 +0100 +++ /var/tmp/diff_new_pack.SysrIR/_new 2020-03-17 13:09:08.805752961 +0100 @@ -20,7 +20,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-pikepdf -Version: 1.10.1 +Version: 1.10.2 Release: 0 Summary: Read and write PDFs with Python, powered by qpdf License: MPL-2.0 ++++++ pikepdf-1.10.1.tar.gz -> pikepdf-1.10.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pikepdf-1.10.1/PKG-INFO new/pikepdf-1.10.2/PKG-INFO --- old/pikepdf-1.10.1/PKG-INFO 2020-02-10 06:39:15.790757000 +0100 +++ new/pikepdf-1.10.2/PKG-INFO 2020-02-25 02:05:57.822245600 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pikepdf -Version: 1.10.1 +Version: 1.10.2 Summary: Read and write PDFs with Python, powered by qpdf Home-page: https://github.com/pikepdf/pikepdf Author: James R. Barlow diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pikepdf-1.10.1/azure-pipelines.yml new/pikepdf-1.10.2/azure-pipelines.yml --- old/pikepdf-1.10.1/azure-pipelines.yml 2020-02-10 06:37:08.000000000 +0100 +++ new/pikepdf-1.10.2/azure-pipelines.yml 2020-02-25 02:03:58.000000000 +0100 @@ -170,6 +170,10 @@ - task: UsePythonVersion@0 - powershell: azure-pipelines/win-download-qpdf.ps1 displayName: "Download QPDF" + - powershell: | + # https://github.com/qpdf/qpdf/issues/286#issuecomment-467101492 + Set-Itemproperty -path 'HKLM:\SOFTWARE\Microsoft\Cryptography\Protect\Providers\df9d8cd0-1501-11d1-8c7a-00c04fc297eb' -name 'ProtectionPolicy' -value 1 + displayName: "Fix 'unable to acquire crypt context' error" - bash: source azure-pipelines/build.bash displayName: "cibuildwheel" - publish: wheelhouse diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pikepdf-1.10.1/docs/installation.rst new/pikepdf-1.10.2/docs/installation.rst --- old/pikepdf-1.10.1/docs/installation.rst 2020-02-10 06:37:08.000000000 +0100 +++ new/pikepdf-1.10.2/docs/installation.rst 2020-02-25 02:03:58.000000000 +0100 @@ -46,28 +46,29 @@ distributed with PyPI, but may be convenient for users that cannot use binary wheels. -Debian, Ubuntu and other APT-based distributions -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. |apt| image:: https://repology.org/badge/vertical-allrepos/pikepdf.svg - :alt: Package status in apt world +.. |pikepdf| image:: https://repology.org/badge/vertical-allrepos/pikepdf.svg + :alt: Package status + +.. |python-pikepdf| image:: https://repology.org/badge/vertical-allrepos/python:pikepdf.svg + :alt: Package status for python:pikepdf + +|pikepdf| |python-pikepdf| -|apt| +Debian, Ubuntu and other APT-based distributions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: bash apt install pikepdf -Fedora 29 -^^^^^^^^^ - -.. |fedora| image:: https://repology.org/badge/version-for-repo/fedora_29/python:pikepdf.svg - :alt: Fedora 29 +Fedora +^^^^^^ -.. |rawhide| image:: https://repology.org/badge/version-for-repo/fedora_rawhide/python:pikepdf.svg +.. |fedora| image:: https://repology.org/badge/version-for-repo/fedora_rawhide/python:pikepdf.svg :alt: Fedora Rawhide -|fedora| |rawhide| +|fedora| .. code-block:: bash @@ -95,18 +96,17 @@ .. code-block:: bash - pkg install py36-pikepdf + pkg install py37-pikepdf To attempt a manual install, try something like: .. code-block:: bash - pkg install python3 lang/python3 - pkg install py36-lxml qpdf + pkg install python3 py37-lxml py37-pip py37-pybind11 qpdf pip install --user pikepdf -This procedure is known to work on FreeBSD 11.2. It has not been tested on other -versions. +This procedure is known to work on FreeBSD 11.3, 12.0, 12.1-RELEASE and +13.0-CURRENT. It has not been tested on other versions. Building from source -------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pikepdf-1.10.1/docs/release_notes.rst new/pikepdf-1.10.2/docs/release_notes.rst --- old/pikepdf-1.10.1/docs/release_notes.rst 2020-02-10 06:37:08.000000000 +0100 +++ new/pikepdf-1.10.2/docs/release_notes.rst 2020-02-25 02:03:58.000000000 +0100 @@ -18,6 +18,13 @@ ``pikepdf._qpdf`` is a private interface within pikepdf that applications should not access directly, along with any modules with a prefixed underscore. +v1.10.2 +======= + +- Fixed an issue where pages added from a foreign PDF were added as references + rather than copies. (#80) +- Documentation updates. + v1.10.1 ======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pikepdf-1.10.1/src/pikepdf.egg-info/PKG-INFO new/pikepdf-1.10.2/src/pikepdf.egg-info/PKG-INFO --- old/pikepdf-1.10.1/src/pikepdf.egg-info/PKG-INFO 2020-02-10 06:39:13.000000000 +0100 +++ new/pikepdf-1.10.2/src/pikepdf.egg-info/PKG-INFO 2020-02-25 02:05:55.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pikepdf -Version: 1.10.1 +Version: 1.10.2 Summary: Read and write PDFs with Python, powered by qpdf Home-page: https://github.com/pikepdf/pikepdf Author: James R. Barlow diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pikepdf-1.10.1/src/qpdf/qpdf_pagelist.cpp new/pikepdf-1.10.2/src/qpdf/qpdf_pagelist.cpp --- old/pikepdf-1.10.1/src/qpdf/qpdf_pagelist.cpp 2020-02-10 06:37:08.000000000 +0100 +++ new/pikepdf-1.10.2/src/qpdf/qpdf_pagelist.cpp 2020-02-25 02:03:58.000000000 +0100 @@ -157,7 +157,7 @@ if (page_owner == this->qpdf.get()) { // qpdf does not accept duplicating pages within the same file, // so manually create a copy - page = this->qpdf->makeIndirectObject(page); + page = this->qpdf->makeIndirectObject(page.shallowCopy()); } if (index != this->count()) { QPDFObjectHandle refpage = this->get_page(index); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pikepdf-1.10.1/tests/test_pages.py new/pikepdf-1.10.2/tests/test_pages.py --- old/pikepdf-1.10.1/tests/test_pages.py 2020-02-10 06:37:08.000000000 +0100 +++ new/pikepdf-1.10.2/tests/test_pages.py 2020-02-25 02:03:58.000000000 +0100 @@ -5,8 +5,7 @@ import pytest -from pikepdf import Pdf, PdfMatrix, Stream, Dictionary, Name - +from pikepdf import Dictionary, Name, Pdf, PdfMatrix, Stream # pylint: disable=redefined-outer-name,pointless-statement @@ -313,3 +312,17 @@ def test_repr_pagelist(fourpages): assert '4' in repr(fourpages.pages) + + +def test_foreign_copied_pages_are_true_copies(graph, outpdf): + out = Pdf.new() + for n in range(4): + out.pages.append(out.copy_foreign(graph.pages[0])) + + for n in [0, 2]: + out.pages[n].Rotate = 180 + + out.save(outpdf) + reopened = Pdf.open(outpdf) + assert reopened.pages[0].Rotate == 180 + assert reopened.pages[1].get(Name.Rotate, 0) == 0
