[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2014-03-04 Thread Andreas Pelme

Andreas Pelme added the comment:

I agree with Danilo and Shai -- this behavior very surprising. I deal with 
datetimes a lot, and this bug has bitten me a number of times.

I cannot really think of a single case where if timeobj: is useful with the 
current behavior. It results in a check for is timeobj midnight or false?

Would that ever be useful in practice? If you are indeed checking for midnight, 
surely if timeobj == time(0, 0): would be the most explicit and obvious way 
to do it?

--
nosy: +Andreas.Pelme

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



[issue5033] setup.py crashes if sqlite version contains 'beta'

2013-02-23 Thread Andreas Pelme

Andreas Pelme added the comment:

This bug still exists in 2.7 and 3.4.

If SQLITE_VERSION in sqlite3.h (/usr/include/sqlite3.h on Mac OS) ends with 
beta, such as
 
#define SQLITE_VERSION3.7.12beta

make will fail.

The regex changed suggested above fixes this. The attached patch contains that 
fix and makes the build work.

--
keywords: +patch
nosy: +Andreas.Pelme
Added file: http://bugs.python.org/file29171/issue5033.patch

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



[issue17176] Document imp.NullImporter is NOT used anymore by import

2013-02-23 Thread Andreas Pelme

Andreas Pelme added the comment:

This seems like an oversight from

http://bugs.python.org/issue15473

The release notes for 3.3 added a note about this:
Because None is now inserted into sys.path_importer_cache, if you are clearing 
out entries in the dictionary of paths that do not have a finder, you will need 
to remove keys paired with values of None and imp.NullImporter to be 
backwards-compatible. This will lead to extra overhead on older versions of 
Python that re-insert None into sys.path_importer_cache where it repesents the 
use of implicit finders, but semantically it should not change anything.

But the relevant docs for NullImporter 
(http://docs.python.org/2/library/imp.html#imp.NullImporter) and 
sys.path_importer_cache 
(http://docs.python.org/2/library/sys.html#sys.path_importer_cache) did not get 
updated.

We have verified that the release notes in 3.4 is correct, and NullImporter is 
never used.

We are however not sure about the correct wording for the documentation fix.

--
nosy: +Andreas.Pelme

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