[issue16883] "--enable-shared" during configure forces "2.7.3" to build as "2.7.2+" on Ubuntu 11.10

2013-01-06 Thread Isaac (.ike) Levy
New submission from Isaac (.ike) Levy: Host OS: Ubuntu 11.10 (oneiric) --enable-shared flag during configure forces 2.7.3 to build as 2.7.2+ TO REPLICATE: unpack Python tarball, # cd Python-2.7.3/ # ./configure --enable-shared # make # ./python -V 2.7.2+ # make clean ; ./configure --enable-sh

[issue16882] Python 2.7 has 73 files with hard references to /usr/local when building on *NIX

2013-01-06 Thread Isaac (.ike) Levy
New submission from Isaac (.ike) Levy: There are currently 73 files with hard-coded references to /usr/local, To see what I'm talking about, unpack a source Python tarball, and check it out like so: # cd Python-2.7.3 # grep -Rl '\/usr\/local' ./* | wc -l 73 To read more detail, # grep -R '\/u

[issue16154] Some minor doc fixes in Doc/library

2013-01-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue13899] re pattern r"[\A]" should work like "A" but matches nothing. Ditto B and Z.

2013-01-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: -> needs patch versions: +Python 3.3, Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mail

[issue16868] Python Developer Guide: Include a reminder to "ping" bug report if not reviewed in timely manner

2013-01-06 Thread Ezio Melotti
Ezio Melotti added the comment: A month sounds good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2013-01-06 Thread Eli Bendersky
Eli Bendersky added the comment: I think that changing the _elementtree's Element's name to match the Python version, and then making sure the same serialized object is returned - is a worthy option to try. Then it will hopefully "just work". When pickle deserializes a user-defined object tha

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2013-01-06 Thread Daniel Shahaf
Daniel Shahaf added the comment: Eli Bendersky wrote on Thu, Jan 03, 2013 at 14:44:02 +: > If this change is required (even if we choose to name it > "xml.etree.ElementTree.Element" for Py compatibility to fix the pickling > regression, we may find ourselves in a need to change it between 3.3

[issue16853] add a Selector to the select module

2013-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: (Adding Richard Oudkerk to the nosy list as I am pleading here for support of WSAPoll(), see last few messages.) -- nosy: +sbt ___ Python tracker ___

[issue16853] add a Selector to the select module

2013-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: Maybe I should explain the need for SELECT_CONNECT more. This is necessary so that on Windows the PollSelector can use WSAPoll(). The reason is that for async connect() calls, WSAPoll() doesn't return the FD as writable, just as having an exception. I did

[issue16853] add a Selector to the select module

2013-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: This seems okay. I am attaching the changes I had to make to Tulip to support this. However, two Tulip tests are now failing: - tulip.events_test.PollEventLoopTests.testCreateSslTransport fails with spurious file descriptors returned by poll() that aren't

[issue16878] argparse: positional args with nargs='*' defaults to []

2013-01-06 Thread Chris Jerdonek
Chris Jerdonek added the comment: I was referring to the fact that optionals have an additional case that positionals don't have: "Note that for optional arguments, there is an additional case -- the option string is present but not followed by a command-line argument." (from http://docs.pyth

[issue16877] Odd behavior of ~ in os.path.abspath and os.path.realpath

2013-01-06 Thread Ian Shields
Ian Shields added the comment: I think that's an excellent resolution to the problem. Thank you. -- ___ Python tracker ___ ___ Python-

[issue16878] argparse: positional args with nargs='*' defaults to []

2013-01-06 Thread R. David Murray
R. David Murray added the comment: >>> p.add_argument('-a', action="append", default=None) >>> p.parse_args([]) Namespace(a=None) >>> p.parse_args(['-a', '1', '-a', '2']) Namespace(a=['1', '2']) So there's a logical correspondence there (repeated option vs multiple values, each producing a list

[issue16878] argparse: positional args with nargs='*' defaults to []

2013-01-06 Thread Chris Jerdonek
Chris Jerdonek added the comment: I agree it would be very likely to break working code. Can you elaborate on your point about 'append' though? I'm not sure I see it. Aside from consistency, I'm wondering if there is ever a case where it would help to return None for positional arguments. F

[issue16854] usage() is not defined in Lib/test/regrtest.py

2013-01-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue9685] tuples should remember their hash value

2013-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: My apologies once again, Raymond. I mistakenly thought that I unassigned the issue from you (it was a Roundup bug at this day). As for the issue, I totally agree with Tim. -- ___ Python tracker

[issue10156] Initialization of globals in unicodeobject.c

2013-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > unicode-leak.patch doesn't fix #16143 though. unicode_empty and > unicode_latin1 need to be initialized, too. Indeed. I'll upload patches tomorrow. -- ___ Python tracker _

[issue16868] Python Developer Guide: Include a reminder to "ping" bug report if not reviewed in timely manner

2013-01-06 Thread Todd Rovito
Todd Rovito added the comment: I agree with Meador it should be a specific amount of time. As a beginner at contributing to Python I thought "substantial amount of time" meant one month but it depends on interpretation. I think making it very specific makes the documentation more clear. Inc

[issue12939] Add new io.FileIO using the native Windows API

2013-01-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: > I don't like the idea of a specific I/O module for an OS. Is the public API > different? It was partly to make integration with the existing tests easier: _io, _pyio and winio are tested in parallel. > Can't you reuse the io module? In what sense? I don't

[issue16853] add a Selector to the select module

2013-01-06 Thread Charles-François Natali
Charles-François Natali added the comment: > If you don't want to change the API back to separate register_*() methods for > readers and writers, perhaps you can add a method that tells me, for a given > fileobj, whether it is registered, and with which poll flags > (SELECT_IN/OUT/both) and th

[issue12939] Add new io.FileIO using the native Windows API

2013-01-06 Thread STINNER Victor
STINNER Victor added the comment: I don't like the idea of a specific I/O module for an OS. Is the public API different? Can't you reuse the io module? Le 6 janv. 2013 14:59, "Richard Oudkerk" a écrit : > > Richard Oudkerk added the comment: > > Attached is a patch which adds a winio module whi

[issue16876] epoll: reuse epoll_event buffer instead of allocating a new one at each poll()

2013-01-06 Thread Charles-François Natali
Charles-François Natali added the comment: Updated to reflect Richard's comment. -- Added file: http://bugs.python.org/file28601/epoll_realloc.diff ___ Python tracker ___ ___

[issue16876] epoll: reuse epoll_event buffer instead of allocating a new one at each poll()

2013-01-06 Thread Charles-François Natali
Changes by Charles-François Natali : Removed file: http://bugs.python.org/file28600/epoll_realloc.diff ___ Python tracker ___ ___ Python-bugs-

[issue9685] tuples should remember their hash value

2013-01-06 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue16877] Odd behavior of ~ in os.path.abspath and os.path.realpath

2013-01-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 02e2fa22f8b7 by R David Murray in branch '3.2': #16877: Add mention that shell-style path expansions are not automatic. http://hg.python.org/cpython/rev/02e2fa22f8b7 New changeset 2ff547c165fd by R David Murray in branch '3.3': merge #16877: Add men

[issue16877] Odd behavior of ~ in os.path.abspath and os.path.realpath

2013-01-06 Thread Georg Brandl
Georg Brandl added the comment: LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue16876] epoll: reuse epoll_event buffer instead of allocating a new one at each poll()

2013-01-06 Thread Charles-François Natali
Changes by Charles-François Natali : Removed file: http://bugs.python.org/file28589/epoll_realloc.diff ___ Python tracker ___ ___ Python-bugs-

[issue16876] epoll: reuse epoll_event buffer instead of allocating a new one at each poll()

2013-01-06 Thread Charles-François Natali
Changes by Charles-François Natali : Added file: http://bugs.python.org/file28600/epoll_realloc.diff ___ Python tracker ___ ___ Python-bugs-li

[issue8745] zipimport is a bit slow

2013-01-06 Thread Catalin Iacob
Catalin Iacob added the comment: Attached v4 of patch with error checking for getc and some more comments. A real world example of the speedup is Calibre (http://calibre-ebook.com/) which on Windows comes with its own code, its dependecies and Python's stdlib all bundled in a 40MB zip. With th

[issue16876] epoll: reuse epoll_event buffer instead of allocating a new one at each poll()

2013-01-06 Thread Charles-François Natali
Changes by Charles-François Natali : -- nosy: +sbt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue16854] usage() is not defined in Lib/test/regrtest.py

2013-01-06 Thread Chris Jerdonek
Chris Jerdonek added the comment: I'm submitting a patch for this independent of issue 16799 on Serhiy's request. -- dependencies: -start using argparse.Namespace in regrtest keywords: +patch Added file: http://bugs.python.org/file28598/issue-16854-1.diff __

[issue16877] Odd behavior of ~ in os.path.abspath and os.path.realpath

2013-01-06 Thread R. David Murray
R. David Murray added the comment: Here is a proposed doc patch. While not a necessary doc addition, I do think it provides some useful guidance, and is short enough that it doesn't weigh down the docs. -- keywords: +patch Added file: http://bugs.python.org/file28597/doc_no_default_ex

[issue10156] Initialization of globals in unicodeobject.c

2013-01-06 Thread Stefan Krah
Stefan Krah added the comment: unicode-leak.patch doesn't fix #16143 though. unicode_empty and unicode_latin1 need to be initialized, too. Actually we could close this in favor of #16143. -- ___ Python tracker ___

[issue16873] increase epoll.poll() maxevents default value, and improve documentation

2013-01-06 Thread Charles-François Natali
Charles-François Natali added the comment: You're right, I just saw my mistake. Sorry for the noise (the extra performance arguement is not a good enough motivation to tune this dynaically). Closing. -- resolution: -> invalid stage: needs patch -> committed/rejected status: open -> cl

[issue10156] Initialization of globals in unicodeobject.c

2013-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Daniel's patch looks good for me. 2.7 looks affected too. -- nosy: +serhiy.storchaka stage: patch review -> commit review versions: +Python 2.7 -Python 3.3, Python 3.4 ___ Python tracker

[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-01-06 Thread Sven Brauch
Sven Brauch added the comment: Here's a new proposal, I adjusted the AST tests and fixed some small problems I encountered during that. It contains all the diffs for generated files, should I remove those for easier review? A remaining problem is that AST_Tests::_assertTrueorder now fails, I th

[issue9242] unicodeobject.c: use of uninitialized values

2013-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 3.2 is affected too. The PEP-393 changes fixes this bug in 3.3+. Here is a simple patch. -- assignee: -> serhiy.storchaka keywords: +patch nosy: +serhiy.storchaka stage: -> patch review versions: +Python 3.2 Added file: http://bugs.python.org/file28

[issue16799] start using argparse.Namespace in regrtest

2013-01-06 Thread Chris Jerdonek
Chris Jerdonek added the comment: Sure, I'd be happy to do that. I'll prepare the patch for the other issue. -- ___ Python tracker ___ __

[issue14965] super() and property inheritance behavior

2013-01-06 Thread David Beazley
David Beazley added the comment: Just as a note, there is a distinct possibility that a "property" in a superclass could be some other kind of descriptor object that's not a property. To handle that case, the solution of super(self.__class__, self.__class__).x.fset(self, value) would actuall

[issue16877] Odd behavior of ~ in os.path.abspath and os.path.realpath

2013-01-06 Thread Georg Brandl
Georg Brandl added the comment: Both are a kind of command-line expansion, see for example bash(1). Listed there are "brace expansion, tilde expansion, parameter and variable expansion, command substitution, arithmetic expansion, word splitting, and pathname expansion". Python does none of th

[issue16799] start using argparse.Namespace in regrtest

2013-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be it would be better to split the patch to two parts -- the fix of usage() bug and the enhancement. -- nosy: +serhiy.storchaka ___ Python tracker __

[issue16877] Odd behavior of ~ in os.path.abspath and os.path.realpath

2013-01-06 Thread Ian Shields
Ian Shields added the comment: David, Tilde expansion is different to globbing. Globbing in Python doesn't automatically do tilde expansion either. >>> glob.glob("~") [] Looking at the documentation, I don't think it would be practical to add documentation to each affected function - there are

[issue16873] increase epoll.poll() maxevents default value, and improve documentation

2013-01-06 Thread Charles-François Natali
Charles-François Natali added the comment: Of course it does, the write ends all get filled, so the number of ready writers drops to zero... That's not all at the problem I'm talking about (I may not be clear though, a script will make it more clear). -- __

[issue16873] increase epoll.poll() maxevents default value, and improve documentation

2013-01-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Yes, but the problem is that between two epoll_wait() calls, the > readiness of the FDs can have changed: and if that happens, you'll get > the same list over and over. If an fd *was* ready but isn't anymore then why would you want to know about it? Trying

[issue16873] increase epoll.poll() maxevents default value, and improve documentation

2013-01-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: Here is a version which uses epoll to service a number of pipes which is larger than maxevents. (If NUM_WRITERS is too large then I get "OSError: [Errno 24] Too many open files".) All pipes get serviced and the output is: Working with 20 FDs, 5 maxevents [5

[issue16499] CLI option for isolated mode

2013-01-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: -serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue16873] increase epoll.poll() maxevents default value, and improve documentation

2013-01-06 Thread Charles-François Natali
Charles-François Natali added the comment: > That assumes that epoll_wait() is supposed to return *all* ready fds. But > that is not possible because maxevents is finite. If you want all events > then obviously you may need to call epoll_wait() multiple times. Yes, but the problem is that be

[issue16320] Establish order in bytes/string dependencies

2013-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed. Thank you for review, Meador. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue16320] Establish order in bytes/string dependencies

2013-01-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8a6068ec220e by Serhiy Storchaka in branch 'default': Issue #16320: Remove redundant Makefile dependencies for strings and bytes. http://hg.python.org/cpython/rev/8a6068ec220e -- nosy: +python-dev ___ Pyt

[issue16873] increase epoll.poll() maxevents default value, and improve documentation

2013-01-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: > The fact that that the FDs are duped shouldn't change anything to the > events reported: it works while the number of FDs is less than > FD_SETSIZE (epoll_wait() maxevents argument). That assumes that epoll_wait() is supposed to return *all* ready fds. But t

[issue16877] Odd behavior of ~ in os.path.abspath and os.path.realpath

2013-01-06 Thread Ian Shields
Ian Shields added the comment: Oddity may be in the eye of the beholder. I've been programming and scripting for about 40 years, including several *IX shells and many other systems. I'm relatively new to Python. Mostly the results of doing things in Python are what I expect. Not doing expansio

[issue16877] Odd behavior of ~ in os.path.abspath and os.path.realpath

2013-01-06 Thread R. David Murray
R. David Murray added the comment: In addition, as far as I know, ba/sh has no equivalent to os.path.join (see, eg: http://unix.stackexchange.com/questions/23208/building-paths-robustly). So even if we *did* want to "act like the shell" there's no analog to point to. The shell only expands ~

[issue16840] Tkinter doesn't support large integers

2013-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I reclassify this as enhancement until the real bug is not found. -- type: behavior -> enhancement versions: -Python 2.7, Python 3.2, Python 3.3 ___ Python tracker _

[issue16843] sporadic test_sched failure

2013-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Perhaps you should give it to Guido as a present? First I have to find some application for it. Wait for me at the 3013 year. -- ___ Python tracker ___

[issue9685] tuples should remember their hash value

2013-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, Raymond. It was a bad day for Roundup. -- assignee: -> rhettinger nosy: +serhiy.storchaka ___ Python tracker ___ __

[issue16873] increase epoll.poll() maxevents default value, and improve documentation

2013-01-06 Thread Charles-François Natali
Charles-François Natali added the comment: > The program does *not* demonstrate starvation because you are servicing the > resource represented by the "starved" duplicate fds before calling poll() > again. No. What the program does is the following: while all the write FDs have not been retur

[issue16843] sporadic test_sched failure

2013-01-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Actually this class is a > forward-running time-machine with pause. Perhaps you should give it to Guido as a present? -- ___ Python tracker

[issue16843] sporadic test_sched failure

2013-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I don't understand what you're gaining with this complicated class: your > class guarantees that the sleepers will be woken up, but it doesn't > guarantee that any user code will actually run. It guarantees that advance() returns only when all sleepers are s

[issue9685] tuples should remember their hash value

2013-01-06 Thread Georg Brandl
Changes by Georg Brandl : -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue16877] Odd behavior of ~ in os.path.abspath and os.path.realpath

2013-01-06 Thread Georg Brandl
Georg Brandl added the comment: Can you point exactly where the "odd behavior" is? Note that "~" is a normal component for UNIX file/path names, and in such it has no special meaning (as opposed to "/"). This is why it gets no special handling by any Python path functions, except for expandu

[issue16877] Odd behavior of ~ in os.path.abspath and os.path.realpath

2013-01-06 Thread Ian Shields
Ian Shields added the comment: Regarding last comment. I had missed the comment in documentation fo os.path.join "Join one or more path components intelligently. If any component is an absolute path, all previous components (on Windows, including the previous drive letter, if there was one) ar

[issue16880] Importing "imp" will fail if dynamic loading not supported

2013-01-06 Thread Jeffrey Armstrong
Jeffrey Armstrong added the comment: The patch works with respect to allowing the interpreter to start, and importing modules from the interpreter seems to be working fine. I can't speak to Brett's concerns about possible side effects of setting load_dynamic to None. -- _

[issue16537] Python’s setup.py raises a ValueError when self.extensions is empty

2013-01-06 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue16868] Python Developer Guide: Include a reminder to "ping" bug report if not reviewed in timely manner

2013-01-06 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue16880] Importing "imp" will fail if dynamic loading not supported

2013-01-06 Thread Brett Cannon
Brett Cannon added the comment: I did just realize, though, there is no test for temporarily setting load_dynamic() to None in imp.py to make sure the expected exception is raised. -- ___ Python tracker __

[issue8109] Server-side support for TLS Server Name Indication extension

2013-01-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: (testing Roundup mail gateway, please ignore) -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue16880] Importing "imp" will fail if dynamic loading not supported

2013-01-06 Thread Brett Cannon
Brett Cannon added the comment: I should say LGTM in terms of looking at the patch, not actually trying it out. =) -- ___ Python tracker ___

[issue16880] Importing "imp" will fail if dynamic loading not supported

2013-01-06 Thread Brett Cannon
Brett Cannon added the comment: LGTM -- stage: needs patch -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue16880] Importing "imp" will fail if dynamic loading not supported

2013-01-06 Thread Christian Heimes
Changes by Christian Heimes : -- keywords: +patch Added file: http://bugs.python.org/file28592/imp_dynamic.patch ___ Python tracker ___ __

[issue16880] Importing "imp" will fail if dynamic loading not supported

2013-01-06 Thread Christian Heimes
Christian Heimes added the comment: The attached patch should fix the issue. Can you give it a try, please? -- assignee: -> christian.heimes nosy: +christian.heimes ___ Python tracker _

[issue15204] Deprecate the 'U' open mode

2013-01-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Would the deprecation need to be moved up to 3.4 though now? Yes, I think so. -- versions: -Python 3.3 ___ Python tracker ___ __

[issue16873] increase epoll.poll() maxevents default value, and improve documentation

2013-01-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: > I actually wrote a script to reproduce this issue: The program does *not* demonstrate starvation because you are servicing the resource represented by the "starved" duplicate fds before calling poll() again. You are creating thousands of duplicate handles f

[issue16881] Py_ARRAY_LENGTH macro incorrect with GCC < 3.1

2013-01-06 Thread Christian Heimes
Christian Heimes added the comment: Fixed in http://hg.python.org/cpython/rev/13c83199c211 -- assignee: -> christian.heimes nosy: +christian.heimes resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.4 ___ P

[issue16881] Py_ARRAY_LENGTH macro incorrect with GCC < 3.1

2013-01-06 Thread Jeffrey Armstrong
New submission from Jeffrey Armstrong: The Py_ARRAY_LENGTH macro (Include/pymacro.h:36) checks to see if using GCC by simply looking for __GCC__ being defined. If so, it uses the GCC extension function "__builtin_types_compatible_p." However, this function was not introduced until GCC 3.1.

[issue16880] Importing "imp" will fail if dynamic loading not supported

2013-01-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brett.cannon, ncoghlan stage: -> needs patch versions: +Python 3.4 ___ Python tracker ___ ___ P

[issue16880] Importing "imp" will fail if dynamic loading not supported

2013-01-06 Thread Jeffrey Armstrong
New submission from Jeffrey Armstrong: On a platform where dynamic loading is unsupported, the function "imp_load_dynamic" is not compiled (Python/import.c:1775), and the Python function "load_dynamic" (Python/import.c:1845) will not be included in the _imp module. However, Lib/imp.py attempt

[issue16873] increase epoll.poll() maxevents default value, and improve documentation

2013-01-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > 3) use a simple heuristic: start with a reasonable value for > `maxevents` (FD_SETSIZE seems like a good candidate), and if > epoll_wait() ever returns `maxevents` events, double the value (that's > what libevent does, with a capping to 32000). What if some ev

[issue16878] argparse: positional args with nargs='*' defaults to []

2013-01-06 Thread R. David Murray
R. David Murray added the comment: I'd prefer to fix it, since having the action='append' and nargs='*' behaviors be different looks like a bug. However, fixing it to match 'append' (default really is None) would be likely to break working code, so we certainly couldn't backport that, and I'd

[issue16873] increase epoll.poll() maxevents default value, and improve documentation

2013-01-06 Thread Charles-François Natali
Charles-François Natali added the comment: The implementation can't simply drain a queue, because it can be level-triggered (which is the case by default), so you want to keep events around. The kernel actually uses a red-black tree, but I didn't really check how it's done (there's probably very

[issue8109] Server-side support for TLS Server Name Indication extension

2013-01-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed in 52b4d9bfc9ea (Roundup e-mail gateway seems broken). -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker

[issue12939] Add new io.FileIO using the native Windows API

2013-01-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: Attached is a patch which adds a winio module which is a replacement for io, but uses windows handles instead of fds. It reimplements FileIO and open(), and provides openhandle() and closehandle() as replacements for os.open() and os.close(). test_io has bee

[issue16873] increase epoll.poll() maxevents default value, and improve documentation

2013-01-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: Is this actually a problem? If events are arranged in a queue and epoll_wait() just removes the oldest events (up to maxevents) from that queue then there would be no problem with using a small value for maxevents. I don't *know* if that is the case, but I w

[issue16879] distutils.command.config uses fragile constant temporary file name

2013-01-06 Thread Michał Górny
New submission from Michał Górny: The distutils.command.config module reads: def _gen_temp_sourcefile(self, body, headers, lang): filename = "_configtest" + LANG_EXT[lang] which means that every time one of the functions is used, a temporary file with the same name will be created.

[issue16843] sporadic test_sched failure

2013-01-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The previous patch is broken, here is a fixed, more complicated, > patch. May be this class would be useful in other tests. I don't understand what you're gaining with this complicated class: your class guarantees that the sleepers will be woken up, but it doe

[issue16876] epoll: reuse epoll_event buffer instead of allocating a new one at each poll()

2013-01-06 Thread Charles-François Natali
Changes by Charles-François Natali : Added file: http://bugs.python.org/file28589/epoll_realloc.diff ___ Python tracker ___ ___ Python-bugs-li

[issue16876] epoll: reuse epoll_event buffer instead of allocating a new one at each poll()

2013-01-06 Thread Charles-François Natali
Changes by Charles-François Natali : Removed file: http://bugs.python.org/file28587/epoll_realloc.diff ___ Python tracker ___ ___ Python-bugs-

[issue16843] sporadic test_sched failure

2013-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The previous patch is broken, here is a fixed, more complicated, patch. May be this class would be useful in other tests. -- Added file: http://bugs.python.org/file28588/test_sched_deterministic_timer_2.patch ___

[issue16876] epoll: reuse epoll_event buffer instead of allocating a new one at each poll()

2013-01-06 Thread Charles-François Natali
Changes by Charles-François Natali : Added file: http://bugs.python.org/file28587/epoll_realloc.diff ___ Python tracker ___ ___ Python-bugs-li

[issue16876] epoll: reuse epoll_event buffer instead of allocating a new one at each poll()

2013-01-06 Thread Charles-François Natali
Changes by Charles-François Natali : Removed file: http://bugs.python.org/file28586/epoll_realloc.diff ___ Python tracker ___ ___ Python-bugs-

[issue12641] Remove -mno-cygwin from distutils

2013-01-06 Thread Martin v . Löwis
Martin v. Löwis added the comment: Geert: Someone will have to provide a patch, else the issue will go nowhere. I will insist that the patch continues to support "older" gcc installations (from 2012), at least if implemented as a bug fix to older Python releases. -- __

[issue12641] Remove -mno-cygwin from distutils

2013-01-06 Thread Geert Jansen
Geert Jansen added the comment: *bump* I just installed MinGW 2.6.2 32-bit on Windows XP. It doesn't accept -mnocygwin and there is no binary "i686-pc-mingw32-gcc" either. It would be great if you could agree on an approach and get this fixed. This impacts a lot of users that want to build ex

[issue16878] argparse: positional args with nargs='*' defaults to []

2013-01-06 Thread Chris Jerdonek
New submission from Chris Jerdonek: In argparse, positional arguments with nargs='*' default to [] rather None, even if default=None is passed explicitly. The documentation says otherwise: "The default keyword argument of add_argument(), whose value defaults to None, specifies what value shou