[issue9784] _msi.c warnings under 64-bit Windows

2010-09-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Martin Lowis do you mean API when you type SDK? When I said "SDK examples", then I really meant "examples as published in the SDK", not "examples as published in the API" (and the SDK documentation, in turn, is published on msdn). But yes, the SDK examples u

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-24 Thread Kevin Hunter
Kevin Hunter added the comment: My first thought is "Why is the reference counter stored with the object itself?" I imagine there are very good reasons, however, and this is not an area in which I have much mastery. Answering the question as best I can: I don't know how the reference counter

[issue6608] asctime does not check its input

2010-09-24 Thread MunSic JEONG
MunSic JEONG added the comment: I uploaded a patch against py3k branch. Sorry for many "Added file" and "Removed file" mails. I am learning customs Trac now. -- Added file: http://bugs.python.org/file19004/issue6608-p3k.patch ___ Python tracker

[issue9943] TypeError message became less helpful in Python 2.7

2010-09-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: Reverted, however. Let me clarify: you think the unhelpful part is that the count includes keyword arguments? This change was intentional, actually wrt to cases like this: >>> def f(a): ...pass >>> f(6, a=4, *(1, 2, 3)) Traceback (most

[issue6608] asctime does not check its input

2010-09-24 Thread MunSic JEONG
Changes by MunSic JEONG : Removed file: http://bugs.python.org/file18987/issue6608-timemodule-2nd.patch ___ Python tracker ___ ___ Python-bugs-

[issue6608] asctime does not check its input

2010-09-24 Thread MunSic JEONG
Changes by MunSic JEONG : Removed file: http://bugs.python.org/file18978/issue6608-testcase.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue6608] asctime does not check its input

2010-09-24 Thread MunSic JEONG
Changes by MunSic JEONG : Removed file: http://bugs.python.org/file18976/issue6608-timemodule.patch ___ Python tracker ___ ___ Python-bugs-list

[issue9910] Add Py_SetPath API for embedding python

2010-09-24 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson : -- title: Add Py_SetPath API for embeddint python -> Add Py_SetPath API for embedding python ___ Python tracker ___ __

[issue9943] TypeError message became less helpful in Python 2.7

2010-09-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: r85003 Thanks for the report. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue9910] Add Py_SetPath API for embeddint python

2010-09-24 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Right, forgot about getpath.c. Added documentation. See the latest version of the patch. Please note that I was unable to test the non-windows compile. -- Added file: http://bugs.python.org/file19003/py_setpath.patch ___

[issue9934] Python Docs Typo

2010-09-24 Thread Brian Curtin
Brian Curtin added the comment: Fixed in r85002. This was taken care of on py3k a while ago. -- assignee: d...@python -> brian.curtin nosy: +brian.curtin resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: -> behavior versions: -Python 3.1, Pyth

[issue9784] _msi.c warnings under 64-bit Windows

2010-09-24 Thread Jon Anglin
Jon Anglin added the comment: Martin Lowis do you mean API when you type SDK? If I understand what you are saying, you would rather use the Win32 API instead of the CRT API? It may interest you to know that _open calls CreateFile internally, _read calls ReadFile, _write calls WriteFile, _l

[issue9784] _msi.c warnings under 64-bit Windows

2010-09-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: See, for example, the link you gave in msg115750. It has this sample code in it (listed in the "Examples" section): FNFCIREAD(fnFileRead) { DWORD dwBytesRead = 0; UNREFERENCED_PARAMETER(pv); if( ReadFile((HANDLE)hf, memory, cb, &dwBytesRead, NUL

[issue9784] _msi.c warnings under 64-bit Windows

2010-09-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Which "SDK Example" are you referring to? I could not find any example. -- ___ Python tracker ___

[issue9926] Wrapped TestSuite subclass does not get __call__ executed

2010-09-24 Thread Michael Foord
Michael Foord added the comment: On 24/09/2010 19:23, Martin v. Löwis wrote: > Martin v. Löwis added the comment: >> Perhaps slightly ironically (for this particular bug report) is that >> the change was introduced to support class and module level setUp and >> tearDown (similar to the use-case

[issue9944] Typo in doc for itertools recipe of consume

2010-09-24 Thread Jon Clements
New submission from Jon Clements : Very low priority. def consume(iterator, n): "Advance the iterator n-steps ahead. If n is none, consume entirely." # Use functions that consume iterators at C speed. if n is None: # feed the entire iterator into a zero-length deque c

[issue9915] speeding up sorting with a key

2010-09-24 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > what about adding a simple "random.seed(12345)" That's an excellent suggestion! In fact, I'm embarrassed that it never occurred to me (especially since I have used it in other projects). I will have a revised speed_test along with more extensive measurem

[issue9915] speeding up sorting with a key

2010-09-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: > the random data you run in interpreter 1 won't be the same data > you run in interpreter 2 what about adding a simple "random.seed(12345)" -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue9915] speeding up sorting with a key

2010-09-24 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > Does this help any? No :-) The problem is that the random data you run in interpreter 1 won't be the same data you run in interpreter 2, so the results are not directly comparable. One of the sets of random data may be more easily sortable than the othe

[issue9915] speeding up sorting with a key

2010-09-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Does this help any? >>> import random >>> from timeit import timeit >>> testlist = list(range(10)) >>> random.shuffle(testlist) >>> timeit('t=list(testlist); t.sort()', 'from __main__ import testlist', number=1) 0.1467957519740679 I just learned the imp

[issue9915] speeding up sorting with a key

2010-09-24 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > Since the patch is intended to speed up 3.2 and your posted > experiments were run on that, I am puzzled that you would post a > test script to run under late 2.x instead of 3.1+. I had originally written the test script was originally written for somethin

[issue9934] Python Docs Typo

2010-09-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Agreed. Should happen sometime. Thanks for catching this. -- nosy: +terry.reedy ___ Python tracker ___ _

[issue9934] Python Docs Typo

2010-09-24 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- keywords: +easy, patch stage: -> needs patch versions: -Python 2.5, Python 2.6, Python 3.3 ___ Python tracker ___

[issue9925] Idle doesn't launch

2010-09-24 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: -Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue9915] speeding up sorting with a key

2010-09-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: The posted experiments on sorted data do not do any sorting. They only test the difference in setup and comparison speed and not sorting/swapping speed. Please post something with large arrays of random data. Since the patch is intended to speed up 3.2 and yo

[issue9360] nntplib cleanup

2010-09-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch adding tests for article(), head() and body(), as well as for the "file" parameter. As far as code is concerned, this should now be complete. Documentation remains to be updated :) -- Added file: http://bugs.python.org/file19002/nntpli

[issue9889] PyUnicode_FormatV and Py_UNICODE*?

2010-09-24 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: -Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue9896] Introspectable range objects

2010-09-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Range objects are new in 3.0; they supersede 2.x xrange objects, which are perhaps 10 years old. I do not remember that xrange objects had such attributes. On the other hand, I believe there were requests. The request, with either implementation, seems reason

[issue9938] Documentation for argparse interactive use

2010-09-24 Thread Steven Bethard
Changes by Steven Bethard : -- nosy: +bethard versions: +Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue6706] asyncore's accept() is broken

2010-09-24 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Here's a rewriting attempt (not tested). Now that I look at it I must say it's quite ugly, so I don't think we should follow this road. An alternative I see is to return None in case of errors occurring on accept() and make this very clear in doc. Other th

[issue9864] email.utils.{parsedate, parsedate_tz} should have better return types

2010-09-24 Thread R. David Murray
R. David Murray added the comment: http://launchpad.net/python-email6 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue9943] TypeError message became less helpful in Python 2.7

2010-09-24 Thread Geoffrey Bache
New submission from Geoffrey Bache : Consider the following code: ### keywords.py def f(**kw): print arg, kw f("hello", keyword=True) and compare the behaviour in Python 2.6 and Python 2.7: $ python keywords.py Traceback (most recent call last): File "keywords.py", line 5, in f("

[issue9923] mailcap module may not work on non-POSIX platforms if MAILCAPS env variable is set

2010-09-24 Thread Ned Deily
Ned Deily added the comment: Thanks for the patches. Can you also add a test case to Lib/test/mailcap.py to cover this problem? -- nosy: +ned.deily stage: -> unit test needed ___ Python tracker _

[issue8879] Implement os.link on Windows

2010-09-24 Thread Brian Curtin
Brian Curtin added the comment: In a round-about way, that's what the tests do via sameopenfile. Maybe the behavior of os.path.samefile for Windows hard links should be documented? Possibly just a small note explaining that os.path.sameopenfile is an alternate solution due to how GetFinalPath

[issue9783] _elementtree.c warnings under 64-bit Windows

2010-09-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: > issue9783.diff provides a patch that will compile clean on 32 and 64 > bit Windows systems. I tried to avoid explicit casts where I could, > but it was not always possible. I have ported a lot of my company's > code to 64 bit (all Windows based). In my expe

[issue3873] Unpickling is really slow

2010-09-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, thank you. I hadn't tested in debug mode and there was a wrong assert from the previous code. Here is a patch with the assert removed. -- versions: +Python 3.2 -Python 3.1 Added file: http://bugs.python.org/file19000/unpickleprefetch2.patch __

[issue9926] Wrapped TestSuite subclass does not get __call__ executed

2010-09-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Perhaps slightly ironically (for this particular bug report) is that > the change was introduced to support class and module level setUp and > tearDown (similar to the use-case it now blocks). FWIW, this issue arrived from pygresql, see TestSuite2 in http://

[issue9936] trace misreports "missing" lines

2010-09-24 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Fixed in r84994, r84995 (3.1) and r84996 (2.7). -- resolution: -> fixed stage: commit review -> committed/rejected ___ Python tracker ___

[issue3873] Unpickling is really slow

2010-09-24 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I get this error with the patch: python: /home/alex/src/python.org/py3k/Modules/_pickle.c:908: _Unpickler_ReadFromFile: Assertion `self->next_read_idx == 0' failed. Aborted -- ___ Python tracker

[issue9418] Move _formatter_* methods from string type into _string module

2010-09-24 Thread Eric Smith
Eric Smith added the comment: The more I think about this, the more sense it makes to leave the module in unicodeobject.c. Certainly all the code it's likely to ever contain would already be in unicodeobject.c. While I agree there's some conceptual clarity to be had by having the code in a n

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: With CPython, even objects that don't change see their reference counter modified quite frequently, just by looking at them. What kind of memory would you mark this way? -- nosy: +amaury.forgeotdarc ___ Python

[issue9942] Allow memory sections to be OS MERGEABLE

2010-09-24 Thread Kevin Hunter
New submission from Kevin Hunter : Should Python enable a way for folks to inform the OS of MADV_MERGEABLE memory? I can't speak for other OSs, but Linux added the ability for processes to inform the kernel that they have memory that will likely not change for a while in 2.6.32. This is done

[issue9784] _msi.c warnings under 64-bit Windows

2010-09-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: -1 for the patch. I still maintain that it is better to follow the current SDK. -- ___ Python tracker ___ _

[issue6608] asctime does not check its input

2010-09-24 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: No, it looks like the starting patch is against 2.7. We need a py3k patch. Meanwhile, I've noticed a couple of grammatical mistakes in comments: "strftime(), asctime() does not" -> "strftime() and asctime() do not" "fixes bug #897625, #6608" -> "fixes

[issue9940] Strange error reporting with "with" statement

2010-09-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: I would say it's strange but correct. (and unavoidable I think) -- resolution: -> invalid status: open -> closed ___ Python tracker ___

[issue6608] asctime does not check its input

2010-09-24 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Hmm, it looks like issue6608-timemodule-2nd.patch is a patch on top of your previous patches. I'll check if I can apply last three patches in order. -- ___ Python tracker _

[issue6608] asctime does not check its input

2010-09-24 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: MunSic, Your patch does not apply cleanly to the py3k branch. Please not that new features can only go to py3k. While some may argue that this issue is a bug, I think it is more likely that it will only be accepted for 3.2. In any case, a py3k patch

[issue9941] Unify trace and profile interfaces

2010-09-24 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The runfunc/runcall difference is the easiest to address. I propose to add runcall to Trace as an alias to runfunc and deprecate runfunc. In addition, I propose to add __enter__ and __exit__ methods to both Trace and Profile so that they can be used a

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-24 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Again, I'm not sure this is right fix. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue9941] Unify trace and profile interfaces

2010-09-24 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : The trace and profile modules provide similar functionality, but have some gratuitous differences in their APIs and command line interfaces. For example, the method to trace a single call is Trace.runfunc, but almost identical Profile method is called

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-24 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: This happens because RegQueryInfoKeyA returns maximum value name length not in *Ansi* characters but in *Unicode" characters. I don't know clue why. http://msdn.microsoft.com/en-us/library/ms724902%28VS.85%29.aspx In multibyte environment, 2 or 3 bytes char

[issue9940] Strange error reporting with "with" statement

2010-09-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Of course, you get the same error with: >>> f = open('foo', 'wb') >>> x, y = f Traceback (most recent call last): File "", line 1, in IOError: File not open for reading i.e. the tuple assignment iterates over the file, and calls readline() --

[issue9552] ssl build under Windows always rebuilds OpenSSL

2010-09-24 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Thank you, I've committed in r84993(py3k) I'll close this issue after merging to other branches. -- ___ Python tracker ___ __

[issue9936] trace misreports "missing" lines

2010-09-24 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: unit test needed -> commit review Added file: http://bugs.python.org/file18998/issue9936a.diff ___ Python tracker ___ _

[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > I thought it might be useful for third-party libraries, or even > non-testing situations That might be true, but I prefer that we give code a more vigorous exercise before putting it in the standard library proper. When we try to use it for something mo

[issue9926] Wrapped TestSuite subclass does not get __call__ executed

2010-09-24 Thread Michael Foord
Michael Foord added the comment: Ok, so here is an idea that could remove the need for TestSuite._wrapped_run. TestSuite.run could "tag" the result object (set an attribute). Nested TestSuites would see an already tagged suite and do nothing (beyond running tests of course). The suite that d

[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Another option would be to have the read-end act like a non-blocking > socket (i.e., raise EAGAIN). > > Since it would mostly be for testing, would it make more sense to add > it to test.support or someplace similar instead of io? I thought it might be usefu

[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Another option would be to have the read-end act like a non-blocking socket (i.e., raise EAGAIN). Since it would mostly be for testing, would it make more sense to add it to test.support or someplace similar instead of io? -- _

[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The _multiprocessing module already have similar objects. > _multiprocessing.Connection is based on file descriptors (and initialized > with the result of os.pipe()) > _multiprocessing.PipeConnection uses Windows named pipes. _multiprocessing.Connection expo

[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Simply buffer everything. > > That works for when a write operation would block. What would it do > when a read operation would block? Good question. It could either return an empty bytes object, or perhaps raise EOFError (it could be a constructor argume

[issue9940] Strange error reporting with "with" statement

2010-09-24 Thread Antoine Pitrou
New submission from Antoine Pitrou : Under 3.2 and 3.1: >>> with open("foo", "wb") as x: pass ... >>> with open("foo", "wb") as (x, y): pass ... Traceback (most recent call last): File "", line 1, in io.UnsupportedOperation: read Similar oddities under 2.7: >>> with open("foo", "wb") as (

[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > Simply buffer everything. That works for when a write operation would block. What would it do when a read operation would block? -- ___ Python tracker __

[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The _multiprocessing module already have similar objects. _multiprocessing.Connection is based on file descriptors (and initialized with the result of os.pipe()) _multiprocessing.PipeConnection uses Windows named pipes. -- nosy: +amaury.forgeotda

[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > It would be a non-seekable in-memory bytes buffer with distinct > > read and write pointers, so as to act like a system FIFO or a > > socket.makefile() object. > > What would it do when the equivalent system FIFO object would block? Simply buffer everyth

[issue9815] assertRaises as a context manager keeps tracebacks and frames alive

2010-09-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note that the original issue (test_tarfile failures on the Windows buildbots) now seems fixed thanks to the various tarfile and test_tarfile improvements. I have no opinion on whether assertRaises should take care of cleaning the tracebacks or not. As the tes

[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > It would be a non-seekable in-memory bytes buffer with distinct > read and write pointers, so as to act like a system FIFO or a > socket.makefile() object. What would it do when the equivalent system FIFO object would block? > (you may point to os.pipe()

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-24 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : -- Removed message: http://bugs.python.org/msg117293 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-24 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: This happens because RegQueryInfoKeyA returns maximum value name length in *Unicode* characters. Strange API. lpcMaxValueNameLen [out, optional] A pointer to a variable that receives the size of the key's longest value name, in Unicode characters. The

[issue9939] Add a pipe type (FIFO) to the io module

2010-09-24 Thread Antoine Pitrou
New submission from Antoine Pitrou : While writing tests for nntplib, it came to me that a PipeIO or BytesPipeIO would be useful (I actually wrote a minimal one). It would be a non-seekable in-memory bytes buffer with distinct read and write pointers, so as to act like a system FIFO or a socke

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-24 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I can reproduce the issue on python2.x. I cannot on python3.x. -- nosy: +ocean-city ___ Python tracker ___ __

[issue459007] Document sys.path on Windows

2010-09-24 Thread MunSic JEONG
MunSic JEONG added the comment: I made patch which move comment from PC/getpathp.c to Doc/using/windows.rst. And did a little editing, reST markup. http://codereview.appspot.com/2211046 -- keywords: +patch Added file: http://bugs.python.org/file18997/comment_move_to_windows_rst.patch

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-24 Thread Brian Curtin
Brian Curtin added the comment: I'm not able to reproduce any MemoryError on 2.6, 2.7, or 3.2 on Windows 7 using your registry data and test script. -- ___ Python tracker ___ __

[issue9907] interactive mode TAB does not insert on OS X built with editline instead of GNU readline

2010-09-24 Thread Ronald Oussoren
Ronald Oussoren added the comment: Patch looks fine and should IMO be applied -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue9923] mailcap module may not work on non-POSIX platforms if MAILCAPS env variable is set

2010-09-24 Thread Ronald Oussoren
Changes by Ronald Oussoren : -- assignee: ronaldoussoren -> components: -Macintosh nosy: -ronaldoussoren ___ Python tracker ___ ___

[issue766910] fix one or two bugs in trace.py

2010-09-24 Thread Guido van Rossum
Changes by Guido van Rossum : -- Removed message: http://bugs.python.org/msg117113 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue766910] fix one or two bugs in trace.py

2010-09-24 Thread Guido van Rossum
Changes by Guido van Rossum : -- Removed message: http://bugs.python.org/msg117114 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue9665] Buid issues on Cygwin - _curses, _curses_panel, and _io

2010-09-24 Thread Brian Curtin
Changes by Brian Curtin : -- assignee: brian.curtin -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue9938] Documentation for argparse interactive use

2010-09-24 Thread Jay T
New submission from Jay T : I want to create a custom interactive shell where I continually do parse_args. Like the following: parser = argparse.ArgumentParser() command = raw_input() while(True): args = parser.parse_args(shlex.split(command)) # Do some magic stuff command = raw_inp

[issue9418] Move _formatter_* methods from string type into _string module

2010-09-24 Thread Eric Smith
Eric Smith added the comment: Now that I start this, I see that it's complicated by the fact that the functions actually being wrapped are in stringlib/string_format.h. That's because in 2.x they compile as both unicode and str. Before the _string module is created, the code should really be

[issue9790] ntpath contains imports inside functions

2010-09-24 Thread Brian Curtin
Brian Curtin added the comment: Committed in r84992. Thanks for having a look. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker __

[issue9790] ntpath contains imports inside functions

2010-09-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch looks ok, and it would hopefully fix build errors on the XP buildbots :) -- nosy: +pitrou ___ Python tracker ___ _

[issue9790] ntpath contains imports inside functions

2010-09-24 Thread Nick Coghlan
Nick Coghlan added the comment: Yeah, I realised shortly after I sent my email in response to the checkin that the original version was covering more cases in that first try-block. I'll defer to you when it comes to exactly which case that NotImplementedError was covering - patch looks good g

[issue9935] Faster pickling of instances

2010-09-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue9418] Move _formatter_* methods from string type into _string module

2010-09-24 Thread Eric Smith
Eric Smith added the comment: My only concern with this is that it would cause other implementations to do the same thing. I assume it's not hard for them, but it is work. I know that IronPython implemented the _formatter_* methods so that they could use string.py as-is. But that's a small c

[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread STINNER Victor
STINNER Victor added the comment: Le vendredi 24 septembre 2010 14:35:29, Marc-Andre Lemburg a écrit : > Thanks for the explanation. So the only reason why you have to go through > all those hoops is to > > * allow the complete set of Python supported encoding names >for the PYTHONFSENCODI

[issue9929] subprocess.Popen unbuffered not work

2010-09-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: As another sidenote, `bufsize` should only be relevant for stdin. For stdout and stderr, disabling buffering will only reduce performance, not add functionality. So I would suggest only setting buffering on stding. --

[issue9929] subprocess.Popen unbuffered not work

2010-09-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: You are right that it doesn't work anymore (under Linux too). Your patch is almost ok. It should raise a ValueError if bufsize=0 and universal_newlines is true (the two can't be satisfied together, since universal newlines implies buffering). It would also b

[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread STINNER Victor
STINNER Victor added the comment: > Some things about your patch: > - as Amaury said, functions should be named "redecode*" > rather than "reencode*" Yes, as written before (msg117269), I will do it in my next patch. > - please use -1 for error return, not 1 Ok. > - have you tried to measur

[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> Why is this needed ? > > Short answer: to support filesystem encoding different than utf-8. See #8611 > for a longer explanation. > > Example: > > $ pwd > /home/SHARE/SVN/py3ké > $ PYTHO

[issue9937] _winreg.EnumValue causes MemoryError

2010-09-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brian.curtin, haypo, tim.golden versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker ___

[issue9552] ssl build under Windows always rebuilds OpenSSL

2010-09-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not really able to review this kind of things. Please commit if you think it is ok. -- ___ Python tracker ___ _

[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brett.cannon, loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue1542544] Improve dynamic linking support on AIX

2010-09-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> duplicate status: open -> closed superseder: -> AIX shared library fix ___ Python tracker ___ __

[issue1542544] Improve dynamic linking support on AIX

2010-09-24 Thread Sébastien Sablé
Sébastien Sablé added the comment: I think this issue can be closed as a duplicate of issue 941346. -- ___ Python tracker ___ ___ P

[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread STINNER Victor
STINNER Victor added the comment: > Not sure it's related, but there seems to be a bug: It's not a bug, it's a feature :-) If you specify a non-existing locale, the GNU libc fails back to ascii. $ locale -a C français french fr_FR fr...@euro fr_FR.iso88591 fr_fr.iso885...@euro fr_FR.utf8 $ L

[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Some things about your patch: - as Amaury said, functions should be named "redecode*" rather than "reencode*" - please use -1 for error return, not 1 - have you tried to measure if it made Python startup slower? -- _

[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: >It is not possible to set Py_FilesystemDefaultEncoding before loading >the first module. initfsencoding() loads codecs and encodings modules to >check the codec name. Not sure it's related, but there seems to be a bug: $ ./python -c "import sys; print(sys.g

[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread STINNER Victor
STINNER Victor added the comment: > Why is this needed ? Short answer: to support filesystem encoding different than utf-8. See #8611 for a longer explanation. Example: $ pwd /home/SHARE/SVN/py3ké $ PYTHONFSENCODING=ascii ./python test_fs_encoding.py Fatal Python error: Py_Initialize: can't

[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > New version of the patch: > - reencode sys.path_importer_cache (and remove the last FIXME) > - fix different reference leaks > - catch PyIter_Next() failures > - create a subfunction to r

[issue9630] Reencode filenames when setting the filesystem encoding

2010-09-24 Thread STINNER Victor
STINNER Victor added the comment: > I would rename the feature to something like "redecode-modules" Yes, right. I will rename the functions before commiting the patch. -- ___ Python tracker ___

  1   2   >