[issue15364] sysconfig confused by relative paths

2012-07-18 Thread Richard Oudkerk
Richard Oudkerk added the comment: Forgot to remove some unnecessary code in patch. -- Added file: http://bugs.python.org/file26427/sysconf.patch ___ Python tracker <http://bugs.python.org/issue15

[issue15184] Test failure in test_sysconfig_module

2012-07-18 Thread Richard Oudkerk
Richard Oudkerk added the comment: I suspect the problem is related to http://bugs.python.org/issue15298. Basically the global sysconfig module caches the results of parsing Makefile in Lib/_sysconfigdata.py. This can cause you to get the config vars from an old configure and build

[issue15364] sysconfig confused by relative paths

2012-07-19 Thread Richard Oudkerk
Richard Oudkerk added the comment: > I'd make get_config_var('srcdir') to be None for installed systems, > because the source tree is not available there. While playing with a version of the patch which returns None for non-source builds, I found that distutils.suppo

[issue15397] Unbinding of methods

2012-07-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: Can't you unbind without any changes to the C code by doing def unbind(f): if hasattr(f, '__func__'): return f.__func__ self = getattr(f, '__self__', None) if self is not None and not isinstan

[issue15408] os.fork/os.popen behaviour change between 2.7 and 3.2

2012-07-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: The problem is that os.wait() is returning when the wrong process exits. You can fix this by specifying the pid you are waiting for by doing "os.waitpid(pid, 0)" instead of "os.wait()". Arguably os.popen() and subprocess.communicate() et

[issue15408] os.fork/os.popen behaviour change between 2.7 and 3.2

2012-07-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: Actually, if you replace print(os.popen("uname").read()) with f = os.popen("uname") print(f.read()) f.close() or with os.popen("uname") as f: print(f.read()) then things

[issue15412] Note in documentation for weakrefs

2012-07-21 Thread Richard Oudkerk
New submission from Richard Oudkerk : In the documentation on weakrefs there is the following quote Note: Weak references to an object are cleared before the object’s __del__() is called, to ensure that the weak reference callback (if any) finds the object still alive. But I think

[issue15412] Note in documentation for weakrefs

2012-07-21 Thread Richard Oudkerk
Richard Oudkerk added the comment: > The weakref is "dead" but it's still a weakref, and it can be used to > e.g. index a container of existing weakrefs (cf. WeakSet, > WeakKeyDictionary, WeakValueDictionary). Ah. I had assumed that since dead weakrefs were unhashable

[issue15408] os.fork/os.popen behaviour change between 2.7 and 3.2

2012-07-23 Thread Richard Oudkerk
Richard Oudkerk added the comment: In Python 2.x, when the file object returned by popen() is garbage collected the process is automatically waited on, collecting the pid of the process. In Python 3.x a wrapper object is used whose close method wait on the pid. This close method is *not

[issue15408] os.fork/os.popen behaviour change between 2.7 and 3.2

2012-07-23 Thread Richard Oudkerk
Richard Oudkerk added the comment: A program which depends on the old behaviour would be broken on a non-refcounted implementation of Python, so I would be inclined to say "won't fix". However, I think the following patch would restore the old behaviour diff -r a970054a93fb

[issue6056] socket.setdefaulttimeout affecting multiprocessing Manager

2012-07-24 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- nosy: +sbt ___ Python tracker <http://bugs.python.org/issue6056> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: ISTM the simplest approach would be to just set self->args in BaseException.__new__() (like in Georg's patch) but to ignore the possibility that the user might later set self.args to something stupid "wrong": diff -r 51ac5f06dd04 Objects/

[issue14930] Make memoryview weakrefable

2012-07-25 Thread Richard Oudkerk
Richard Oudkerk added the comment: Is it possible that the use of test.support.gc_collect() in test_memoryview made the difference? -- ___ Python tracker <http://bugs.python.org/issue14

[issue15448] utimes() functions fail with ENOSYS even when detected by configure

2012-07-25 Thread Richard Moseley
New submission from Richard Moseley : When building on a ASUS Eee PC 1000 running the original Xandros O/S with libc-2.7-13, the various utimes() functions are being detected as available for use, everything compiles. However, during installation of the lib-dynload libraries, the error '

[issue14501] Error initialising BaseManager class with 'authkey' argument of string type.

2012-07-25 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- nosy: +sbt ___ Python tracker <http://bugs.python.org/issue14501> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15451] PATH is not honored in subprocess.Popen in win32

2012-07-26 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think env is used for specifying the environment used by the child process once it has started. env['PATH'] is not used by the parent process to find program to run. Having said that, maybe if you used "shell=True" as well then the s

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-26 Thread Richard Oudkerk
Richard Oudkerk added the comment: I see that the originally proposed patch is more or less what I suggested above. Since this has been a critical issue for 5 years, I think such a minimal patch should be committed even though it is not a complete solution. It seems to me that the more

[issue14501] Error initialising BaseManager class with 'authkey' argument of string type.

2012-07-26 Thread Richard Oudkerk
Richard Oudkerk added the comment: You could just do Server_1=TestServer(address=("127.0.0.1",5),authkey=b"passkey") so this is probably a documentation issue. The examples in the documentation should at least be updated. -- __

[issue15364] sysconfig confused by relative paths

2012-07-26 Thread Richard Oudkerk
Richard Oudkerk added the comment: Any objection if I commit the last patch before the next beta? This is the one which on installed Pythons have get_config_var('srcdir') == os.path.dirname(get_makefile_filename()) on pos

[issue15364] sysconfig confused by relative paths

2012-07-26 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Does get_config_var('srcdir') always return a string or sometimes None? Always a string. distutils.support._get_xxmodule_path() is one place which (currently) would throw an exception if it

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-26 Thread Richard Oudkerk
Richard Oudkerk added the comment: I realize now that the idea of using object.__reduce__(..., 2) would not really work since many exception classes use non-slot descriptors (unless '__slots__' attributes were also added as hints of what to serialize). I think there are two opti

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-27 Thread Richard Oudkerk
Richard Oudkerk added the comment: Here is a minimal patch against default. It is a clear improvement on the current situation, even though it still cannot handle the case class Error(Exception): def __init__(self, x): Exception.__init__(self) self.x = x

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-27 Thread Richard Oudkerk
Changes by Richard Oudkerk : Added file: http://bugs.python.org/file26537/init_args.patch ___ Python tracker <http://bugs.python.org/issue1692335> ___ ___ Python-bug

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-27 Thread Richard Oudkerk
Richard Oudkerk added the comment: ExceptionTests.testAttributes already checks the attributes of unpickled copies (using all protocols). -- ___ Python tracker <http://bugs.python.org/issue1692

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-27 Thread Richard Oudkerk
Richard Oudkerk added the comment: BTW, BaseException_init() has the code Py_XDECREF(self->args); self->args = args; Py_INCREF(self->args); Presumably the Py_XDECREF(self->args) would be better replaced by Py_CLEA

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-27 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Or you could simply Py_INCREF(args) before the Py_XDECREF... But won't self->args point to a broken object while any callbacks triggered by Py_XDECREF() are run? An alternative would be tmp = self->args; self->args = args;

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-27 Thread Richard Oudkerk
Richard Oudkerk added the comment: Patch which adds fix for BaseException_init(). Actually this class of problem seem to be quite common. BaseException_set_tb() appears to be affected too, as is the code in the tutorial which introduces setters. -- Added file: http

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2012-07-29 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Richard, can the issue be closed? I guess so (although the change could arguably be back ported). Pickling of Exception classes is still somewhat dodgy because an example like class Error(Exception): def __init__(self, x): Except

[issue6056] socket.setdefaulttimeout affecting multiprocessing Manager

2012-07-29 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: crash -> behavior ___ Python tracker <http://bugs.pytho

[issue15364] sysconfig confused by relative paths

2012-07-29 Thread Richard Oudkerk
Richard Oudkerk added the comment: > One example is 'srcdir': this value is only useful in the build tree and > there currently is no clean way to signal that you are retrieving a > value that is not useful. In the particular case of 'srcdir', sysconfig.is_pyth

[issue15451] PATH is not honored in subprocess.Popen in win32

2012-07-29 Thread Richard Oudkerk
Richard Oudkerk added the comment: > But I observe that the same script(with proper modification of file names) > works very well under Linux. After I dive into the source code, I found > Python use execvpe to invoke the child process which _will_ use the PATH > variable t

[issue15451] PATH is not honored in subprocess.Popen in win32

2012-07-29 Thread Richard Oudkerk
Richard Oudkerk added the comment: > What I understand you two as saying is that there seems to be an > undocumented difference in execxxe between unix and windows which has been > carried over to subprocess. No. There is no difference between the platforms in the behaviour of o

[issue15507] test_subprocess assumes SIGINT is not being ignored.

2012-07-31 Thread Richard Oudkerk
Richard Oudkerk added the comment: Couldn't the preexec_fn argument of Popen be used instead? -- nosy: +sbt ___ Python tracker <http://bugs.python.org/is

[issue15507] test_subprocess assumes SIGINT is not being ignored.

2012-07-31 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Couldn't the preexec_fn argument of Popen be used instead? Actually, since Python 3.2 you can just use "restore_signals=True". -- ___ Python tracker <http://bugs.

[issue15528] Better support for finalization with weakrefs

2012-08-01 Thread Richard Oudkerk
New submission from Richard Oudkerk: A patch with docs and tests for the idea I suggested on python-ideas: http://comments.gmane.org/gmane.comp.python.ideas/15863 To repeat what I wrote there, the current issues with weakref callbacks include: 1. They are rather low level, and working out

[issue15525] test_multiprocessing failure on Windows XP

2012-08-01 Thread Richard Oudkerk
Richard Oudkerk added the comment: I would guess that the process has already terminated (or is being torn down) but the timeout is not long enough to let the parent join child. Let's see if increasing the timeout fixes the failures. -- ___ P

[issue15525] test_multiprocessing failure on Windows XP

2012-08-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: Looks like it is fixed. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue15528] Better support for finalization with weakrefs

2012-08-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: > I don't quite understand the purpose of your suggestions. What can you do > with it help, what you can not do with contextlib.ExitStack, atexit, > __del__ method, weakref.WeakKeyDictionary or weakref.ref? I read the > documentation, but t

[issue15528] Better support for finalization with weakrefs

2012-08-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: > For point 1: global weakref.WeakKeyDictionary is good store for weak refs > with > callbacks. > > global weakdict > weakdict[kenny] = weakref.ref(kenny, lambda _: print("you killed kenny!")) That depends on kenny being hasha

[issue15528] Better support for finalization with weakrefs

2012-08-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: Updated patch. get() and put() replaced by peek() and detach(). Added isalive(). Now finalizer class has no state, i.e. __slots__ == (). -- Added file: http://bugs.python.org/file26701/finalize.patch ___ Python

[issue15528] Better support for finalization with weakrefs

2012-08-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: > In _make_callback, I still think the default error reporting mechanism > should be kept. It can be improved separately. New patch. This time I have got rid of _make_callback, and just given __call__ an ignored optional argument. -- Adde

[issue15528] Better support for finalization with weakrefs

2012-08-11 Thread Richard Oudkerk
Richard Oudkerk added the comment: > In the latest patch, what are "broken" and "priority" for? They are for a subclass used by multiprocessing. But it is premature to worry about subclassing, so I will take them out. > Also, I would question why atexit is false b

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: Might it be simpler to run doctest over the rst file from the relevant unittest? (Perhaps with help from test.support.) -- nosy: +sbt ___ Python tracker <http://bugs.python.org/issue15

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: > the occasional typos can be found by simply run `make doctest` every once > in a while). But doesn't "make doctest" attempt to run the doctests using Python 2.x (because Sphinx does n

[issue15629] Run doctests in Doc/*.rst as part of regrtest

2012-08-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: An example from the output of "make doctest" which fails because Python 2.x is being used: ** File "library/multiprocessing.rst", line 453, in default Failed example:

[issue15364] sysconfig confused by relative paths

2012-08-13 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue15364> ___ ___ Python-bugs-list mailing list Unsubscri

[issue15322] sysconfig.get_config_var('srcdir') returns unexpected value

2012-08-13 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think #15364 is a duplicate of this. It should be fixed now. Can you check again. -- nosy: +sbt resolution: -> duplicate stage: -> committed/rejected status: open -> pending superseder: -> sysconfig confused by relative paths type:

[issue15322] sysconfig.get_config_var('srcdir') returns unexpected value

2012-08-13 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue15322> ___ ___ Python-bugs-list mailing list Unsubscri

[issue15646] multiprocessing can do equivalent of a fork bomb on Windows

2012-08-14 Thread Richard Oudkerk
New submission from Richard Oudkerk: If the "if __name__ == '__main__'" idiom is not used on Windows you can get the recursive starting of new processes. This is because importing the main module in a child process starts a new child process as a side effect. There i

[issue15646] multiprocessing can do equivalent of a fork bomb on Windows

2012-08-14 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue15702] Multiprocessing Pool deadlocks on join after empty map operation

2012-08-17 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> duplicate stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue15528] Better support for finalization with weakrefs

2012-08-17 Thread Richard Oudkerk
Richard Oudkerk added the comment: Updated patch. -- Added file: http://bugs.python.org/file26879/finalize.patch ___ Python tracker <http://bugs.python.org/issue15

[issue14501] Error initialising BaseManager class with 'authkey' argument of string type.

2012-08-17 Thread Richard Oudkerk
Richard Oudkerk added the comment: I have fixed the documentation and examples to say that authentication keys are byte strings. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python track

[issue15412] Note in documentation for weakrefs

2012-08-17 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue15526] test_startfile crash on Windows 7 AMD64

2012-08-19 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think the reason that it is only this buildbot which fails is that the other Windows buildbots don't use multiple processes. Therefore they don't use a different dir for each test. > 4) change os.startfile() to use ShellExecuteEx and use

[issue15528] Better support for finalization with weakrefs

2012-08-19 Thread Richard Oudkerk
Richard Oudkerk added the comment: New patch. -- Added file: http://bugs.python.org/file26900/finalize.patch ___ Python tracker <http://bugs.python.org/issue15

[issue15733] PEP 3121, 384 Refactoring applied to winapi module

2012-08-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: I don't see why you made has_CancelIoEx part of the module state. Availability of CancelIoEx only depends on the version of Windows you have, so it will not change if you reload the module. BTW, I think you forgot to delete the has_CancelIoEx global, a

[issue15733] PEP 3121, 384 Refactoring applied to winapi module

2012-08-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: > In addition, I plan to actively drop Windows 2000 support post 3.3, so > CancelIO can be presumed to be present. The function at issue is CancelIoEx() (introduced in Vista) not CancelIo(). I assume WinXP will still be sup

[issue15758] 500x speed up for Popen.communicate() on Windows

2012-08-21 Thread Richard Oudkerk
New submission from Richard Oudkerk: Piping significant amounts of data through a subprocess using Popen.communicate() is crazily slow on Windows. The attached program just pushes data through mingw's cat.exe. Python 3.3: amount = 1 MB; time taken = 0.07 secs; rate = 13.51 MB/s amount =

[issue15758] 500x speed up for Popen.communicate() on Windows

2012-08-21 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- keywords: +patch Added file: http://bugs.python.org/file26953/popen_communicate.patch ___ Python tracker <http://bugs.python.org/issue15

[issue13520] Patch to make pickle aware of __qualname__

2012-08-21 Thread Richard Oudkerk
Richard Oudkerk added the comment: There is a cute way to use operator.attrgetter to produce backwards compatible pickles using the qualname: import pickle, copyreg, operator, sys, pickletools, types class AttrGetter(object): def __init__(self, name): self.name = name def

[issue15758] 500x speed up for Popen.communicate() on Windows

2012-08-21 Thread Richard Oudkerk
Richard Oudkerk added the comment: RawIOBase.readall() does the sensible thing already. Maybe FileIO should be allowed to inherit it. The alternative patch (which probably only works for raw unbuffered case) diff -r ca54c27a9045 Lib/subprocess.py --- a/Lib/subprocess.py Tue Aug 21 14:54:22

[issue15758] 500x speed up for Popen.communicate() on Windows

2012-08-21 Thread Richard Oudkerk
Richard Oudkerk added the comment: > FileIO.readall() already has an overallocation mechanism which should > yield linear complexity. Perhaps it needs to be tweaked a bit? > (look at new_buffersize in Modules/_io/fileio.c) I think it needs a bit more than a tweak;-) Looks like it inc

[issue15758] 500x speed up for Popen.communicate() on Windows

2012-08-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: In each loop before calling read() the buffer size is recalculated based on the amount of space used, causing a realloc *regardless* of how much empty space is left in the buffer. And each read is only producing a smallish chunk (5120 bytes). So assuming

[issue15758] 500x speed up for Popen.communicate() on Windows

2012-08-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: The attached patch (readall-resize.patch) makes the resizes only happen when the buffer is full. It produces amount = 1 MB; time taken = 0.02 secs; rate = 64.10 MB/s amount = 2 MB; time taken = 0.03 secs; rate = 64.10 MB/s amount = 4 MB; time taken = 0.06

[issue15758] 500x speed up for Popen.communicate() on Windows

2012-08-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: Alternative patch (readall-chunks.patch) which delegates to RawIOBase.readall() if the file cannot be stat-ed or appears to have size zero. amount = 1 MB; time taken = 0.02 secs; rate = 64.10 MB/s amount = 2 MB; time taken = 0.02 secs; rate = 128.21 MB/s

[issue15758] 500x speed up for Popen.communicate() on Windows

2012-08-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: > It seems we could do both (fix the resizing logic, and fallback on > chunks if the size is unknown). Combined patch attached. -- Added file: http://bugs.python.org/file26963/readall-combined.patch ___

[issue15758] 500x speed up for Popen.communicate() on Windows

2012-08-23 Thread Richard Oudkerk
Changes by Richard Oudkerk : Removed file: http://bugs.python.org/file26953/popen_communicate.patch ___ Python tracker <http://bugs.python.org/issue15758> ___ ___ Pytho

[issue15758] 500x speed up for Popen.communicate() on Windows

2012-08-23 Thread Richard Oudkerk
Changes by Richard Oudkerk : Removed file: http://bugs.python.org/file26960/readall-chunks.patch ___ Python tracker <http://bugs.python.org/issue15758> ___ ___ Python-bug

[issue15758] 500x speed up for Popen.communicate() on Windows

2012-08-23 Thread Richard Oudkerk
Changes by Richard Oudkerk : Removed file: http://bugs.python.org/file26959/readall-resize.patch ___ Python tracker <http://bugs.python.org/issue15758> ___ ___ Python-bug

[issue15758] 500x speed up for Popen.communicate() on Windows

2012-08-23 Thread Richard Oudkerk
Changes by Richard Oudkerk : Removed file: http://bugs.python.org/file26963/readall-combined.patch ___ Python tracker <http://bugs.python.org/issue15758> ___ ___ Pytho

[issue15758] FileIO.readall() has worst case O(n^2) complexity

2012-08-23 Thread Richard Oudkerk
Richard Oudkerk added the comment: Here is the patch (with the old ones removed). Note that the old code mishandled the case where _PyBytes_Resize() failed by assuming that the old bytes object would still be valid. I have assumed that stream psuedo-files will never claim to have a size

[issue15758] FileIO.readall() has worst case O(n^2) complexity

2012-08-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: After playing with the patch on Linux it seems that Linux much prefers the realloc() scheme to the list-of-chunks scheme. This new patch only does list-of-chunks on Windows. -- Added file: http://bugs.python.org/file26985/readall-combined.patch

[issue15758] FileIO.readall() has worst case O(n^2) complexity

2012-08-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: Attached is an alternative benchmark program which does not use subprocess. -- Added file: http://bugs.python.org/file26986/readall-benchmark.py ___ Python tracker <http://bugs.python.org/issue15

[issue15758] FileIO.readall() has worst case O(n^2) complexity

2012-08-24 Thread Richard Oudkerk
Changes by Richard Oudkerk : Removed file: http://bugs.python.org/file26952/push-thru-cat.py ___ Python tracker <http://bugs.python.org/issue15758> ___ ___ Python-bug

[issue15758] FileIO.readall() has worst case O(n^2) complexity

2012-08-24 Thread Richard Oudkerk
Changes by Richard Oudkerk : Removed file: http://bugs.python.org/file26970/readall-combined.patch ___ Python tracker <http://bugs.python.org/issue15758> ___ ___ Pytho

[issue15758] FileIO.readall() has worst case O(n^2) complexity

2012-08-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: > What about the method call overhead in RawIO.readall(), and the > different progression of buffer sizes? (the realloc scheme uses larger > and larger read() sizes, while RawIO.readall() uses a constant read() > size). For this benchmark the c

[issue15784] OSError.__str__() should distinguish between errno and winerror

2012-08-25 Thread Richard Oudkerk
New submission from Richard Oudkerk: Since WindowsError became an alias of OSError, the error number shown in the stringification of an OSError err can either be a windows error code (err.winerror) or a posix style error number (err.errno), with no way to tell which. For instance in

[issue15784] OSError.__str__() should distinguish between errno and winerror

2012-08-25 Thread Richard Oudkerk
Changes by Richard Oudkerk : Added file: http://bugs.python.org/file27002/winerror.patch ___ Python tracker <http://bugs.python.org/issue15784> ___ ___ Python-bugs-list m

[issue15784] OSError.__str__() should distinguish between errno and winerror

2012-08-25 Thread Richard Oudkerk
Changes by Richard Oudkerk : Removed file: http://bugs.python.org/file27001/winerror.patch ___ Python tracker <http://bugs.python.org/issue15784> ___ ___ Python-bug

[issue15784] OSError.__str__() should distinguish between errno and winerror

2012-08-27 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Well, "Error" and "Errno" are rather hard to distinguish Embarrassingly, I did not even notice the was a difference. -- ___ Python tracker <http://

[issue15784] OSError.__str__() should distinguish between errno and winerror

2012-08-29 Thread Richard Oudkerk
Richard Oudkerk added the comment: The changeset is 2e587b9bae35. Georg, could you copy it to your release branch please. -- ___ Python tracker <http://bugs.python.org/issue15

[issue15812] inspect.getframeinfo() cannot show first line

2012-08-29 Thread Richard Oudkerk
New submission from Richard Oudkerk: When inspect.getframeinfo() tries to collect lines of context it never shows the first line (unless context is as big as the number of lines in the file). The relevant code is start = lineno - 1 - context//2 try: lines, lnum

[issue15818] multiprocessing documentation of Process.exitcode

2012-08-30 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- nosy: +sbt ___ Python tracker <http://bugs.python.org/issue15818> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2012-08-30 Thread Richard Oudkerk
Richard Oudkerk added the comment: Would it simplify matters to stop treating 0,1,2 specially and just add them to pass_fds instead? -- nosy: +sbt ___ Python tracker <http://bugs.python.org/issue15

[issue15819] Unable to build Python out-of-tree when source tree is readonly.

2012-08-30 Thread Richard Oudkerk
Richard Oudkerk added the comment: I tried building from out-of-tree with a read-only srcdir, but I found two other files which the build process tries to create in the source directory: $(srcdir)/Objects/typeslots.inc $(srcdir)/Lib/_sysconfigdata.py -- nosy: +sbt

[issue15819] Unable to build Python out-of-tree when source tree is readonly.

2012-08-31 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Richard: what was your use case? Building on the main host and a VM without having to commit and synchronize temporary changes. (The VM has read-only access to the host's repositories). > What steps did you take that resulted in getting typesl

[issue15819] Unable to build Python out-of-tree when source tree is readonly.

2012-08-31 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Why is that? python will work just fine if it can't write pyc files. When I hacked around the _sysconfigdata.py issue, running the created python produced Fatal Python error: Py_Initialize: Unable to get the locale encoding Traceback (most recent c

[issue15819] Unable to build Python out-of-tree when source tree is readonly.

2012-08-31 Thread Richard Oudkerk
Richard Oudkerk added the comment: It looks like the code which writes the byte-compiled codes checks for and ignores PermissionError (EACCES, EPERM) and FileExistsError (EEXIST). However, for me it is EIO which is raised. -- ___ Python tracker

[issue15833] most failures to write byte-compiled file no longer suppressed

2012-08-31 Thread Richard Oudkerk
New submission from Richard Oudkerk: As discussed in http://bugs.python.org/issue15819 trying to run python built outside a read-only source directory fails for me because OSError(EIO, ...) is raised when importlib tries to write the byte compiled file. (I built python in a Linux VM

[issue15819] Unable to build Python out-of-tree when source tree is readonly.

2012-08-31 Thread Richard Oudkerk
Richard Oudkerk added the comment: I have opened a new issue: http://bugs.python.org/issue15833 It is a regression because in Python 3.2 all failures to open the file for writing were supressed. > But as I said: I'd also be fine with declaring this VM software > unsupported. I

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: If sysconfig._generate_posix_vars() creates the build directory and pybuilddir.txt (instead of setup.py) then it could write _sysconfigdata.py in the correct place. Then setup.py would not have to mess with its own sys.path. One issue with having

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: Alternative patch. -- Added file: http://bugs.python.org/file27122/alt_sysconfigdata.patch ___ Python tracker <http://bugs.python.org/issue15

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: > builddir should have added > +("-pydebug" if hasattr(sys, "gettotalrefcount") else "") Oops, yes. > the installation installs this to the lib-dynload directory, which > maybe is not desired. The

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: Updated patch. -- Added file: http://bugs.python.org/file27125/alt_sysconfigdata.patch ___ Python tracker <http://bugs.python.org/issue15

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Changes by Richard Oudkerk : Removed file: http://bugs.python.org/file27125/alt_sysconfigdata.patch ___ Python tracker <http://bugs.python.org/issue15298> ___ ___ Pytho

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: Try again. -- Added file: http://bugs.python.org/file27126/alt_sysconfigdata.patch ___ Python tracker <http://bugs.python.org/issue15

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Changes by Richard Oudkerk : Added file: http://bugs.python.org/file27127/alt_sysconfigdata.patch ___ Python tracker <http://bugs.python.org/issue15298> ___ ___ Python-bug

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Changes by Richard Oudkerk : Removed file: http://bugs.python.org/file27126/alt_sysconfigdata.patch ___ Python tracker <http://bugs.python.org/issue15298> ___ ___ Pytho

[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-09-05 Thread Richard Oudkerk
Changes by Richard Oudkerk : Removed file: http://bugs.python.org/file27122/alt_sysconfigdata.patch ___ Python tracker <http://bugs.python.org/issue15298> ___ ___ Pytho

<    1   2   3   4   5   6   7   8   9   10   >