[issue8514] Create fsencode() and fsdecode() functions in os.path

2010-04-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: i'm +0.7 on fsencode/fsdecode going into os.path. My bikeshed 0.7? They're also useful for dealing with environment variables which are not strictly filesystem (fs) related but also suffer from the same issue requiring surrogate escape. But other than jus

[issue8532] Refinements to Python 3 New GIL

2010-04-25 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: -> pitrou nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8532] Refinements to Python 3 New GIL

2010-04-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: since the other discussion is ongoing on issue7946 i posted my comment there. -- nosy: +gregory.p.smith ___ Python tracker ___ ___

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-04-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: Nice dabeaz. One potential concern with "dabeaz_gil.patch 2010-04-25 21:13" is that it appears to always leave the gil_monitor thread running. This is bad on mobile/embedded platforms where waking up at regular intervals prevents advanced sleep states and

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-04-25 Thread David Beazley
David Beazley added the comment: Here is the result of running the writes.py test with the patch I submitted. This is on OS-X. bash-3.2$ ./python.exe writes.py t1 2.83990693092 0 t2 3.27937912941 0 t1 5.54346394539 1 t2 6.68237304688 1 t1 8.9648039341 2 t2 9.60041999817 2 t1 12.1856160164 3

[issue4171] SSL handshake fails after TCP connection in getpeername()

2010-04-25 Thread Dmitry Dvoinikov
Dmitry Dvoinikov added the comment: The problem does not reproduce in 3.1.1 nor in 3.1.2 (either x86 or x64). Antoine Pitrou пишет: > Antoine Pitrou added the comment: > > What happens if you remove the call to settimeout()? > Also, it would be nice if you could try with the latest py3k check

[issue8532] Refinements to Python 3 New GIL

2010-04-25 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: +nirai stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-04-25 Thread David Beazley
David Beazley added the comment: One comment on that patch I just submitted. Basically, it's an attempt to make an extremely simple tweak to the GIL that fixes most of the problems discussed here in an extremely simple manner. I don't have any special religious attachment to it though. Woul

[issue8532] Refinements to Python 3 New GIL

2010-04-25 Thread Alex
Changes by Alex : -- nosy: +alex ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-04-25 Thread David Beazley
David Beazley added the comment: The attached patch makes two simple refinements to the new GIL implemented in Python 3.2. Each is briefly described below. 1. Changed mechanism for thread time expiration In the current implementation, threads perform a timed-wait on a condition variable.

[issue8532] Refinements to Python 3 New GIL

2010-04-25 Thread David Beazley
David Beazley added the comment: Can't decide whether this should be attached to Issue 7946 or not. I will also post it there. (Feel free to close this issue if you want to keep 7946 alive). -- ___ Python tracker

[issue8532] Refinements to Python 3 New GIL

2010-04-25 Thread David Beazley
New submission from David Beazley : The attached patch makes two simple refinements to the new GIL implemented in Python 3.2. Each is briefly described below. 1. Changed mechanism for thread time expiration In the current implementation, threads perform a timed-wait on a condition variable.

[issue8523] shutil.rmtree and os.listdir cannot recover on error conditions

2010-04-25 Thread R. David Murray
R. David Murray added the comment: If solution 1 is acceptable in the general case, then I think a better fix would look like this: try: names = os.listdir(path) except os.error, err: onerror(os.listdir, path, sys.exc_info()) return That is, this is another case in which we can't

[issue7672] _ssl module overwrites existing thread safety callbacks

2010-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think asking Python extensions to be safe in the face of brutal DLL unloading is wise. I don't think any of our C extensions tries to respect such an use case. We could still try to support the use case of some application registering its own callback

[issue4171] SSL handshake fails after TCP connection in getpeername()

2010-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: What happens if you remove the call to settimeout()? Also, it would be nice if you could try with the latest py3k checkout. There's a couple of fixes for do_handshake there (including timeout issues). -- nosy: +pitrou priority: -> normal versions: +Py

[issue6462] bsddb3 intermittent test failures

2010-04-25 Thread STINNER Victor
STINNER Victor added the comment: Is the following error related to this issue? http://www.python.org/dev/buildbot/builders/x86 Windows7 2.6/builds/256/steps/test/logs/stdio test test_bsddb3 failed -- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\2.6.bolen-windows7

[issue8531] test_ascii_formatd fails if ctypes module is missing

2010-04-25 Thread STINNER Victor
STINNER Victor added the comment: > libffi 3.0.9 is installed. the buildbot master needs to pass > --with-system-libffi to configure. I fixed this issue by fixing my initial problem: test_ascii_formatd failure. Would you like to contact buildbot master owner to change the configuration? (are

[issue8514] Create fsencode() and fsdecode() functions in os.path

2010-04-25 Thread STINNER Victor
STINNER Victor added the comment: Oops, "Update path": I mean "Update patch" ;-) -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue8514] Create fsencode() and fsdecode() functions in os.path

2010-04-25 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file17061/os_path_fs_encode_decode.patch ___ Python tracker ___ ___ Python-bug

[issue8514] Create fsencode() and fsdecode() functions in os.path

2010-04-25 Thread STINNER Victor
STINNER Victor added the comment: Update path: rename fs_encode/fs_decode to fsencode/fsdecode. -- title: Create fs_encode() and fs_decode() functions in os.path -> Create fsencode() and fsdecode() functions in os.path Added file: http://bugs.python.org/file17082/os_path_fs_encode_deco

[issue8531] test_ascii_formatd fails if ctypes module is missing

2010-04-25 Thread Matthias Klose
Matthias Klose added the comment: libffi 3.0.9 is installed. the buildbot master needs to pass --with-system-libffi to configure. -- nosy: +doko ___ Python tracker ___ _

[issue7319] Silence DeprecationWarning by default

2010-04-25 Thread Brett Cannon
Brett Cannon added the comment: I'm tired of svn. I swear I made sure I didn't list that file in what was changed. Anyway, it's been reverted in r80496. -- ___ Python tracker _

[issue8531] test_ascii_formatd fails if ctypes module is missing

2010-04-25 Thread STINNER Victor
STINNER Victor added the comment: This issue is specific to Python 3.1: test_ascii_formatd starts with "PyOS_ascii_formatd is deprecated and not called from anywhere in Python itself. So this module is the only place it gets tested. Test that it works, and test that it's deprecated." I prefe

[issue8531] libffi: selected processor does not support stfeqd/ldfd (ARMv7Thumb)

2010-04-25 Thread STINNER Victor
STINNER Victor added the comment: Python 3.x doesn't have this issue because it uses libffi 3.0.9 and this version was fixed for ARMv7. Python 3.1 uses libffi 3.0.5. The buildbot should install libffi 3.0.9 and set system libffi path to Python configure script. ... or fix test_ascii_formatd:

[issue7319] Silence DeprecationWarning by default

2010-04-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: Brett, by the way, you had spurious changes in subprocess in your last commit. -- ___ Python tracker ___

[issue8531] libffi: selected processor does not support stfeqd/ldfd (ARMv7Thumb)

2010-04-25 Thread STINNER Victor
New submission from STINNER Victor : Errors on ARMv7Thumb Ubuntu 3.1 buildbot. http://www.python.org/dev/buildbot/builders/ARMv7Thumb Ubuntu 3.1/builds/37/steps/compile/logs/stdio creating build/temp.linux-armv7l-3.1-pydebug/libffi checking build system type... armv7l-unknown-linux-gnu checkin

[issue7319] Silence DeprecationWarning by default

2010-04-25 Thread Brett Cannon
Brett Cannon added the comment: Making this a 3.2 issue now. -- versions: +Python 3.2 -Python 2.7 ___ Python tracker ___ ___ Python-bu

[issue7319] Silence DeprecationWarning by default

2010-04-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: This still hasn't been ported to py3. -- resolution: fixed -> status: closed -> open ___ Python tracker ___

[issue8512] os.execv*e(): fix formatting of the environment variables (Python 3.1)

2010-04-25 Thread STINNER Victor
STINNER Victor added the comment: I choosed to backport #8391 fix to Python 3.1 (which is better) instead of writing a custom (shorter but incomplete) patch for Python 3.1: see msg104175. (os_execve_env.patch doesn't work if LANG environment variable is not set) -- resolution: -> fix

[issue7288] Detect improper leading whitespace in C files for Vim

2010-04-25 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-25 Thread STINNER Victor
STINNER Victor added the comment: I blocked the fix in Python 3.1 because it's non trivial and I prefer to avoid complex changes in Python 3.1. But then I realized that Python 3.1 has two bugs about environment variables. It uses sys.getfilesystemencoding()+surrogateecape to decode variables

[issue7319] Silence DeprecationWarning by default

2010-04-25 Thread Brett Cannon
Brett Cannon added the comment: -Q now works like -3 by causing the DeprecationWarning silencing to be skipped. Committed in r80492. -- resolution: -> fixed status: open -> closed ___ Python tracker _

[issue2302] Uses of SocketServer.BaseServer.shutdown have a race

2010-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed with a test in r80484 (trunk), r80486 (2.6), r80487 (py3k), r80491 (3.1). -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___

[issue8529] subclassing builtin class (str, unicode, list...) needs to override __getslice__

2010-04-25 Thread Florent Xicluna
Florent Xicluna added the comment: OK, I said nothing, it is already in the doc. :-) -- ___ Python tracker ___ ___ Python-bugs-list m

[issue8529] subclassing builtin class (str, unicode, list...) needs to override __getslice__

2010-04-25 Thread Florent Xicluna
Florent Xicluna added the comment: OK, but it yields Python 3 DeprecationWarning in the subclass. And there's no workaround to get rid of the deprecation. If it is the correct behaviour, maybe some words could be added about subclassing builtin types: http://docs.python.org/reference/datamode

[issue8529] subclassing builtin class (str, unicode, list...) needs to override __getslice__

2010-04-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: This is because unicode implements __getslice__. -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker __

[issue8530] Stringlib fastsearch can read beyond the front of an array

2010-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: It could read into an invalid page and segfault. It depends on specifics of the memory allocator. -- ___ Python tracker ___ ___

[issue8510] update to autoconf2.65

2010-04-25 Thread Matthias Klose
Matthias Klose added the comment: r80483: Makefile.pre.in (autoconf): Call autoconf/autoheader with -Wall to help the configure script to stay warning free. -- ___ Python tracker __

[issue8510] update to autoconf2.65

2010-04-25 Thread Matthias Klose
Matthias Klose added the comment: r80481: configure.in: Avoid autoconf warning: Assume C89 semantics that RETSIGTYPE is always void (issue #8510). Keep the definition, although the python code itself doesn't use it anymore. -- ___ Python tracker

[issue8530] Stringlib fastsearch can read beyond the front of an array

2010-04-25 Thread Alex
Alex added the comment: Well, the fact that it hasn't been shown to fail doesn't mean it can't fail. It relies on reading undefined memory, which is usually bad ;). However, since we're at i=0, regardless of what we add to the value it's going to end up terminating the loop, so I'm not sure

[issue8530] Stringlib fastsearch can read beyond the front of an array

2010-04-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: Why add a bounds check if it can't be caused to fail. How about just a comment? -- nosy: +benjamin.peterson ___ Python tracker ___ __

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-25 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: > Doesn't that only cache the first remote client it encounters, though? Maybe > a dictionary of caches? A BaseHTTPRequestHandler is instantiated every time a client connects, so there should be only one client per handler, no (the cache is an attrib

[issue8510] update to autoconf2.65

2010-04-25 Thread Matthias Klose
Matthias Klose added the comment: r80478 converts all obsolete AC_TRY_* macros to AC_*_IFELSE, the outcome is ... nothing (but whitespace changes): $ svn diff --diff-cmd diff -x -uEwB configure Index: configure === --- configure

[issue5099] subprocess.POpen.__del__() AttributeError (os module == None!)

2010-04-25 Thread Brett Cannon
Changes by Brett Cannon : Removed file: http://bugs.python.org/file16976/subprocess__del__.diff ___ Python tracker ___ ___ Python-bugs-list mai

[issue5099] subprocess.POpen.__del__() AttributeError (os module == None!)

2010-04-25 Thread Brett Cannon
Brett Cannon added the comment: New patch updated to at least r80476. -- Added file: http://bugs.python.org/file17080/subprocess_shutdown.diff ___ Python tracker ___

[issue6483] Modules are not deallocated correctly if m_size = -1

2010-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, in 2.x you didn't even have the choice. The dict of an extension module was always copied, becoming essentially immortal. In 3.x you can use an m_size>=0 so as to disable this behaviour. -- nosy: +pitrou versions: +Python 3.2 __

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-25 Thread Charles-Francois Natali
Changes by Charles-Francois Natali : Removed file: http://bugs.python.org/file17079/base_http_server_fqdn_lag.diff ___ Python tracker ___ ___ P

[issue8526] msilib doesn't support multiple CAB instances in same installer

2010-04-25 Thread Martin v . Löwis
Martin v. Löwis added the comment: I still don't see the need to create multiple CABs. Just use the Directory class to add files, and that will automatically record them in the singleton CAB. -- ___ Python tracker

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-25 Thread Santoso Wijaya
Santoso Wijaya added the comment: Doesn't that only cache the first remote client it encounters, though? Maybe a dictionary of caches? -- ___ Python tracker ___

[issue8523] shutil.rmtree and os.listdir cannot recover on error conditions

2010-04-25 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> tarek nosy: +tarek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue8526] msilib doesn't support multiple CAB instances in same installer

2010-04-25 Thread Bill Janssen
Bill Janssen added the comment: I'm certainly using the API provided by msilib, but perhaps I'm using it badly. Which API did you have in mind? I'm using msilib directly, not through bdist_msi. This seems like an artificial limitation to put on the Python library; the standard MSI spec sup

[issue8510] update to autoconf2.65

2010-04-25 Thread Matthias Klose
Matthias Klose added the comment: r80475: s/AC_AIX/AC_USE_SYSTEM_EXTENSIONS/ -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue8530] Stringlib fastsearch can read beyond the front of an array

2010-04-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: -Python 2.6, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8530] Stringlib fastsearch can read beyond the front of an array

2010-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Of course your patch might slow down the loop, so perhaps you want to run some benchmarks. -- ___ Python tracker ___ __

[issue8530] Stringlib fastsearch can read beyond the front of an array

2010-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: I can't manage to trigger any crash on a Linux machine, so I think we'll live without a test. -- nosy: +pitrou ___ Python tracker ___ _

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-25 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: The attached patch caches the result of FQDN lookup. -- keywords: +patch Added file: http://bugs.python.org/file17079/base_http_server_fqdn_lag.diff ___ Python tracker ___

[issue8530] Stringlib fastsearch can read beyond the front of an array

2010-04-25 Thread Florent Xicluna
Florent Xicluna added the comment: This patch should fix it. Since there's no failure, I don't find any test to add. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file17078/issue8530_rfind.diff ___ Python t

[issue8510] update to autoconf2.65

2010-04-25 Thread Matthias Klose
Matthias Klose added the comment: r80474: Replace AC_HELP_STRING with AS_HELP_STRING -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue8530] Stringlib fastsearch can read beyond the front of an array

2010-04-25 Thread Alex
Alex added the comment: Yes, as the comment of the top of the file notes, reading to s[n] (where n == len(s)) is safe because strings are null padded. -- ___ Python tracker ___

[issue8530] Stringlib fastsearch can read beyond the front of an array

2010-04-25 Thread Florent Xicluna
Florent Xicluna added the comment: I guess we don't have the same issue with the find() implementation? if (!STRINGLIB_BLOOM(mask, s[i+m])) Because: * len(s) = n = (w + m) * the loop condition is (i <= w) ==> s[w+m] is beyond the array, but it is '\0' probably Is it correct? --

[issue8530] Stringlib fastsearch can read beyond the front of an array

2010-04-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Interpreter Core nosy: +flox priority: -> normal stage: -> needs patch type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker __

[issue8530] Stringlib fastsearch can read beyond the front of an array

2010-04-25 Thread Alex
New submission from Alex : In Objects/stringlib/fastsearch.h the lines: if (!STRINGLIB_BLOOM(mask, s[i-1])) and if (!STRINGLIB_BLOOM(mask, s[i-1])) can read beyond the front of the array that is passed to it when the loop enters with i = 0. I originally notic

[issue8529] subclassing builtin class (str, unicode, list...) needs to override __getslice__

2010-04-25 Thread Florent Xicluna
New submission from Florent Xicluna : It looks like a bug, because __getslice__ is deprecated since 2.0. If you subclass a builtin type and override the __getitem__ method, you need to override the (deprecated) __getslice__ method too. And if you run your program with "python -3", it Example

[issue8514] Create fs_encode() and fs_decode() functions in os.path

2010-04-25 Thread STINNER Victor
STINNER Victor added the comment: > Please follow the naming convention used in os.path. The functions > would have to be called os.path.fsencode() and os.path.fsdecode(). Ok > Other than that, I'm +0 on the patch: the sys.filesystemencoding > logic doesn't really work well in practice - on Un

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-04-25 Thread Ray.Allen
Changes by Ray.Allen : -- nosy: +ysj.ray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements

2010-04-25 Thread Dan Kenigsberg
Changes by Dan Kenigsberg : -- nosy: +danken ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue8522] enhacement proposal in howto/doanddont

2010-04-25 Thread Georg Brandl
Georg Brandl added the comment: Thanks, applied in r80461. -- nosy: +georg.brandl resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue8528] typo in argparse documentation

2010-04-25 Thread Georg Brandl
Georg Brandl added the comment: Thanks, fixed in r80460. -- assignee: d...@python -> nosy: +georg.brandl resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue8528] typo in argparse documentation

2010-04-25 Thread akira
New submission from akira <4kir4...@gmail.com>: `messges` should be replaced by `messages` on http://docs.python.org/dev/library/argparse.html#upgrading-optparse-code page. -- assignee: d...@python components: Documentation messages: 104144 nosy: akira, d...@python severity: normal stat

[issue7865] io close() swallowing exceptions

2010-04-25 Thread Pascal Chambon
Pascal Chambon added the comment: SHould be better this way then B-) -- Added file: http://bugs.python.org/file17077/no_swallow_on_close2.patch ___ Python tracker ___ ___

[issue7865] io close() swallowing exceptions

2010-04-25 Thread Pascal Chambon
Changes by Pascal Chambon : Removed file: http://bugs.python.org/file17046/release_io_close_exceptions.patch ___ Python tracker ___ ___ Python-