[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2014-10-08 Thread Nick Coghlan
Nick Coghlan added the comment: The language reference - at least the section on the import statement, and potentially the section on the overall operation of the import system. I don't *think* it would affect anywhere in the tutorial or the importlib docs, but they may be worth skimming to se

[issue13128] httplib debuglevel on CONNECT doesn't print response headers

2014-10-08 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag versions: +Python 3.5 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list maili

[issue16177] Typing left parenthesis in IDLE causes intermittent Cocoa Tk crash on OS X

2014-10-08 Thread Ned Deily
Ned Deily added the comment: Thanks, Tom, nice writeup! If any of the other people who have seen this crash are still around, it would be interesting to know if they also were using more than one monitor. -- ___ Python tracker

[issue22247] More incomplete module.__all__ lists

2014-10-08 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue3068] IDLE - Add an extension configuration dialog

2014-10-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Saimadhav, can you review on linux? This is the blocker for line numbers. A note on style: there is no need for leading underscores, so I removed them. -- ___ Python tracker _

[issue3068] IDLE - Add an extension configuration dialog

2014-10-08 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +sahutd ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue3068] IDLE - Add an extension configuration dialog

2014-10-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Pending review on non-Windows systems, I believe the attached patch patch is about ready to commit (after re-enabling all tests). As for Ned's 5 points: 1. macosxSupport.py changes are incorporated. 2. Buttons should work with re-use of the ConfigDialog code.

[issue16177] Typing left parenthesis in IDLE causes intermittent Cocoa Tk crash on OS X

2014-10-08 Thread Tom Goddard
Tom Goddard added the comment: Ok I reported this as a Mac Tk bug and gave a very simple way to reproduce it. http://core.tcl.tk/tk/tktview?name=3Dc84f660833 -- ___ Python tracker _

[issue22247] More incomplete module.__all__ lists

2014-10-08 Thread Martin Panter
Martin Panter added the comment: Confirmed Python 3.4.2 fixes the missing NNTPError. I never remembered the other instance I found, so I am happy for this to be closed. -- ___ Python tracker __

[issue21049] Warning at interpreter exit triggers flood of “ImportWarning: sys.meta_path is empty”

2014-10-08 Thread Martin Panter
Martin Panter added the comment: Quentin, do you think this should be reopened? Brett Cannon, I wonder if the only reason you closed this bug is because you thought the scenario to trigger it is very unlikely. Considering it affected someone else, and that there are other real-world triggers i

[issue3068] IDLE - Add an extension configuration dialog

2014-10-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Pushing a usable extension editor is my current Idle priority since the lack of one more or less blocks several other issues. The two big problems with the Feb 2014 patch are the actions buttons at the bottom and the true/false options. I moved the cureent, a

[issue3068] IDLE - Add an extension configuration dialog

2014-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3f10b8009060 by Terry Jan Reedy in branch '2.7': Issue 3068: Move idlelib.configDialog action button creation into a separate https://hg.python.org/cpython/rev/3f10b8009060 New changeset f0e06514d67f by Terry Jan Reedy in branch '3.4': Issue 3068: M

[issue22583] Segmentation fault with string concatenation

2014-10-08 Thread Kevin Dyer
Kevin Dyer added the comment: Gotcha. Thanks for the explanation. Two questions: 1) Given that it's probably not an out-of-memory issue, is it possible that this could turn into something more malicious? (e.g., an arbitrary code execution vulnerability?) 2) It's not obvious to me why eval-ing

[issue22583] Segmentation fault with string concatenation

2014-10-08 Thread Josh Rosenberg
Josh Rosenberg added the comment: It's not out of memory at all. It's (probably) a blown stack during compilation optimization. Modern Py3 has "fixed" this by simply preventing silly levels of literal concatenation like this causing indefinite call stack expansion; the older ones just allowed

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: By the way, is there any documentation that would need to be updated for this? -- ___ Python tracker ___ ___

[issue22542] Use arc4random under OpenBSD for os.urandom()

2014-10-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +rpointel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I've found it. The numbers don't look that good here (Linux, SSD): $ ~/cpython/opt/python benchmark.py -c python /usr/share/ [...] os.walk took 1.266s, scandir.walk took 1.852s -- 0.7x as fast $ ~/cpython/opt/python benchmark.py -c c /usr/share/ [...] os.

[issue22578] Add additional attributes to re.error

2014-10-08 Thread Matthew Barnett
Matthew Barnett added the comment: I prefer to include the line and column numbers if it's a multi-line pattern, not just if the line number is > 1. BTW, it's shorter if you do this: self.colno = pos - pattern.rfind(newline, 0, pos) If there's no newline, .rfind will return -1. -

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ben, how can I run the benchmark on my own machine? Thanks! -- ___ Python tracker ___ ___ Python-bu

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-10-08 Thread Ben Hoyt
Ben Hoyt added the comment: Here are the actual numbers (instead of just from memory) running on my Windows laptop, which happens to have an SSD drive, so os.walk() with scandir is particularly good here. python 3.4: benchmark.py -c python (all implemented in Python using ctypes): os.walk too

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2014-10-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, no, I guess "continue" would also create a backwards edge. Nevermind, sorry. -- ___ Python tracker ___ _

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > END_ITER is a synonym for JUMP_ABSOLUTE. It is needed so that > frame.set_lineno() can identify loop blocks. I was thinking about this. Isn't it enough to consider all backwards edges as ending a loop block? -- _

[issue1519638] Unmatched Group issue - workaround

2014-10-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: effbot -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue21715] Chaining exceptions at C level

2014-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for the review Antoine. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.4 ___ Python tracker

[issue17381] IGNORECASE breaks unicode literal range matching

2014-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually 3.5 patch can be simpler. -- Added file: http://bugs.python.org/file36839/re_ignore_case_range-3.5_2.patch ___ Python tracker ___ ___

[issue21715] Chaining exceptions at C level

2014-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9af21752ea2a by Serhiy Storchaka in branch '3.4': Issue #21715: Extracted shared complicated code in the _io module to new https://hg.python.org/cpython/rev/9af21752ea2a New changeset 8b1ac1a3d007 by Serhiy Storchaka in branch 'default': Issue #2171

[issue16254] Make PyUnicode_AsWideCharString() increase temporary

2014-10-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: I tried to re-title to describe the enhancement proposal. There are multiple API proposals in the two messages above. -- nosy: +terry.reedy stage: -> needs patch title: PyUnicode_AsWideCharString() increases string size -> Make PyUnicode_AsWideCharStr

[issue8065] Memory leak in readline.get_current_history_length

2014-10-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: The leak had been fixed in #9450. "There are still the remaining issues of: - better testing for the readline module, and - attempting to work around libedit bugs. Perhaps those should become separate issues, though?" If those are current issues and anyone ca

[issue22582] RuntimeError with string concatenation

2014-10-08 Thread R. David Murray
Changes by R. David Murray : -- stage: -> resolved title: Segmentation fault with string concatenation -> RuntimeError with string concatenation ___ Python tracker ___

[issue11693] memory leak in email.generator.Generator().flatten() method

2014-10-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: >From Anaury's report, this is fixed in 2.7. Email in current 3.x has been >re-written. -- nosy: +terry.reedy resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue22583] Segmentation fault with string concatenation

2014-10-08 Thread Kevin Dyer
New submission from Kevin Dyer: The following can be used to generate a file called mega_concat.py: N = 2**17 my_array = [] for i in range(N): my_array.append("\"\"") print '+'.join(my_array) Then, on Ubuntu 14.04, 32-bit: $ python mega_concat.py Segmentation fault (core dumped) $ python3 m

[issue22582] Segmentation fault with string concatenation

2014-10-08 Thread Kevin Dyer
New submission from Kevin Dyer: The following can be used to generate a file called ```mega_concat.py```: ```python N = 2**17 my_array = [] for i in range(N): my_array.append("\"\"") print '+'.join(my_array) ``` Then: ```console $ python mega_concat.py Segmentation fault (core dumped) $ pyth

[issue22582] Segmentation fault with string concatenation

2014-10-08 Thread Kevin Dyer
Kevin Dyer added the comment: The following can be used to generate a file called ```mega_concat.py```: ```python N = 2**17 my_array = [] for i in range(N): my_array.append("\"\"") print '+'.join(my_array) ``` Then: ```console $ python mega_concat.py Segmentation fault (core dumped) $ python

[issue22550] issubclass can fail after module reloading

2014-10-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python

[issue11664] Add patch method to unittest.TestCase

2014-10-08 Thread Julien Pagès
Julien Pagès added the comment: Thanks Antoine for the link, and the quick answer; It seems that it is a sensible subject, adding or not this method, and what it should do. I wrote the patch anyway, but I must confess that somewhere it feels strange to me to add such a method in TestCase clas

[issue22462] Modules/pyexpat.c violates PEP 384

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch pushed. I've kept the changes together :) Hopefully there won't be any ctypes regression. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue22526] file iteration SystemError for huge lines (2GiB+)

2014-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could anyone please test it on Windows? -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue22542] Use arc4random under OpenBSD for os.urandom()

2014-10-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- title: Use syscall (eg. arc4random or getentropy) rather than /dev/urandom when possible -> Use arc4random under OpenBSD for os.urandom() ___ Python tracker _

[issue22542] Use syscall (eg. arc4random or getentropy) rather than /dev/urandom when possible

2014-10-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Interpreter Core -Build resolution: duplicate -> stage: -> needs patch type: -> enhancement ___ Python tracker ___

[issue22542] Use syscall (eg. arc4random or getentropy) rather than /dev/urandom when possible

2014-10-08 Thread 700eb415
700eb415 added the comment: I'm reopening this for now as advised from the Linux getrandom() thread. I agree we should not be using arc4random() blindly. However, in the long run it is a necessary change at least on OpenBSD. OpenBSD is not likely to create another syscall to avoid portability

[issue22462] Modules/pyexpat.c violates PEP 384

2014-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5433ef907e4f by Antoine Pitrou in branch '3.4': Issue #22462: Fix pyexpat's creation of a dummy frame to make it appear in exception tracebacks. https://hg.python.org/cpython/rev/5433ef907e4f New changeset f2f13aeb590a by Antoine Pitrou in branch '

[issue11664] Add patch method to unittest.TestCase

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hi Julien and welcome, > - is this issue still open and needed ? Yes and "perhaps". I have no opinion on whether it is necessary, but other people seem to think it's useful. > - if yes, do I have to work from 3.3 branch, as stated in the issue > "Versions" f

[issue11664] Add patch method to unittest.TestCase

2014-10-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: michael.foord -> versions: +Python 3.5 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-li

[issue22327] test_gdb failures on Ubuntu 14.10

2014-10-08 Thread Matěj Stuchlík
Matěj Stuchlík added the comment: FYI I'm seeing the error with the new 3.4.2 release as well. https://kojipkgs.fedoraproject.org//work/tasks/599/7800599/build.log -- ___ Python tracker ___

[issue22581] Other mentions of the buffer protocol

2014-10-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In addition to issue16518. There are other non-fixed messages (may be introduced after 3.3): >>> b''.join(['']) Traceback (most recent call last): File "", line 1, in TypeError: sequence item 0: expected bytes, bytearray, or an object with the buffer in

[issue11664] Add patch method to unittest.TestCase

2014-10-08 Thread Julien Pagès
Julien Pagès added the comment: Hi all, I would like to contribute to Python and I'm interested in working on this. I have few questions (I hope you don't mind that I ask here): - is this issue still open and needed ? - if yes, do I have to work from 3.3 branch, as stated in the issue "Versi

[issue22580] PyUnicode_Tailmatch documentation does not match signature

2014-10-08 Thread Josh Ayers
New submission from Josh Ayers: The documentation for PyUnicode_Tailmatch says it returns an int: https://docs.python.org/3/c-api/unicode.html?highlight=pyunicode_tailmatch#c.PyUnicode_Tailmatch However, the include file shows it returns Py_ssize_t: https://hg.python.org/cpython/file/f21f0de305

[issue7830] Flatten nested functools.partial

2014-10-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I've updated the patch. -- keywords: +patch Added file: http://bugs.python.org/file36837/issue7830-2.diff ___ Python tracker ___ __

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Since this is a Linux-specific issue (see the title), you should create a separate issue for OpenBSD support. Bonus points if you want to submit a patch as well :-) -- ___ Python tracker

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-10-08 Thread 700eb415
700eb415 added the comment: While I agree it may not be wise to use arc4random() globally, OpenBSD is unlikely to create a duplicate interface since it's already available. Python is currently unusable in chroots on that platform without reducing the security of the host partition by removing

[issue22578] Add additional attributes to re.error

2014-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Sounds ok, but it would be nice to add some tests. Thank you. Here is a patch with added test. -- Added file: http://bugs.python.org/file36836/re_error_attrs2.patch ___ Python tracker

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-10-08 Thread Alex Gaynor
Alex Gaynor added the comment: As I said on the other ticket, using arc4random() indiscriminately would be a very poor idea, on some platforms (such as OS X) arc4random() really does use ARC4, which means there are serious security concerns with it. --

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: This issue is about Linux support. Does the glibc have arc4random? I can't find it on my Ubuntu 13.10 system. -- nosy: +pitrou ___ Python tracker _

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-10-08 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-10-08 Thread 700eb415
700eb415 added the comment: OpenBSD already provides high quality pseudorandom numbers from arc4random(). I don't think this would make us "early adopters" since it has been around for some time on this platform. It's also worth mentioning that getentropy() is not recommended in use for norma

[issue22579] Posix module init function name should not be compiler-dependent

2014-10-08 Thread Jeffrey Armstrong
New submission from Jeffrey Armstrong: The determination of the name of the posix module's initialization function (at Modules/posixmodule.c:12055) is currently dependent on the compiler being used. For MSVC, Watcom, or Borland, the name is defined as "PyInit_nt." However, both Open Watcom

[issue22578] Add additional attributes to re.error

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sounds ok, but it would be nice to add some tests. -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue22578] Add additional attributes to re.error

2014-10-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- title: Add addition attributes to re.error -> Add additional attributes to re.error ___ Python tracker ___ ___

[issue22578] Add addition attributes to re.error

2014-10-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett, pitrou stage: -> patch review type: -> enhancement versions: +Python 3.5 ___ Python tracker _

[issue22578] Add addition attributes to re.error

2014-10-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch adds additional attributes to the re.error exception: msg, pattern, pos, colno, lineno. It also adds helpful information to error message. Examples: >>> re.compile(r"abc\u123") Traceback (most recent call last): File "", line 1, in File

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-10-08 Thread Ben Hoyt
Ben Hoyt added the comment: Thanks for the initial response and code review, Victor. I'll take a look and respond further in the next few days. In the meantime, however, I'm definitely open to splitting scandir out into its own C file. This will mean a little refactoring (making some functions

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-10-08 Thread Christian Heimes
Christian Heimes added the comment: Let's not be early adopters here. I suggest we wait until glibc has a proper interface. -- ___ Python tracker ___ ___

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-10-08 Thread STINNER Victor
STINNER Victor added the comment: > You may want to have the C primitive return results in batches (of e.g. 10 or > 100 entries) to limit the overhead, btw. Ah yes, good idea. I read that internally readdir() also fetchs many entries in a single syscall (prefetch" / readahead, I don't know how

[issue22577] local variable changes lost after pdb jump command

2014-10-08 Thread Xavier de Gaye
New submission from Xavier de Gaye: With the following pdb_jump.py script: def foo(x): import pdb; pdb.set_trace() lineno = 3 lineno = 4 foo(1) The change made to 'x' is lost after a jump to line 4: $ ./python ~/tmp/test/pdb_jump.py > ~/tmp/test/pdb_jump.py(3)foo() -> lineno = 3

[issue22576] ftplib documentation gives a wrong argument name for storbinary

2014-10-08 Thread Berker Peksag
Berker Peksag added the comment: Fixed. Thanks for the report, Derek. -- assignee: docs@python -> berker.peksag nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.4, Python 3.5 -Python 3.3 ___ Pyt

[issue22576] ftplib documentation gives a wrong argument name for storbinary

2014-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4cc584d47c7d by Berker Peksag in branch '3.4': Issue #22576: Fix signatures of FTP.storbinary() and FTP.storlines() methods. https://hg.python.org/cpython/rev/4cc584d47c7d New changeset f21f0de30544 by Berker Peksag in branch 'default': Issue #22576

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree that having a high-level wrapper around a low-level C primitive would be cool, but someone has to experiment on that to find out how much performance it would cost. You may want to have the C primitive return results in batches (of e.g. 10 or 100 entr

[issue22477] GCD in Fractions

2014-10-08 Thread gladman
gladman added the comment: You might be right that it is not worth adding the ability to handle a variable number of parameters in the new gcd. But this depends on whether you are right that this would add a significant burden to the implementation. I am not sure that it would. But for pure