Package: python-exchangelib
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch

Dear Maintainer,

autopkgtest EWSDateTimeTest.test_generate() because the time zones defined by
package tzdata and
https://raw.githubusercontent.com/unicode-org/cldr/master/common/supplemental/windowsZones.xml
differ for Kiev.

Cf. "Tests failure due to Kiev timezone"
https://github.com/ecederstrand/exchangelib/issues/1120

In Ubuntu, the attached patch was applied:

  * Timezone "Europe/Kyiv" exists in tzdata but not in the webpage
    
https://raw.githubusercontent.com/unicode-org/cldr/master/common/supplemental/windowsZones.xml
    Add patch d/p/ubuntu-kyiv-quirk.patch to let autopkgtests succeed.
    (LP: #1990843)

Thanks for considering the patch.


-- System Information:
Debian Release: bookworm/sid
  APT prefers kinetic-proposed
  APT policy: (500, 'kinetic-proposed'), (500, 'kinetic')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.19.0-15-generic (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru python-exchangelib-4.7.6/debian/patches/series 
python-exchangelib-4.7.6/debian/patches/series
--- python-exchangelib-4.7.6/debian/patches/series      2022-09-08 
18:06:14.000000000 +0200
+++ python-exchangelib-4.7.6/debian/patches/series      2022-09-27 
09:46:34.000000000 +0200
@@ -1,2 +1,3 @@
 0001-Do-not-depend-on-tzdata-use-local-timezone-database.patch
 0002-add-kyiv.patch
+ubuntu-kyiv-quirk.patch
diff -Nru python-exchangelib-4.7.6/debian/patches/ubuntu-kyiv-quirk.patch 
python-exchangelib-4.7.6/debian/patches/ubuntu-kyiv-quirk.patch
--- python-exchangelib-4.7.6/debian/patches/ubuntu-kyiv-quirk.patch     
1970-01-01 01:00:00.000000000 +0100
+++ python-exchangelib-4.7.6/debian/patches/ubuntu-kyiv-quirk.patch     
2022-09-27 09:45:34.000000000 +0200
@@ -0,0 +1,21 @@
+From: Heinrich Schuchardt <heinrich.schucha...@canonical.com>
+Subject: [PATCH] fix CLDR_TO_MS_TIMEZONE_MAP testing
+
+Timezone "Europe/Kyiv" exists in tzdata but not in webpage CLDR_WINZONE_URL.
+To overcome autopkgtest failures remove the entry when testing.
+
+--- a/tests/test_ewsdatetime.py
++++ b/tests/test_ewsdatetime.py
+@@ -198,9 +198,11 @@
+             # generate_map() requires access to unicode.org, which may be 
unavailable. Don't fail test, since this is
+             # out of our control.
+             return
++        # Timezone "Europe/Kyiv" exists in tzdata but not in webpage 
CLDR_WINZONE_URL
++        expected_map = {key : CLDR_TO_MS_TIMEZONE_MAP[key] for key in 
CLDR_TO_MS_TIMEZONE_MAP if key != "Europe/Kyiv"}
+         self.assertEqual(type_version, CLDR_WINZONE_TYPE_VERSION)
+         self.assertEqual(other_version, CLDR_WINZONE_OTHER_VERSION)
+-        self.assertDictEqual(tz_map, CLDR_TO_MS_TIMEZONE_MAP)
++        self.assertDictEqual(tz_map, expected_map)
+ 
+     @requests_mock.mock()
+     def test_generate_failure(self, m):

Reply via email to