unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46294: python-arrow timezone test failure
@ 2021-02-04 12:47 Guillaume Le Vaillant
  2021-02-08  8:02 ` Efraim Flashner
  0 siblings, 1 reply; 2+ messages in thread
From: Guillaume Le Vaillant @ 2021-02-04 12:47 UTC (permalink / raw)
  To: 46294

[-- Attachment #1: Type: text/plain, Size: 2478 bytes --]

Hi,

The python-arrow package currently fails to build because the
"test_parse_tz_name_zzz" test is failing.
This is with Guix at eae865c134ebb8b7432572288e8721794d6a9b87.
I'm not very familiar with Python, so does someone know how to fix this?


Here's the relevant part of the build log:

--8<---------------cut here---------------start------------->8---
_________ TestDateTimeParserParse.test_parse_tz_name_zzz[America/Nuuk] _________

self = <tests.test_parser.TestDateTimeParserParse object at 0x7ffff3e0d220>
full_tz_name = 'America/Nuuk'

    @pytest.mark.parametrize("full_tz_name", make_full_tz_list())
    def test_parse_tz_name_zzz(self, full_tz_name):
    
        self.expected = datetime(2013, 1, 1, tzinfo=tz.gettz(full_tz_name))
>       assert (
            self.parser.parse("2013-01-01 {}".format(full_tz_name), "YYYY-MM-DD ZZZ")
            == self.expected
        )

tests/test_parser.py:347: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
arrow/parser.py:244: in parse
    self._parse_token(token, value, parts)
arrow/parser.py:397: in _parse_token
    parts["tzinfo"] = TzinfoParser.parse(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'arrow.parser.TzinfoParser'>, tzinfo_string = 'America/Nuuk'

    @classmethod
    def parse(cls, tzinfo_string):
    
        tzinfo = None
    
        if tzinfo_string == "local":
            tzinfo = tz.tzlocal()
    
        elif tzinfo_string in ["utc", "UTC", "Z"]:
            tzinfo = tz.tzutc()
    
        else:
    
            iso_match = cls._TZINFO_RE.match(tzinfo_string)
    
            if iso_match:
                sign, hours, minutes = iso_match.groups()
                if minutes is None:
                    minutes = 0
                seconds = int(hours) * 3600 + int(minutes) * 60
    
                if sign == "-":
                    seconds *= -1
    
                tzinfo = tz.tzoffset(None, seconds)
    
            else:
                tzinfo = tz.gettz(tzinfo_string)
    
        if tzinfo is None:
>           raise ParserError(
                'Could not parse timezone expression "{}"'.format(tzinfo_string)
            )
E           arrow.parser.ParserError: Could not parse timezone expression "America/Nuuk"

arrow/parser.py:592: ParserError
--8<---------------cut here---------------end--------------->8---

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#46294: python-arrow timezone test failure
  2021-02-04 12:47 bug#46294: python-arrow timezone test failure Guillaume Le Vaillant
@ 2021-02-08  8:02 ` Efraim Flashner
  0 siblings, 0 replies; 2+ messages in thread
From: Efraim Flashner @ 2021-02-08  8:02 UTC (permalink / raw)
  To: Guillaume Le Vaillant; +Cc: 46294-done

[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

On Thu, Feb 04, 2021 at 01:47:59PM +0100, Guillaume Le Vaillant wrote:
> Hi,
> 
> The python-arrow package currently fails to build because the
> "test_parse_tz_name_zzz" test is failing.
> This is with Guix at eae865c134ebb8b7432572288e8721794d6a9b87.
> I'm not very familiar with Python, so does someone know how to fix this?

I tracked this down a bit, python-dateutil still has America/Nuuk as
America/Godthab, so any test looking for America/Nuuk is going to fail.
Unfortunately with the number of dependants there's not an easy way to
fix it on master so I think we'll need to skip that test for now.

I've gone ahead and skipped the broken test and added a message to
re-enable it after an update to python-dateutil.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-08 14:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 12:47 bug#46294: python-arrow timezone test failure Guillaume Le Vaillant
2021-02-08  8:02 ` Efraim Flashner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).