Skip Menu |

This queue is for tickets about the DateTime-Format-DateParse CPAN distribution.

Report information
The Basics
Id: 52598
Status: resolved
Priority: 0/
Queue: DateTime-Format-DateParse

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc: jhoblitt [...] cpan.org
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



CC: JHOBLITT [...] cpan.org
Subject: DT 0.52,0.53 break DateTime::Format::DateParse
Since 0.52 hit the cpan testers we observe FAILs on DateTime::Format::DateParse with the error message: t/02_date.t ..... 1/123 The 'nanosecond' parameter ("182321300.000002") to DateTime::new did not pass the 'a positive integer' callback at /home/src/perl/repoperls/installed-perls/perl/v5.11.1-237-g7d5ce19/lib/site_perl/5.11.1/x86_64-linux-thread-multi/DateTime.pm line 176 DateTime::new(undef, 'hour', 09, 'minute', 08, 'second', 17, 'day', 24, ...) called at lib/DateTime/Format/DateParse.pm line 69 DateTime::Format::DateParse::parse_datetime('DateTime::Format::DateParse', '1995-01-24T09:08:17.1823213') called at t/02_date.t line 144 # Looks like you planned 123 tests but ran 1. # Looks like your test exited with 255 just after 1. t/02_date.t ..... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 122/123 subtests I'm not in the position to decide where the bug is, so I withdraw, Respectfully Yours,
Subject: Re: [rt.cpan.org #52598] DT 0.52,0.53 break DateTime::Format::DateParse
Date: Wed, 9 Dec 2009 09:05:45 -0600 (CST)
To: Andreas Koenig via RT <bug-DateTime [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Wed, 9 Dec 2009, Andreas Koenig via RT wrote: Show quoted text
> Since 0.52 hit the cpan testers we observe FAILs on > DateTime::Format::DateParse with the error message: > > t/02_date.t ..... 1/123 The 'nanosecond' parameter ("182321300.000002") > to DateTime::new did not pass the 'a positive integer' callback > at > /home/src/perl/repoperls/installed-perls/perl/v5.11.1-237-g7d5ce19/lib/site_perl/5.11.1/x86_64-linux-thread-multi/DateTime.pm > line 176 > DateTime::new(undef, 'hour', 09, 'minute', 08, 'second', 17, > 'day', 24, ...) called at lib/DateTime/Format/DateParse.pm line 69 > > DateTime::Format::DateParse::parse_datetime('DateTime::Format::DateParse', > '1995-01-24T09:08:17.1823213') called at t/02_date.t line 144 > # Looks like you planned 123 tests but ran 1. > # Looks like your test exited with 255 just after 1. > t/02_date.t ..... Dubious, test returned 255 (wstat 65280, 0xff00) > Failed 122/123 subtests
DateTime used to silently accept non-integer arguments and not do anything intelligent with them. Not it insists on integers. It'd probably be best to fix DateTime::Format::DateParse to call int() on the nanosecond param. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
RT-Send-CC: DROLSKY [...] cpan.org
I don't know how it comes that I hear a faint ~~~depre~~~ ~~~cation~~~ followed by an even fainter ~~~cycle~~~
Subject: Re: [rt.cpan.org #52598] DT 0.52,0.53 break DateTime::Format::DateParse
Date: Thu, 10 Dec 2009 19:24:33 -0600 (CST)
To: Andreas Koenig via RT <bug-DateTime-Format-DateParse [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Thu, 10 Dec 2009, Andreas Koenig via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=52598 > > > I don't know how it comes that I hear a faint ~~~depre~~~ ~~~cation~~~ > followed by an even fainter ~~~cycle~~~
I had no idea any code was passing fractional nanoseconds to the constructor. There was never any guarantee that this would work, although the docs don't say one way or the other. Some DateTime module authors have already updated modules which break, so I'm hoping others follow soon. I could issue a release which just warned, but then I'll get complaints that previously working modules now issue warnings. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Subject: Re: [rt.cpan.org #52598] DT 0.52,0.53 break DateTime::Format::DateParse
Date: Thu, 10 Dec 2009 18:31:16 -0700
To: bug-DateTime-Format-DateParse [...] rt.cpan.org
From: Joshua Hoblitt <josh [...] hoblitt.com>
On 12/10/09 18:25, autarch@urth.org via RT wrote: Show quoted text
> I had no idea any code was passing fractional nanoseconds to the > constructor. There was never any guarantee that this would work, although > the docs don't say one way or the other. >
Perhaps we should just document that nanoseconds is a purely integer value? -J --
My idea how it could be fixed with no floating math involved: ftp://cpan.cpantesters.org/CPAN/authors/id/A/AN/ANDK/patches/DateTime-Format-DateParse-0.04-ANDK-01.patch.gz Distroprefs users can get the matching distroprefs file here: http://github.com/andk/cpanpm/blob/3863eba3ae2e1677bd716fa57aa8daf57d872fd2/distroprefs/JHOBLITT.DateTime-Format-DateParse.yml Enjoy,
On Sat Dec 12 04:15:24 2009, ANDK wrote: Show quoted text
> My idea how it could be fixed with no floating math involved: > > ftp://cpan.cpantesters.org/CPAN/authors/id/A/AN/ANDK/patches/DateTime- > Format-DateParse-0.04-ANDK-01.patch.gz > > Distroprefs users can get the matching distroprefs file here: > >
http://github.com/andk/cpanpm/blob/3863eba3ae2e1677bd716fa57aa8daf57d872fd2/distroprefs/JHOBLITT.DateTime- Show quoted text
> Format-DateParse.yml > > Enjoy,
This works for me, but are we saying this is a long term fix or a stopgap until we can patch the original code? This is fine for my development but ever time I tell people (like my system administrators) to install a local distropref to workaround I have to refight the "we should/shouldn't" be using cpan/reinventing our own wheels argument at the office. If patching this is just about someone with tuits to do it, I'm happy to step up. Just point me to a repo and all that. Thanks! John
From: ppisar [...] redhat.com
Dne St 09.pro.2009 02:13:01, ANDK napsal(a): Show quoted text
> Since 0.52 hit the cpan testers we observe FAILs on > DateTime::Format::DateParse with the error message: > > t/02_date.t ..... 1/123 The 'nanosecond' parameter > ("182321300.000002") > to DateTime::new did not pass the 'a positive integer' callback > at > /home/src/perl/repoperls/installed-perls/perl/v5.11.1-237- > g7d5ce19/lib/site_perl/5.11.1/x86_64-linux-thread-multi/DateTime.pm > line 176 > DateTime::new(undef, 'hour', 09, 'minute', 08, 'second', 17, > 'day', 24, ...) called at lib/DateTime/Format/DateParse.pm line 69 >
I think this can be closed as resolved because version 0.05 rounds fractional nanoseconds to nearest integer.
It sounds like this fixed itself. I'm going to close it out unless it's still affecting folks.