Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pelican for openSUSE:Factory 
checked in at 2023-03-01 16:14:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pelican (Old)
 and      /work/SRC/openSUSE:Factory/.python-pelican.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pelican"

Wed Mar  1 16:14:25 2023 rev:21 rq:1068351 version:4.8.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pelican/python-pelican.changes    
2022-07-19 17:18:54.988331013 +0200
+++ /work/SRC/openSUSE:Factory/.python-pelican.new.31432/python-pelican.changes 
2023-03-01 16:14:51.882851943 +0100
@@ -1,0 +2,6 @@
+Wed Mar  1 07:17:54 UTC 2023 - Daniel Garcia <daniel.gar...@suse.com>
+
+- Add python-311.patch to support python 3.11
+  gh#getpelican/pelican#3055
+
+-------------------------------------------------------------------

New:
----
  python-311.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pelican.spec ++++++
--- /var/tmp/diff_new_pack.8iBXLr/_old  2023-03-01 16:14:52.410854673 +0100
+++ /var/tmp/diff_new_pack.8iBXLr/_new  2023-03-01 16:14:52.414854693 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pelican
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,6 @@
 
 
 %define skip_python2 1
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pelican
 Version:        4.8.0
 Release:        0
@@ -28,6 +27,8 @@
 # Use the source instead of the pypi release for the tests
 # Source:         
https://github.com/getpelican/pelican/archive/%%{version}.tar.gz
 Source:         pelican-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM python-311.patch gh#getpelican/pelican#3055
+Patch0:         python-311.patch
 BuildRequires:  %{python_module Jinja2 >= 2.11}
 BuildRequires:  %{python_module Markdown >= 3.1.1}
 BuildRequires:  %{python_module Pygments}

++++++ python-311.patch ++++++
>From 3937028c00344dc82798750e5f13a8a1aea890d4 Mon Sep 17 00:00:00 2001
From: Deniz Turgut <dtur...@gmail.com>
Date: Wed, 26 Oct 2022 23:27:06 +0300
Subject: [PATCH 2/2] update unit test to avoid using deprecated
 locale.getdefaultlocale()

---
 pelican/tests/test_settings.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Index: pelican-4.8.0/pelican/tests/test_settings.py
===================================================================
--- pelican-4.8.0.orig/pelican/tests/test_settings.py
+++ pelican-4.8.0/pelican/tests/test_settings.py
@@ -2,7 +2,6 @@ import copy
 import locale
 import os
 from os.path import abspath, dirname, join
-from sys import platform
 
 
 from pelican.settings import (DEFAULT_CONFIG, DEFAULT_THEME,
@@ -136,18 +135,19 @@ class TestSettingsConfiguration(unittest
             settings['ARTICLE_DIR']
             settings['PAGE_DIR']
 
-    # locale.getdefaultlocale() is broken on Windows
-    # See: https://bugs.python.org/issue37945
-    @unittest.skipIf(platform == 'win32', "Doesn't work on Windows")
     def test_default_encoding(self):
-        # Test that the default locale is set if not specified in settings
+        # Test that the user locale is set if not specified in settings
 
-        # Reset locale to Python's default locale
         locale.setlocale(locale.LC_ALL, 'C')
-        self.assertEqual(self.settings['LOCALE'], DEFAULT_CONFIG['LOCALE'])
+        # empty string = user system locale
+        self.assertEqual(self.settings['LOCALE'], [''])
 
         configure_settings(self.settings)
-        self.assertEqual(locale.getlocale(), locale.getdefaultlocale())
+        lc_time = locale.getlocale(locale.LC_TIME)  # should be set to user 
locale
+
+        # explicitly set locale to user pref and test
+        locale.setlocale(locale.LC_TIME, '')
+        self.assertEqual(lc_time, locale.getlocale(locale.LC_TIME))
 
     def test_invalid_settings_throw_exception(self):
         # Test that the path name is valid

Reply via email to