[issue10811] sqlite segfault with generators

2012-02-03 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: It seems to me that the fix still needs to be backported to 3.2 and 2.7. -- nosy: +petri.lehtinen status: pending - open versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue13445] Enable linking the module pysqlite with Berkeley DB SQL instead of SQLite

2012-02-03 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Is it possible to compile pysqlite so that it links with both, or so that the linking type can be changed at run time? I'm -1 on adding a compile-time option to switch the storage backend to Python itself, but a runtime flag or a separate

[issue9750] sqlite3 iterdump fails on column with reserved name

2012-02-03 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9750 ___ ___ Python-bugs-list

[issue13299] namedtuple row factory for sqlite3

2012-02-03 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13299 ___ ___ Python-bugs-list

[issue13124] Add Running a Build Slave page to the devguide

2012-02-03 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Antoine Pitrou rep...@bugs.python.org wrote: I'm sure some admins will prefer using their system's packages (I think buildbot is packaged for Debian/Ubuntu, I see it in Mageia's packages, not sure about Fedora). Yes, certainly. I had

[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-03 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Patch version 10: - deprecate os.stat_float_times() - fix docstring of os.*stat() functions - add a reference to the PEP - add a comment to indicate that _PyTime_gettimeofday() ignores integer overflow -- Added file:

[issue13928] bug in asyncore.dispatcher_with_send

2012-02-03 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: why is a not connected connection writable? A non connected socket must be writable in order to connect. if we call dispatcher.connect() immediately after .connect(), socket error 10057 may be raised, Not sure what you mean here.

[issue13892] distutils handling of windows manifest isn't optimal

2012-02-03 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +mhammond ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13892 ___ ___ Python-bugs-list mailing

[issue13763] Potentially hard to understand wording in devguide

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I like the result, thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13763 ___ ___

[issue13846] Add time.monotonic() function

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I don’t understand why this new function would be useful. Time-related modules in Python are already complicated. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org

[issue13850] Summary tables for argparse add_argument options

2012-02-03 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13850 ___ ___ Python-bugs-list

[issue13851] Packaging distutils2 for Fedora

2012-02-03 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- resolution: - invalid stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13851 ___

[issue13846] Add time.monotonic() function

2012-02-03 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: If you are trying to time something (an interval), having the time go backward can really screw up your data. And that *will* happen on a system that is running NTP (or even just resets its time). monotonic clocks were introduced at

[issue13861] test_pydoc failure

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I have the same one on Debian testing: == FAIL: test_apropos_with_bad_package (test.test_pydoc.PydocImportTest)

[issue13865] distutils documentation says Extension has optional argument

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: It was me who ported that doc change from 3.2, but distutils in 2.7 does not provide that feature. Thanks for catching it, I’ll revert the commit when I get the chance. -- nosy: +eric.araujo ___

[issue13865] distutils documentation says Extension has optional argument

2012-02-03 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- assignee: docs@python - eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13865 ___ ___

[issue13866] {urllib, urllib.parse}.urlencode should not use quote_plus

2012-02-03 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13866 ___ ___ Python-bugs-list

[issue13889] str(float) and round(float) issues with FPU precision

2012-02-03 Thread Samuel Iseli
Samuel Iseli samuel.is...@gmail.com added the comment: I would definitely classify this as a bug in Python 2.7 as it breaks backwards-compatibility for embedding environments that default to 64bit FPU precision (e.g. Delphi). Additionally the bug is very hard to detect and leads to wrong

[issue13875] cmd: no user documentation

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: +1 to expanding the introduction. Do you have a phrasing suggestion? MOTW links are a more global issue that was discussion on python-dev (I forget the outcome, but I think it was no). IIRC it was on python-ideas, and (among other criticisms

[issue13875] Improve description of cmd module

2012-02-03 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- resolution: works for me - stage: - needs patch title: cmd: no user documentation - Improve description of cmd module ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13875

[issue13605] document argparse's nargs=REMAINDER

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: It would be best if the 3.x docs did not use a print statement wink. The code block should also be preceded by ::. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org

[issue13879] Argparse does not support subparser aliases in 2.7

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Agreed, this looks like a doc glitch. -- assignee: - docs@python components: +Documentation -Library (Lib) nosy: +docs@python, eric.araujo, ezio.melotti ___ Python tracker rep...@bugs.python.org

[issue13833] No documentation for PyStructSequence

2012-02-03 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo stage: - patch review versions: +Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13833 ___

[issue1625] bz2.BZ2File doesn't support multiple streams

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: As the bug/feature judgment is not easy to make, I think python-dev should be asked. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1625

[issue13846] Add time.monotonic() function

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks, now I see the usefulness. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13846 ___ ___

[issue13799] Base 16 should be hexadecimal in Unicode HOWTO

2012-02-03 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13799 ___ ___ Python-bugs-list

[issue13770] python3 json: add ensure_ascii documentation

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: FTR I’ve fixed this and now need to find a place with SSH access so I can push. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13770 ___

[issue2945] bdist_rpm does not list dist files (should effect upload)

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: FYI I have committed the patch to my repo and will push as soon as I can. -- assignee: tarek - eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2945

[issue13815] tarfile.ExFileObject can't be wrapped using io.TextIOWrapper

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Please always use explicit roles in reST, i.e. :meth:`flush` instead of `flush` (use ``flush`` when you don’t want a ton of identical links). In the test, using assertEqual instead of assertTrue will certainly give more useful output in case of

[issue13824] argparse.FileType opens a file and never closes it

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Additionally, there is no way to prevent FileType from clobbering an existing file when used with write mode. I think this deserves its own feature request: now that Python 3.3 has an “exclusive create” mode, argparse.FileType could gain

[issue13826] Having a shlex example in the subprocess.Popen docs is confusing

2012-02-03 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13826 ___ ___ Python-bugs-list

[issue13830] codecs error handler is called with a UnicodeDecodeError with the same args

2012-02-03 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +haypo, lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13830 ___ ___ Python-bugs-list

[issue13824] argparse.FileType opens a file and never closes it

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: s/sure was/sure way/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13824 ___ ___

[issue13771] HTTPSConnection __init__ super implementation causes recursion error

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Hi, wsgi_intercept has overridden http.client.HTTPSConnection with a class that subclasses HTTPSConnection and overrides a few methonds. Do you mean that the module is monkey-patched? Fix the issue in http/client.py:1074 by replacing

[issue13773] Support sqlite3 uri filenames

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Should I also rewrap modified lines that were already much too long? Please don’t, it would make the diff harder to read. I also noticed fixed an unrelated typo in Lib/sqlite3/test/hooks.py... Can you open a bug report for that? I think the

[issue13807] logging.Handler.handlerError() may raise AttributeError in traceback.print_exception()

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: As said on python-checkins/-dev, this bug fix should be reverted in 3.1 (in security mode). -- nosy: +eric.araujo versions: -Python 2.6, Python 3.1, Python 3.4 ___ Python tracker

[issue13889] str(float) and round(float) issues with FPU precision

2012-02-03 Thread Samuel Iseli
Samuel Iseli samuel.is...@gmail.com added the comment: There's an excess space after a line continuation backslash in my last patch, so it doesn't compile (pyport.h, line 567). Here's an additional patch that removes the space. Didn't find out how to combine the 2 revisions in one patch-file...

[issue13931] os.path.exists inconsistent between 32 bit and 64 bit

2012-02-03 Thread zxw
New submission from zxw eeyore@gmail.com: When I run the following line while the 32 bit version of python is installed it returns false, however with the 64 bit version it correctly returns true. os.path.exists('C:\\Windows\\System32\\msg.exe') I'm using Python 2.7.2 with Windows 7

[issue13932] If some test module fails to import another module unittest reports a very misleading message

2012-02-03 Thread Sébastien Barthélémy
New submission from Sébastien Barthélémy barthel...@crans.org: If some test module (say, testmath) fails to import some other module, unittest reports a very misleading message: AttributeError: 'module' object has no attribute 'testmath' Would it be possible improve the message or, better,

[issue13777] socket: communicating with Mac OS X KEXT controls

2012-02-03 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: The patch fails to apply in configure.in. Can you please regenerate it? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13777

[issue13931] os.path.exists inconsistent between 32 bit and 64 bit

2012-02-03 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: This is the Windows x64 file system redirector at work. I can't get through to msdn at the moment to get a link, but Google for those terms. -- nosy: +tim.golden ___ Python tracker

[issue13830] codecs error handler is called with a UnicodeDecodeError with the same args

2012-02-03 Thread Walter Dörwald
Walter Dörwald wal...@livinglogic.de added the comment: See this ancient posting about this problem: http://mail.python.org/pipermail/python-dev/2002-August/027661.html (see point 4.). So I guess somebody did finally complain! ;) The error attributes are documented in PEP 293. The

[issue13777] socket: communicating with Mac OS X KEXT controls

2012-02-03 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Also: Can you propose test cases for this socket family? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13777 ___

[issue13824] argparse.FileType opens a file and never closes it

2012-02-03 Thread David Layton
David Layton dmlay...@gmail.com added the comment: Eric, checked that the file exists But then you’d run into race conditions. The only sure was to say if a file can be opened is to open it. I think you misunderstand me. I am NOT suggesting that you open and close the file. I am saying

[issue13933] IDLE:not able to complete the hashlib module

2012-02-03 Thread Ramchandra Apte
New submission from Ramchandra Apte maniandra...@gmail.com: No completion appears when I import hashlib in IDLE and type in hashlib. and press Tab to complete. With any other module it works. -- components: IDLE, Library (Lib) messages: 152531 nosy: ramchandra.apte priority: normal

[issue13861] test_pydoc failure

2012-02-03 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Eric Araujo rep...@bugs.python.org wrote: docutils is the first package that???s found in my user site-packages; can you tell if your Crypto package is in that same location? The package is here:

[issue13861] test_pydoc failure

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Adding Ned, who refactored these tests, to nosy. -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13861 ___

[issue11104] distutils sdist ignores MANIFEST

2012-02-03 Thread John Dennis
John Dennis jden...@redhat.com added the comment: The changesets are not in the release27-maint branch. sdist still does not generate a correct archive for release, this is a very serious regression. -- resolution: fixed - status: closed - open ___

[issue11104] distutils sdist ignores MANIFEST

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: The changesets are not in the release27-maint branch. Where did you look? This looks like a Subversion branch name, but now we’re using Mercurial. If you look a few messages up, you’ll see that a changeset was committed to the 2.7 branch and

[issue11104] distutils sdist ignores MANIFEST

2012-02-03 Thread Stephen Thorne
Stephen Thorne step...@thorne.id.au added the comment: Yep - 2.7.2 was released 11th June 2011, the fix was committed Aug 1st 2011. So it won't be in the current 2.7 release. -- ___ Python tracker rep...@bugs.python.org

[issue11104] distutils sdist ignores MANIFEST

2012-02-03 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Obviously I can’t fix past releases. Sometimes the time machine is not available :) -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue13777] socket: communicating with Mac OS X KEXT controls

2012-02-03 Thread Michael Goderbauer
Michael Goderbauer cont...@m-goderbauer.de added the comment: Here is the regenerated patch. To write a test case I would need a PF_SYSTEM socket to connect to. As far as I know Mac OS X doesn't provide a demo socket for this. -- Added file:

[issue13777] socket: communicating with Mac OS X KEXT controls

2012-02-03 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset aa3680d2c24d by Martin v. Löwis in branch 'default': Issue #13777: Add PF_SYSTEM sockets on OS X. http://hg.python.org/cpython/rev/aa3680d2c24d -- nosy: +python-dev ___

[issue13777] socket: communicating with Mac OS X KEXT controls

2012-02-03 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Thanks for the patch. Committed with an additional fix in refcounting. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13777

[issue13889] str(float) and round(float) issues with FPU precision

2012-02-03 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: General shape of the patch looks good. I'd suggest using a mask of _MCW_PC | _MCW_RC instead of just _MCW_PC, so that the rounding mode is also set correctly. Probably rarely an issue in practice, but it's the same thing that we're doing

[issue13889] str(float) and round(float) issues with FPU precision

2012-02-03 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- components: +Windows stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13889 ___

[issue13931] os.path.exists inconsistent between 32 bit and 64 bit

2012-02-03 Thread zxw
zxw eeyore@gmail.com added the comment: Ok, thanks, that fixed it. I'll probably post some example code for anyone else who stumbles across this with the same problem, don't have the time right now however. -- status: open - closed ___ Python

[issue13931] os.path.exists inconsistent between 32 bit and 64 bit

2012-02-03 Thread Brian Curtin
Changes by Brian Curtin br...@python.org: -- resolution: - invalid stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13931 ___

[issue13463] Fix parsing of package_data

2012-02-03 Thread Nick Wilson
Changes by Nick Wilson n...@njwilson.net: -- nosy: +njwilson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13463 ___ ___ Python-bugs-list mailing

[issue6210] Exception Chaining missing method for suppressing context

2012-02-03 Thread Ethan Furman
Ethan Furman et...@stoneleaf.us added the comment: Because Ellipsis is now the default value for __cause__, 'raise ... from Ellipsis' is treated the same as 'raise ...' Not exactly true -- if ... is a new exception then they are the same; if ... is a caught exception that is being reraised,

[issue13124] Add Running a Build Slave page to the devguide

2012-02-03 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: No problem, Stefan. :) The main motivation was to capture the discussion at the time so that something actually came of it. Adding info to the devguide, essentially the catalog/how-to of core dev activities, was meant to simply

[issue13879] Argparse does not support subparser aliases in 2.7

2012-02-03 Thread Tim Willis
Tim Willis schadenfreude...@gmail.com added the comment: The documentation appears to be up to date in the current 2.7 repository, so this can probably be marked as closed/fixed. -- ___ Python tracker rep...@bugs.python.org

[issue13807] logging.Handler.handlerError() may raise AttributeError in traceback.print_exception()

2012-02-03 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 813a34170ac5 by Vinay Sajip in branch '3.1': Revert fix for #13807 mistakenly applied in this branch. http://hg.python.org/cpython/rev/813a34170ac5 -- ___ Python tracker

[issue13930] lib2to3 ability to output files into a different directory and alter their names

2012-02-03 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: while the initial patch below was against 3.1 I'm only intending to commit this to 3.2, 3.3 and 2.7. Feature backports on lib2to3 are allowed per http://mail.python.org/pipermail/python-dev/2011-December/115089.html. -- nosy:

[issue13930] lib2to3 ability to output files into a different directory and alter their names

2012-02-03 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: Added file: http://bugs.python.org/file24411/a6cd0518495e.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13930 ___

[issue13934] sqlite3 test typo

2012-02-03 Thread poq
New submission from poq p...@gmx.com: The test CheckCollationIsUsed in Lib/sqlite3/test/hooks.py never runs because it checks the wrong version tuple. Patch attached. -- components: Tests files: sqlite3-test-hooks.patch keywords: patch messages: 152548 nosy: poq priority: normal

[issue13773] Support sqlite3 uri filenames

2012-02-03 Thread poq
poq p...@gmx.com added the comment: Can you open a bug report for that? Opened #13934. I think the doc could link to the sqlite.org doc about URIs. I considered this, but the rest of the sqlite3 module documentation doesn't link to the sqlite.org doc pages either. There is only a link to

[issue13935] Tarfile - Fixed GNU tar header base-256 handling

2012-02-03 Thread Oskar Wycislak
New submission from Oskar Wycislak canto...@gmail.com: On line 199 in tarfile.py comparison should be done without chr() because s[0] is an integer. Also on line 208 there should be no ord() for the same reason. I think this is fixed in Python 3.3 I'm sorry for not providing a patch but it's

[issue1625] bz2.BZ2File doesn't support multiple streams

2012-02-03 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: In fact, you can create those files from python, files that python can not unpack later. Really? How so? BZ2File only started accepting the a mode in 3.3 (thanks to Nir's patch for this issue, actually). If the refusal of backporting

[issue12142] Reference cycle when importing ctypes

2012-02-03 Thread poq
poq p...@gmx.com added the comment: I've attached a patch for the _array_type change. The long double fix is probably dependent on PEP3118 (#3132). -- keywords: +patch Added file: http://bugs.python.org/file24413/ctypes-leak.patch ___ Python tracker

[issue12993] prepared statements in sqlite3 module

2012-02-03 Thread poq
poq p...@gmx.com added the comment: This can be closed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12993 ___ ___ Python-bugs-list mailing

[issue12142] Reference cycle when importing ctypes

2012-02-03 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12142 ___ ___ Python-bugs-list

[issue13124] Add Running a Build Slave page to the devguide

2012-02-03 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Eric Snow rep...@bugs.python.org wrote: Incidentally, the second patch is a bit cleaner than the first. Yes, indeed it is. :) To prevent a misunderstanding: In my last mail I was talking about the Build Slaves and Security additions to:

[issue6210] Exception Chaining missing method for suppressing context

2012-02-03 Thread Ethan Furman
Ethan Furman et...@stoneleaf.us added the comment: I just noticed that no one is assigned to this issue -- anybody on the nosy list able to review? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6210

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

2012-02-03 Thread Lakin Wecker
New submission from Lakin Wecker lakin.wec...@gmail.com: midnight is represented by datetime.time(0,0,0). However, this time (unlike all other valid times, including datetime.time(0,0,1)) evalutes to false in if conditions: import datetime if datetime.time(0,0,0): print

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

2012-02-03 Thread Lakin Wecker
Lakin Wecker lakin.wec...@gmail.com added the comment: I'm updating the versions to the ones that I've actually tried it on - this is not an exhaustive search at this point. -- versions: +Python 2.6, Python 2.7 ___ Python tracker

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

2012-02-03 Thread Lakin Wecker
Changes by Lakin Wecker lakin.wec...@gmail.com: -- components: +Library (Lib) type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13936 ___

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

2012-02-03 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I don't think I would have ever thought of testing a datetime for its truth value. But the behavior you observe is consistent with the rest of Python: 0 is false. I wonder if this is by design or by accident. -- nosy:

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

2012-02-03 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13936 ___ ___

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

2012-02-03 Thread Lakin Wecker
Lakin Wecker lakin.wec...@gmail.com added the comment: Right. I've updated my code to be more correct: instead of: if not start_time: start_time = default_time it now reads: if start_time is None: start_time = default_time which operates correctly and works fine for my case, I just

[issue5300] build_module faulre

2012-02-03 Thread Patrick Andrew
Changes by Patrick Andrew pand...@isilon.com: -- components: +Distutils -Distutils2 title: Distutils ignores file permissions - build_module faulre versions: +Python 2.7 -3rd party ___ Python tracker rep...@bugs.python.org

[issue5300] build_module failure

2012-02-03 Thread Patrick Andrew
Changes by Patrick Andrew pand...@isilon.com: -- title: build_module faulre - build_module failure ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5300 ___

[issue5300] distutils ignores file permissions

2012-02-03 Thread Patrick Andrew
Changes by Patrick Andrew pand...@isilon.com: -- components: +Distutils2 -Distutils nosy: +alexis title: build_module failure - distutils ignores file permissions versions: +3rd party -Python 2.7 ___ Python tracker rep...@bugs.python.org

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

2012-02-03 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: It must be by design -- someone has implemented a __bool__ (formerly __nonzero__) method; otherwise all objects would be true. -- nosy: +georg.brandl, lemburg ___ Python tracker rep...@bugs.python.org

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

2012-02-03 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: BTW, being a valid time is not a good argument: 0, or False are all valid instances of their types. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13936

[issue12993] prepared statements in sqlite3 module

2012-02-03 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12993 ___

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

2012-02-03 Thread Alexander Belopolsky
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: This is by design. I don't have a reference, but I do remember this being discussed. Suggestions for improving the documentation are welcome. -- ___ Python tracker

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

2012-02-03 Thread Tim Peters
Tim Peters tim.pet...@gmail.com added the comment: From the docs, at: http://docs.python.org/library/datetime.html#time-objects in Boolean contexts, a time object is considered to be true if and only if, after converting it to minutes and subtracting utcoffset() (or 0 if that’s None), the

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

2012-02-03 Thread Lakin Wecker
Lakin Wecker lakin.wec...@gmail.com added the comment: Although I find it odd, you are all correct. It is documented. (I don't know how I missed that when I read those docs looking for that exact documentation). It is consistent with the rest of python. Do I close this? Do you guys? I'm

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

2012-02-03 Thread Tim Peters
Tim Peters tim.pet...@gmail.com added the comment: It is odd, but really no odder than zero values of other types evaluating to false in Boolean contexts ;-) Closing as invalid. -- resolution: - invalid status: open - closed ___ Python tracker

[issue13937] multiprocessing.ThreadPool.join() blocks indefinitely.

2012-02-03 Thread Ben Timby
New submission from Ben Timby bti...@gmail.com: If you instantiate a ThreadPool, then call map() with an empty list, the join() method will block indefinitely on self._result_handler.join() $ python from multiprocessing.pool import ThreadPool t = ThreadPool(1) t.map_async(lambda x: x, [])

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

2012-02-03 Thread Lakin Wecker
Lakin Wecker lakin.wec...@gmail.com added the comment: Yeah - good point, and I agree. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13936 ___

[issue13861] test_pydoc failure

2012-02-03 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e5f2c04055a2 by Ned Deily in branch '2.7': Issue #13861: Prevent test_apropos* test case failures in test_pydoc. http://hg.python.org/cpython/rev/e5f2c04055a2 New changeset 5eb47e1732a0 by Ned Deily in branch '3.2':

[issue13861] test_pydoc failure

2012-02-03 Thread Ned Deily
Ned Deily n...@acm.org added the comment: For the as-yet unreleased changes for Issue7425, I added some test cases for pydoc -k (apropos) and chose a keyword of nothing, a keyword which has no hits in the standard library. Unfortunately, you both installed third-party packages that *do* have

[issue13926] pydoc - stall when requesting a list of available modules in the online help utility

2012-02-03 Thread Ned Deily
Ned Deily n...@acm.org added the comment: Jeroen, if you try running help() from a command-line python2.7, rather than in IDLE, what results do you get? Most likely, Python will crash there and there should be an exception and traceback printed, in which case the problem has nothing to do

[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-03 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Even if some people dislike the idea of adding datetime.datetime type, here is a patch implementing it (it requires time_decimal-XX.patch). The patch is at least a proof-of-concept that it is possible to change the internal

[issue13926] pydoc - stall when requesting a list of available modules in the online help utility

2012-02-03 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- superseder: Clarify sentence in tutorial - help(modules) executes module code ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13926 ___

[issue13926] pydoc - stall when requesting a list of available modules in the online help utility

2012-02-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: digit transposition corrected 12902 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13926 ___

[issue13830] codecs error handler is called with a UnicodeDecodeError with the same args

2012-02-03 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Codec encoders reuse the same exception object for speed, but set some attributes (start, end and reason). Recreate the args tuple each time that a attribute is set. UnicodeEncodeError and UnicodeDecodeError should maybe override

[issue12955] urllib.request example should use with ... as:

2012-02-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Senthil: http://docs.python.org/dev/library/contextlib.html#contextlib.closing currently has this example: from urllib.request import urlopen with closing(urlopen('http://www.python.org')) as page: which is misleading in that the object

  1   2   >