[issue38665] Crash when running SQLAlchemy with pyodbc

2019-11-04 Thread Dave Johansen
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

[issue38665] Crash when running SQLAlchemy with pyodbc

2019-11-01 Thread Dave Johansen
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

[issue37092] LoggerAdapter doesn't have fatal() like Logger

2019-05-29 Thread Dave Johansen
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

[issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp

2017-08-16 Thread Dave Johansen
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

[issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp

2017-08-16 Thread Dave Johansen
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

[issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp

2017-08-16 Thread Dave Johansen
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

[issue31212] min date can't be converted to timestamp

2017-08-15 Thread Dave Johansen
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

[issue18426] Crash when extension does not use PyModule_Create()

2013-10-22 Thread Ivan Johansen
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

[issue18426] Crash when extension does not use PyModule_Create()

2013-07-11 Thread Ivan Johansen
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

[issue18426] Crash when extension does not use PyModule_Create()

2013-07-10 Thread Ivan Johansen
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

[issue9811] strftime strips '%' from unknown format codes on OS X

2010-09-09 Thread Sverre Johansen
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

[issue9811] strftime strips '%' from unknown format codes on OS X

2010-09-09 Thread Sverre Johansen
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

[issue2159] dbmmodule inquiry function is performance prohibitive

2009-01-28 Thread johansen
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

[issue3014] file_dealloc() assumes errno is set when EOF is returned

2008-08-28 Thread johansen
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,

[issue3014] file_dealloc() assumes errno is set when EOF is returned

2008-08-28 Thread johansen
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

[issue2650] re.escape should not escape underscore

2008-06-28 Thread Morten Lied Johansen
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

[issue2650] re.escape should not escape underscore

2008-06-26 Thread Morten Lied Johansen
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

[issue3196] Option in pydoc to show docs from private methods

2008-06-25 Thread Morten Lied Johansen
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

[issue2159] dbmmodule inquiry function is performance prohibitive

2008-06-12 Thread johansen
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

[issue3014] file_dealloc() assumes errno is set when EOF is returned

2008-05-30 Thread johansen
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

[issue2159] dbmmodule inquiry function is performance prohibitive

2008-02-21 Thread johansen
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