[issue24805] Python installer having problem in installing Python for all users in Windows

2015-10-27 Thread mandeep
mandeep added the comment: But if there is a machine which already has Python. If we remove python manually and try the script . The python folder is created. I can see python in start- all programs. But PYTHON its missing from control panel. It does not allow me to uninstall. --

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-10-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is an outdated comment in Objects/exceptions.c that explains args hacking. It refers to no longer supported syntax: except OSError, (errno, strerror): -- ___ Python tracker

[issue25481] PermissionError in subprocess.check_output() when running as a different user (not login shell)

2015-10-27 Thread eryksun
eryksun added the comment: In subprocess.py there's the following code that builds a sequence of potential paths for the executable [1]: executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the

[issue24805] Python installer having problem in installing Python for all users in Windows

2015-10-27 Thread mandeep
mandeep added the comment: It works when I try it on a clean machine. -- nosy: +manddy221 ___ Python tracker ___

[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you for the confirmation that this is a tcl/tk problem. At least this report is here for anyone else using 8.6 with non-US keyboard on linux. -- resolution: -> third party stage: -> resolved status: open -> closed

[issue25488] IDLE: Remove idlelib from sys.path when added

2015-10-27 Thread Terry J. Reedy
New submission from Terry J. Reedy: Problem: Consider module idlelib.run. The following is correct. C:\Users\Terry>python -c "import run" Traceback (most recent call last): File "", line 1, in ImportError: No module named 'run' But in IDLE started from icon or command line >>> import run

[issue25467] Put “deprecated” warnings first

2015-10-27 Thread Tony R.
Tony R. added the comment: > On Oct 26, 2015, at 4:28 PM, Ezio Melotti wrote: > > This is true, but on the other hand you might want to see the [new in 3.4] > while looking at 3.6 docs and working on a program that must support Python > 3.3+. Anyway we can discuss

[issue23237] Interrupts are lost during readline PyOS_InputHook processing (reopening)

2015-10-27 Thread Martin Panter
Martin Panter added the comment: >From memory my biggest worry was changing the API (meaning of return value). I >don’t know what the policy is, but it might need a new separate API. You might >find more input from experts on the python-dev list or something. --

[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-10-27 Thread Martin Panter
Martin Panter added the comment: This looks good enough to me. I would have probably avoided littering the page with too many Deprecated and Note boxes, but I can respect your and Berker’s preference to add the separate box. -- ___ Python tracker

[issue25228] Regression in cookie parsing with brackets and quotes

2015-10-27 Thread Pathangi Jatinshravan
Pathangi Jatinshravan added the comment: Has there been any movement on this issue? -- ___ Python tracker ___

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-27 Thread Martin Panter
Martin Panter added the comment: How does this patch affect a user-defined SIGWINCH handler, or is that not really supported when Readline is in use? -- stage: needs patch -> patch review ___ Python tracker

[issue25489] sys.exit() caught in exception handler

2015-10-27 Thread Brian Sutherland
New submission from Brian Sutherland: Running the attached file with python3 shows that SystemExit is caught rather than causing the process to stop. That's quite surprising. -- components: asyncio files: test_sys_exit_in_exception_handler.py messages: 253529 nosy: gvanrossum, haypo,

[issue25476] close() behavior on non-blocking BufferedIO objects with sockets

2015-10-27 Thread Martin Panter
Martin Panter added the comment: David, what’s your use case for doing non-blocking buffered writing “correctly”? Would you be able to use the context manager functionality? I would have thought you would explicitly call flush() as many times as necessary, but only call close() once when you

[issue25488] IDLE: Remove idlelib from sys.path when added

2015-10-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: When python is started without running a file (Windows icon or command line), '' is prepended to sys.path. When IDLE is started from 3.5 icon, '' is prepended temporally after and spatially before '.../idlelib', so the latter, to be removed, is sys.path[1]

[issue7322] Socket timeout can cause file-like readline() method to lose data

2015-10-27 Thread Martin Panter
Martin Panter added the comment: IMO it might make sense in some cases to disallow subsequent reading from a buffered socket reader (or probably any BufferedReader) that raises an exception (not just a timeout). But the restriction seems unnecessary for unbuffered raw readers, and it also

[issue25470] Random Malloc error raised

2015-10-27 Thread Martin Panter
Martin Panter added the comment: Are you able to reproduce this easily? Perhaps a GDB backtrace might be useful, or posting instructions or code (simplified if possible) to reproduce it. I’m guessing the Valgrind errors may be caused by the same problem that causes the initial assertion

[issue21998] asyncio: support fork

2015-10-27 Thread Christian H
Changes by Christian H : -- nosy: +Christian H ___ Python tracker ___ ___

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

2015-10-27 Thread Florin Papa
Florin Papa added the comment: Hi Stefan, The GCC MPX feature proved stable when using O0, having tested multiple times with regrtest on Skylake, Broadwell and Haswell. Still, this is a new feature and GCC might improve it with time. -- ___ Python

[issue25467] Put “deprecated” warnings first

2015-10-27 Thread Ezio Melotti
Ezio Melotti added the comment: I would rather avoid a JS-based solution. It should be possible to create a mixin that adds the checks for deprecated/versionadded directives among the children of the node, and then define new directives for functions/methods/classes that inherit from the

[issue25492] subprocess with redirection fails after FreeConsole

2015-10-27 Thread George Prekas
New submission from George Prekas: Under Windows, if I do FreeConsole and then subprocess.call with redirected stdin or stdout or stderr, then subprocess.call fails. The only solution is either DO NOT redirect any handle OR to redirect ALL of them. The problem lies in function _get_handles at

[issue25489] sys.exit() caught in exception handler

2015-10-27 Thread R. David Murray
R. David Murray added the comment: Ah, I misunderstood your report, because I didn't actually run the example. The exception is being ignored because it is raised during a __del__ method execution. This has nothing to do with set_exception_handler. And in fact if you raise sys.exit in an

[issue25487] imp module DeprecationWarning in test suite

2015-10-27 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker ___ ___

[issue25489] sys.exit() caught in exception handler

2015-10-27 Thread Yury Selivanov
Yury Selivanov added the comment: > because in that case the handler isn't getting called from the Task __del__ It's possible to fix -- see the attached future.patch. And perhaps this should be fixed in Future.__del__ and Task.__del__ -- ignoring BaseExceptions isn't good. --

[issue25491] ftplib.sendcmd only accepts string

2015-10-27 Thread wozlaf
New submission from wozlaf: The FTP server (ProFTPD 1.3.5a) returns some file and folder names not properly encoded in UTF-8, when requesting with FTP command "MLSD" and "OPTS UTF8 ON". To access I need to send them back to the server exactly as they came (bytes) with ftp.sendcmd(b"CWD" +

[issue25489] sys.exit() caught in exception handler

2015-10-27 Thread Brian Sutherland
Brian Sutherland added the comment: the workaround I am using at the moment is this: def handler(loop, context): print('Got error, exiting') loop.call_soon(sys.exit, 42) which actually does cause the process to exit -- ___ Python tracker

[issue25481] PermissionError in subprocess.check_output() when an inaccessible directory on the path

2015-10-27 Thread Gregory P. Smith
Gregory P. Smith added the comment: Definitely a bug. The path search should silently skip directories it can't access. On Tue, Oct 27, 2015, 7:05 AM R. David Murray wrote: > > R. David Murray added the comment: > > So, two interesting questions: does this in fact

[issue25490] small mistake in example for random.choice()

2015-10-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no mistake. weighted_choices is a list of pairs. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue25493] warnings.warn: wrong stacklevel causes import of local file "sys"

2015-10-27 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___

[issue25489] sys.exit() caught in exception handler

2015-10-27 Thread R. David Murray
R. David Murray added the comment: Not until you convince me there is a reason for deviating from Python's normal __del__ handling :) (Or other asyncio developers agree with you and not me.) -- ___ Python tracker

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-27 Thread Eric Price
Eric Price added the comment: SIGWINCH handler for readline. Fixed indentation issues. -- Added file: http://bugs.python.org/file40870/rl_sigwinch_update.patch ___ Python tracker

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-27 Thread Eric Price
Changes by Eric Price : Removed file: http://bugs.python.org/file40844/rl_sigwinch_update.patch ___ Python tracker ___

[issue25483] Improve f-string implementation: FORMAT_VALUE opcode

2015-10-27 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___

[issue25489] sys.exit() caught in exception handler

2015-10-27 Thread Yury Selivanov
Yury Selivanov added the comment: > No, you are talking about *all* exceptions, since they all descend from > BaseException. Python's normal __del__ handling just prints the ignored > exception to stdout, even if it is a BaseException. Why should asyncio be > different (other than logging

[issue25493] warnings.warn: wrong stacklevel causes import of local file "sys"

2015-10-27 Thread R. David Murray
Changes by R. David Murray : -- nosy: +brett.cannon ___ Python tracker ___ ___

[issue25492] subprocess with redirection fails after FreeConsole

2015-10-27 Thread Zachary Ware
Changes by Zachary Ware : -- components: +Windows nosy: +eryksun, paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-27 Thread Eric Price
Eric Price added the comment: At the moment, it just overwrites any existing SIGWINCH handler. I don't know how to do anything better -- one could try to store an existing SIGWINCH handler and call it, but it still wouldn't really work for an application that wanted to add and remove

[issue25489] sys.exit() caught in exception handler

2015-10-27 Thread R. David Murray
R. David Murray added the comment: So, any exception raised in the exception handler will be re-raised via call_soon. I think the message would be clearer if it said that (that the exception comes from the registered exception handler). But, I'm not sure this is a good idea. Exceptions are

[issue25489] sys.exit() caught in exception handler

2015-10-27 Thread Yury Selivanov
Yury Selivanov added the comment: Trapping those exceptions in __del__ isn't good. Another way to address this would be to at least modify call_exception_handler to log when an exception handler raises a BaseException error. -- ___ Python tracker

[issue25493] warnings.warn: wrong stacklevel causes import of local file "sys"

2015-10-27 Thread Brett Cannon
Brett Cannon added the comment: I'll have to dig into this to figure out what's going on, but since the sys module is built into Python it makes it so import won't accidentally import some file named sys. the real question is who thinks the 'sys' file should be considered. --

[issue25489] sys.exit() caught in exception handler

2015-10-27 Thread Yury Selivanov
Yury Selivanov added the comment: I see your points, but we're talking about BaseExceptions here -- KeyboardInterrupt, SystemExit etc. Those things usually mean that the program has to crash. -- ___ Python tracker

[issue25489] sys.exit() caught in exception handler

2015-10-27 Thread R. David Murray
R. David Murray added the comment: No, you are talking about *all* exceptions, since they all descend from BaseException. Python's normal __del__ handling just prints the ignored exception to stdout, even if it is a BaseException. Why should asyncio be different (other than logging it

[issue25493] warnings.warn: wrong stacklevel causes import of local file "sys"

2015-10-27 Thread Michael Laß
New submission from Michael Laß: When there is a file called "sys" in the local directory of a python script and warning.warn is called with an invalid stacklevel, python tries to import that file and throws an error like the following: >>> import warnings >>> warnings.warn("foo", Warning,

[issue25479] Increase unit test coverage for abc.py

2015-10-27 Thread Brett Cannon
Changes by Brett Cannon : -- stage: -> patch review ___ Python tracker ___ ___

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-27 Thread Mark Roseman
Mark Roseman added the comment: Can I suggest that this issue continues to be about IDLE not being able to write its preferences directory/files due to permissions, and we create a new issue for the fact that IDLE is storing it in the wrong place under Windows? --

[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-10-27 Thread Martin Panter
Martin Panter added the comment: Not quite. This is a two-step deprecation: 1. “htmllib” is removed in favour of HTMLParser. The API is different, so no automatic 2to3 change would be practical. 2. HTMLParser is renamed to “html.parser”, and 2to3 handles this. This is already documented at

[issue25493] warnings.warn: wrong stacklevel causes import of local file "sys"

2015-10-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The "sys" file is not imported. It is read by linecache. warnings.warn() tries to determine the file name by looking at __file__ in module's globals. If it fails, it falls back to the module name. Definitely it fails also for builtin modules, binary

[issue1117601] os.path.exists returns false negatives in MAC environments.

2015-10-27 Thread Stefano Mazzucco
Stefano Mazzucco added the comment: FWIW, I have just been experiencing this on CentOS 6.5 with Python 2.7.5 (sorry). I could make the Python code happy by running chcon[1] with the correct context type, otherwise os.path.exists would happily return False for a file that actually existed.

[issue25494] Four quotes used to begin docstring

2015-10-27 Thread John Mark Vandenberg
New submission from John Mark Vandenberg: Introduced in the initial version of statistics was starting a docstring https://hg.python.org/cpython/annotate/685e044bed5e/Lib/statistics.py#l380 Somewhere the fourth quote is dropped, as it doesnt appear in the docs:

[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-10-27 Thread R. David Murray
R. David Murray added the comment: OK, then the note should be dropped. -- ___ Python tracker ___ ___

[issue25493] warnings.warn: wrong stacklevel causes import of local file "sys"

2015-10-27 Thread R. David Murray
R. David Murray added the comment: Hmm. I remember fixing problems with linecache and inspect. I wonder if this is a variation on that? I don't remember the issue number. -- nosy: +r.david.murray ___ Python tracker

[issue25470] Random Malloc error raised

2015-10-27 Thread augustin rieunier
augustin rieunier added the comment: I should be able to reproduce it yes. Can't really give the code, as it's in a big program i'm working on, and it's never at the same place .. One thing though: it never happened on QA/UAT environments. So it might be linked to something (libs, programs) on

[issue25494] Four quotes used to begin docstring

2015-10-27 Thread John Mark Vandenberg
John Mark Vandenberg added the comment: The additional quotation mark is shown in help() >>> help(statistics.median_grouped) Help on function median_grouped in module statistics: median_grouped(data, interval=1) "Return the 50th percentile (median) of grouped continuous data. --

[issue6860] Inconsistent naming of custom command in setup.py help output

2015-10-27 Thread Camilla Montonen
Camilla Montonen added the comment: Apologies, I should have clarified: I can still replicate the bug in the original post, but I no longer believe this is an issue, because the wording in the documentation has been changed for Python 2.X

[issue6860] Inconsistent naming of custom command in setup.py help output

2015-10-27 Thread Camilla Montonen
Camilla Montonen added the comment: This is still an issue in Python 3.4.3, but I believe the relevant documentation has been changed already to alert users to the fact that the class name and the command name should be the same. Quoting from:

[issue25492] subprocess with redirection fails after FreeConsole

2015-10-27 Thread eryksun
eryksun added the comment: For me, fails() lives up to its name in Windows 7, but it doesn't fail in Windows 10. It shouldn't fail in Windows 8, either. In Windows 8+ the console interface is implemented using a kernel device. Console handles reference virtual files on the ConDrv device,

[issue25494] Four quotes used to begin docstring

2015-10-27 Thread John Mark Vandenberg
John Mark Vandenberg added the comment: Thank you for clarifying that. Does that mean that this issue should not be assigned to docs@python and should not have a Component of 'Documentation'? -- ___ Python tracker

[issue25454] operator.methodcaller should accept additional arguments during the call

2015-10-27 Thread Josh Rosenberg
Josh Rosenberg added the comment: I could see the argument for this to make methodcaller more like an unbound version of functools.partial. Partial lets you prebind some things and not others, you might want to do the same thing with methods, where you prebind the method name and some

[issue25495] binascii documentation incorrect

2015-10-27 Thread R. David Murray
R. David Murray added the comment: I agree that the documentation is not optimal. To give you some background, binascii was primarily implemented to support the email module, and the standard it is referring to is in fact the MIME standard that references base64 (I believe at the time the

[issue25492] subprocess with redirection fails after FreeConsole

2015-10-27 Thread eryksun
eryksun added the comment: I forgot to first check whether p2cread is None: ERROR_INVALID_HANDLE = 0x0006 if stdin is None: p2cread = _winapi.GetStdHandle(_winapi.STD_INPUT_HANDLE) if p2cread is not None: try:

[issue8231] Unable to run IDLE without write-access to home directory

2015-10-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes, that is what this issue *is* about. IDLE, like Python itself, expects to be run on machines that users can write to normally, that have not been crippled by bureaucratic policies, or by users. The editor is useless if the user cannot write files

[issue25489] sys.exit() caught in exception handler

2015-10-27 Thread Guido van Rossum
Guido van Rossum added the comment: Whew. Complex issue! The OP should probably use his workaround or call loop.stop() instead of raising SystemExit. Asyncio in general is rather careless about "true" BaseExceptions (i.e. that aren't also Exceptions), we should decide what we want to do for

[issue25494] Four quotes used to begin docstring

2015-10-27 Thread Emanuel Barry
Emanuel Barry added the comment: I don't know why you believe docstrings are programmatically linked to the library reference... Here is the file that is used to make the online documentation: https://hg.python.org/cpython/file/tip/Doc/library/statistics.rst -- nosy: +ebarry

[issue25495] binascii documentation incorrect

2015-10-27 Thread Mouse
New submission from Mouse: binascii b2a_base64() documentation says: The length of data should be at most 57 to adhere to the base64 standard. This is incorrect, because there is no base64 standard that restricts the length of input data, especially to such a small value. What RFC4648 (that

[issue25494] Four quotes used to begin docstring

2015-10-27 Thread Zachary Ware
Zachary Ware added the comment: Documentation is fine for docstrings, it gets the attention of the docs@ list. Library is also fine, since the change actually goes in Lib/. Both is most correct :) Thanks for the report and patch! -- nosy: +zach.ware

[issue25494] Four quotes used to begin docstring

2015-10-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 041701817c5d by Zachary Ware in branch '3.4': Issue #25494: Remove extra quote from docstring. https://hg.python.org/cpython/rev/041701817c5d New changeset 2dd97ad96021 by Zachary Ware in branch '3.5': Issue #25494: Merge with 3.4

[issue25439] Add type checks to urllib.request.Request

2015-10-27 Thread Nan Wu
Nan Wu added the comment: The do_request_() method which is defined in AbstractHTTPHandler seems not cover the check at least for the first case Ezio brought up. `unknown_open` has been called and gives out a relatively confusing message. -- ___

[issue25454] operator.methodcaller should accept additional arguments during the call

2015-10-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would rather leave lambda or plain function definitions as the way to handle any cases not covered by itergetter, attrgettr, and methodcaller. It feels like we're working way too hard to produce more ways to do it. Also, the suggested use cases with

[issue25439] Add type checks to urllib.request.Request

2015-10-27 Thread Martin Panter
Martin Panter added the comment: I meant removing one of the checks in AbstractHTTPHandler.do_request_(). I left a note in the review at the relevant line. One more thing I forgot to mention, although I am afraid it is 90% nit picking the dict iterable check. For the “http:” scheme, an

[issue25439] Add type checks to urllib.request.Request

2015-10-27 Thread Nan Wu
Nan Wu added the comment: Will fix the other two issues. Thanks. -- ___ Python tracker ___ ___

[issue25494] Four quotes used to begin docstring

2015-10-27 Thread Emanuel Barry
Emanuel Barry added the comment: It probably shouldn't be assigned to docs@python, but it's still a typo in the source code, so it should probably be under Library anyway. LGTM -- ___ Python tracker

[issue25489] sys.exit() caught in exception handler

2015-10-27 Thread R. David Murray
R. David Murray added the comment: I expected this function to be parallel to sys.excepthook, but I see that sys.excepthook does not get called if you call sys.exit() at the python prompt. So I guess I agree with you that it is surprising, although I actually expected the opposite (that

[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-10-27 Thread R. David Murray
R. David Murray added the comment: The note should actually be parallel to the http one (assuming 2to3 does do the translation), rather than say "use instead", which would be incorrect advice for a python2 user :) -- nosy: +r.david.murray ___

[issue25490] small mistake in example for random.choice()

2015-10-27 Thread Anton Tagunov
New submission from Anton Tagunov: Invalid example at this page: https://docs.python.org/3.6/library/random.html '.items()' is missed in the line below: >>> population = [val for val, cnt in weighted_choices for i in range(cnt)] The correct variant: >>> population = [val for val, cnt in

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

2015-10-27 Thread Stefan Krah
Stefan Krah added the comment: > The Python MPX binary will be built with –O0 because other optimization > levels will change instruction order and cause crashes, making it useful for > debugging purposes. I've trouble understanding this: Is the gcc mpx feature not stable? Looking at the

[issue25481] PermissionError in subprocess.check_output() when an inaccessible directory on the path

2015-10-27 Thread R. David Murray
R. David Murray added the comment: So, two interesting questions: does this in fact match the behavior of os._execvpe, and does it match the behavior of the shell? The latter would appear to be false, and could arguably be claimed to be a bug. If we agree that it is, we need to learn what