[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2018-08-20 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2018-07-28 Thread Steve Dower


Change by Steve Dower :


--
keywords:  -easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

I removed the easy keyword from this issue: it's open since 2005, it has 12 
patches and 1 PR attached, and a lot of discussion.

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2018-03-16 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hello, just a small reminder for this issue and the PR ;-) when you have time

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2018-02-07 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

I have updated the patch for 3.8, create a PR and fixed the documentation of 
_strptime._strptime, because this function returns a 3-tuple and not a 2-tuple 
as indicated in its comment. 

Thank you

--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2018-02-07 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
pull_requests: +5396

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2017-07-22 Thread Matheus Vieira Portela

Matheus Vieira Portela added the comment:

Also, may I move this issue to a GitHub PR?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2017-07-22 Thread Matheus Vieira Portela

Matheus Vieira Portela added the comment:

The patch is broken against Python 3.7. I'll try working on it.

--
nosy: +matheus.v.portela
Added file: http://bugs.python.org/file47032/issue1100942_20170722.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2016-10-24 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Never mind the second question.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2016-10-24 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Shouldn't "time part" underlined in my previous note be "date part" instead?  
Also, does non-zero mean non-empty?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2016-10-24 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

belopolsky, could you tell me what it is wrong with the doc about time.strptime 
?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2016-09-14 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee: belopolsky -> 
priority: high -> 
versions: +Python 3.7 -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2016-08-25 Thread Mark Dickinson

Changes by Mark Dickinson :


--
nosy:  -mark.dickinson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2016-08-24 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

This does not look right: 

+.. classmethod:: time.strptime(date_string, format)
+
+   Return a :class:`time` corresponding to *date_string, parsed according to
+   *format*. :exc:`ValueError` is raised if the date string and format can't be
+   parsed by `time.strptime`, if it returns a value which isn't a time tuple,
+   or if the time part is nonzero.
  ^

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2016-08-08 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2016-08-08 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Here is an updated version (for 3.6) of the patch of maciej.szulik.

I have executed all the tests.

Please, could you review this patch.

Thank you

--
nosy: +matrixise
versions: +Python 3.6 -Python 3.5
Added file: http://bugs.python.org/file44044/issue1100942-3.6.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2015-05-11 Thread Maciej Szulik

Maciej Szulik added the comment:

Berker per your comment updated patch changing those two new methods (namely 
date.strptime and time.strptime) to be classmethod and not staticmethods.

--
Added file: http://bugs.python.org/file39345/issue1100942.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2015-05-09 Thread Berker Peksag

Berker Peksag added the comment:

datetime.strptime is a classmethod, but the new date.strptime and time.strptime 
methods are staticmethods. I think we should make the new methods classmethods 
too.

--
stage: needs patch - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2015-05-09 Thread Maciej Szulik

Maciej Szulik added the comment:

I've just double checked, this patch applies cleanly to latest tip. I wouldn't 
mind having this reviewed and merged.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2015-05-04 Thread Mark Lawrence

Mark Lawrence added the comment:

@Alexander as the datetime expert could you get this committed in time for 3.5?

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2014-04-10 Thread Maciej Szulik

Changes by Maciej Szulik solt...@gmail.com:


--
hgrepos:  -232

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2014-04-09 Thread Maciej Szulik

Maciej Szulik added the comment:

Sorry it took me that long - but I'm finally attaching fixed patch. I've also 
checked it again current default branch and updated descriptions accordingly.

--
hgrepos: +232
Added file: http://bugs.python.org/file34778/issue1100942_20140409.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2014-04-04 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

If datetime.date.strptime(date_string, format) validates format, then it is 
*not* equivalent to date(*(time.strptime(date_string, format)[0:3])), is it?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2014-04-04 Thread Maciej Szulik

Maciej Szulik added the comment:

You're right, I'll change this description removing 'This is equivalent...' 
sentence from description. I guess the same applies to 
time.strptime as well.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2014-04-03 Thread Maciej Szulik

Maciej Szulik added the comment:

I've just checked the patch still applies to current HEAD. What about the 
question regarding 0's in date.strptime(...) I asked in previous comment? I'd 
like to move this issue forward now when 3.4 is released.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2014-04-03 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Is this documentation still valid?

+.. staticmethod:: date.strptime(date_string, format)
+
+   Return a :class:`date` corresponding to *date_string*, parsed according to
+   *format*.  This is equivalent to ``date(*(time.strptime(date_string,
+   format)[0:3]))``.

I understand that the latest patch includes checking for time fields in date 
format.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2014-04-03 Thread Maciej Szulik

Maciej Szulik added the comment:

Alexander yes it's correct. It's checking for time part in date.strptime and 
for time part in time.strptime. The only problem I came into is that when 
passing 0 hours or 0 minutes into date.strptime it won't raise an exception, 
though doc explicitly says: (...) ValueError is raised if the date string 
(...) the time part is nonzero. So I'm not sure whether this is enough or 
should I add additional checks if time part was set?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2014-02-17 Thread Westley Martínez

Changes by Westley Martínez aniko...@gmail.com:


--
nosy: +anikom15

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2014-02-03 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy:  -BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2013-12-20 Thread Maciej Szulik

Maciej Szulik added the comment:

I'm attaching merged and fixed patch (issue1100942_full.patch). Though during 
testing I found one issue with the patch: during checking for time part in date 
class I'm using (in _datetimemodule.c-date_strptime) DATE_GET_HOUR etc, but 
when given time parts are 0's then the test fails. Should I leave the patch as 
is, because possibility for 0's is very low or should I check the format string 
for time parts existence? Any further advice is appreciated.

--
Added file: http://bugs.python.org/file33240/issue1100942_full.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2013-12-18 Thread Julian Gindi

Julian Gindi added the comment:

Maciej, cool! I just wanted to move this patch forward because A) it seemed 
inactive and B) I would love to see this feature make it in :) I guess that 
means there is nothing that I need to do. Looking forward to this one, good 
work!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2013-12-18 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
versions: +Python 3.5 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2013-12-17 Thread Julian Gindi

Julian Gindi added the comment:

I'm interested in taking over and finishing whatever needs to be completed to 
move this forward. What else needs to be done? It looks like improved tests are 
needed, but are there any changes needed to the implementation code?

--
nosy: +Julian.Gindi

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2013-12-17 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Julian, You need to update the patch from Juarez Bochi and Berker Peksag to the 
tip.

--
nosy: +vajrasky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2013-12-17 Thread Maciej Szulik

Maciej Szulik added the comment:

Julian I'm almost done with this issue. I just need to polish that a little bit 
and I'll provide working patch withing few hours. Sorry for not writing about 
that later, but I'm just starting with this and I had some time figuring it out.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2013-12-10 Thread Maciej Szulik

Changes by Maciej Szulik solt...@gmail.com:


--
nosy: +maciej.szulik

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2013-03-18 Thread Sean Reifschneider

Sean Reifschneider added the comment:

I've tried to test this but v4 doesn't apply cleanly after pure2 is applied, 
and v4 doesn't include enough to test it (applying v4 only causes test 
failures).

I reviewed v4 and it looks fine in general.  I do see that there are changes in 
it unrelated to this issue, but they are PEP8 changes so I'm not objecting, but 
ideally that would be split out into a separate patch.

I think that this code will incorrectly detect something like '%s %%wall clock' 
as a date spec because it contains '%w', but strptime would consider that '%' 
followed by the string 'wall'.  A subtle edge case, but worth considering.  
Maybe it needs to strip out %% first then look for the % sequences?  Or perhaps 
just do the conversion and if the Y/M/D fields are set in then decide that it 
included a date spec, or if the HMS are set then say that it has the time spec 
included?

--
nosy: +jafo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2013-02-18 Thread Berker Peksag

Berker Peksag added the comment:

New patch attached.

Changes:

* Addressed msg107402. I will update the C code if this implementation
  is correct.
* Added more tests
* Converted classmethods to staticmethods
* Removed doctests
* Updated documentation

--
nosy: +berker.peksag
Added file: http://bugs.python.org/file29117/issue1100942_v4.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2013-02-02 Thread Petre

Changes by Petre pmierlu...@cmedtechnology.com:


--
nosy: +petre

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2013-01-22 Thread Adam Collard

Changes by Adam Collard adam.coll...@gmail.com:


--
nosy: +adam-collard

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2012-11-03 Thread Mark Lawrence

Mark Lawrence added the comment:

Could someone please review this with a view to getting the patch into the 3.4 
code base, thanks.

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2012-11-03 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Juarez,

Are you planning to implement format validation as you described in msg165882?  
Without that, date.strptime() is not very useful because it is almost 
equivalent to datetime.strptime().date().

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2012-11-03 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
versions: +Python 3.4 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2012-07-20 Thread Juarez Bochi

Juarez Bochi jbo...@gmail.com added the comment:

I've updated my patch with the tests for datetime.time.strptime that were 
missing and also its pure Python implementation.

The previous diff also had some issues that I've fixed now: duplicated 
datetime.strptime method definition in c and the pure python docstring state 
that date.strpdate was a method and not a constructor.

--
Added file: http://bugs.python.org/file26445/issue1100942_pure.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2012-07-20 Thread Juarez Bochi

Changes by Juarez Bochi jbo...@gmail.com:


Removed file: http://bugs.python.org/file26440/issue1100942_pure.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2012-07-20 Thread Juarez Bochi

Juarez Bochi jbo...@gmail.com added the comment:

Sorry. I updated my patch again to fix the exception message for time.strptime 
in the pure Python version.

--
Added file: http://bugs.python.org/file26446/issue1100942_pure.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2012-07-20 Thread Juarez Bochi

Changes by Juarez Bochi jbo...@gmail.com:


Removed file: http://bugs.python.org/file26445/issue1100942_pure.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2012-07-20 Thread Juarez Bochi

Juarez Bochi jbo...@gmail.com added the comment:

I've updated the patch based on ezio.melotti and berkerpeksag reviews (thanks).

It's still missing the modifications proposed on msg107402.

--
Added file: http://bugs.python.org/file26452/issue1100942_pure2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2012-07-20 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2012-07-19 Thread Juarez Bochi

Juarez Bochi jbo...@gmail.com added the comment:

I have updated the patches since they were not applying cleanly and included a 
pure Python implementation that was missing.

It has the same issues that were mentioned on msg107402.

Do you have any suggestions? I'm planning to block the formats that are not 
allowed and raise Exceptions like suggested before:

 date.strptime('01', '%M')
...
'%M' is not valid in date format specification.

--
nosy: +Juarez.Bochi
Added file: http://bugs.python.org/file26440/issue1100942_pure.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2012-06-13 Thread Alexander Belopolsky

Alexander Belopolsky alexander.belopol...@gmail.com added the comment:

Bumping priority to get this in before beta.

--
priority: normal - high

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2011-01-11 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

New patch needed to address the issue of time.strftime() accepting %Y when year 
is 1900 and other similar oddities.  See msg107402 above.  Also a patch for 
datetime.py is needed.

--
stage: patch review - needs patch
versions: +Python 3.3 -Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2010-08-18 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Is anyone still interested in moving this forward?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2010-06-09 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

I have updated Amaury's patch for py3k.  I simplified the test for default date 
values and fixed a documentation nit. (Time fileds are [4:7], not [4:6]).  The 
result is attached as issue1100942.diff.

Note that date.strptime accepts some time specs and time.strptime accepts some 
date specs:

 time.strptime('1900', '%Y')
datetime.time(0, 0)
 date.strptime('00', '%H')
datetime.date(1900, 1, 1)

This matches the proposed documentation, but I am not sure is desirable.  
I am about +0 for making the test more robust by scanning the format string and 
rejecting date format codes in time.strptime and time format codes in date.  
This will also allow better diagnostic messages.  For example, instead of 

 date.strptime('01', '%M')
Traceback (most recent call last):
  ..
ValueError: date.strptime value cannot have a time part

we can produce '%M' is not valid in date format specification.

--
keywords: +easy, patch
Added file: http://bugs.python.org/file17599/issue1100942.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2010-05-31 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Does this need to be brought up on python-dev for acceptance?

--
nosy: +mark.dickinson
stage: unit test needed - patch review
versions: +Python 3.2 -Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2010-05-31 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

This doesn't appear to be at all controversial;  I don't think it's necessary 
to consult python-dev.  (I haven't looked at the patch, though.)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2010-05-25 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
assignee:  - belopolsky
nosy: +belopolsky -Alexander.Belopolsky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2010-04-20 Thread Alexander Belopolsky

Alexander Belopolsky alexander.belopol...@gmail.com added the comment:

I am +1 for adding these features and I have only one comment on the code:

It is documented in time.strptime() documentation that

The default values used to fill in any missing data when more accurate values 
cannot be inferred are (1900, 1, 1, 0, 0, 0, 0, 1, -1). 
 http://docs.python.org/dev/py3k/library/time.html#time.strptime

and datetime.strptime(date_string, format) is equivalent to 
datetime(*(time.strptime(date_string, format)[0:6])). according to datetime 
module documentation.

Thus, datetime.strptime(, ) returning datetime.datetime(1900, 1, 1, 0, 0) 
is not an implementation detail and there is no need to compute it in 
time_strptime.

--
nosy: +Alexander.Belopolsky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2010-04-20 Thread Alexander Belopolsky

Alexander Belopolsky alexander.belopol...@gmail.com added the comment:

BTW, it does not bother me that date.strptime() 
seems a bit odd, given that it cannot accept a time part.  To me time in 
strptime means time specification that may include date, time or even just 
month.  If parsed specification does not fit in date (includes time component), 
date.strptime fails.  There is nothing wrong with it.  An alternative would be 
to make {date,time}.strptime() promiscuous and just drop unneeded components, 
but that would make these functions less useful because such behavior is simply 
datetime.strptime(..).{date,time}().

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2009-12-02 Thread Thomas Guettler

Changes by Thomas Guettler guet...@thomas-guettler.de:


--
nosy: +guettli

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2009-06-23 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Here is an updated patch, with tests.

The only thing that bugs me is the name of the method: date.strptime() 
seems a bit odd, given that it cannot accept a time part...
OTOH 'strptime' refers to the format specification: %Y-%m-%d

--
keywords: +needs review -patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file14351/date-strptime.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2009-02-14 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

Patch needs updating.

--
nosy: +ajaksu2
stage:  - test needed
title: datetime.strptime constructor added - Add datetime.time.strptime and 
datetime.date.strptime
versions: +Python 2.7 -Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1100942
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com