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
Ivan Johansen added the comment:
Probably not. I am setting status to closed with resolution fixed.
--
resolution: -> fixed
status: pending -> closed
___
Python tracker
<http://bugs.python.org/i
Ivan Johansen added the comment:
If possible it would be nice if any module could be returned from a C
extension. Specifically I was trying to subclass module (PyModule_Type) and use
that.
But an error message is better than a crash.
--
___
Python
New submission from Ivan Johansen:
In Python/importdl.c around line 99 in the function
_PyImport_LoadDynamicModule() you can find the code:
def = PyModule_GetDef(m);
def->m_base.m_init = p;
If the module m, which is returned from a newly imported extension, is not
created
Sverre Johansen added the comment:
This is because of differences in GNU and BSD C stdlib; I get the same results
using the BSD and GNU versions of `date`.
$ date +"%q"
What does Python typically do in cases like this?
--
___
Pyth
New submission from Sverre Johansen :
There seems to be a platform difference in the way stftime handles
unknown format codes.
In OSX Python removes the percentage sign from the returned string when the
format code is unknown. In Linux it leaves it.
Look at the following example:
This is
johansen added the comment:
I haven't been able to find any of the patches listed in the comments,
but it does look like providing a nb_nonzero method in the module would
solve our issue. PyObject_IsTrue checks the tp_as_number methods before
the sequence and mapping methods. I'm n
johansen <[EMAIL PROTECTED]> added the comment:
As I said before:
check_and_flush calls ferror(3C) and then fflush(3C) on the FILE
stream associated with the file object. There's just one problem
here. If it finds an error that was previously encountered on the
file stream,
johansen <[EMAIL PROTECTED]> added the comment:
The problem is present in Python 2.4.4, the version that we're using
here. I'm not familiar with the versions keyword that's used here, but
that's the version for which I'm reporting this bug.
To be clear, the pr
Morten Lied Johansen <[EMAIL PROTECTED]> added the comment:
In my particular case, we were passing the regex on to a database which
has regex support syntactically equal to Python, so it seemed natural
to use re.escape to make sure we weren't matching against the pattern
we re
Morten Lied Johansen <[EMAIL PROTECTED]> added the comment:
One issue that the current implementation has, which I can't see have
been commented on here, is that it kills utf8 characters (and probably
every other character encoding that is multi-byte).
A é character in an utf8 enc
New submission from Morten Lied Johansen <[EMAIL PROTECTED]>:
Currently, running pydoc on a module will show you the documentation on
all regular methods, and all special methods (starting and ending in
double underscores).
Private methods (starting with a single underscore) are not in
johansen <[EMAIL PROTECTED]> added the comment:
Yes, True/False should be sufficient for our purposes. IIRC, we were
trying to determine if we had a stale handle to the database and needed
to open it again.
___
Python tracker <[EMAIL PROTECTE
New submission from johansen <[EMAIL PROTECTED]>:
We're using Python to build the new packaging system for OpenSolaris.
Yesterday, a user reported that when they ran the pkg command, piped the
output to grep, and then typed ^C, sometimes they'd get this error:
$ pkg list | gre
New submission from johansen:
We've been using Python 2.4 to build the new package management software
for OpenSolaris. We use a ndbm database to hold keywords about
packages, and found that each time we added a new OpenSolaris build to
our package repository, the time to import would inc
21 matches
Mail list logo