[issue16863] Python 2 error in Argparse tutorial

2013-01-05 Thread Tshepang Lekhonkhobe
Tshepang Lekhonkhobe added the comment: A quick patch would be 'This tutorial was written for argparse in Python 3. A few details are different in 2.x.' But feel free to do better. That really sounds great, especially since it avoids resorting to things as ugly as ...and this is Python 2

[issue16870] re fails to match ^ when start index is specified ?

2013-01-05 Thread Poul-Henning Kamp
New submission from Poul-Henning Kamp: I'm surprised that this does not find any matches: import re r = re.compile(^abc) s = 0123abcxyz for i in range(0,len(s)): print(i, r.search(s, i)) I would have expected the i==4 case to match ? (This is on: Python 2.7.3 (default,

[issue16870] re fails to match ^ when start index is specified ?

2013-01-05 Thread Ned Deily
Ned Deily added the comment: Note the warning about '^' in the documentation for the re search method: The optional second parameter pos gives an index in the string where the search is to start; it defaults to 0. This is not completely equivalent to slicing the string; the '^' pattern

[issue16870] re fails to match ^ when start index is specified ?

2013-01-05 Thread Ned Deily
Ned Deily added the comment: To expand a bit, rather than multiple calls to search, you can use the start and end methods of the match object to determine where the string (without the '^' anchor) matches. For example: r = re.compile(abc) s = 0123abcxyz match = r.search(s) if match:

[issue1694663] Overloading int.__pow__ does not work

2013-01-05 Thread Mark Dickinson
Mark Dickinson added the comment: Yep, this was fixed as part of the issue 14658 fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1694663 ___

[issue16853] add a Selector to the select module

2013-01-05 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a new version, with the following changes: - there's no SELECT_ERR anymore: error conditions (POLLNVAL|POLLERR and also POLLHUP) are reported as SELECT_IN|SELECT_OUT, depending on the input event mask: I don't think that a separate error flag

[issue16762] test_subprocess failure on OpenBSD/NetBSD buildbots

2013-01-05 Thread Trent Nelson
Changes by Trent Nelson tr...@snakebite.org: -- nosy: +trent ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16762 ___ ___ Python-bugs-list mailing

[issue16870] re fails to match ^ when start index is specified ?

2013-01-05 Thread Poul-Henning Kamp
Poul-Henning Kamp added the comment: I have tried hard, but have utterly failed to figure out why you have chosen the semantics for ^ you mention, tried to come up with a plausible use case, and I have utterly failed. I find it distinctly counter intuitive. I think the Principle of Least

[issue16853] add a Selector to the select module

2013-01-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: @Guido: agreed. there's no SELECT_ERR anymore [...] the error will be reported when the FD will be read/written I don't think this is a good idea, particularly during this early stage. This assumption might be valid for select() but not for poll() and

[issue16849] Element.{get, iter} doesn't handle keyword arguments when using _elementtree C accelerator.

2013-01-05 Thread Eli Bendersky
Eli Bendersky added the comment: The patch was committed with some minor modifications to 3.3 (c1fc6b6d1cfc) and default branch (e1bee8b09828). New tests were added to the test classes (please don't add new tests to the doctests, they are deprecated). --

[issue15075] XincludeTest failure in test_xml_etree

2013-01-05 Thread Eli Bendersky
Eli Bendersky added the comment: I investigated a bit, and type checks were added to protect from such mixing. Please open a new patch with a speficic reproducer if you run into similar problems (interepreter crash). -- ___ Python tracker

[issue16849] Element.{get, iter} doesn't handle keyword arguments when using _elementtree C accelerator.

2013-01-05 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16849 ___

[issue16817] test___all__ affects other tests by doing too much importing

2013-01-05 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- dependencies: +sys.path in tests contains system directories ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16817 ___

[issue1674555] sys.path in tests contains system directories

2013-01-05 Thread Eli Bendersky
Eli Bendersky added the comment: Issue #16817 discusses a similar problem arising with test___all__. The patches have to be updated to provide a generic way to delegate certain tests to separate subprocesses. Arfrever, it's not necessary to update all the patches at once. Start with the one

[issue16853] add a Selector to the select module

2013-01-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Inline comments: http://bugs.python.org/review/16853/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___

[issue16853] add a Selector to the select module

2013-01-05 Thread Charles-François Natali
Charles-François Natali added the comment: there's no SELECT_ERR anymore [...] the error will be reported when the FD will be read/written I don't think this is a good idea, particularly during this early stage. This assumption might be valid for select() but not for poll() and epoll()

[issue16871] Cleanup a few minor things

2013-01-05 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is a set of patches which clean a few minor things: add spaces after if/while/return/etc, remove spaces after class/function name, remove redundant parens after if/while/return/etc. One set contains only space changes, another set contains parens

[issue16871] Cleanup a few minor things

2013-01-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file28576/minor_things_parens-2.7.diff Added file: http://bugs.python.org/file28577/minor_things_parens-3.2.diff Added file:

[issue16853] add a Selector to the select module

2013-01-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: The actual error (which may be ECONNRESET, but also EBADF, ENOBUFS...) will be raised upon the next call to read()/write(), or can be retrieved through getsockopt(SO_ERROR). Mmmm... I would be tempted to think the same but the fact that both Tornado and

Re: [issue16871] Cleanup a few minor things

2013-01-05 Thread Senthil Kumaran
Looks good in most of the places, but at some places the parenthesis are of course helpful for cohesiveness, and this can be quite subjective. With these patches, are you in general removing all instances of parenthesis when it is not required or also considering for places where parens may help

[issue16855] traceback module leaves off module name in last line of formatted tracebacks

2013-01-05 Thread Walter Mundt
Walter Mundt added the comment: Thanks for looking into the version applicability. I'd bet that under the covers IDLE is relying on the traceback module too. Anyone have a Windows CPython 2.7.3 and care to check the output of the test code in a cmd window? I originally ran it unindented

[issue16870] re fails to match ^ when start index is specified ?

2013-01-05 Thread Matthew Barnett
Matthew Barnett added the comment: The semantics of '^' are common to many different regex implementations, including those of Perl and C#. The 'pos' argument merely gives the starting position the search (C# also lets you provide a starting position, and behaves in exactly the same way).

[issue16871] Cleanup a few minor things

2013-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For me none of these parens help while reading the code (but this is quite subjective). I not object if only a part of these changes will be applied. Review the patches and point what changes should be applied and what changes should not. --

[issue16869] makesetup should support .S source files

2013-01-05 Thread Senthil Kumaran
Senthil Kumaran added the comment: Should not this be? *.S) obj=`basename $src .S`.o; cc='$(CC)';; # The filetype extension .S instead .cpp. And, I have less know-how on these, but for my understanding how would non-preprocessed asm files (.s) will be handled? And doc reference to how this

[issue16853] add a Selector to the select module

2013-01-05 Thread Guido van Rossum
Guido van Rossum added the comment: I think that this needs extensive tests that verify the behavior of many end cases, including under duress (e.g. when there are too many connections for the kernel to handle). That would seem the only way to make sure that the code is reliable across

[issue13103] copy of an asyncore dispatcher causes infinite recursion

2013-01-05 Thread Xavier de Gaye
Xavier de Gaye added the comment: Same problem in 3.4. $ ./python Python 3.4.0a0 (default:e1bee8b09828, Jan 5 2013, 20:29:00) [GCC 4.3.2] on linux Type help, copyright, credits or license for more information. import asyncore a = asyncore.dispatcher() del a.socket a.foo Traceback (most

[issue13103] copy of an asyncore dispatcher causes infinite recursion

2013-01-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: asyncore's __getattr__ horror was scheduled for removal a long ago (3.1 as per issue8483). We can safely remove it for 3.4 and fix the RuntimeError exception above for all the earlier Python versions which are affected. --

[issue13103] copy of an asyncore dispatcher causes infinite recursion

2013-01-05 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- assignee: - giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13103 ___ ___

[issue16871] Cleanup a few minor things

2013-01-05 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: How about innecessary code churn? -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16871 ___ ___

[issue16871] Cleanup a few minor things

2013-01-05 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: I elaborate: issue15580. An example of many. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16871 ___ ___

[issue16872] Metaclass conflict proposition

2013-01-05 Thread João Bernardo
New submission from João Bernardo: This is actually a proposition for a behavior change caused by a bugfix. I have a project dealing with a metaclass factory and the next thing in the TODO list was to add multiple inheritance support. For my surprise, I tried and there was no metaclass

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

2013-01-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 927afb7bca2a by Antoine Pitrou in branch 'default': Issue #8109: The ssl module now has support for server-side SNI, thanks to a :meth:`SSLContext.set_servername_callback` method. http://hg.python.org/cpython/rev/927afb7bca2a -- nosy:

[issue16853] add a Selector to the select module

2013-01-05 Thread Charles-François Natali
Charles-François Natali added the comment: I think that this needs extensive tests that verify the behavior of many end cases, including under duress (e.g. when there are too many connections for the kernel to handle). That would seem the only way to make sure that the code is reliable

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

2013-01-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've committed the latest patch. Thank you very much! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8109

[issue16853] add a Selector to the select module

2013-01-05 Thread Meador Inge
Meador Inge added the comment: The EpollSelector and PollSelector implementations are basically identical. You might want to refactor these to share more code. -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org

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

2013-01-05 Thread danblack
danblack added the comment: I've committed the latest patch. Thank you very much! much appreciate your help. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8109 ___

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

2013-01-05 Thread Meador Inge
Meador Inge added the comment: This seems like a reasonable addition to me. Although, I don't like the substantial amount of time part (yes I know it was already there). That should probably be replaced with something more concrete, e.g. one week. -- nosy: +meador.inge

[issue9685] tuples should remember their hash value

2013-01-05 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9685 ___ ___ Python-bugs-list

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

2013-01-05 Thread Chris Jerdonek
Chris Jerdonek added the comment: I would also take out the sentence about forgetting about the issue, because that's just one of several possible reasons and I don't think usually the main reason. -- nosy: +chris.jerdonek ___ Python tracker

[issue16143] Building with configure option --without-doc-strings crashes first time through PyUnicode_DecodeUTF8Stateful

2013-01-05 Thread Franck Michea
Changes by Franck Michea franck.mic...@gmail.com: -- nosy: +kushou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16143 ___ ___ Python-bugs-list

[issue16871] Cleanup a few minor things

2013-01-05 Thread Chris Jerdonek
Chris Jerdonek added the comment: Here is another recent comment from Georg on this topic: And please don't commit cosmetic/cleanup changes to bugfix branches in the future. (from http://bugs.python.org/issue16793#msg178372 ) -- nosy: +chris.jerdonek

[issue16855] traceback module leaves off module name in last line of formatted tracebacks

2013-01-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: console = cmd window. I did run it there and that is where I duplicated your 2.7.3 result. I don't understand the different result with 2.7.3 IDLE, since it runs in a separate pythonw process that *should* give the same result as the python cmd window. But

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

2013-01-05 Thread Sven Brauch
Sven Brauch added the comment: While writing tests, I noticed that the additional fields (lineno, col_offset for vararg, kwarg, and other arguments) currently are mandatory. Is that a problem? It doesn't seem trivial to change that, since apparently only attributes (not fields) can be

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

2013-01-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: A question mark after the type name in the AST makes it optional. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16795 ___

[issue16872] Metaclass conflict proposition

2013-01-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: This is material for the python-ideas list. -- nosy: +benjamin.peterson resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16872

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

2013-01-05 Thread Ezio Melotti
Ezio Melotti added the comment: I agree with Chris. +substantial amount of time first ping the issue on the `issue tracker`_ I would add a comma after 'time'. I don't like the substantial amount of time part (yes I know it was already there). That should probably be replaced with something

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

2013-01-05 Thread Sven Brauch
Sven Brauch added the comment: Thanks. I had seen and tried this before, but the ast module in python, which is used in the tests, still requires the additional arguments. Probably this is only valid for the C API? -- ___ Python tracker

[issue16866] libainstall doesn't create $(BINDIR) directory

2013-01-05 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the fix. The patches fixes it. Since this is a bug fix, it should be backported all the way till 2.7. -- assignee: - orsenthil nosy: +orsenthil stage: - commit review versions: +Python 2.7, Python 3.2, Python 3.3

[issue16853] add a Selector to the select module

2013-01-05 Thread Charles-François Natali
Charles-François Natali added the comment: I've noticed a bug present in Tulip, pyftpdlib and tornado (and this implementation, too): none of them passes the maxevents argument to epoll.poll(), and by default the poll() wrapper in the socket module uses FD_SETSIZE-1, so you'll never get more

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

2013-01-05 Thread Charles-François Natali
New submission from Charles-François Natali: In issue #16853, it was noted that many several projects don't set epoll.poll() maxevents argument, which effectively limits the number of events retuend to FD_SETSIZE-1 (set in selectmodule.c). Also, the methode documentation can confuse users

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

2013-01-05 Thread Christian Heimes
Christian Heimes added the comment: Coverity reports an issue in the callback function: /Modules/_ssl.c: 2403 ( uninit_use) 2400/* remove race condition in this the call back while if removing the 2401 * callback is in progress */ 2402

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

2013-01-05 Thread Meador Inge
Meador Inge added the comment: On Sat, Jan 5, 2013 at 5:55 PM, Ezio Melotti rep...@bugs.python.org wrote: That really depends on the situation. I think the point of that sentence is to make clear that some time might pass before someone can look at the issue, and I'm not sure it's

[issue16866] libainstall doesn't create $(BINDIR) directory

2013-01-05 Thread Senthil Kumaran
Senthil Kumaran added the comment: Digging a little deeper, make libainstall needs $(BINDIR) because of this $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config *And* that python$(VERSION)-config file refers to the python exe which is available only after bininstall or

[issue16853] add a Selector to the select module

2013-01-05 Thread Guido van Rossum
Guido van Rossum added the comment: I am trying to use this module in Tulip instead of its pollster implementation, and am running into a problem. Tulip defines separate add_reader()/add_writer() methods, which call to the pollster's register_reader()/register_writer(), respectively. The

[issue16874] setup.py upload option repeated in docs

2013-01-05 Thread Chris Jerdonek
New submission from Chris Jerdonek: The following page: http://docs.python.org/dev/distutils/uploading.html says, Other upload options include --repository= or --repository= where url... I haven't looked into what the correct wording is meant to be. -- assignee: eric.araujo

[issue7434] general pprint rewrite

2013-01-05 Thread Danilo Bargen
Changes by Danilo Bargen gez...@gmail.com: -- nosy: +gwrtheyrn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7434 ___ ___ Python-bugs-list mailing

[issue16866] libainstall doesn't create $(BINDIR) directory

2013-01-05 Thread Benno Leslie
Benno Leslie added the comment: I was using this in the case where I just want to link against libpython.a and for me it is a limited case where I don't really need the functionality of python-config; so for me this is certainly the best approach. But I concede this use case is probably a

[issue16875] in 3.3.0 windows 64 idle editor

2013-01-05 Thread Glenn
New submission from Glenn: when in the Idle editor this line command does not work: print Hello World! does not work it says it is a syntax error but x=Hello World! x produces this 'Hello World!' -- components: IDLE messages: 179164 nosy: pargo priority: normal severity: normal

[issue16875] in 3.3.0 windows 64 idle editor

2013-01-05 Thread Ezio Melotti
Ezio Melotti added the comment: That's because in Python 3 print is a function, so you need to do print(Hello World!) instead. See the Python 3 tutorial: http://docs.python.org/3/tutorial/ -- nosy: +ezio.melotti resolution: - invalid stage: - committed/rejected status: open - closed

[issue16875] in 3.3.0 windows 64 idle editor

2013-01-05 Thread Ned Deily
Ned Deily added the comment: Also see http://docs.python.org/3/whatsnew/3.0.html#print-is-a-function -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16875 ___

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

2013-01-05 Thread Charles-François Natali
New submission from Charles-François Natali: Currently, epoll.poll() allocates an epoll_event buffer every time/ this is bad, because it changes an O(number of ready FDs) syscall into a O(maxevents/FD_SETSIZE) complexity. The patch attached allocates a epoll events buffer per epoll instance,

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

2013-01-05 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: Removed file: http://bugs.python.org/file28585/epoll_realloc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16876 ___

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

2013-01-05 Thread Christian Heimes
Changes by Christian Heimes li...@cheimes.de: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16876 ___ ___

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

2013-01-05 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: Added file: http://bugs.python.org/file28586/epoll_realloc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16876 ___

[issue16866] libainstall doesn't create $(BINDIR) directory

2013-01-05 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks Benno. I think that making libainstall depend on bininstall is a right solution too. A nod from devs who have committed changes in that area may help. Also, I believe that this is a bug fix and should be ported back upto 2.7. If there are any concerns

[issue16499] CLI option for isolated mode

2013-01-05 Thread Nick Coghlan
Nick Coghlan added the comment: The system Python idea in PEP 432 is aimed at providing an alternate interpreter binary which changes the default behaviour to be appropriate for system utilities, while allowing such features to be enabled selectively. --

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

2013-01-05 Thread Ian Shields
New submission from Ian Shields: Filespecs that start with ~ are not properly handled by os.path.realpath or os.path.abspath (and maybe other functions). Following console output from Fedora 17 using Puthon 3.2 illustrates the issue. Similar issue in 2.7 [ian@attic4 developerworks]$ cd ..

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

2013-01-05 Thread R. David Murray
R. David Murray added the comment: This is intentional. You have to call expanduser yourself if you want ~ to be expanded. Otherwise it is treated as any other path component would be. I don't understand your final comment, can you clarify? -- nosy: +r.david.murray resolution: -

[issue15204] Deprecate the 'U' open mode

2013-01-05 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - patch review versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15204 ___

[issue11346] Generator object should be mentioned in gc module document

2013-01-05 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +pitrou stage: - needs patch type: - enhancement versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11346

[issue16869] makesetup should support .S source files

2013-01-05 Thread Benno Leslie
Benno Leslie added the comment: Thanks for the comments Senthil. I'll improve the patch fixing the bug, adding support for .s and updating the docs. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16869

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

2013-01-05 Thread danblack
danblack added the comment: I don't know which error code should be returned in this case. Thanks Christian. My fault - asked Antoine to remove the default value for it and didn't see this like. make line 2403: return SSL_TLSEXT_ERR_OK; -- ___