[issue28964] AST literal_eval exceptions provide no information about line number

2016-12-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Usually literal_eval() is used with short one-line input. For what large documents do you use it? -- nosy: +serhiy.storchaka ___ Python tracker

[issue29094] Regression in zipfile writing in 2.7.13

2016-12-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The specification of ZIP files is not pretty clear, but the unzip utility first try to interpret offsets relatively to the start of the archive that can be different from the start of the file. Go's standard archive/zip package interprets offsets as

[issue29071] IDLE doesn't highlight f-strings properly

2016-12-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The regular expression can be simplified using local flags: -stringprefix = (r"(\br|R|u|U|f|F|fr|Fr|fR|FR|rf|rF|Rf|RF" -"|b|B|br|Br|bR|BR|rb|rB|Rb|RB)?") +stringprefix = r"(?i:\br|u|f|fr|rf|b|br|rb)?" -- nosy:

[issue28964] AST literal_eval exceptions provide no information about line number

2016-12-31 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Steve!. This looks like a reasonable request to me, but 1) we can only make this change in 3.7 2) we need a test case for the new message 3) you can use f-strings instead of str.format() -- nosy: +berker.peksag stage: -> patch

[issue28911] Clarify the behaviour of assert_called_once_with

2016-12-31 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag, michael.foord -153957 stage: -> patch review type: enhancement -> behavior versions: -Python 3.3, Python 3.4 ___ Python tracker

[issue29127] Incorrect reference names in asyncio.subprocess documentation

2016-12-31 Thread Eric Ahn
New submission from Eric Ahn: On this page of the documentation https://docs.python.org/3/library/asyncio-subprocess.html it seems that some of the reference names are incorrect. Namely, asyncio.subprocess.PIPE is referred to as asyncio.asyncio.subprocess.PIPE (along with STDOUT and

[issue29120] Move hash randomisation initialisation out of Python/random.c

2016-12-31 Thread Nick Coghlan
Nick Coghlan added the comment: On 1 Jan 2017 05:00, "Raymond Hettinger" wrote: It would be nice if Python/random.c were renamed to something else that indicated its relation to urandom and to hash secrets. Right, based on Victor & Serhiy's feedback, the split I would

[issue29126] Fix comments about _PyThreadState_Current

2016-12-31 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +haypo ___ Python tracker ___ ___

[issue29123] CheckSqlTimestamp is fragile

2016-12-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1d5b4426fe87 by Berker Peksag in branch '2.7': Issue #29123: Make CheckSqlTimestamp more robust https://hg.python.org/cpython/rev/1d5b4426fe87 -- ___ Python tracker

[issue29126] Fix comments about _PyThreadState_Current

2016-12-31 Thread Jim Nasby
New submission from Jim Nasby: Attached patch fixes two comments in dictobject.c referring to no longer exposed _PyThreadState_Current variable. I also tweaked the grammar for that issue in NEWS, since it came up in my search. Apologies if that's considered gratuitous noise. --

[issue29093] Windows launcher breaks history in Git Bash

2016-12-31 Thread Eryk Sun
Eryk Sun added the comment: git-bash.exe runs bash.exe via cmd.exe, which means the console (conhost.exe) ends up with 5 attached processes: cmd.exe bash.exe bash.exe py.exe python.exe The default console configuration uses 4 history

[issue29123] CheckSqlTimestamp is fragile

2016-12-31 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue29123] CheckSqlTimestamp is fragile

2016-12-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset bb64ae455490 by Berker Peksag in branch '3.5': Issue #29123: Make CheckSqlTimestamp more robust https://hg.python.org/cpython/rev/bb64ae455490 New changeset 0331420d6cba by Berker Peksag in branch '3.6': Issue #29123: Merge from 3.5

[issue29119] Unintentional hard reference assignment in Python version of OrderedDict.move_to_end

2016-12-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Nice work Andra. Thank you. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue29119] Unintentional hard reference assignment in Python version of OrderedDict.move_to_end

2016-12-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset cd811b867393 by Raymond Hettinger in branch '3.6': Issue #29119: Merge in ACK from 3.5 branch https://hg.python.org/cpython/rev/cd811b867393 -- ___ Python tracker

[issue29119] Unintentional hard reference assignment in Python version of OrderedDict.move_to_end

2016-12-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 19376765d7c3 by Raymond Hettinger in branch '3.5': Issue #29119: Fix weakref in OrderedDict.move_to_end(). Work by Andra Bogildea. https://hg.python.org/cpython/rev/19376765d7c3 -- nosy: +python-dev ___

[issue29120] Move hash randomisation initialisation out of Python/random.c

2016-12-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, I concur with Nick's initial observation that the current "API naming looks like it relates to initialising the random module, when it has nothing to do with that." It would be nice if Python/random.c were renamed to something else that indicated

[issue29125] Shell injection via TIX_LIBRARY when using tkinter.tix

2016-12-31 Thread symphorien
New submission from symphorien: The tkinter.tix module looks for a Tix installation in the directory specified by the TIX_LIBRARY environment variable, but blindly trusts that it is a path in the filesystem. This enables a shell injection : TIX_LIBRARY='/dev/null}; exec gsimplecal;' python2

[issue29122] set() bug

2016-12-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry Styg, but this is the expected behavior. To achieve what you wanted, write this is instead: print list(set(a)) -- nosy: +rhettinger resolution: -> not a bug status: open -> closed ___ Python tracker

[issue29102] Add an id field to PyInterpreterState.

2016-12-31 Thread Eric Snow
Eric Snow added the comment: Thanks for pointing that out, Victor. Given the precedent I switched to using int64_t. The patch actually uses PY_INT64_T, but I didn't see a reason to use int64_t directly. FWIW, there *are* a few places that use int_fast64_t, but they are rather specialized

[issue29124] Freeze fails to compile on windows

2016-12-31 Thread Liran Ringel
New submission from Liran Ringel: The patch fixes 3 bugs: 1. Include Python.h in frozen_dllmain.c - needed for Py_ARRAY_LENGTH symbol 2. DL_IMPORT is used in checkextensions_win32.py, but it's deprecated and not defined anymore. Replaced it with __declspec(dllimport) 3. Fix python lib path in

[issue29123] CheckSqlTimestamp is fragile

2016-12-31 Thread Berker Peksag
New submission from Berker Peksag: == FAIL: CheckSqlTimestamp (sqlite3.test.types.DateTimeTests) -- Traceback (most recent call last): File

[issue29122] set() bug

2016-12-31 Thread Ammar Askar
Ammar Askar added the comment: Why would the expected output be [1, 2, 3]? That is the list notation for having a list that contains the elements 1, 2 and 3. -- nosy: +ammar2 ___ Python tracker

[issue29122] set() bug

2016-12-31 Thread styg
New submission from styg: set() method leads to this error: a=[1,2,3,3] b=set(a) print b >> set([1,2,3]) # should be [1,2,3] -- messages: 284402 nosy: styg priority: normal severity: normal status: open title: set() bug type: behavior versions: Python 2.7

[issue26267] UUID docs should say how to get "standard form"

2016-12-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1a25c639f81e by Berker Peksag in branch '3.5': Issue #26267: Improve uuid.UUID documentation https://hg.python.org/cpython/rev/1a25c639f81e New changeset c9e944cc6301 by Berker Peksag in branch '3.6': Issue #26267: Merge from 3.5

[issue26267] UUID docs should say how to get "standard form"

2016-12-31 Thread Berker Peksag
Berker Peksag added the comment: Thanks, Ammar. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

[issue29082] In 2.7.13, _ctypes.LoadLibrary no longer accepts Unicode objects

2016-12-31 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Oops, Parser/asdl_c.py shouldn't be included. Here's the correct patch -- Added file: http://bugs.python.org/file46103/issue29082.patch ___ Python tracker

[issue29082] In 2.7.13, _ctypes.LoadLibrary no longer accepts Unicode objects

2016-12-31 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: I finally get Windows builds working. Here's the patch. -- Added file: http://bugs.python.org/file46102/issue29082.patch ___ Python tracker

[issue29082] In 2.7.13, _ctypes.LoadLibrary no longer accepts Unicode objects

2016-12-31 Thread Chi Hsuan Yen
Changes by Chi Hsuan Yen : Removed file: http://bugs.python.org/file46055/LoadLibrary_revert_arg_parsing.patch ___ Python tracker ___

[issue28518] execute("begin immediate") throwing OperationalError

2016-12-31 Thread Aviv Palivoda
Aviv Palivoda added the comment: Adding the vacuum test can't actually happen because the change in commit 284676cf2ac8 changed the API and we don't commit before non DML statements. I opened a issue that will clarify the docs (#29121). -- ___

[issue29121] sqlite3 Controlling Transactions documentation not updated

2016-12-31 Thread Aviv Palivoda
New submission from Aviv Palivoda: commit 284676cf2ac8 changed the sqlite3 module so it will no longer implicitly commit an open transaction before DDL statements. The docs have been updated but there is still an incorrect paragraph that has not been removed. Attached is a patch that remove

[issue29102] Add an id field to PyInterpreterState.

2016-12-31 Thread STINNER Victor
STINNER Victor added the comment: I would prefer to not use "fast" C types because they are not well supported. For example, ctypes has ctypes.c_int64 but no ctypes.c_int_fast64. Previous work adding an unique identifier: PEP 509 https://www.python.org/dev/peps/pep-0509/#integer-overflow

[issue29120] Move hash randomisation initialisation out of Python/random.c

2016-12-31 Thread STINNER Victor
STINNER Victor added the comment: Nick: As Serhiy explained, IMHO you misunderstood _PyRandom_Init() and _PyRandom_Fini(), I suggest to close the issue. -- ___ Python tracker

[issue29120] Move hash randomisation initialisation out of Python/random.c

2016-12-31 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue29093] Windows launcher breaks history in Git Bash

2016-12-31 Thread Evan
Evan added the comment: No problem, thanks for your time. -- ___ Python tracker ___ ___ Python-bugs-list

[issue28518] execute("begin immediate") throwing OperationalError

2016-12-31 Thread Berker Peksag
Berker Peksag added the comment: I only did a quick review, but Aviv's latest patch looks reasonable to me. Thanks! And yes, we can add CheckVacuum back if it's not already tested. -- ___ Python tracker

[issue28518] execute("begin immediate") throwing OperationalError

2016-12-31 Thread Marcus
Changes by Marcus : -- nosy: +callidomus ___ Python tracker ___ ___ Python-bugs-list

[issue29120] Move hash randomisation initialisation out of Python/random.c

2016-12-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually _PyRandom_Fini() has a relation to _PyOS_URandom APIs. It releases resources acquired by _PyOS_URandom APIs. It shouldn't be renamed to _Py_HashRandomization_Fini. _PyRandom_Init() just initializes _Py_HashSecret. But it can't be implemented via

[issue29120] Move hash randomisation initialisation out of Python/random.c

2016-12-31 Thread Nick Coghlan
Nick Coghlan added the comment: You're right, I forgot about that part (I was mainly looking at the diffs today). Spelling out the *problem*, rather than just jumping to a specific proposed solution, the confusing code layout we currently have is: * Modules/_randommodule.c provides

[issue29119] Unintentional hard reference assignment in Python version of OrderedDict.move_to_end

2016-12-31 Thread Andra Bogildea
Andra Bogildea added the comment: od_proxy.diff and od_proxy2a.diff are the same. Did you meant soft_link = proxy(link) in od_proxy2a.diff? I believe Technique 1 (od_proxy.diff) is preferable, because it reuses the proxy object. Regarding automated tests, I agree with what’s been said. The

[issue29120] Rename Python/random.c to Python/bootstrap_hash.c

2016-12-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is not just about the hash randomization. The file also contains implementations of _PyOS_URandom() and _PyOS_URandomNonblock(). -- nosy: +serhiy.storchaka ___ Python tracker

[issue29093] Windows launcher breaks history in Git Bash

2016-12-31 Thread Paul Moore
Paul Moore added the comment: Thanks for letting us know -- ___ Python tracker ___ ___ Python-bugs-list

[issue15452] Improve the security model for logging listener()

2016-12-31 Thread Vinay Sajip
Changes by Vinay Sajip : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue28443] Logger methods never use kwargs

2016-12-31 Thread Vinay Sajip
Vinay Sajip added the comment: I'll close this - as indicated in my comment, there's no need for this enhancement, as the already available "extra" parameter performs the same function. -- resolution: -> wont fix status: open -> closed ___ Python

[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2016-12-31 Thread Vinay Sajip
Vinay Sajip added the comment: > I tried making a Framework build of Python with the environment variable > removed entirely, but I'm not experienced enough with builds on a Mac to know > what I need to do to create a proper build. Given Jason's comment above, it's probably best for one of

[issue28524] Set default argument of logging.disable() to logging.CRITICAL

2016-12-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 459500606560 by Vinay Sajip in branch 'default': Closes #28524: added default level for logging.disable(). https://hg.python.org/cpython/rev/459500606560 -- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed

[issue29120] Rename Python/random.c to Python/bootstrap_hash.c

2016-12-31 Thread Nick Coghlan
New submission from Nick Coghlan: This is the last major structural refactoring proposal to come out of the prep work on the PEP 432 modular bootstrapping feature development branch: * rename Python/random.c -> Python/hash_randomization.c * rename _PyRandom_Init -> __Py_HashRandomization_Init

[issue29105] code or doc improvement for logging.handlers.RotatingFileHandler

2016-12-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4255c7aae85b by Vinay Sajip in branch '3.6': Closes #29105: Updated RotatingFileHandler documentation. https://hg.python.org/cpython/rev/4255c7aae85b -- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed

[issue29093] Windows launcher breaks history in Git Bash

2016-12-31 Thread Evan
Evan added the comment: This appears to be a bug with Git Bash, not Python or the launcher. Closing. -- resolution: -> third party status: open -> closed ___ Python tracker

[issue29102] Add an id field to PyInterpreterState.

2016-12-31 Thread Eric Snow
Eric Snow added the comment: I've updated the patch to address Nick's review. Thanks! -- Added file: http://bugs.python.org/file46100/interpreter-id-3.diff ___ Python tracker

[issue28815] test_socket fails if /proc/modules is existent but not readable

2016-12-31 Thread patrila
patrila added the comment: @Martin Panter: Thanks for your support and merging. -- ___ Python tracker ___ ___

[issue29102] Add an id field to PyInterpreterState.

2016-12-31 Thread Eric Snow
Eric Snow added the comment: int_fast64_t it is then. :) I vacillated between the options and went with the bigger space. However, you're right that following convention is worth it. -- ___ Python tracker

[issue29062] hashlib documentation link error

2016-12-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +martin.panter, r.david.murray ___ Python tracker ___

[issue29119] Unintentional hard reference assignment in Python version of OrderedDict.move_to_end

2016-12-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: od_proxy2a.diff LGTM. -- ___ Python tracker ___ ___ Python-bugs-list