[issue26491] Defer DECREFs until enum object is in a consistent state for re-entrancy

2016-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This change is not broken. It is just redundant. If you are still inclined to apply this changes, I would suggest to factor out common code in enum_next_long and enum_next. > Oh, this change was not intended. I don't know how it occurred. Any reply changes

[issue25330] Docs for pkgutil.get_data inconsistent with semantics

2016-04-12 Thread Brett Cannon
Brett Cannon added the comment: This can't change in Python 2.7 because of backwards-compatibility. And I would argue this isn't a serious security risk as pkgutil.get_data() typically works with string constants and values provided by the library and not user-provided values. This is

[issue26639] Tools/i18n/pygettext.py: replace deprecated imp module with importlib

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: > pygettext_imp.patch looks good to me. Thanks for the review. > I left a comment on Rietveld. Oops, I added it but then inlined the function in caller sites. I removed the now empty function :-) -- resolution: -> fixed status: open -> closed

[issue24136] document PEP 448: unpacking generalization

2016-04-12 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___

[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-04-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7bf08a11d4c9 by Victor Stinner in branch 'default': Issue #26647: Cleanup opcode https://hg.python.org/cpython/rev/7bf08a11d4c9 New changeset 423e2a96189e by Victor Stinner in branch 'default': Issue #26647: Cleanup modulefinder

[issue20767] Some python extensions can't be compiled with clang 3.4

2016-04-12 Thread Berker Peksag
Changes by Berker Peksag : -- components: -Build, Extension Modules, Interpreter Core, Tkinter, Unicode, Windows, XML stage: -> patch review versions: -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker

[issue15984] Wrong documentation for PyUnicode_FromObject() and PyUnicode_FromEncodedObject()

2016-04-12 Thread Berker Peksag
Changes by Berker Peksag : -- components: -Build, Tests, Unicode, Windows, XML ___ Python tracker ___

[issue26639] Tools/i18n/pygettext.py: replace deprecated imp module with importlib

2016-04-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset cd03ff74eaea by Victor Stinner in branch 'default': Update pygettext.py to get ride of imp https://hg.python.org/cpython/rev/cd03ff74eaea -- nosy: +python-dev ___ Python tracker

[issue24557] Refactor LibreSSL / EGD detection

2016-04-12 Thread SilentGhost
Changes by SilentGhost : -- Removed message: http://bugs.python.org/msg263251 ___ Python tracker ___

[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: module_finder.patch: cleanup (optimize?) modulefinder.ModuleFinder.scan_opcodes_25(): Use an index rather than creating a lot of substrings. It's unrelated to Wordcode, it's just that I noticed the inefficient code while reviewing the whole patch.

[issue19217] Calling assertEquals for moderately long list takes too long

2016-04-12 Thread Berker Peksag
Changes by Berker Peksag : -- Removed message: http://bugs.python.org/msg263252 ___ Python tracker ___

[issue19217] Calling assertEquals for moderately long list takes too long

2016-04-12 Thread Berker Peksag
Changes by Berker Peksag : -- components: -Build, Documentation, Unicode, Windows, XML nosy: -supriyanto maftuh, supriyantomaftuh versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker

[issue24557] Refactor LibreSSL / EGD detection

2016-04-12 Thread Berker Peksag
Changes by Berker Peksag : -- components: -2to3 (2.x to 3.x conversion tool), Argument Clinic, Benchmarks, Build, Cross-Build, Demos and Tools, Devguide, Distutils, Documentation, Extension Modules, IDLE, IO, Installation, Interpreter Core, Macintosh, Regular

[issue26639] Tools/i18n/pygettext.py: replace deprecated imp module with importlib

2016-04-12 Thread Berker Peksag
Changes by Berker Peksag : -- components: -Benchmarks, Unicode stage: -> patch review type: compile error -> enhancement versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker

[issue26639] Tools/i18n/pygettext.py: replace deprecated imp module with importlib

2016-04-12 Thread Berker Peksag
Berker Peksag added the comment: pygettext_imp.patch looks good to me. I left a comment on Rietveld. -- ___ Python tracker ___

[issue20767] Some python extensions can't be compiled with clang 3.4

2016-04-12 Thread Zachary Ware
Changes by Zachary Ware : -- hgrepos: -339 ___ Python tracker ___ ___

[issue24557] Refactor LibreSSL / EGD detection

2016-04-12 Thread Zachary Ware
Changes by Zachary Ware : -- hgrepos: -337 ___ Python tracker ___ ___

[issue24557] Refactor LibreSSL / EGD detection

2016-04-12 Thread Zachary Ware
Changes by Zachary Ware : -- assignee: docs@python -> nosy: -docs@python, supriyanto maftuh, supriyantomaftuh, zach.ware versions: +Python 2.7 ___ Python tracker

[issue25835] httplib uses print for debugging

2016-04-12 Thread Zachary Ware
Changes by Zachary Ware : -- hgrepos: -327 ___ Python tracker ___ ___

[issue26720] memoryview from BufferedWriter becomes garbage

2016-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I meant getting rid of memoryview at all and passing bytes buffer object directly to underlying write. But now I see that this idea perhaps is not feasible since we must write not only from the start of the buffer. A writer like AuditableBytesIO is very

[issue26716] EINTR handling in fcntl

2016-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I just don't know whether the patch will break existing code that relies on current behavior. If EINTR handling in other functions was not backported to older versions, I think this is good argument against fixing this issue in 3.5. Could you write tests

[issue15984] Wrong documentation for PyUnicode_FromObject() and PyUnicode_FromEncodedObject()

2016-04-12 Thread Zachary Ware
Changes by Zachary Ware : -- hgrepos: -341 ___ Python tracker ___ ___

[issue24557] Refactor LibreSSL / EGD detection

2016-04-12 Thread Matthew Barnett
Changes by Matthew Barnett : -- nosy: -mrabarnett ___ Python tracker ___ ___

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset fb7628e8dfef by Victor Stinner in branch '3.5': Fix os.urandom() on Solaris 11.3 https://hg.python.org/cpython/rev/fb7628e8dfef -- nosy: +python-dev ___ Python tracker

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added more comments as suggested by Guido. -- Added file: http://bugs.python.org/file42447/super_init_leaks_2.patch ___ Python tracker

[issue24136] document PEP 448: unpacking generalization

2016-04-12 Thread Zachary Ware
Changes by Zachary Ware : -- hgrepos: -336 ___ Python tracker ___ ___

[issue15216] Support setting the encoding on a text stream after creation

2016-04-12 Thread Zachary Ware
Changes by Zachary Ware : -- hgrepos: -334 ___ Python tracker ___ ___

[issue24557] Refactor LibreSSL / EGD detection

2016-04-12 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread Matthew Ryan
Matthew Ryan added the comment: Yes, I've verified that: * the issue existed in the default branch as of this morning. * the patch applies cleanly against both 3.5 and default, and addresses the issue in both branches. -- ___ Python tracker

[issue19217] Calling assertEquals for moderately long list takes too long

2016-04-12 Thread Zachary Ware
Changes by Zachary Ware : -- hgrepos: -338 ___ Python tracker ___ ___

[issue26716] EINTR handling in fcntl

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: Ok, I will update the patch to include an unit test and only apply it to Python 3.5. -- ___ Python tracker ___

[issue23076] list(pathlib.Path().glob("")) fails with IndexError

2016-04-12 Thread Zachary Ware
Changes by Zachary Ware : -- hgrepos: -331 ___ Python tracker ___ ___

[issue26673] Tkinter error when opening IDLE configuration menu

2016-04-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you. I believe a see a bug in configHandler.)idleConf.GetFont(self, 'main', 'EditorWindow') returning a size of 0. Could you post the result of running the following for the bad case? import tkinter as tk from tkinter.font import Font root=tk.Tk() f =

[issue25496] tarfile: Default value for compresslevel is not documented

2016-04-12 Thread Zachary Ware
Changes by Zachary Ware : -- hgrepos: -330 ___ Python tracker ___ ___

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: super_init_leaks_2.patch LGTM. -- ___ Python tracker ___ ___

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: > Yes, I've verified that: (...) Cool, thanks for the bug report and for the check. It's now fixed. In the meanwhile, you can workaround the issue by limiting yourself calls to os.urandom() to 1024 bytes (and then concatenate the result). --

[issue26639] Tools/i18n/pygettext.py: replace deprecated imp module with importlib

2016-04-12 Thread Zachary Ware
Changes by Zachary Ware : -- hgrepos: -340 ___ Python tracker ___ ___

[issue24557] Refactor LibreSSL / EGD detection

2016-04-12 Thread Paul Moore
Changes by Paul Moore : -- nosy: -paul.moore ___ Python tracker ___ ___

[issue26624] Windows hangs in call to CRT setlocale()

2016-04-12 Thread Jeremy Kloth
Jeremy Kloth added the comment: It seems that the updated UCRT debug runtime has indeed solved the issue. I suggest that this issue remains open pending an update to the devguide for required settings for installing VS2015 with the updated runtime (see msg262672). I have no idea if the VC

[issue26741] subprocess.Popen should emit a ResourceWarning in destructor if the process is still running

2016-04-12 Thread Martin Panter
Martin Panter added the comment: Did you forget to send the patch? One potential problem is how to provide for people who really want to let the child continue to run in the background or as a daemon without waiting for it, even if the parent exits. Perhaps a special method proc.detach() or

[issue26741] subprocess.Popen should emit a ResourceWarning in destructor if the process is still running

2016-04-12 Thread STINNER Victor
New submission from STINNER Victor: A subprocess.Popen object contains many resources: pipes, a child process (its pid, and an handle on Windows), etc. IMHO it's not safe to rely on the destructor to release all resources. I would prefer to release resources explicitly. For example, use

[issue26729] Incorrect __text_signature__ for sorted

2016-04-12 Thread Martin Panter
Martin Panter added the comment: Patch 3 looks okay to me. -- ___ Python tracker ___ ___ Python-bugs-list

[issue14784] Re-importing _warnings changes warnings.filters

2016-04-12 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> duplicate status: open -> closed superseder: -> test_warnings modifies warnings.filters when running with "-W default" ___ Python tracker

[issue26404] socketserver context manager

2016-04-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c4303c46a18 by Martin Panter in branch 'default': Issue #26404: Add context manager to socketserver, by Aviv Palivoda https://hg.python.org/cpython/rev/5c4303c46a18 -- nosy: +python-dev ___ Python

[issue26491] Defer DECREFs until enum object is in a consistent state for re-entrancy

2016-04-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: Deferring decrefs as late as possible is a good practice, reducing the risk of bugs being introduced later. There have been other places where there were bugs that arose due to premature decreffing. I wrote the original code for enumerate, am the primary

[issue26742] imports in test_warnings changes warnings.filters

2016-04-12 Thread STINNER Victor
New submission from STINNER Victor: --- $ ./python -Wd -m test -j0 test_warnings Run tests in parallel using 6 child processes 0:00:01 [1/1] test_warnings (...) Warning -- warnings.filters was modified by test_warnings 1 test altered the execution environment: test_warnings Total duration:

[issue26742] imports in test_warnings changes warnings.filters

2016-04-12 Thread Martin Panter
Martin Panter added the comment: Hmm your patch is a variation of the first patch in Issue 18383, and Serhiy’s comment about not fixing the underlying problem would apply: . I can’t remember all the details now, but it sounds like Alex’s later

[issue26741] subprocess.Popen should emit a ResourceWarning in destructor if the process is still running

2016-04-12 Thread Martin Panter
Martin Panter added the comment: I think the basic idea of adding the warning is good. I think this might be a bit like open(closefd=True) and socket.detach(). Normally, it is a bug not to close a file or socket, but the API is flexible and has a way to bypass this. Perhaps the term “daemon”

[issue26741] subprocess.Popen should emit a ResourceWarning in destructor if the process is still running

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: > Did you forget to send the patch? Right :-) -- keywords: +patch Added file: http://bugs.python.org/file42448/subprocess_res_warn.patch ___ Python tracker

[issue26624] Windows hangs in call to CRT setlocale()

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: Is it possible to log a compilation warning in Python if VS version contains the bug? Or even make the compilation fails? -- ___ Python tracker

[issue26491] Defer DECREFs until enum object is in a consistent state for re-entrancy

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: > status: pending -> open Oh, this change was not intended. I don't know how it occurred. -- status: open -> pending ___ Python tracker

[issue25942] subprocess.call SIGKILLs too liberally

2016-04-12 Thread Mike Pomraning
Mike Pomraning added the comment: Yes, standard UNIX terminal behavior is to map Ctrl-C to a SIGINT sent to the foreground process group, so that every member of a pipeline (e.g.) or hidden helper children processes can be terminated by the interactive user and have the chance to clean up.

[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: Demur Rumed: can you please rebase your patch? And can you please generate a patch without the git format? -- ___ Python tracker

[issue25942] subprocess.call SIGKILLs too liberally

2016-04-12 Thread Martin Panter
Martin Panter added the comment: I don’t know how it works on Windows, but on Unix in most cases the parent and child will share a controlling terminal. Pressing Ctrl+C in the terminal will broadcast SIGINT to all processes, parent and child. That is probably why os.system() ignores SIGINT.

[issue26731] subprocess on windows leaks stdout/stderr handle to child process when stdout/stderr overridden

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: The PEP 446 fixes the issue on UNIX for file descriptors, but you are right, there is still an issue with inheritable Windows handles. By default, Windows handles are not inheritable, but subprocess requires to make stdout and stderr pipes inheritable. See:

[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2016-04-12 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware type: enhancement -> resource usage ___ Python tracker

[issue26732] multiprocessing sentinel resource leak

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: I confirm the issue with Python 3.6 on Linux. File descriptors of the parent process: haypo@selma$ ls -l /proc/31564/fd/ lrwx--. 1 haypo haypo 64 13 avril 00:55 0 -> /dev/pts/0 lrwx--. 1 haypo haypo 64 13 avril 00:55 1 -> /dev/pts/0 lr-x--. 1 haypo

[issue26731] subprocess on windows leaks stdout/stderr handle to child process when stdout/stderr overridden

2016-04-12 Thread STINNER Victor
Changes by STINNER Victor : -- type: -> resource usage ___ Python tracker ___ ___

[issue26491] Defer DECREFs until enum object is in a consistent state for re-entrancy

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: Raymond: Do you have an example to trigger the issue? -- nosy: +haypo status: pending -> open ___ Python tracker ___

[issue26741] subprocess.Popen should emit a ResourceWarning in destructor if the process is still running

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: > One potential problem is how to provide for people who really want to let the > child continue to run in the background or as a daemon without waiting for > it, even if the parent exits. Perhaps a special method proc.detach() or > whatever? Maybe my

[issue26624] Windows hangs in call to CRT setlocale()

2016-04-12 Thread Steve Dower
Steve Dower added the comment: That's a good idea. I don't know that it's trivial to do, but at build is going to be the easiest time. I'll take a look. -- ___ Python tracker

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

2016-04-12 Thread Ma Lin
New submission from Ma Lin: My OS is MS-Windows 10 X86-64 (Home edition), with the lastest update (now it's 10586.164). I have two programs, they occasionally infinite hang. After a few months observation, I provide these infomation: 1, print() function cause the infinite hang. 2, If it

[issue26745] Redundant code in _PyObject_GenericSetAttrWithDict

2016-04-12 Thread Xiang Zhang
New submission from Xiang Zhang: It seems some code in _PyObject_GenericSetAttrWithDict is not necessary. There is no need to check data descriptor again using PyDescr_IsData. And the second if (f != NULL) {} will never function. -- components: Interpreter Core files:

[issue26624] Windows hangs in call to CRT setlocale()

2016-04-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset a352f7e96f85 by Steve Dower in branch 'default': Issue #26624: Adds recommendation to install updates of VS 2015. https://hg.python.org/devguide/rev/a352f7e96f85 -- ___ Python tracker

[issue26720] memoryview from BufferedWriter becomes garbage

2016-04-12 Thread Martin Panter
Martin Panter added the comment: The trouble with my original idea is that it is complex to implement, and inconsistent. If you wrote small amounts to your BufferedWriter, you would get a memoryview of bytes that you save for later. If there was a write of a large bytes object, we could pass

[issue25496] tarfile: Default value for compresslevel is not documented

2016-04-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset b1f3fe320adf by Martin Panter in branch '3.5': Issue #25496: Document compresslevel defaults to 9, by Hamza T Khan https://hg.python.org/cpython/rev/b1f3fe320adf New changeset a04455866ec7 by Martin Panter in branch 'default': Issue #25496: Merge

[issue25910] Fixing links in documentation

2016-04-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4b65bee79dab by Georg Brandl in branch '2.7': Update susp-ignore file (#25910). https://hg.python.org/cpython/rev/4b65bee79dab -- ___ Python tracker

[issue26745] Redundant code in _PyObject_GenericSetAttrWithDict

2016-04-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +benjamin.peterson, pitrou ___ Python tracker ___ ___

[issue26404] socketserver context manager

2016-04-12 Thread Martin Panter
Martin Panter added the comment: Thanks for the patch Aviv. I made a few minor English grammar etc tweaks in the version I committed, as pointed out in the review comments. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue26743] Unable to import random with python2.7 on power pc based machine

2016-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +mark.dickinson, rhettinger, serhiy.storchaka type: crash -> behavior ___ Python tracker ___

[issue25942] subprocess.call SIGKILLs too liberally

2016-04-12 Thread Martin Panter
Martin Panter added the comment: When no timeout is specified, these are the options as I see them: 1. SIGKILL child immediately on the first KeyboardInterrupt (Victor’s behaviour since 3.3) 2. Give up and leave a zombie after the first KeyboardInterrupt (pre-3.3 behaviour) 3. Wait again

[issue26743] Unable to import random with python2.7 on power pc based machine

2016-04-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: That's odd. Try: import math print math.sqrt(2.0) print math Post what you see. -- ___ Python tracker ___

[issue26743] Unable to import random with python2.7 on power pc based machine

2016-04-12 Thread Raghu
New submission from Raghu: Hi, I am trying to import random on a power pc based machine and I see this exception. Could you please help me? root@host# python Python 2.7.3 (default, Apr 3 2016, 22:31:30) [GCC 4.8.1] on linux2 Type "help", "copyright", "credits" or "license" for more

[issue26624] Windows hangs in call to CRT setlocale()

2016-04-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 605fde022b15 by Steve Dower in branch '3.5': Closes #26624: Adds validation of ucrtbase[d].dll version with warning for old versions. https://hg.python.org/cpython/rev/605fde022b15 New changeset 6ff020df61b8 by Steve Dower in branch 'default':

[issue26745] Redundant code in _PyObject_GenericSetAttrWithDict

2016-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue26491] Defer DECREFs until enum object is in a consistent state for re-entrancy

2016-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___

[issue26729] Incorrect __text_signature__ for sorted

2016-04-12 Thread Erik Welch
Erik Welch added the comment: That's a fair and valid point, Raymond. "sorted_2.patch" was submitted for consideration. Either __text_signature__ is wrong, or the call argument handling is wrong. One should be fixed. Having a flexible call signature as if sorted were a user-defined

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread SilentGhost
Changes by SilentGhost : -- components: +Interpreter Core nosy: +haypo stage: -> patch review ___ Python tracker ___

[issue26737] csv.DictReader throws generic error when fieldnames is accessed for non-text file

2016-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +rhettinger ___ Python tracker ___ ___

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-12 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your comments Serhiy. I update the patch according to your comments. Actually I don't think this is a new feature. Maybe staticmethod and classmethod are just forgotten. As for separate tests for staticmethod and classmethod, I think they are not

[issue26737] csv.DictReader throws generic error when fieldnames is accessed for non-text file

2016-04-12 Thread Bayo Opadeyi
Bayo Opadeyi added the comment: Yes, the problem is that the file is not csv. The scenario is a web application allowing people to upload csv files, but they can upload any files they like. -- status: pending -> open ___ Python tracker

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Possible solutions: 1. Correctly decref old values. 2. Raise an exception if super.__init__ is caled multiple times. 3. Remove super.__init__ and add super.__new__. What is more preferable? -- ___ Python tracker

[issue25061] Add native enum support for argparse

2016-04-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: Enum is just one tool among many, no more special than named tuples, nested dicts, string.Templates, regexes, pickles etc. The second issue is keeping the scope of argparse focused on its core task rather than trying to incorporate other parts of the

[issue26729] Incorrect __text_signature__ for sorted

2016-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue26282. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: > I've attached a possible patch for this issue, against the 3.5.1 source tree. I guess that you are already using Python 3.5.1 which uses getrandom(). You should try to confirm using strace. I updated your patch. I replaced "#if defined(__sun__)" with

[issue26737] csv.DictReader throws generic error when fieldnames is accessed for non-text file

2016-04-12 Thread Berker Peksag
Berker Peksag added the comment: > The scenario is a web application allowing people to upload csv files, but > they can upload any files they like. This looks like a potential security flaw in the application. The application should reject any non-CSV files from being uploaded (instead of

[issue26735] os.urandom(2500) fails on Solaris 11.3

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: See also the issue #25003 and the changeset 835085cc28cd: Issue #25003: On Solaris 11.3 or newer, os.urandom() now uses the getrandom() function instead of the getentropy() function. The getentropy() function is blocking to generate very good quality entropy,

[issue26740] tarfile: accessing (listing and extracting) tarball fails with UnicodeDecodeError

2016-04-12 Thread Tomas Tomecek
New submission from Tomas Tomecek: I have a tarball (generated by docker-1.10 via `docker export`) and am trying to extract it with python 2.7 tarfile: ``` with tarfile.open(name=tarball_path) as tar_fd: tar_fd.extractall(path=path) ``` Output from a pytest run: ```

[issue26673] Tkinter error when opening IDLE configuration menu

2016-04-12 Thread Petr Viktorin
Petr Viktorin added the comment: buggy: configuredFont: ('DejaVu Sans Mono', 0, 'normal') fontSize: 0 good: configuredFont: ('courier', 10, 'normal') fontSize: 10 -- ___ Python tracker

[issue26729] Incorrect __text_signature__ for sorted

2016-04-12 Thread Nick Coghlan
Nick Coghlan added the comment: +1 for Serhiy's suggestion of enhancing the C API to specifically handle these cases. -- dependencies: +Add support for partial keyword arguments in extension functions ___ Python tracker

[issue26740] tarfile: accessing (listing and extracting) tarball fails with UnicodeDecodeError

2016-04-12 Thread SilentGhost
Changes by SilentGhost : -- nosy: +lars.gustaebel type: -> behavior ___ Python tracker ___

[issue26740] tarfile: accessing (listing and extracting) tarball fails with UnicodeDecodeError

2016-04-12 Thread Tomas Tomecek
Tomas Tomecek added the comment: Unfortunately I can't, since it's internal docker image. I have found a bug report in Red Hat bugzilla with more info: https://bugzilla.redhat.com/show_bug.cgi?id=1194473 Here's even a commit with a fix (via monkeypatching):

[issue25330] Docs for pkgutil.get_data inconsistent with semantics

2016-04-12 Thread WGH
WGH added the comment: I think it can even be considered a security bug. A classic path traversal. The fact that documentation falsely suggests that there's no such vulnerability is clearly not helping. Python 2.7 is affected as well, by the way. -- nosy: +WGH

[issue26740] tarfile: accessing (listing and extracting) tarball fails with UnicodeDecodeError

2016-04-12 Thread STINNER Victor
STINNER Victor added the comment: Can you give a link to the tar archive, or for example the first 256 KB of the archive? -- ___ Python tracker ___

[issue26729] Incorrect __text_signature__ for sorted

2016-04-12 Thread Martin Panter
Martin Panter added the comment: I didn’t realize about the keyword-only parameters. This is inherited from list.sort(). The signature can be corrected in 3.5. There is also Issue 21314 about documenting the slash notation for signatures (it comes from PEP 457). --

[issue15994] memoryview to freed memory can cause segfault

2016-04-12 Thread Martin Panter
Martin Panter added the comment: I recently created Issue 26720 about a similar situation with BufferedWriter. However I am starting to believe that the problem cannot be solved the way I originally wanted. Instead, the best solution there would be similar what I would suggest here: we need

[issue26729] Incorrect __text_signature__ for sorted

2016-04-12 Thread Erik Welch
Erik Welch added the comment: sorted_3.patch corrects the __text_signature__. Behavior of sorted is unchanged. >>> def raises(err, lamda): ... try: ... lamda() ... return False ... except err: ... return True ... >>> import inspect >>> sig =

[issue26720] memoryview from BufferedWriter becomes garbage

2016-04-12 Thread Martin Panter
Martin Panter added the comment: I realize there is another problem, and doing tricks with a bytes object won’t help that. BufferedWriter bypasses its own buffer for large writes: >>> writer = BufferedWriter(Raw()) >>> large = bytearray(1) >>> writer.write(large) 1 >>>

[issue20699] Document that binary IO classes work with bytes-likes objects

2016-04-12 Thread Martin Panter
Martin Panter added the comment: After thinking about Issue 26720 (see also Issue 15994), I think it might be worth documenting not only that bytes-like objects may be passed, but in some cases the class should not be access the object after the method returns. This applies to at least

  1   2   >