[issue26554] PC\bdist_wininst\install.c: Missing call to fclose()

2016-04-17 Thread Martin Panter
Martin Panter added the comment: Adding aatishnn to nosy in case they aren’t aware of your review. -- nosy: +aatishnn, martin.panter ___ Python tracker

[issue26770] _Py_set_inheritable(): do nothing if the FD_CLOEXEC close is already set/cleared

2016-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Another question: should we handle EINTR in ioctl() and fcntl()? But this is a different issue. -- ___ Python tracker

[issue26786] bdist_msi duplicates directories with names in ALL CAPS to a bogus location

2016-04-17 Thread Ivan Pozdeev
Changes by Ivan Pozdeev : -- keywords: +patch Added file: http://bugs.python.org/file42496/bdist_msi.patch ___ Python tracker ___

[issue26787] test_distutils fails when configured --with-lto

2016-04-17 Thread Gregory P. Smith
New submission from Gregory P. Smith: When configured using './configure --with-lto' (added in issue25702) and doing a 'make profile-opt' build, test_distutils fails: == FAIL: test_sysconfig_compiler_vars

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-04-17 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- dependencies: +test_distutils fails when configured --with-lto ___ Python tracker ___

[issue26778] More typo fixes

2016-04-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26778] More typo fixes

2016-04-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 395dd5630e6c by Serhiy Storchaka in branch '3.5': Issue #26778: Fixed "a/an/and" typos in code comment and documentation. https://hg.python.org/cpython/rev/395dd5630e6c New changeset bbcde8db4dc4 by Serhiy Storchaka in branch '2.7': Issue #26778:

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-17 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26744] print() function hangs on MS-Windows 10

2016-04-17 Thread Ma Lin
Ma Lin added the comment: faulthandler module caught a hang just now: Timeout (0:01:00)! Thread 0x0eb0 (most recent call first): File "D:\git\tz2txt\tz2txt\gui.py", line 262 in delfile File "C:\Python35\lib\tkinter\__init__.py", line 1549 in __call__ File

[issue26756] fileinput handling of unicode errors from standard input

2016-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Calling the openhook for the stdin will break existing code. Third-party openhooks don't special case the '' name, which is legitimate file name. Instead I recommend to patch sys.stdin explicitly in your program. sys.stdin =

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-04-17 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- dependencies: +test_gdb fails all tests on a profile-opt build configured --with-lto ___ Python tracker

[issue26788] test_gdb fails all tests on a profile-opt build configured --with-lto

2016-04-17 Thread Gregory P. Smith
New submission from Gregory P. Smith: cpython/build35.lto$ ./python ../3.5/Lib/test/test_gdb.py GDB version 7.10: GNU gdb (Ubuntu 7.10-1ubuntu2) 7.10 ... == FAIL: test_tuples (__main__.PrettyPrintTests) Verify the

[issue26770] _Py_set_inheritable(): do nothing if the FD_CLOEXEC close is already set/cleared

2016-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Changes look pretty innocent. LGTM. -- assignee: -> haypo nosy: +steve.dower stage: -> commit review ___ Python tracker

[issue26758] Unnecessary format string handling for no argument slot wrappers in typeobject.c

2016-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If I correctly understood, there is no visible bug, but there is a suboptimal code. The patch is welcome. -- stage: -> needs patch type: behavior -> performance versions: -Python 3.5 ___ Python tracker

[issue26770] _Py_set_inheritable(): do nothing if the FD_CLOEXEC close is already set/cleared

2016-04-17 Thread STINNER Victor
STINNER Victor added the comment: > Another question: should we handle EINTR in ioctl() and fcntl()? But this is > a different issue. See attached test stress.py. I tried it with ioctl() and fcntl() implementations of os.set_inheritable() and I got more than 10,000 signals: no syscalls

[issue26789] Please do not log during shutdown

2016-04-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +vinay.sajip ___ Python tracker ___ ___

[issue26770] _Py_set_inheritable(): do nothing if the FD_CLOEXEC close is already set/cleared

2016-04-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset d268f108ba80 by Victor Stinner in branch 'default': Avoid fcntl() if possible in set_inheritable() https://hg.python.org/cpython/rev/d268f108ba80 -- nosy: +python-dev ___ Python tracker

[issue26770] _Py_set_inheritable(): do nothing if the FD_CLOEXEC close is already set/cleared

2016-04-17 Thread STINNER Victor
STINNER Victor added the comment: > Changes look pretty innocent. LGTM. Thanks. I pushed my change. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue26791] shutil.move fails to move symlink (Invalid cross-device link)

2016-04-17 Thread Renato Alves
Changes by Renato Alves : -- versions: +Python 2.7, Python 3.5 ___ Python tracker ___

[issue26767] Inconsistant error messages for failed attribute modification

2016-04-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- priority: normal -> low ___ Python tracker ___ ___

[issue26774] Elide Py_atomic fences when WITH_THREAD is disabled?

2016-04-17 Thread STINNER Victor
STINNER Victor added the comment: Discussion about --without-threads: * May 2012 https://mail.python.org/pipermail/python-dev/2012-May/119333.html * Follow-up january 2013 https://mail.python.org/pipermail/python-dev/2013-January/123505.html --

[issue26789] Please do not log during shutdown

2016-04-17 Thread Matthias Urlichs
New submission from Matthias Urlichs: … or, if you do, ignore errors. This is during program shutdown. Unfortunately, I am unable to create a trivial example which exhibits the order of destruction necessary to trigger this problem. Traceback (most recent call last): File

[issue26791] shutil.move fails to move symlink (Invalid cross-device link)

2016-04-17 Thread Renato Alves
Renato Alves added the comment: Also related to http://bugs.python.org/issue212317 -- ___ Python tracker ___

[issue26745] Redundant code in _PyObject_GenericSetAttrWithDict

2016-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Issue26767 looks too complex and resolving it needs much more rewriting. -- resolution: remind -> fixed status: open -> closed ___ Python tracker

[issue26790] bdist_msi package duplicates everything to a bogus location when run with /passive or /q

2016-04-17 Thread Ivan Pozdeev
New submission from Ivan Pozdeev: First, the background information so you understand what I am talking about. bdist_msi-produced packages work in the following way: The files to install are presented as at least 3 equivalent sets (implemented as Features): "Python" (for Python from

[issue26791] shutil.move fails to move symlink (Invalid cross-device link)

2016-04-17 Thread Renato Alves
New submission from Renato Alves: Hi everyone, I'm not really sure if this is a new issue but digging through the bug reports from the past I couldn't find an answer. There's http://bugs.python.org/issue1438480 but this seems to be a different issue. I also found

[issue26773] Shelve works inconsistently when carried over to child processes

2016-04-17 Thread Paul Ellenbogen
Paul Ellenbogen added the comment: I think this behavior is due to the underlying behavior of the dbm. The same code using dbm, rather than shelve, also throws KeyErrors: from multiprocessing import Process import dbm db = dbm.open("example.dbm", "c") for i in range(100): db[str(i)] =

[issue26774] Elide Py_atomic fences when WITH_THREAD is disabled?

2016-04-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: This sounds like additional hassle for not much gain. Agreed with Victor. -- nosy: +pitrou ___ Python tracker ___

[issue26716] EINTR handling in fcntl

2016-04-17 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file42498/fcntl_eintr-3.patch ___ Python tracker ___

[issue26716] EINTR handling in fcntl

2016-04-17 Thread STINNER Victor
STINNER Victor added the comment: I updated the test, does it look better now? -- ___ Python tracker ___ ___

[issue25987] collections.abc.Reversible

2016-04-17 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I see that I forgot to include .. versionadded:: in the documentation. Will this go into 3.5.2 or in 3.6? -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker

[issue26790] bdist_msi package duplicates everything to a bogus location when run with /passive or /q

2016-04-17 Thread SilentGhost
Changes by SilentGhost : -- versions: -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___

[issue26745] Redundant code in _PyObject_GenericSetAttrWithDict

2016-04-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset e5149789e4ea by Serhiy Storchaka in branch 'default': Issue #26745: Removed redundant code in _PyObject_GenericSetAttrWithDict. https://hg.python.org/cpython/rev/e5149789e4ea -- nosy: +python-dev ___

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Nick, do you consider this as a new feature, or as a fix? -- ___ Python tracker ___

[issue26785] repr of -nan value should contain the sign

2016-04-17 Thread Mark Dickinson
Mark Dickinson added the comment: Gah, sorry. I misdiagnosed the Python 2.7 issue (I was looking at the code for the wrong branch). See issue 22590 for the correct diagnosis. -- ___ Python tracker

[issue26785] repr of -nan value should contain the sign

2016-04-17 Thread Hrvoje Abraham
Hrvoje Abraham added the comment: Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] on win32: >>> import struct >>> x=float("-nan") >>> struct.pack('

[issue26788] test_gdb fails all tests on a profile-opt build configured --with-lto

2016-04-17 Thread Alecsandru Patrascu
Alecsandru Patrascu added the comment: I will investigate this issue to understand what is happening there and submit a fix. Thank you for pointing out the exact OS and toolchain used. -- ___ Python tracker

[issue26785] repr of -nan value should contain the sign

2016-04-17 Thread Mark Dickinson
Mark Dickinson added the comment: The current behaviour is deliberate, so any change would be an enhancement rather than a bugfix. I'm modifying the versions accordingly. Unlike the sign of a zero, the sign of a NaN has no useful meaning: IEEE 754 explicitly says "this standard does not

[issue26785] repr of -nan value should contain the sign

2016-04-17 Thread Mark Dickinson
Mark Dickinson added the comment: > it is actually used in real-life situations Do you have any examples available? -- ___ Python tracker ___

[issue26720] memoryview from BufferedWriter becomes garbage

2016-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Python implementation passes bytearray to underlying write and delete it's content just after that. Thus saving written data was never worked, and making it working don't worth efforts. I agree with you, we should add a warning against saving. This might be

[issue26787] test_distutils fails when configured --with-lto

2016-04-17 Thread Alecsandru Patrascu
Alecsandru Patrascu added the comment: I will investigate this and submit a fix. At a first glance, it seems the test is failing because it does not have the knowledge of the LTO flags. -- ___ Python tracker

[issue26642] Replace stdout and stderr with simple standard printers at Python exit

2016-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I meant that C files stderr and stdout can be closed. Or it's file descriptors can be closed. I think in these cases fileno() or PyFile_NewStdPrinter() will fail. I'm trying to consider all possible cases. Standard streams can be: * Left original. * Set to

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2016-04-17 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > @mbussonn - I don't see an updated non-tty-checking patch from you? Sorry for the delay, trying to get back on this. Please find attached a new patch that does not check whether is is a tty. Still struggling a bit with HG (looking fwd to migration to

[issue26627] IDLE incorrectly labeling error as internal

2016-04-17 Thread ppperry
ppperry added the comment: Duplicate issue24252, although the consequences are slightly different. -- nosy: +ppperry ___ Python tracker ___

[issue26765] Factor out common bytes and bytearray implementation

2016-04-17 Thread Meador Inge
Meador Inge added the comment: If I follow this correctly, then it seems like there are two main pieces to this patch: 1. Consolidating the following methods into `bytes_methods.c`: a. {bytes, bytearray}_find_internal b. {bytes, bytearray}_find c. {bytes, bytearray}_count

[issue26785] repr of -nan value should contain the sign

2016-04-17 Thread Mark Dickinson
Mark Dickinson added the comment: About the Python 2.7 behaviour: >>> from math import copysign >>> x = float("-nan") >>> copysign(1.0, x) 1.0 I'd be interested to know what `struct.pack('

[issue26785] repr of -nan value should contain the sign

2016-04-17 Thread Hrvoje Abraham
Hrvoje Abraham added the comment: Regarding NaN sign bit, IEEE-754 states: "Note, however, that operations on bit strings—copy, negate, abs, copySign—specify the sign bit of a NaN result, sometimes based upon the sign bit of a NaN operand. The logical predicate totalOrder is also affected by

[issue26792] docstrings of runpy.run_{module,path} are rather sparse

2016-04-17 Thread Antony Lee
New submission from Antony Lee: $ pydoc runpy run_module(mod_name, init_globals=None, run_name=None, alter_sys=False) Execute a module's code without importing it Returns the resulting top level namespace dictionary run_path(path_name, init_globals=None,

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2016-04-17 Thread Josh Snider
Josh Snider added the comment: Here's a patch that raises an exception when _put[w]ch and _get[w]ch[e] are run without a console. Like Eryk Sun says, the get's work fine if you do unget before hand. -- keywords: +patch nosy: +Josh Snider Added file:

[issue25987] collections.abc.Reversible

2016-04-17 Thread Guido van Rossum
Guido van Rossum added the comment: Because it's a change to collections.abc, it goes in 3.6 only. -- ___ Python tracker ___

[issue26785] repr of -nan value should contain the sign

2016-04-17 Thread Hrvoje Abraham
Hrvoje Abraham added the comment: Sage: http://doc.sagemath.org/html/en/reference/rings_numerical/sage/rings/complex_number.html >>> log(ComplexNumber(NaN,1)) NaN - NaN*I -- ___ Python tracker

[issue26793] uuid causing thread issues when forking using os.fork py3.4+

2016-04-17 Thread Steven Adams
New submission from Steven Adams: I've ran into a strange issue after trying to port a project to support py 3.x The app uses a double os.fork to run in the background. On py 3.4+ it seems that when you have an import uuid statement it causes threading.threads to always return false on

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-17 Thread Nick Coghlan
Nick Coghlan added the comment: Looking at the history of the dis module, I'd now class this as a bug fix for 3.5+ - it looks like dis.dis gained the ability to disassemble static and class methods as a side-effect of the removal of bound methods in Python 3 (see

[issue25243] decouple string-to-boolean logic from ConfigParser.getboolean and offer as separate function

2016-04-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm not sure I see the point in moving this out to a separate method (i.e. I wouldn't want to see people importing configparser just to use this particular group of boolean word aliases). In general, users would be better served by a simple dictionary

[issue26793] uuid causing thread issues when forking using os.fork py3.4+

2016-04-17 Thread Steven Adams
Steven Adams added the comment: I forgot to mention if i remove import uuid all works as expected. -- ___ Python tracker ___

[issue26793] uuid causing thread issues when forking using os.fork py3.4+

2016-04-17 Thread Xiang Zhang
Xiang Zhang added the comment: It seems a matter of lib uuid. The comments in uuid.py tells that the module is not thread-safe. I try to comment out the code using ctypes and rerun your sample, it works well. In uuid's documentation it does not mention the non-thread-safe characteristic.

[issue26793] uuid causing thread issues when forking using os.fork py3.4+

2016-04-17 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +pitrou, xiang.zhang ___ Python tracker ___ ___

[issue25987] collections.abc.Reversible

2016-04-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7d9f7d7a21ae by Georg Brandl in branch 'default': #25987: add versionadded to Reversible. https://hg.python.org/cpython/rev/7d9f7d7a21ae -- ___ Python tracker

[issue26793] uuid causing thread issues when forking using os.fork py3.4+

2016-04-17 Thread Steven Adams
Steven Adams added the comment: Shouldn't that mean it also breaks on py3.3? As a workaround i just import uuid later within the thread method. -- ___ Python tracker