[issue25339] sys.stdout.errors is set to "surrogateescape"

2015-10-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The error handler of sys.stdout and sys.stdin is set to "surrogateescape" even for non-ASCII encoding. $ LANG= PYTHONIOENCODING=UTF-8 ./python -c 'import sys; print(sys.stdout.encoding, sys.stdout.errors)' UTF-8 surrogateescape -- components: IO m

[issue19058] test_sys.test_ioencoding_nonascii() fails with ASCII locale encoding

2015-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What could you say about the recent patch Victor? -- ___ Python tracker ___ ___ Python-bugs-list m

[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> martin.panter stage: patch review -> commit review ___ Python tracker ___ ___ Python-bu

[issue23749] asyncio missing wrap_socket (starttls)

2015-10-07 Thread Elizabeth Myers
Elizabeth Myers added the comment: > Therefore, the most convenient place to add the new API are *transports*. I had an inkling this was the case, but I didn't know how to go about the creation of a new protocol and transport pair. > I'm hesitant to add this API to Transport; it somehow feels

[issue25338] urllib fail to check host whether it should be bypassed

2015-10-07 Thread Jung-chih Wei
Jung-chih Wei added the comment: patch for 2.7 branch -- Added file: http://bugs.python.org/file40715/cpython_98593.patch ___ Python tracker ___ _

[issue25338] urllib fail to check host whether it should be bypassed

2015-10-07 Thread Jung-chih Wei
Jung-chih Wei added the comment: patch for default branch -- keywords: +patch Added file: http://bugs.python.org/file40714/cpython_98592.patch ___ Python tracker ___

[issue25338] urllib fail to check host whether it should be bypassed

2015-10-07 Thread Jung-chih Wei
New submission from Jung-chih Wei: Windows could append a empty host in ProxyOverride list. Then, proxy_bypass_registry() will return true for any host. -- components: Windows messages: 252510 nosy: Jung-chih Wei, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity:

[issue16802] fileno argument to socket.socket() undocumented

2015-10-07 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 ___ Python tracker ___

[issue16802] fileno argument to socket.socket() undocumented

2015-10-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset f4606117d571 by Berker Peksag in branch '3.4': Issue #16802: Document fileno parameter of socket.socket() https://hg.python.org/cpython/rev/f4606117d571 New changeset 1d14675c6050 by Berker Peksag in branch '3.5': Issue #16802: Document fileno param

[issue25228] Regression in cookie parsing with brackets and quotes

2015-10-07 Thread Martin Panter
Martin Panter added the comment: Instead of the while loop, can’t you use something like str.find(";", i)? -- stage: needs patch -> patch review ___ Python tracker ___ __

[issue25336] Segmentation fault on Mavericks consistent crashing of software: Please HELP!!!!!

2015-10-07 Thread Ned Deily
Ned Deily added the comment: Without more information or a reproducible test case, it is very difficult to say what's going on. But, from some of the file paths in the crash report, I'm guessing you are using a third-party package called OOF2 with a MacPorts-installed Python 2.7 and oof2 seem

[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Is there a runtime cost or does the hardware run the bounds checks in parallel with memory accesses? Are the bounds set when malloc() is called or elsewhere? I read the provided links but can't say I fully understand how it works exactly (which memory bl

[issue25337] weakref.finalize documentation refers to old interpreter shutdown behavior

2015-10-07 Thread Josh Rosenberg
New submission from Josh Rosenberg: In weakref.finalize's documentation ( https://docs.python.org/3/library/weakref.html#weakref.finalize ), it says: "A finalizer will never invoke its callback during the later part of the interpreter shutdown when module globals are liable to have been replac

[issue25045] smtplib throws exception TypeError: readline()

2015-10-07 Thread R. David Murray
R. David Murray added the comment: Thanks for figuring out the cause and that it has already been fixed. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue25045] smtplib throws exception TypeError: readline()

2015-10-07 Thread Peter Donis
Peter Donis added the comment: It looks like this was fixed some time in between my Python 3.2 version (3.2.3) and the current one (3.2.6); the code in the current 3.2 head in the repository has a size parameter in the readline function for SSLFakeFile: https://hg.python.org/cpython/file/3.2/L

[issue25045] smtplib throws exception TypeError: readline()

2015-10-07 Thread Peter Donis
Peter Donis added the comment: Investigating further, the problem appears to be with the SSLFakeFile object used for SSL/TLS connections. Here is a console session showing the issue (I have redacted the host name and port number used for privacy reasons): >>> import smtplib >>> smtp = smtplib.

[issue25228] Regression in cookie parsing with brackets and quotes

2015-10-07 Thread Pathangi Jatinshravan
Pathangi Jatinshravan added the comment: Oh not intentional. Must have clicked something by mistake -- versions: +Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker __

[issue25045] smtplib throws exception TypeError: readline()

2015-10-07 Thread Peter Donis
Peter Donis added the comment: I am having the same problem; the error occurs in the call to the login method of the smtplib.SMTP object. That method takes two arguments, username and password, and that is what I am calling it with. -- nosy: +pdonis ___

[issue25298] Add lock and rlock weakref tests

2015-10-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: This looks reasonable, though I don't see a need to backport it. -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___

[issue25315] Make it clear in the collections Python source code that OrderedDict may be overridden

2015-10-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: > What I'm suggesting it would be worth adding to the source code is > a simple comment before the class definition for OrderedDict that > says "This Python code may be overridden by an accelerated > version of this class." Sorry, I disagree. We've never

[issue25315] Make it clear in the collections Python source code that OrderedDict may be overridden

2015-10-07 Thread R. David Murray
R. David Murray added the comment: What I'm suggesting it would be worth adding to the source code is a simple comment before the class definition for OrderedDict that says "This Python code may be overridden by an accelerated version of this class." The idea being to prevent confusion if som

[issue25315] Make it clear in the collections Python source code that OrderedDict may be overridden

2015-10-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: One other thought: The purpose of the source links is to help people learn. It in no way every implies that someone should hack private implementation details. We have a number of modules that have both a pure python implementation and a replacement wit

[issue25315] Make it clear in the collections Python source code that OrderedDict may be overridden

2015-10-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, the decision to use __ to make the implementation more private was done at Guido's recommendation. -- ___ Python tracker ___ _

[issue25315] Make it clear in the collections Python source code that OrderedDict may be overridden

2015-10-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: In general, the __attributes and _attributes are already considered to be private, so I don't see the point. Aside from this one user that is never been necessary and he already knows that it doesn't work. Re-reading the thread, the issue isn't that he do

[issue14611] inspect.getargs fails on some anonymous tuples

2015-10-07 Thread Scott Sanderson
Scott Sanderson added the comment: Note also that a much simpler repro for this issue is: inspect.getargs(((x for _ in [0]) for x in [0]).gi_code) This triggers the same issue because the inner generator expression closes over the loop variable of the outer expression, which causes us to hit t

[issue25228] Regression in cookie parsing with brackets and quotes

2015-10-07 Thread Tim Graham
Tim Graham added the comment: Yes, when I have some time. By the way, did you intentionally remove all the "Python 3.X" versions on the issue? -- ___ Python tracker ___ ___

[issue14611] inspect.getargs fails on some anonymous tuples

2015-10-07 Thread Scott Sanderson
Scott Sanderson added the comment: This issue is the root cause of at least two open issues in IPython: https://github.com/ipython/ipython/issues/8293 https://github.com/ipython/ipython/issues/8205 Testing locally, the patch supplied here fixes both of those issues. Is there still work that n

[issue25228] Regression in cookie parsing with brackets and quotes

2015-10-07 Thread Pathangi Jatinshravan
Pathangi Jatinshravan added the comment: Hi Tim, I have submitted a patch (patch_with_test.diff). Can you take a look at this? -- ___ Python tracker ___

[issue25332] [Errno 10035] A non-blocking socket operation could not be completed immediately on python 3.1.2

2015-10-07 Thread Zachary Ware
Zachary Ware added the comment: Python 3.1 is long since dead, and 3.1.2 isn't even the latest 3.1. Is there a particular reason why you're using it? I highly recommend upgrading to a newer Python, either 3.4.3 or 3.5.0. 3.5.0 if you're on anything newer than Windows XP, 3.4.3 if you're on

[issue25332] [Errno 10035] A non-blocking socket operation could not be completed immediately on python 3.1.2

2015-10-07 Thread Martin Panter
Martin Panter added the comment: See , which is why I thought the problem should be fixed in 3.2. Specifically, that commit went into v3.2a3. If you can demonstrate the problem exists in 3.4 or newer, you might be able to get more people interested

[issue25311] Add f-string support to tokenize.py

2015-10-07 Thread Martin Panter
Martin Panter added the comment: Thanks for the patch. Do you want to try adding a test case. See TokenizeTest.test_string() at /Lib/test/test_tokenize.py:189 for a guide, though I would suggest a new test_fstring() method. Also, F-strings can be combined with the raw string syntax. I wonder i

[issue25322] contextlib.suppress not tested for nested usage

2015-10-07 Thread Nan Wu
Nan Wu added the comment: Added a patch with Martina's idea. Isn't ignored better set as false instead ? Since interpreter did not ignore it. -- keywords: +patch nosy: +Nan Wu Added file: http://bugs.python.org/file40713/fix_reentrant_cm_test.patch _

[issue16099] robotparser doesn't support request rate and crawl delay parameters

2015-10-07 Thread Nikolay Bogoychev
Nikolay Bogoychev added the comment: Hey, Friendly reminder that there has been no activity on this issue for more than an year. Cheers, Nick -- ___ Python tracker ___ __

[issue18595] zipfile: symlinks etc.

2015-10-07 Thread Xavier Combelle
Xavier Combelle added the comment: about the readlink functionnality, I would like to point that it might lead to security issues see for example https://security.stackexchange.com/questions/73718/how-zip-symlink-works At least, the standard read should not do it by default. -- nosy:

[issue25335] ast.literal_eval fails to parse numbers with leading "+"

2015-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: Digging into the history, it looks as though changeset 884c71cd8dc6 is responsible for the difference between Python 2 and Python 3. More background: in Python 2, there was the oddity that an expression like `-34` is parsed as a single AST node: in a sense. I

[issue25330] Docs for pkgutil.get_data inconsistent with semantics

2015-10-07 Thread Brett Cannon
Brett Cannon added the comment: Changing this to be a single issue about the difference between the docs and the semantics of pkgutil. The feature request can be made into a separate issue, but there are plans to replace the API with a more stringently defined one in importlib. -- nos

[issue25311] Add f-string support to tokenize.py

2015-10-07 Thread Nan Wu
Nan Wu added the comment: Added 'f'/'F' to the StringPrefix regex and also update the quote dictionary. -- keywords: +patch nosy: +Nan Wu Added file: http://bugs.python.org/file40712/tokenize.patch ___ Python tracker

[issue5380] pty.read raises IOError when slave pty device is closed

2015-10-07 Thread Guido van Rossum
Guido van Rossum added the comment: Indeed, ptys and pipes behave very differently (that's why we have both -- they serve different purposes). More relevant question: we should find a way to decide whether to either apply Antoine's patch or close this issue. Finally, maybe array.fromfile() ca

[issue25335] ast.literal_eval fails to parse numbers with leading "+"

2015-10-07 Thread R. David Murray
R. David Murray added the comment: This works in python3. I'm not sure why the two pythons are different, there's no obvious issue about this being changed in python3, so perhaps it was something that "just happened" while changing other things. literal_eval is *not* a general expression ev

[issue25335] ast.literal_eval fails to parse numbers with leading "+"

2015-10-07 Thread Scott Turner
New submission from Scott Turner: import ast ast.literal_eval("+3") Traceback (most recent call last): [...] ValueError: malformed string -- messages: 252476 nosy: Scott Turner priority: normal severity: normal status: open title: ast.literal_eval fails to parse numbers with lead

[issue25332] [Errno 10035] A non-blocking socket operation could not be completed immediately on python 3.1.2

2015-10-07 Thread raghu prasad
raghu prasad added the comment: HI Martin, Thanks for the immediate reply i m sure about the version 3.2 we are using 3.1.2 in our project so thought if it was missed in this version Oh if 3.1.2 is closed then its bad luck can you provide some inputs on how to proceed further on this i hea

[issue17908] Unittest runner needs an option to call gc.collect() after each test

2015-10-07 Thread Adam
Changes by Adam : -- keywords: +patch Added file: http://bugs.python.org/file40711/unittest-add-gc.patch ___ Python tracker ___ ___ Py

[issue25315] Make it clear in the collections Python source code that OrderedDict may be overridden

2015-10-07 Thread R. David Murray
Changes by R. David Murray : -- title: Make it clear in the OrderedDict source that it may be overridden -> Make it clear in the collections Python source code that OrderedDict may be overridden ___ Python tracker

[issue25315] Make it clear in the OrderedDict source that it may be overridden

2015-10-07 Thread R. David Murray
Changes by R. David Murray : -- title: OrderedDict mangled private attribute is inaccessible -> Make it clear in the OrderedDict source that it may be overridden ___ Python tracker

[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-07 Thread R. David Murray
R. David Murray added the comment: This is a general policy: we have python modules for as many stdlib modules as we can (which is most of them), and for some stdlib modules we also have C accelerators. I will agree that the fact that the documentation has a link to the source code of the col

[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-07 Thread Emanuel Barry
Emanuel Barry added the comment: The Python implementation will stay for two main reasons, one to provide a working implementation for all those who wish to use a modified version (you, for example, if you want to use a version that lets you alter order), and two for alternate implementations

[issue25334] telnetlib: process_rawq() and binary data

2015-10-07 Thread Michael Walle
New submission from Michael Walle: The process_rawq() discards '\x00' and '\x11' bytes. At least the '\x00' byte is specified by the standard as a No-Op. So this is standard conform according to RFC 854. But there is also the binary transmission mode for telnet (RFC 856). If I want to support

[issue25333] .1 + .2 == .3 should be True

2015-10-07 Thread Eric V. Smith
Eric V. Smith added the comment: This is not a bug. See: https://docs.python.org/3.5/tutorial/floatingpoint.html -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue25333] .1 + .2 == .3 should be True

2015-10-07 Thread Rodrigo Souto
New submission from Rodrigo Souto: print(.1 + .2 == .3) should be True like the others >>> print(.1 + .2 == .3) False >>> print(.1 + .3 == .4) True >>> print(.1 + .4 == .5) True >>> print(.1 + .1 == .2) True -- messages: 252470 nosy: Rodrigo Souto priority: normal severity: normal stat

[issue25228] Regression in cookie parsing with brackets and quotes

2015-10-07 Thread Pathangi Jatinshravan
Pathangi Jatinshravan added the comment: Is this what you wanted? -- Added file: http://bugs.python.org/file40709/patch_with_test.diff ___ Python tracker ___

[issue19500] Error when connecting to FTPS servers not supporting SSL session resuming

2015-10-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: This is supposed to be a new feature hence the patch should be targeted against Python 3.6, definitively not 2.7. -- versions: +Python 3.6 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker

[issue19500] Error when connecting to FTPS servers not supporting SSL session resuming

2015-10-07 Thread Alex Warhawk
Alex Warhawk added the comment: Based on the proof-of-concept patch I submitted a few days ago I have built a more sophisticated patch. Please review it and let me know about necessary changes. -- Added file: http://bugs.python.org/file40708/implement_ssl_session_reuse.patch _

[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-07 Thread Serge Matveenko
Serge Matveenko added the comment: Sorry for reopening. I completely agree with the point that is it not necessary for Python and C implementations to duplicate each other. But then the Python OrderedDict implementation should be dropped from the library source. The code that is there now is n

[issue25332] [Errno 10035] A non-blocking socket operation could not be completed immediately on python 3.1.2

2015-10-07 Thread Martin Panter
Martin Panter added the comment: According to Issue 9090, this was already fixed in 3.2 and 2.7. I think the 3.1 branch is closed. Are you seeing the same problem in newer version of Python, or just 3.1.2? If only 3.1.2, I think you may be on your own. -- nosy: +martin.panter

[issue5380] pty.read raises IOError when slave pty device is closed

2015-10-07 Thread Martin Panter
Martin Panter added the comment: I don’t think it is right to assume pseudo-terminals behave exactly like pipes. I suspect the behaviour when the slave is closed is undefined, or at best platform-specific, and there is no bug to fix in Python. Also, it looks like array.fromfile() assumes any s

[issue25332] [Errno 10035] A non-blocking socket operation could not be completed immediately on python 3.1.2

2015-10-07 Thread raghu prasad
New submission from raghu prasad: On one machine we are facing this issue [Errno 10035] A non-blocking socket operation could not be completed immediately We are using urllib.request.urlopen with some timeout value sample code getRequest = urllib.request.Request(getUrl) g

[issue25286] views are not sequences

2015-10-07 Thread Martin Panter
Martin Panter added the comment: Thanks Akira -- resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: +Python 2.7 ___ Python tracker ___ __

[issue25286] views are not sequences

2015-10-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 04815b55227f by Martin Panter in branch '2.7': Issue #25286: Accidentally dropped "the" https://hg.python.org/cpython/rev/04815b55227f -- ___ Python tracker __

[issue25331] https://docs.python.org/3.5/using/windows.html should list whcih windows service packs are

2015-10-07 Thread Laura Creighton
New submission from Laura Creighton: https://docs.python.org/3.5/using/windows.html should list which windows service packs are needed to install Python. Could somebody knowledgable please add this information. -- assignee: docs@python components: Documentation, Windows messages: 25246

[issue25286] views are not sequences

2015-10-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 41e1f2500047 by Martin Panter in branch '2.7': Issue #25286: Dictionary views are not sequences https://hg.python.org/cpython/rev/41e1f2500047 -- ___ Python tracker __

[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. See also minor note on Rietveld. I think it is worth to extract all input() tests to separate class. -- nosy: +serhiy.storchaka ___ Python tracker

[issue25286] views are not sequences

2015-10-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 92429e01f444 by Martin Panter in branch '3.4': Issue #25286: Dictionary views are not sequences https://hg.python.org/cpython/rev/92429e01f444 New changeset c29f1114ef65 by Martin Panter in branch '3.5': Issue #25286: Merge dictionary view glossary

[issue25286] views are not sequences

2015-10-07 Thread Martin Panter
Martin Panter added the comment: Will commit this patch, except for the :dfn:`view` part. That isn’t a hyperlink, it just emphasizes the term. -- assignee: docs@python -> martin.panter nosy: +berker.peksag stage: patch review -> commit review ___ Pyt

[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-07 Thread Martin Panter
Martin Panter added the comment: This patch includes a test case using pty.fork() to ensure stdin is a terminal, so the bug would be triggered. It is a bit tricky, but hopefully works on Unix platforms. I have only tested it on Linux. -- Added file: http://bugs.python.org/file40707/inp

[issue7352] pythonx.y-config --ldflags out of /usr and missing -L

2015-10-07 Thread Maxim Egorushkin
Maxim Egorushkin added the comment: I encountered this issue when compiling gdb against my own build of Python 2.7 in a non-standard location. gdb could not locate libpython2.7.so. The solution is to configure Python with LINKFORSHARED variable which contains additional linker flags required t