Dave Johansen added the comment:
I can't. I just know that I'm running this process and this crash happens. Any
recommendations on how to diagnose that?
--
___
Python tracker
<https://bugs.python.o
New submission from Dave Johansen :
We're using SQLAlchemy 1.3.10 with pyodbc 4.0.27 in the python:3.7.5-alpine
docker image to connect to a MySQL 13.0.5026.0 database and it's crashing with
the following error:
python: malloc.c:2406: sysmalloc: Assertion `(old_top == initi
New submission from Dave Johansen :
Using LoggerAdapter is a convenient way to add extra info to all logs, but it
doesn't have the fatal() method like Logger, so it isn't a drop in replacement
like it should be.
--
components: Library (Lib)
messages: 343941
nosy: Dav
Dave Johansen added the comment:
Ok, so I understand the issue now. `timestamp()` for naive datetime instances
applies the local timezone offset (
https://docs.python.org/3.6/library/datetime.html#datetime.datetime.timestamp
). This is surprising because naive datetime instances usually are
Dave Johansen added the comment:
The use case was parsing user input of ISO 8601 date strings and converting
them to UNIX epochs. The input "0001-01-01T00:00:00" is valid, parses to a
valid `datetime` and it seems like a reasonable expectation that all of the
functions should work
Dave Johansen added the comment:
That's a valid `datetime` (i.e. within the min and max values) and `tzinfo` is
`None` so I think it's completely reasonable to assume that `timestamp()` will
return the correct value.
--
___
Python trac
New submission from Dave Johansen:
This worked in Python 3.6.0 and before:
```
from datetime import datetime
d = datetime(1, 1, 1, 0, 0, 0)
d.timestamp()
```
The error output is:
```
ValueError: year 0 is out of range
```
But it used to return `-62135658000.0`.
Appears to be related to https