15
0

Accepting request 1144079 from devel:languages:python

- Drop patch support-python-311.patch, no longer required.

OBS-URL: https://build.opensuse.org/request/show/1144079
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-autopage?expand=0&rev=8
This commit is contained in:
2024-02-05 21:01:23 +00:00
committed by Git OBS Bridge
3 changed files with 7 additions and 44 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Feb 5 04:53:08 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Drop patch support-python-311.patch, no longer required.
-------------------------------------------------------------------
Fri Nov 10 13:14:47 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-autopage
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -23,7 +23,6 @@ Summary: A library to provide automatic paging for console output
License: Apache-2.0
URL: https://github.com/zaneb/autopage
Source: https://files.pythonhosted.org/packages/source/a/autopage/autopage-%{version}.tar.gz
Patch0: support-python-311.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
@@ -62,6 +61,6 @@ rm -v autopage/tests/test_end_to_end.py
%doc README.md
%license LICENSE
%{python_sitelib}/autopage
%{python_sitelib}/autopage-%{version}*-info
%{python_sitelib}/autopage-%{version}.dist-info
%changelog

View File

@@ -1,41 +0,0 @@
Index: autopage-0.5.1/autopage/tests/test_autopage.py
===================================================================
--- autopage-0.5.1.orig/autopage/tests/test_autopage.py
+++ autopage-0.5.1/autopage/tests/test_autopage.py
@@ -37,6 +37,9 @@ class PagedStreamTest(fixtures.TestWithF
popen = fixtures.MockPatch('subprocess.Popen')
self.useFixture(popen)
self.popen = popen.mock
+ self.encoding = 'UTF-8'
+ if sys.version_info >= (3, 11):
+ self.encoding = 'utf-8'
def test_defaults(self) -> None:
class TestCommand(command.PagerCommand):
@@ -58,7 +61,7 @@ class PagedStreamTest(fixtures.TestWithF
env=get_env.return_value,
bufsize=-1,
universal_newlines=True,
- encoding='UTF-8',
+ encoding=self.encoding,
errors='strict',
stdin=subprocess.PIPE,
stdout=None)
@@ -84,7 +87,7 @@ class PagedStreamTest(fixtures.TestWithF
env=get_env.return_value,
bufsize=-1,
universal_newlines=True,
- encoding='UTF-8',
+ encoding=self.encoding,
errors='strict',
stdin=subprocess.PIPE,
stdout=None)
@@ -100,7 +103,7 @@ class PagedStreamTest(fixtures.TestWithF
env=get_env.return_value,
bufsize=-1,
universal_newlines=True,
- encoding='UTF-8',
+ encoding=self.encoding,
errors='strict',
stdin=subprocess.PIPE,
stdout=None)