Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pydyf for openSUSE:Factory checked in at 2022-10-12 18:27:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pydyf (Old) and /work/SRC/openSUSE:Factory/.python-pydyf.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pydyf" Wed Oct 12 18:27:02 2022 rev:5 rq:1010272 version:0.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pydyf/python-pydyf.changes 2022-08-17 18:25:35.123499967 +0200 +++ /work/SRC/openSUSE:Factory/.python-pydyf.new.2275/python-pydyf.changes 2022-10-12 18:28:33.974201651 +0200 @@ -1,0 +2,7 @@ +Wed Oct 12 14:08:39 UTC 2022 - Yogalakshmi Arunachalam <yarunacha...@suse.com> + +- Update to version 0.3.0 + * Support marked content + * Allow version and ID to be specified when initializing PDF objects + +------------------------------------------------------------------- Old: ---- pydyf-0.2.0.tar.gz New: ---- pydyf-0.3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pydyf.spec ++++++ --- /var/tmp/diff_new_pack.zzQnRy/_old 2022-10-12 18:28:34.378202540 +0200 +++ /var/tmp/diff_new_pack.zzQnRy/_new 2022-10-12 18:28:34.386202557 +0200 @@ -18,7 +18,7 @@ Name: python-pydyf -Version: 0.2.0 +Version: 0.3.0 Release: 0 Summary: A low-level PDF generator License: BSD-3-Clause ++++++ pydyf-0.2.0.tar.gz -> pydyf-0.3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydyf-0.2.0/.github/FUNDING.yml new/pydyf-0.3.0/.github/FUNDING.yml --- old/pydyf-0.2.0/.github/FUNDING.yml 2022-05-23 15:10:18.000000000 +0200 +++ new/pydyf-0.3.0/.github/FUNDING.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -open_collective: courtbouillon diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydyf-0.2.0/.github/workflows/doconfly.yml new/pydyf-0.3.0/.github/workflows/doconfly.yml --- old/pydyf-0.2.0/.github/workflows/doconfly.yml 2022-05-23 15:10:18.000000000 +0200 +++ new/pydyf-0.3.0/.github/workflows/doconfly.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,29 +0,0 @@ -name: doconfly -on: - push: - branches: - - master - tags: - - "*" - -jobs: - doconfly: - name: doconfly job - runs-on: ubuntu-latest - env: - PORT: ${{ secrets.PORT }} - SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} - TAKOYAKI: ${{ secrets.TAKOYAKI }} - USER: ${{ secrets.USER }} - DOCUMENTATION_PATH: ${{ secrets.DOCUMENTATION_PATH }} - DOCUMENTATION_URL: ${{ secrets.DOCUMENTATION_URL }} - steps: - - run: | - which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y ) - eval $(ssh-agent -s) - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - - mkdir -p ~/.ssh - chmod 700 ~/.ssh - ssh-keyscan -p $PORT $TAKOYAKI >> ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts - ssh $USER@$TAKOYAKI -p $PORT "doconfly/doconfly.sh $GITHUB_REPOSITORY $GITHUB_REF $DOCUMENTATION_PATH $DOCUMENTATION_URL" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydyf-0.2.0/.github/workflows/tests.yml new/pydyf-0.3.0/.github/workflows/tests.yml --- old/pydyf-0.2.0/.github/workflows/tests.yml 2022-05-23 15:10:18.000000000 +0200 +++ new/pydyf-0.3.0/.github/workflows/tests.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,35 +0,0 @@ -name: pydyf's tests -on: [push, pull_request] - -jobs: - tests: - name: ${{ matrix.os }} - ${{ matrix.python-version }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.8'] - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install Ghostscript (Ubuntu) - if: matrix.os == 'ubuntu-latest' - run: sudo apt-get update -y && sudo apt-get install ghostscript -y - - name: Install Ghostscript (macOS) - if: matrix.os == 'macos-latest' - run: brew install ghostscript - - name: Install Ghostscript (Windows) - if: matrix.os == 'windows-latest' - run: | - C:\msys64\usr\bin\bash -lc 'pacman -S mingw-w64-x86_64-ghostscript --noconfirm' - echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH - rm C:\msys64\mingw64\bin\python.exe - - name: Upgrade pip and setuptools - run: python -m pip install --upgrade pip setuptools - - name: Install tests??? requirements - run: python -m pip install .[test] - - name: Launch tests - run: python -m pytest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydyf-0.2.0/.gitignore new/pydyf-0.3.0/.gitignore --- old/pydyf-0.2.0/.gitignore 2022-05-23 15:10:18.000000000 +0200 +++ new/pydyf-0.3.0/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -/docs/_build -/tests/results -__pycache__ -.coverage diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydyf-0.2.0/PKG-INFO new/pydyf-0.3.0/PKG-INFO --- old/pydyf-0.2.0/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/pydyf-0.3.0/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -0,0 +1,58 @@ +Metadata-Version: 2.1 +Name: pydyf +Version: 0.3.0 +Summary: A low-level PDF generator. +Keywords: pdf,generator +Author-email: CourtBouillon <cont...@courtbouillon.org> +Maintainer-email: CourtBouillon <cont...@courtbouillon.org> +Requires-Python: >=3.7 +Description-Content-Type: text/x-rst +Classifier: Development Status :: 4 - Beta +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: BSD License +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy +Requires-Dist: sphinx ; extra == "doc" +Requires-Dist: sphinx_rtd_theme ; extra == "doc" +Requires-Dist: pytest ; extra == "test" +Requires-Dist: pytest-xdist ; extra == "test" +Requires-Dist: pytest-flake8 ; extra == "test" +Requires-Dist: pytest-isort ; extra == "test" +Requires-Dist: pytest-cov ; extra == "test" +Requires-Dist: coverage[toml] ; extra == "test" +Requires-Dist: pillow ; extra == "test" +Project-URL: Changelog, https://github.com/CourtBouillon/pydyf/releases +Project-URL: Code, https://github.com/CourtBouillon/pydyf +Project-URL: Documentation, https://doc.courtbouillon.org/pydyf/ +Project-URL: Donation, https://opencollective.com/courtbouillon +Project-URL: Homepage, https://www.courtbouillon.org/pydyf +Project-URL: Issues, https://github.com/CourtBouillon/pydyf/issues +Provides-Extra: doc +Provides-Extra: test + +pydyf is a low-level PDF generator written in Python and based on PDF +specification 1.7. + +* Free software: BSD license +* For Python 3.7+, tested on CPython and PyPy +* Documentation: https://doc.courtbouillon.org/pydyf +* Changelog: https://github.com/CourtBouillon/pydyf/releases +* Code, issues, tests: https://github.com/CourtBouillon/pydyf +* Code of conduct: https://www.courtbouillon.org/code-of-conduct +* Professional support: https://www.courtbouillon.org +* Donation: https://opencollective.com/courtbouillon + +Copyrights are retained by their contributors, no copyright assignment is +required to contribute to pydyf. Unless explicitly stated otherwise, any +contribution intentionally submitted for inclusion is licensed under the BSD +3-clause license, without any additional terms or conditions. For full +authorship information, see the version control history. + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydyf-0.2.0/docs/changelog.rst new/pydyf-0.3.0/docs/changelog.rst --- old/pydyf-0.2.0/docs/changelog.rst 2022-05-23 15:10:18.000000000 +0200 +++ new/pydyf-0.3.0/docs/changelog.rst 2022-09-19 08:55:51.185662300 +0200 @@ -2,6 +2,40 @@ ========= +Version 0.3.0 +------------- + +Released on 2022-09-19. + +New features: + +* Support marked content +* Allow version and ID to be specified when initializing PDF objects + +Contributors: + +* Guillaume Ayoub + +Backers and sponsors: + +* Grip Angebotssoftware +* Manuel Barkhau +* Crisp BV +* SimonSoft +* Menutech +* Spacinov +* KontextWork +* Ren?? Fritz +* NCC Group +* Kobalt +* Tom Pohl +* John R Ellis +* Moritz Mahringer +* G??bor +* Piotr Horzycki +* Andrew Ittner + + Version 0.2.0 ------------- @@ -11,7 +45,7 @@ * Python 3.7+ is now needed, Python 3.6 is not supported anymore - New features: +New features: * `d0be36b <https://github.com/CourtBouillon/pydyf/commit/d0be36b>`_: Allow to set PDF version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pydyf-0.2.0/pydyf/__init__.py new/pydyf-0.3.0/pydyf/__init__.py --- old/pydyf-0.2.0/pydyf/__init__.py 2022-05-23 15:10:18.000000000 +0200 +++ new/pydyf-0.3.0/pydyf/__init__.py 2022-09-17 09:55:05.994255800 +0200 @@ -8,7 +8,7 @@ from codecs import BOM_UTF16_BE from hashlib import md5 -VERSION = __version__ = '0.2.0' +VERSION = __version__ = '0.3.0' def _to_bytes(item): @@ -97,6 +97,15 @@ #: Compress the stream data if set to ``True``. Default is ``False``. self.compress = compress + def begin_marked_content(self, tag, property_list=None): + """Begin marked-content sequence.""" + self.stream.append(f'/{tag}') + if property_list is None: + self.stream.append(b'BMC') + else: + self.stream.append(property_list) + self.stream.append(b'BDC') + def begin_text(self): """Begin a text object.""" self.stream.append(b'BT') @@ -172,6 +181,10 @@ """End path without filling or stroking.""" self.stream.append(b'n') + def end_marked_content(self): + """End marked-content sequence.""" + self.stream.append(b'EMC') + def end_text(self): """End text object.""" self.stream.append(b'ET') @@ -409,7 +422,18 @@ class PDF: """PDF document.""" - def __init__(self): + def __init__(self, version=b'1.7', identifier=None): + """Create a PDF document. + + :param bytes version: PDF version. + :param bytes identifier: PDF file identifier. + + """ + #: PDF version, as :obj:`bytes`. + self.version = _to_bytes(version) + #: PDF file identifier. + self.identifier = identifier + #: Python :obj:`list` containing the PDF???s objects. self.objects = [] @@ -470,7 +494,7 @@ self.current_position += len(content) + 1 output.write(content + b'\n') - def write(self, output, version=b'1.7', identifier=None): + def write(self, output, version=None, identifier=None): """Write PDF to output. :param output: Output stream. @@ -479,6 +503,9 @@ :param bytes identifier: PDF file identifier. """ + version = self.version if version is None else _to_bytes(version) + identifier = self.identifier if identifier is None else identifier + # Write header self.write_line(b'%PDF-' + version, output) self.write_line(b'%\xf0\x9f\x96\xa4', output)