forked from pool/python-qrcode
Compare commits
6 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| e928df6e71 | |||
| 029c1df4e6 | |||
| d40f19da2f | |||
| 819d260e2a | |||
| 4937bb4667 | |||
| 28f2c67d91 |
33
364.patch
33
364.patch
@@ -1,33 +0,0 @@
|
||||
From 0fd5649d6f971e5c19ac7f6953e9d6737d3fbb0b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
|
||||
Date: Mon, 10 Jun 2024 13:22:24 +0200
|
||||
Subject: [PATCH] Add buffer and fileno for mocked sys.stdout
|
||||
|
||||
This change fixes the issue of two failing tests because the sys.stdout
|
||||
seems not to be properly mocked. Both tests need a buffer and test_piped
|
||||
additionally needs fileno method.
|
||||
---
|
||||
qrcode/tests/test_script.py | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/qrcode/tests/test_script.py b/qrcode/tests/test_script.py
|
||||
index 4ae4ccbc..96458e4c 100644
|
||||
--- a/qrcode/tests/test_script.py
|
||||
+++ b/qrcode/tests/test_script.py
|
||||
@@ -30,6 +30,8 @@ def test_isatty(self, mock_print_ascii):
|
||||
@mock.patch("sys.stdout")
|
||||
@unittest.skipIf(not Image, "Requires PIL")
|
||||
def test_piped(self, mock_stdout):
|
||||
+ mock_stdout.buffer = io.BytesIO()
|
||||
+ mock_stdout.fileno = lambda: 999
|
||||
main(["testtext"])
|
||||
|
||||
@mock.patch("os.isatty", lambda *args: True)
|
||||
@@ -61,6 +63,7 @@ def test_optimize(self, mock_print_ascii):
|
||||
|
||||
@mock.patch("sys.stdout")
|
||||
def test_factory(self, mock_stdout):
|
||||
+ mock_stdout.buffer = io.BytesIO()
|
||||
main("testtext --factory svg".split())
|
||||
|
||||
@mock.patch("sys.stderr")
|
||||
@@ -1,3 +1,39 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 5 08:57:38 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Update to 8.2.0
|
||||
* Optimize QRColorMask apply_mask method for enhanced performance
|
||||
* Fix typos on StyledPilImage embeded_* parameters.
|
||||
The old parameters with the typos are still accepted
|
||||
for backward compatibility.
|
||||
- from version 8.1
|
||||
* Added support for Python 3.13.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 26 10:05:29 UTC 2025 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Fix build and runtime dependencies
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 30 09:47:24 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Update to 8.0.0
|
||||
* Added support for Python 3.11 and 3.12.
|
||||
* Drop support for Python <=3.8.
|
||||
* Change local development setup to use Poetry_.
|
||||
* Testsuite and code quality checks are done
|
||||
through Github Actions.
|
||||
* Code quality and formatting utilises ruff_.
|
||||
* Removed ``typing_extensions`` as a dependency,
|
||||
as it's no longer required with
|
||||
having Python 3.9+ as a requirement.
|
||||
* Only allow high error correction rate (`qrcode.ERROR_CORRECT_H`)
|
||||
when generating QR codes with embedded images to ensure content
|
||||
is readable
|
||||
- Install manpage manually in %install section
|
||||
- Drop 364.patch, merged upstream
|
||||
- Switch package source from PyPi to Github
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 23 08:43:04 UTC 2024 - Andreas Schneider <asn@cryptomilk.org>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-qrcode
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,27 +18,23 @@
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-qrcode
|
||||
Version: 7.4.2
|
||||
Version: 8.2
|
||||
Release: 0
|
||||
Summary: QR Code image generator
|
||||
License: BSD-3-Clause
|
||||
URL: https://github.com/lincolnloop/python-qrcode
|
||||
Source: https://files.pythonhosted.org/packages/source/q/qrcode/qrcode-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM - Add buffer and fileno for mocked sys.stdout
|
||||
Patch0: https://github.com/lincolnloop/python-qrcode/pull/364.patch
|
||||
BuildRequires: %{python_module Pillow}
|
||||
Source: %{url}/archive/v%{version}.tar.gz#/qrcode-%{version}.tar.gz
|
||||
BuildRequires: %{python_module Pillow >= 9.1.0}
|
||||
BuildRequires: %{python_module base >= 3.9}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module poetry-core}
|
||||
BuildRequires: %{python_module pypng}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module typing-extensions}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-Pillow
|
||||
Requires: python-pypng
|
||||
Requires: python-setuptools
|
||||
Requires: python-typing-extensions
|
||||
Recommends: python-Pillow >= 9.1.0
|
||||
Recommends: python-pypng
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildArch: noarch
|
||||
@@ -49,8 +45,7 @@ This module uses the Python Imaging Library (PIL) to allow for the generation
|
||||
of QR Codes.
|
||||
|
||||
%prep
|
||||
%setup -q -n qrcode-%{version}
|
||||
%patch -P0 -p1
|
||||
%setup -q -n python-qrcode-%{version}
|
||||
# drop shebang from console_scripts
|
||||
sed -i '1s@^#!.*@@' qrcode/console_scripts.py
|
||||
|
||||
@@ -59,6 +54,7 @@ sed -i '1s@^#!.*@@' qrcode/console_scripts.py
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
install -Dm 644 doc/qr.1 %{buildroot}%{_mandir}/man1/qr.1
|
||||
%python_clone -a %{buildroot}%{_mandir}/man1/qr.1
|
||||
%python_clone -a %{buildroot}%{_bindir}/qr
|
||||
%fdupes %{buildroot}%{_prefix}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9dd969454827e127dbd93696b20747239e6d540e082937c90f14ac95b30f5845
|
||||
size 535974
|
||||
3
qrcode-8.2.tar.gz
Normal file
3
qrcode-8.2.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:072dc52937ccfaff68a70c93081ad333e33201159ff5aeef8a49e8d2e643ea1b
|
||||
size 529231
|
||||
Reference in New Issue
Block a user