[issue40771] python3 fromtimestamp generates OSError

2020-05-25 Thread Jim Carroll
New submission from Jim Carroll : We encountered an interesting mtime problem in the field, that I believe represents a bug in python's datetime timestamp handling. A file stored on a windows server had the last-modified date '1/1/4501' (that's the year 4501). os.path.getmtime() returns a val

[issue40771] python3 fromtimestamp generates OSError

2020-05-25 Thread SilentGhost
SilentGhost added the comment: You seem to have read the docs, so I'm a bit confused why you think that is a bug. According to https://docs.python.org/3/library/datetime.html#datetime.datetime.fromtimestamp > fromtimestamp() may raise OverflowError, if the timestamp is out of the range > of

[issue40771] python3 fromtimestamp generates OSError

2020-05-26 Thread Jim Carroll
Jim Carroll added the comment: My bad. I read the docs, but mistakenly believed platform support meant OS. I figured since Windows maketh then Windows should taketh. I've spent the day studying the _datetimemodule.c code and now realize my error. Question -- it seems to me an unnecessary lim

[issue40771] python3 fromtimestamp generates OSError

2020-05-26 Thread SilentGhost
SilentGhost added the comment: I think I would have to leave judgement on that to core developers. This, if accepted, would be a candidate for 3.10. -- versions: +Python 3.10 -Python 3.8 ___ Python tracker