[issue9012] Separate compilation of time and datetime modules

2010-07-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: What about PC/VS7.1/pythoncore.vcproj? Is there some automation in place to keep the project files in sync? ISTM, all the info to generate these should be in setup.py. The patch looks good, but I am hesitant to commit changes that I cannot test.

[issue9324] signal.signal(bogus_signal, handler) segfaults on Windows

2010-07-21 Thread Dave Fugate
New submission from Dave Fugate : Using Python 2.7 (r27:82525, Jul 4 2010, 09:01:59; 32-bit Intel) on 64-bit Windows Server 2008 R2, python.exe (interactive sessions and files) crashes when it encounters the following snippet: >>> import signal >>> signal.signal(7, lambda a, b: None) Note that

[issue9079] Make gettimeofday available in time module

2010-07-21 Thread Brian Curtin
Brian Curtin added the comment: I won't have time to review this, but I can say issue9079b.diff works fine on Windows. -- ___ Python tracker ___

[issue9324] signal.signal(bogus_signal, handler) segfaults on Windows

2010-07-21 Thread Brian Curtin
Changes by Brian Curtin : -- components: +Extension Modules, Windows nosy: +brian.curtin stage: -> unit test needed versions: +Python 3.2 ___ Python tracker ___ _

[issue4510] ValueError for list.remove() not very helpful

2010-07-21 Thread Tim Lesher
Tim Lesher added the comment: This patch combines the fix from Georg Brandl's original patch with the fix made to listindex. The r76058 fix fails the test in Georg's original test where the repr of the item to be removed itself raises; this patch handles that case for both list.remove and li

[issue9324] signal.signal(bogus_signal, handler) segfaults on Windows

2010-07-21 Thread Tim Lesher
Tim Lesher added the comment: This appears to run afoul of Microsoft's "security-enhanced CRT", which aborts a program that calls certain API functions (including signal) with invalid parameters. PyOS_getsig() has conditionally-compiled code added to deal with this (and handle invalid sign

[issue8035] urllib.request.urlretrieve hangs

2010-07-21 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: 2010/7/21 Amaury Forgeot d'Arc > > Amaury Forgeot d'Arc added the comment: > > This URL does not seem to return a 302 code. Is there another example? There are probably many of them, but a simple way to reproduce it could be to use netcat on your mac

[issue9012] Separate compilation of time and datetime modules

2010-07-21 Thread Tim Lesher
Tim Lesher added the comment: No, there's no automated way to keep "legacy" Windows toolchains in sync; short of adopting something like Scons or CMAKE (which I'm *not* suggesting) I don't think I've seen a trustworthy way of doing so. The PCBuild's "readme.txt" states: "You can find build d

[issue9012] Separate compilation of time and datetime modules

2010-07-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Jul 21, 2010 at 3:58 PM, Tim Lesher wrote: .. > To date, I believe that the attitude toward these older build files has been > "unsupported; use at own risk; patches welcome". > OK, I guess there is little risk in committing this patch. I'll do

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2010-07-21 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : The -m interpreter option allows one to run library module as a script, but if you want to debug, profile or trace the execution of the same, you must supply the path to the module source file on the command line. The resulting execution may also be

[issue9213] range purports to implement the Sequence ABC, but is missing index and count methods

2010-07-21 Thread Daniel Urban
Daniel Urban added the comment: The attached patch adds the range.count and range.index methods. Pseudocode for the two method: def count(self, ob): if ob in self: return 1 else: return 0 def index(self, ob, start=0, stop=len(self)): if ob in self: idx = (ob

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2010-07-21 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue9324] signal.signal(bogus_signal, handler) segfaults on Windows

2010-07-21 Thread Brian Curtin
Brian Curtin added the comment: issue9324.diff checks the signal value after argument parsing and before sending it onward towards the system call. It only lets you use the following signals, per http://msdn.microsoft.com/en-us/library/xdkz3x12.aspx SIGABRT SIGFPE SIGILL SIGINT SIGSEGV SIGTER

[issue9324] signal.signal(bogus_signal, handler) segfaults on Windows

2010-07-21 Thread Brian Curtin
Brian Curtin added the comment: Oops, note to myself that there's a long line in signalmodule.c. -- ___ Python tracker ___ ___ Python-

[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True

2010-07-21 Thread Berwyn
Berwyn added the comment: I think this should be documented more clearly rather than just rejected. It keeps causing various people grief. David Fraser's post would be good documentation. -- status: pending -> open ___ Python tracker

[issue9213] range purports to implement the Sequence ABC, but is missing index and count methods

2010-07-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +gvanrossum, mark.dickinson, rhettinger stage: unit test needed -> patch review versions: -Python 2.6, Python 2.7, Python 3.1 ___ Python tracker

[issue9326] Error message for incorrect number of (function) args is incorrect

2010-07-21 Thread Dave Fugate
New submission from Dave Fugate : The error message below should state something along the lines of "f() takes at least 1 non-keyword argument (0 given)". Regardless, this is a regression from 2.6 which would have emitted "f() takes at least 1 argument (0 given)" which while not perfect, is a

[issue9326] Error message for incorrect number of (function) args is incorrect

2010-07-21 Thread Dave Fugate
Dave Fugate added the comment: Actually CPython 2.6 emits precisely what I'd expect: D:\rft\vsl\dlr\Languages\IronPython\Tests>26 Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def

[issue9012] Separate compilation of time and datetime modules

2010-07-21 Thread Tim Lesher
Changes by Tim Lesher : Removed file: http://bugs.python.org/file18107/add_time_to_vc8_build.diff ___ Python tracker ___ ___ Python-bugs-list m

[issue9012] Separate compilation of time and datetime modules

2010-07-21 Thread Tim Lesher
Changes by Tim Lesher : Added file: http://bugs.python.org/file18113/add_time_to_vc8_build.diff ___ Python tracker ___ ___ Python-bugs-list mai

[issue8293] HTTPSConnection.close() does not immediately close the connection.

2010-07-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Works fine here under Linux, with 3.2, 2.6 and 2.7. HTTPS connections actually get recycled quicker than plain HTTP ones. Please note that your results could also depend on the behaviour of the target server. I tested against http://linuxfr.org. -- no

[issue8293] HTTPSConnection.close() does not immediately close the connection.

2010-07-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Works fine under a Windows XP VM too. -- resolution: out of date -> works for me status: open -> pending ___ Python tracker ___

[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception.

2010-07-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: Guido: "Hm. I wonder if os.mkdir() should not be left alone (so as to continue to match the system call most exactly, as is our convention) and the extra functionality added to os.makedirs() only." Sticking with that convention seems like a good idea. That wo

[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True

2010-07-21 Thread Stefan Krah
Stefan Krah added the comment: I find this particular section one of the most clear sections in the whole Python documentation: "On Unix, with shell=True: If args is a string, it specifies the command string to execute through the shell. This means that the string must be formatted exactly as

[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True

2010-07-21 Thread Berwyn
Berwyn added the comment: Good point, Stefan. In hindsight my issue was probably more with understanding how the sh command line works rather than how python works. -- status: pending -> open ___ Python tracker _

[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True

2010-07-21 Thread Stefan Krah
Stefan Krah added the comment: I'm glad you agree. Closing this now. -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-21 Thread Greg Brockman
Greg Brockman added the comment: > I thought the EOF errors would take care of that, at least this has > been running in production on many platforms without that happening. There are a lot of corner cases here, some more pedantic than others. For example, suppose a child dies while holding th

[issue4510] ValueError for list.remove() not very helpful

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The patch is good, except for two things: when PyObject_Repr() fails, the word 'item' is put instead. This is a good idea, but PyErr_Clear() should be called as soon as possible, before calling another API function. Also, the error message can grow witho

[issue1441530] socket read() can cause MemoryError in Windows

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Which module did you change, and which precise version of python are you using? I wonder if this was fixed with issue2632. -- ___ Python tracker _

[issue9327] doctest DocFileCase setUp/tearDown asymmetry

2010-07-21 Thread Patrick Strawderman
New submission from Patrick Strawderman : doctest.DocFileTest inserts the test's path into the globs as "__file__", but doctest.DocTestCase's tearDown method simply calls globs.clear(), so that subsequent runs of the test case will not receive the same initial globals. This means that doctests r

[issue9327] doctest DocFileCase setUp/tearDown asymmetry

2010-07-21 Thread Patrick Strawderman
Changes by Patrick Strawderman : Added file: http://bugs.python.org/file18114/doctestbug.py ___ Python tracker ___ ___ Python-bugs-list mailing

[issue9327] doctest DocFileCase setUp/tearDown asymmetry

2010-07-21 Thread Patrick Strawderman
Changes by Patrick Strawderman : Added file: http://bugs.python.org/file18115/doctestbugpy3.py ___ Python tracker ___ ___ Python-bugs-list mail

[issue9327] doctest DocFileCase setUp/tearDown asymmetry

2010-07-21 Thread Patrick Strawderman
Changes by Patrick Strawderman : -- versions: -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue9320] os.environ is global for threads

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Quoting the wikipedia page: """multiple threads within a process share state as well as memory and other resources""" If you never worked with threads, then you really need a tutorial about threads, or even a general explanation about threads; the refer

[issue8035] urllib.request.urlretrieve hangs

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I would have hoped a Windows way... -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue9327] doctest DocFileCase setUp/tearDown asymmetry

2010-07-21 Thread Patrick Strawderman
Changes by Patrick Strawderman : Removed file: http://bugs.python.org/file18114/doctestbug.py ___ Python tracker ___ ___ Python-bugs-list maili

[issue9327] doctest DocFileCase setUp/tearDown asymmetry

2010-07-21 Thread Patrick Strawderman
Changes by Patrick Strawderman : Removed file: http://bugs.python.org/file18115/doctestbugpy3.py ___ Python tracker ___ ___ Python-bugs-list ma

[issue9327] doctest DocFileCase setUp/tearDown asymmetry

2010-07-21 Thread Patrick Strawderman
Changes by Patrick Strawderman : Added file: http://bugs.python.org/file18116/doctestbug.py ___ Python tracker ___ ___ Python-bugs-list mailing

[issue9328] str.__format__.__doc__ backport glitch

2010-07-21 Thread Terry J. Reedy
New submission from Terry J. Reedy : On Python list, 'jmfauth' reports >>> >>> sys.version 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] >>> >>> ''.format.__doc__ S.format(*args, **kwargs) -> unicode I do not have 2.7 loaded to verify this, but assuming this is accurate, 'un

[issue7989] Add pure Python implementation of datetime module to CPython

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Technically, since the C module is now named _datetime, it needs to be renamed in Modules/Setup.dist, and most importantly in PC/config.c (because on Windows datetime is built in the main interpreter) -- ___

[issue7836] Add /usr/sfw/lib to OpenSSL search path for Solaris.

2010-07-21 Thread Stefan Krah
Stefan Krah added the comment: Looks like a minor change. Do the ssl unit tests pass? -- nosy: +skrah ___ Python tracker ___ ___ Pytho

[issue7836] Add /usr/sfw/lib to OpenSSL search path for Solaris.

2010-07-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Could you provide a proper patch? -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list maili

[issue9315] The trace module lacks unit tests

2010-07-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: [from pydev discussion] I agree with renaming current test_trace to test_sys_settrace. If sys.settrace does more than line tracing, and the additional actions are not currently tested in the general sys test, then they should be, eventually, by someone, in a

[issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True

2010-07-21 Thread R. David Murray
R. David Murray added the comment: Since the other bug was about a different topic and was closed as fixed, I'd rather have this issue open. What I've done instead is merge the nosy list from the other bug...anyone who is not interested can of course opt out of this one. Christoph, would yo

[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True

2010-07-21 Thread R. David Murray
R. David Murray added the comment: Note that the "clear wording" was only introduced on 2/4 of this year (issue 6770). -- nosy: +r.david.murray ___ Python tracker ___ __

[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True

2010-07-21 Thread R. David Murray
Changes by R. David Murray : -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/o

[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True

2010-07-21 Thread R. David Murray
R. David Murray added the comment: Note that the "clear wording" was only introduced on 2/4 of this year (issue 6760). -- ___ Python tracker ___

[issue9328] str.__format__.__doc__ backport glitch

2010-07-21 Thread Eric Smith
Eric Smith added the comment: Yes, that is what it says; and yes, it should be "string". Although why all of the methods say "string" and not "str" isn't clear to me. Probably historical. The doc string for str.__format__ contains the same error. -- nosy: +eric.smith

[issue9328] str.__format__.__doc__ backport glitch

2010-07-21 Thread Eric Smith
Eric Smith added the comment: And now that I look at it, the subject contains "__format__" but the original message says "format". Both cases are already covered! -- ___ Python tracker

[issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True

2010-07-21 Thread Chris Rebert
Chris Rebert added the comment: I'm busy with finding an apartment and taking exams for the next week-or-so, but after that I'll try and suggest a patch. If anyone wants to have a crack at it between now and then, don't let me stop you. -- ___ Pyth

[issue9326] Error message for incorrect number of (function) args is incorrect

2010-07-21 Thread R. David Murray
R. David Murray added the comment: Benjamin was the last one who worked on this code (in issue 6474), adding him to nosy. -- nosy: +benjamin.peterson, r.david.murray stage: -> unit test needed ___ Python tracker

[issue9328] str.__format__.__doc__ backport glitch

2010-07-21 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: On Wed, Jul 21, 2010 at 8:34 PM, Eric Smith wrote: > Although why all of the methods say "string" and not "str" isn't clear to me. > Probably historical. Indeed; we used "string" in the docs as an informal way to say what eventually became known as basest

[issue9328] str.__format__.__doc__ backport glitch

2010-07-21 Thread Fred L. Drake, Jr.
Changes by Fred L. Drake, Jr. : -- nosy: -fdrake ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2010-07-21 Thread Peter Donis
Peter Donis added the comment: Re my msg110822, I think I have a better solution: have the test create a temporary txt file with intentionally mismatched newlines, and use that as the doctest. That means we can control the exact byte by byte content of the txt file, without worrying about how it

[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2010-07-21 Thread Peter Donis
Peter Donis added the comment: Uploaded doctest-fixes5.diff with one minor correction: removed some comments that were reminders for the py3k version (which I'll upload shortly). -- Added file: http://bugs.python.org/file18118/doctest-fixes5.diff ___

[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-21 Thread Senthil Kumaran
Senthil Kumaran added the comment: Reverted the checkin in revision 83045. For the robotparser issue, one of the these two can be adopted. 1. Fix it by decoding the unicode url using utf-8, strict. 2. Catch the KeyError exception and raise a TypeError exception from the robotparser module inf

[issue1565071] update Lib/plat-linux2/IN.py

2010-07-21 Thread Daniele Tricoli
Daniele Tricoli added the comment: I would like to take care of this bug if it is worthwhile. I tried to use h2py as suggested by Martin v. Löwis adding /usr/include/linux/sockios.h in the regen shell script and it obviously work. I used a fresh clone of the py3k branch. P.S. Is not a problem

[issue1712522] urllib.quote throws exception on Unicode URL

2010-07-21 Thread Matt Giuca
Matt Giuca added the comment: If you're going the way of option 2, I would strongly advise against relying on the KeyError. The fact that a KeyError is raised by urllib.quote is not part of it's specification, it's a bug/quirk in the implementation (which is now unlikely to be change, but it'

[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2010-07-21 Thread Peter Donis
Peter Donis added the comment: Uploaded doctest-fixes5-py3k.diff, diff against py3k branch implementing same improved test method as doctest-fixes5.diff. -- Added file: http://bugs.python.org/file18119/doctest-fixes5-py3k.diff ___ Python tracker

[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True

2010-07-21 Thread Berwyn
Berwyn added the comment: Ah. I don't need to feel so forgetful, then. -- title: subprocess doesn't pass arguments correctly on Linux when shell=True -> subprocess doesn't pass arguments correctly on Linux whenshell=True ___ Python tracker

[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception.

2010-07-21 Thread Ray.Allen
Ray.Allen added the comment: Agree! Sure, the functions in os are mainly to simulate the system call but not the system command. This seems like a good suggestion. So here is the new patch which leave posixmodule.c alone and just wrappers os.mkdir() with try...except... in os.makedirs(). ---

[issue7977] I found Python 3.1 xmlrpc lib use "" not properly. and i have fixed it.

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: But what if I want to pass a tuple through xmlrpc? The function in the test case: +def execute(server, methodname, *args): +r = getattr(server, methodname)(args) # params become a tuple +return r looks wrong to me. It has th

[issue1152248] Enhance file.readlines by making line separator selectable

2010-07-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This fileLineIter function looks like a good recipe to me. Can we close the issue then? -- nosy: +amaury.forgeotdarc resolution: -> works for me status: open -> pending ___ Python tracker

<    1   2