[issue8408] need console/pager module

2010-04-15 Thread anatoly techtonik
anatoly techtonik added the comment: It is not a bug, but a "feature request". -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue8401] Strange behavior of bytearray slice assignment

2010-04-15 Thread Ezio Melotti
Ezio Melotti added the comment: Here is a proof of concept that fixes the problem. The doc of bytearray() says about its first arg: * If it is a string, you must also give the encoding [...]. * If it is an integer, the array will have that size and will be initialized with null bytes. * If

[issue7384] curses crash on FreeBSD

2010-04-15 Thread Jeroen Ruigrok van der Werven
Jeroen Ruigrok van der Werven added the comment: For the record, this happens on FreeBSD 8 as well. It seems it is still the same bug as what I reported back in March 2009 on the Python-dev list. If you run the test stand-alone with ./python Lib/test/regrtest.py -uall test_curses it passes a

[issue4356] Add "key" argument to "bisect" module functions

2010-04-15 Thread Alex
Alex added the comment: Looks nice to me, however I wonder if there isn't some overlap with the requests to add a key= kwarg to heapq methods (and the discussion about adding a Heap class there). -- nosy: +alex ___ Python tracker

[issue8416] python 2.6.5 documentation can't search

2010-04-15 Thread Santiago Gala
New submission from Santiago Gala : http://docs.python.org/release/2.6.5/search.html?q=regular+expression fails. It fails because http://docs.python.org/release/2.6.5/searchindex.js returns 404 NOT FOUND There are really two bugs here: * that the file is not there, and * that the page gives n

[issue8401] Strange behavior of bytearray slice assignment

2010-04-15 Thread Ezio Melotti
Ezio Melotti added the comment: This happens because bytearray_ass_subscript() (Objects/bytearrayobject.c:588) calls PyByteArray_FromObject() (:641) that in turn calls bytearray_init() (:746), so the results are similar to the ones returned by calling bytearray(...) directly. -- nosy

[issue8415] namedtuple vs tuple

2010-04-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, this was by design. There were two possible constructors, one using positional arguments or keywords and one from an iterable. Either one could have been the main constructor. A number of use cases favored the one that we choose. It was a good d

[issue8415] namedtuple vs tuple

2010-04-15 Thread Ezio Melotti
Ezio Melotti added the comment: You should propose this on the python-ideas mailing list first. Anyway it's already too late to do this on Python 2.x, and since it's not backward compatible for the 1-element case, it won't probably be accepted for 3.x either, so I suggest closing this as rejec

[issue8415] namedtuple vs tuple

2010-04-15 Thread H Krishnan
New submission from H Krishnan : Named tuples and tuples have different creation behavior. Changing a tuple to a namedtuple will involve changing the usage as well. For example: >>> ntuple = collections.namedtuple("ntuple", "a,b") >>> ntuple(1,2) ntuple(a=1, b=2) >>> tuple(1,2) Traceback (most

[issue4356] Add "key" argument to "bisect" module functions

2010-04-15 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file16944/SortedCollection.py ___ Python tracker ___ ___ Python-bugs-list mai

[issue4356] Add "key" argument to "bisect" module functions

2010-04-15 Thread Raymond Hettinger
Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file16929/SortedCollection.py ___ Python tracker ___ ___ Python-bugs-list m

[issue2987] RFC2732 support for urlparse (IPv6 addresses)

2010-04-15 Thread Senthil Kumaran
Senthil Kumaran added the comment: merged into py3k in revision 80102 and release31-maint in revision 80103. Thanks for the patches, Tony and Hans. I have acknowledged it in NEWS file too. -- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed

[issue8414] Add test cases for assert

2010-04-15 Thread Ezio Melotti
Ezio Melotti added the comment: Wouldn't it be better to test e.args instead or in addition to str(e)? Skipping the whole test if __debug__ is False is also a good idea. -- nosy: +ezio.melotti priority: -> normal stage: -> patch review ___ Python t

[issue8414] Add test cases for assert

2010-04-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: I propose you move all the assert test cases into there own test method and decorate it with @unittest.skipUnless(__debug__). -- nosy: +benjamin.peterson ___ Python tracker ___

[issue2987] RFC2732 support for urlparse (IPv6 addresses)

2010-04-15 Thread Senthil Kumaran
Senthil Kumaran added the comment: Committed into trunk in revision 80101 -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue8414] Add test cases for assert

2010-04-15 Thread Gregory Nofi
Changes by Gregory Nofi : Added file: http://bugs.python.org/file16943/test_grammar.v3.patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue8414] Add test cases for assert

2010-04-15 Thread Gregory Nofi
New submission from Gregory Nofi : I'm adding some assert tests to test_grammar.py to verify that the assert statement raises (or doesn't raise) an AssertionError properly. NOTE: I'm currently helping Dino port IronPython tests into CPython. This is part of that series. -- components:

[issue7424] segmentation fault in listextend during install

2010-04-15 Thread Jon Buller
Jon Buller added the comment: I found that python 2.4.5 will compile and install on this machine, though I don't know if that helps anyone or not, or how to track this down further. (At least I can run mercurial on that machine again.) On 03/11/10 18:16, Jon Buller wrote: > > Jon Buller added

[issue8413] String interpolation doesn't work with sys.version_info

2010-04-15 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue8413] String interpolation doesn't work with sys.version_info

2010-04-15 Thread Arfrever Frehtes Taifersar Arahesis
New submission from Arfrever Frehtes Taifersar Arahesis : String interpolation doesn't work with sys.version_info in Python versions in which sys.version_info is a named tuple. It's a regression in Python 2.7 and 3.1. This problem doesn't concern named tuples created using collections.namedtu

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

2010-04-15 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file16918/os_execvpe_surrogates.patch ___ Python tracker ___ ___ Python-bugs-l

[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-04-15 Thread STINNER Victor
Changes by STINNER Victor : -- dependencies: +pickle is unable to encode unicode surrogates ___ Python tracker ___ ___ Python-bugs-list

[issue8412] os.system() doesn't support surrogates nor bytes

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: See also #8391 (os.execvpe env) and #8393 (subprocess cwd). -- ___ Python tracker ___ ___ Python-bug

[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-04-15 Thread STINNER Victor
Changes by STINNER Victor : -- dependencies: +os.system() doesn't support surrogates nor bytes ___ Python tracker ___ ___ Python-bugs-l

[issue8412] os.system() doesn't support surrogates nor bytes

2010-04-15 Thread STINNER Victor
New submission from STINNER Victor : os.system() doesn't support bytes, bytearray not str containing surrogates. Attached patch uses PyUnicode_FSConverter, bytes2str and release_bytes in (the non-Windows version of) os.system() to support all of this. It locks the buffer because os.system() re

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

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: New version of the patch: - factorize code between execve(), spawnve() and spawnvpe() - support also surrogates in environment variable names - support bytes and bytearray (bytearray cannot be used as a dictionary key, but my patch supports it) - remove unr

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

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: Other notes: Environment variable *names* use also surrogateescape "encoding". os.spawnve() and os.spawnvpe() should also be patched (the code should also be factorized). -- ___ Python tracker

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

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: My patch doesn't work for types bytes and bytearray. I noticed that py3k uses surrogateescape to encode environment variable values ;-) -- ___ Python tracker

[issue8354] siginterrupt with flag=False is reset when signal received

2010-04-15 Thread Andrew Bennetts
Andrew Bennetts added the comment: > I'm not exactly sure how we will know if it is expected to fail, > though. I don't think `HAVE_SIGACTION` is exposed nicely to Python > right now. It might be useful to have the contents of pyconfig.h exposed as a dict somehow. Maybe call it sys._pyconfig

[issue7606] test_xmlrpc fails with non-ascii path

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: What do you think about my solution (convert the traceback to ASCII to avoid the encoding issue)? If you would like to support non-ASCII characters in HTTP headers, you should open a new issue. For the compatibility, I prefer to use pure ASCII headers because

[issue8393] subprocess: support undecodable current working directory on POSIX OS

2010-04-15 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file16920/posixsubprocess_cwd.patch ___ Python tracker ___ ___ Python-bugs-lis

[issue8393] subprocess: support undecodable current working directory on POSIX OS

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: New patch supporting bytearray type (remove the buggy assertion). -- Added file: http://bugs.python.org/file16939/posixsubprocess_cwd-2.patch ___ Python tracker ___

[issue8394] ctypes.dlopen() doesn't support surrogates

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: (oops, my patch included unrelated changes about trailing spaces) -- Added file: http://bugs.python.org/file16938/ctypes_dlopen_surrogates-2.patch ___ Python tracker __

[issue8394] ctypes.dlopen() doesn't support surrogates

2010-04-15 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file16937/ctypes_dlopen_surrogates-2.patch ___ Python tracker ___ ___ Python-b

[issue8394] ctypes.dlopen() doesn't support surrogates

2010-04-15 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file16921/ctypes_dlopen_surrogates.patch ___ Python tracker ___ ___ Python-bug

[issue8394] ctypes.dlopen() doesn't support surrogates

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: amaury> Your patch should handle the case when name2 is a bytearray. Ok, fixed. I also tested None: Python does segfault :-) New patch rejects None value. -- Added file: http://bugs.python.org/file16937/ctypes_dlopen_surrogates-2.patch __

[issue8410] Fix emulated lock to be 'fair'

2010-04-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't understand why you claim your patched version is fair. As far as I can tell, if you have three threads A, B and C all routinely trying to take this lock, your implementation can perfectly well bounce between A and B without ever giving the lock to C.

[issue2090] __import__ with fromlist=

2010-04-15 Thread George Sakkis
George Sakkis added the comment: More fun findings: dots are special-cased too, but only if they don't appear consecutively (!); ~$ cat pkg/__init__.py print __name__ ~$ python -c "__import__('pkg', fromlist=['.'])" pkg pkg.. ~$ python -c "__import__('pkg', fromlist=['..'])" pkg ~$ python -c

[issue5671] Speed up pickling of lists in cPickle

2010-04-15 Thread Garen
Changes by Garen : -- nosy: +Garen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailma

[issue2090] __import__ with fromlist=

2010-04-15 Thread George Sakkis
George Sakkis added the comment: > When you use an empty string in fromlist you are essentially simulating > ``from pkg import`` which makes absolutely no sense, so no one has > cared enough to try to fix this. ``from pkg import __bogus__, 123, @$%`` doesn't make sense either and yet the equi

[issue2090] __import__ with fromlist=

2010-04-15 Thread Brett Cannon
Brett Cannon added the comment: Although now that I think about it, there is a slightly sticky situation of someone using '' or some name with a slash for a key in __dict__. The usage in fromlist would then be "reasonable", but the semantics would be somewhat odd as fromlist is really only ne

[issue7384] curses crash on FreeBSD

2010-04-15 Thread Mark Dickinson
Mark Dickinson added the comment: With that patch, I'm still getting the core dump (with the traceback looking pretty much as it did before). When I traced through this with gdb, I didn't see stdscr getting set to 0 at any point. Unless I missed any, the only curses library calls made (in s

[issue7384] curses crash on FreeBSD

2010-04-15 Thread Jeroen Ruigrok van der Werven
Changes by Jeroen Ruigrok van der Werven : -- nosy: +asmodai ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue2090] __import__ with fromlist=

2010-04-15 Thread Brett Cannon
Brett Cannon added the comment: On Thu, Apr 15, 2010 at 14:56, Éric Araujo wrote: That's fine with me if someone wrote a patch that did that. -- title: __import__ with fromlist=[''] causes double initialization of modules -> __import__ with fromlist= Added file: http://bugs.python.o

[issue7384] curses crash on FreeBSD

2010-04-15 Thread Mark Dickinson
Mark Dickinson added the comment: > Here's a possible patch Thanks. I'll give it a try on my FreeBSD VM and report back. BTW, did you mean to include the threading change in that patch? -- ___ Python tracker

[issue7384] curses crash on FreeBSD

2010-04-15 Thread Mark Dickinson
Mark Dickinson added the comment: > Could I get a login on the buildbot to make a fix? I think David Bolen (db3l) is the maintainer. David? -- ___ Python tracker ___ __

[issue7384] curses crash on FreeBSD

2010-04-15 Thread A.M. Kuchling
A.M. Kuchling added the comment: Here's a possible patch; it at least doesn't seem to break the module on MacOS, though MacOS doesn't crash with the current code either. -- keywords: +patch Added file: http://bugs.python.org/file16935/freebsd-curses.diff __

[issue2090] __import__ with fromlist=[''] causes double initialization of modules

2010-04-15 Thread Éric Araujo
Éric Araujo added the comment: Since ``from pkg import`` makes no sense, would it be okay if __import__ with an empty fromlist or slashes raised an error? -- nosy: +merwok ___ Python tracker __

[issue4111] Add Systemtap/DTrace probes

2010-04-15 Thread Garen
Changes by Garen : -- nosy: +Garen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailma

[issue7384] curses crash on FreeBSD

2010-04-15 Thread A.M. Kuchling
A.M. Kuchling added the comment: Could I get a login on the buildbot to make a fix? I bet the problem is with the stdscr object. PyCurses_InitScr() does 'return (PyObject *)PyCursesWindow_New(stdscr);'. PyCursesWindow_Dealloc() does: if (wo->win != stdscr) delwin(wo->win); I bet FreeBSD is

[issue2090] __import__ with fromlist=[''] causes double initialization of modules

2010-04-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Brett. For the most part, we don't care about implementation artifacts and undefined behaviors (as long as it doesn't segfault). -- nosy: +rhettinger ___ Python tracker

[issue2090] __import__ with fromlist=[''] causes double initialization of modules

2010-04-15 Thread Brett Cannon
Brett Cannon added the comment: If you want a justification, think of it as undefined behavior. When you use an empty string in fromlist you are essentially simulating ``from pkg import`` which makes absolutely no sense, so no one has cared enough to try to fix this. It's such a hack that I d

[issue8408] need console/pager module

2010-04-15 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +merwok ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue8299] Improve GIL in 2.7

2010-04-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Googling a bit gave me this: > http://lists.apple.com/archives/darwin-kernel/2005/Dec/msg00022.html > It would appear that mac os X was at least lacking full posix semaphore > support in 2005. Hmm. OS X really sucks. -- ___

[issue8409] gettext should honor $LOCPATH environment variable

2010-04-15 Thread Roumen Petrov
Roumen Petrov added the comment: LOCPATH is not used by GNU gettext. /usr/share/locale/XX/... - message translation files (GNU gettext) /usr/lib/locale/xx_XX*/ - locale (GNU libc) -- nosy: +rpetrov ___ Python tracker

[issue7384] curses crash on FreeBSD

2010-04-15 Thread Mark Dickinson
Mark Dickinson added the comment: Here's the top of the backtrace. (Thanks asmodai for helping me out with working out how to build a FreeBSD system ncurses with debugging information.) #0 0x000801460714 in cannot_delete (win=0x80116b1d0) at /usr/src/lib/ncurses/ncursesw/../../../co

[issue2987] RFC2732 support for urlparse (IPv6 addresses)

2010-04-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: This is ok with me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue8406] Make some setup.py paths exclude-able

2010-04-15 Thread Ned Deily
Ned Deily added the comment: Sorry, Ronald, of course that's what you were suggesting with the proposed configure --with options. +1 on that. I'd just want to ensure that any solution addresses any needs in Issue7713, too. Something like that should. There are probably other open issues i

[issue7490] IGNORE_EXCEPTION_DETAIL should ignore the module name

2010-04-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2010/4/15 Nick Coghlan : > > Nick Coghlan added the comment: > > With a little more thought, I'm actually keen on including it as well > (although the docs still need a bit more tweaking). The 2.x/3.x compatibility > point is a good one. > > If Benjamin OK

[issue8408] need console/pager module

2010-04-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Please propose on python-ideas before making a bug. -- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed ___ Python tracker __

[issue8411] Improve condition variable emulation on NT

2010-04-15 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson : As per Antoine's suggestion, here is a patch to improve condition variable emulation on windows. By using the windows Semaphore (which hasn't always been available) all of the problems in emulating condition variables using Events disappear. in pa

[issue8406] Make some setup.py paths exclude-able

2010-04-15 Thread Ned Deily
Ned Deily added the comment: Skip, I saw David's chroot remark but I'm having a hard time envisioning how one could use that as a practical matter to build an OS X framework without some *serious* changes to the current configure(s), Makefile(s), and installer script. -- ___

[issue8410] Fix emulated lock to be 'fair'

2010-04-15 Thread Martin v . Löwis
Martin v. Löwis added the comment: > On pthreads plaforms, if the posix_sem functions aren't available > (when _POSIX_SEMAPHORES isn't defined), the python lock is > implemented with a mutex and a condition variable. This appears to > be the case on Mac OS X, for example. The problem is that th

[issue8406] Make some setup.py paths exclude-able

2010-04-15 Thread Ned Deily
Ned Deily added the comment: Ronald, as far as I can see, the patch as it stands only addresses dbm so more work is needed to address all the other cases, the ones that actually matter. Issue7713 describes a more serious, general problem because a number of other builders / distributers have

[issue8410] Fix emulated lock to be 'fair'

2010-04-15 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson : On pthreads plaforms, if the posix_sem functions aren't available (when _POSIX_SEMAPHORES isn't defined), the python lock is implemented with a mutex and a condition variable. This appears to be the case on Mac OS X, for example. The problem is that

[issue5091] Segfault in PyObject_Malloc(), address out of bounds

2010-04-15 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: It was a long time ago, but: - I think the interpreter will never be able to catch all memory allocation errors, since because of overcommitting (which Linux does), you can very well get a segmentation fault even if the memory allocation routine (be i

[issue8405] Improve test_os._kill (failing on slow machines)

2010-04-15 Thread R. David Murray
R. David Murray added the comment: I like this version of the patch better. Is there any reason not to drop the initial sleep(0.5) and loop 10 times instead? Any place we can cut down the sleeps so the test suite runs faster on fast machines is good. As someone else said, it *ought* to be p

[issue6916] Remove deprecated items from asynchat

2010-04-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue8406] Make some setup.py paths exclude-able

2010-04-15 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue2090] __import__ with fromlist=[''] causes double initialization of modules

2010-04-15 Thread George Sakkis
George Sakkis added the comment: Just bitten by this (through a 3rd party library that uses this pattern) and I'm wondering why it was closed as invalid. Passing a non-empty fromlist string also imports the tail module but without the side effect of double import, so it's not generally harmfu

[issue8354] siginterrupt with flag=False is reset when signal received

2010-04-15 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: > * There seems to be no good reason to special case SIGCHLD in signal_handler. > The comment about infinite recursion has no obvious interpretation to me. > Fortunately, this is irrelevant on platforms with sigaction, because the > handler remains

[issue3823] ssl.wrap_socket() is incompatible with servers that drop privileges, due to keyfile requirement

2010-04-15 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Any update about this issue? This should be marked as high priority, imho. -- ___ Python tracker ___

[issue4453] MSI installer shows error message if "Compile .py files to bytecode" option is selected

2010-04-15 Thread Aaron Thomas
Aaron Thomas added the comment: I can verify this will all versions of Windows 7, and the versions of python 32 and 64 bit. I install this at my work to many machines, and every one of them crashes when trying to 'compile py scripts to bytecode' during install. I have to left click the setup

[issue8279] python-gdb PyListTests fail

2010-04-15 Thread Dave Malcolm
Dave Malcolm added the comment: New version of patch attached All tests continue to pass for me. I believe this will fix the "py-list", "py-locals", "py-print" commands and their respective tests on Ubuntu; I expect py-up/py-down to still fail due to missing gdb.Frame.select method. ---

[issue8299] Improve GIL in 2.7

2010-04-15 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Googling a bit gave me this: http://lists.apple.com/archives/darwin-kernel/2005/Dec/msg00022.html It would appear that mac os X was at least lacking full posix semaphore support in 2005. -- ___ Python tracke

[issue8299] Improve GIL in 2.7

2010-04-15 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: David, I urge you to reconsider: The "emulated" semaphore is broken because it is unfair. It is clearly a programming error, born out of naivete about how to implement such primitives. Proper semaphores therefore cannot be implemented using the "exac

[issue5419] urllib.request.open(someURL).read() returns a bytes object so writing it requires binary mode

2010-04-15 Thread Senthil Kumaran
Senthil Kumaran added the comment: Fixed in revision 80092 and merged into release31-maint in revision 80093. I am marking this as fixed and closed. If there are any similar issues at other places, we will address them as separate bugs. -- resolution: accepted -> fixed status: open ->

[issue8299] Improve GIL in 2.7

2010-04-15 Thread David Beazley
David Beazley added the comment: I hope everyone realizes that all of this bike-shedding about emulated semaphores versus "real" semaphores is mostly a non-issue. For one thing, go look at how a "real" semaphore is implemented by reading the source code to pthreads or some other thread libr

[issue8299] Improve GIL in 2.7

2010-04-15 Thread R. David Murray
R. David Murray added the comment: Also note that his results were much worse on MacOS than anyone was seeing on Linux, which may support this theory :) -- ___ Python tracker __

[issue8299] Improve GIL in 2.7

2010-04-15 Thread R. David Murray
R. David Murray added the comment: My understanding is that David noticed the problem originally on MacOS. If the emulation is indeed being used on that platform (and a little googling indicates the MacOS posix semaphore implementation is considered at least slightly broken, and FreeBSD didn

[issue8299] Improve GIL in 2.7

2010-04-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > You do realize, that if we enable the USE_SEMAPHORE, we get the GIL > behaviour as seen on windows and with my ROUNDROBIN_GIL > implementation, right? I haven't studied this argument, but I don't see how that contradicts anything. The main issue witnessed wit

[issue8299] Improve GIL in 2.7

2010-04-15 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: You do realize, that if we enable the USE_SEMAPHORE, we get the GIL behaviour as seen on windows and with my ROUNDROBIN_GIL implementation, right? Also, at the GIL open space talk on PyCon, David did show us the "emulation" source code as if it were _

[issue7384] curses crash on FreeBSD

2010-04-15 Thread Mark Dickinson
Mark Dickinson added the comment: I'm looking at this again, after installing FreeBSD 8.0/amd64 in a VM. I've reduced Lib/test/test_curses.py to the following 9 lines: import rlcompleter import curses f = open('mytempfile', 'w+b') stdscr = curses.initscr() stdscr.putwin(f) f.seek(0) curses.get

[issue8299] Improve GIL in 2.7

2010-04-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Yes, we put #error in both places (defining and undefining > USE_SEMAPHORES). The colleague in question is Christian Tismer, he is > unlikely to have gotten it wrong. Ok, so can you or Christian open an issue about it? We should try to fix it. > I am also c

[issue7490] IGNORE_EXCEPTION_DETAIL should ignore the module name

2010-04-15 Thread R. David Murray
R. David Murray added the comment: By that logic, 2to3 can't solve anything. I don't think there's any question that this patch should be applied to 3.2. 3.1 might be an issue as it is a new feature, but maybe we can claim it is a bug fix :) As for 3to2, like I said I don't think 3to2 touch

[issue8299] Improve GIL in 2.7

2010-04-15 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Yes, we put #error in both places (defining and undefining USE_SEMAPHORES). The colleague in question is Christian Tismer, he is unlikely to have gotten it wrong. I am also curious why David Beazley kept talking about the "binary semaphore" when it

[issue850728] Semaphore.acquire() timeout parameter

2010-04-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: 2.7 is in (mostly) feature freeze mode, so I'm retargetting this to 3.2. (yes, this issue is very old; sorry) I will try to include it (or a variant thereof; the non-blocking + timeout combination doesn't make much sense, so I plan to forbid it) to the py3k bra

[issue2987] RFC2732 support for urlparse (IPv6 addresses)

2010-04-15 Thread Senthil Kumaran
Senthil Kumaran added the comment: Final patch with inclusion of detecting invalid urls at netloc and hostname level, tests and NEWS entry. -- Added file: http://bugs.python.org/file16931/issue2987-final.patch ___ Python tracker

[issue8299] Improve GIL in 2.7

2010-04-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > However, I just asked a colleague with a os X to compile python 2.7 > and _POSIX_SEMAPHORES isn't defined, and so, it is running using the > emulation. Why, I wonder? Isn't it defined in unistd.h? Perhaps a bad combination of defines. Has he checked that th

[issue8299] Improve GIL in 2.7

2010-04-15 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Oh dear. I was assuming that the mutex+condition variable were the actual implementation mostly in use on pthreads. This is because of David's GIL open talk at pycon, where we were looking at the source and bickering about the placement of "pthread_

[issue7490] IGNORE_EXCEPTION_DETAIL should ignore the module name

2010-04-15 Thread Lennart Regebro
Lennart Regebro added the comment: Sure, but +IGNORE_EXCEPTION_DETAIL will only work on Python 3.2+, so 2to3 can't solve the issue. It can only help once 3.2 does the actual solving. ;) 3to2 could simply remove the module name from exceptions in the output. You don't need to touch IGNORE_EXCE

[issue7490] IGNORE_EXCEPTION_DETAIL should ignore the module name

2010-04-15 Thread R. David Murray
R. David Murray added the comment: @Lennart: no, in that direction (2.7 to 3.x) there's less of a problem. You leave the module name off in the doctest, and have 2to3 add the IGNORE_EXCEPTION_DETAIL to the doctest during translation. I was looking at the farther future case, where a project

[issue8406] Make some setup.py paths exclude-able

2010-04-15 Thread Skip Montanaro
Skip Montanaro added the comment: Ronald> To be honest I'd must rather remove /opt/local and /sw entirely Ronald> from setup.py and add new configure flags to specify the Ronald> location of a number of libraries (e.g. 'configure Ronald> --with-sleepycat-db=/opt/local'). Explicit co

[issue8409] gettext should honor $LOCPATH environment variable

2010-04-15 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- versions: +Python 2.7, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8409] gettext should honor $LOCPATH environment variable

2010-04-15 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- versions: -Python 2.7, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue8409] gettext should honor $LOCPATH environment variable

2010-04-15 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : LOCPATH is an environment variable recognized by locale(1) http://man.he.net/?topic=locale§ion=all gettext.find() should probably consult $LOCPATH and use that for localedir if the argument is not given. -- assignee: barry components: Library (Lib

[issue8299] Improve GIL in 2.7

2010-04-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > if _POSIX_SEMAPHORES is defined, thread_pthread.h is designed to use > the (fair) semaphore. If it is not present, or > HAVE_BROKEN_POSIX_SEMAPHORES defined, the semaphore is supposed to be > emulated using a condition variable. > Now, I don't have access to

[issue7490] IGNORE_EXCEPTION_DETAIL should ignore the module name

2010-04-15 Thread Nick Coghlan
Nick Coghlan added the comment: With a little more thought, I'm actually keen on including it as well (although the docs still need a bit more tweaking). The 2.x/3.x compatibility point is a good one. If Benjamin OKs it, I'll include this in the list of things I want to get to for beta2 (sai

[issue7490] IGNORE_EXCEPTION_DETAIL should ignore the module name

2010-04-15 Thread Lennart Regebro
Lennart Regebro added the comment: It's not possible for 2to3 to reformat exceptions, as the formatting would need to go from TheException to themodule.TheException, and there is no way to figure out the module name... -- ___ Python tracker

[issue7490] IGNORE_EXCEPTION_DETAIL should ignore the module name

2010-04-15 Thread R. David Murray
R. David Murray added the comment: I think this one is worth making an exception for, since it would mean that a project could have 3.x doctests that also work with 2.7, whereas if we leave it out of 2.7 the doctests have to stay in 2.x format even if the project has (at some future point) dr

  1   2   >