[issue28509] dict.update allocates too much

2016-10-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Dict is resized. And since __dict__.update() caused the resizing, both are normal (combined) dict. Ah, my bad, I missed this point. The original issue now disappears. Thanks Naoki. But dict.update (and maybe inserting) can use more economical allocation s

[issue25953] re fails to identify invalid numeric group references in replacement strings

2016-10-23 Thread SilentGhost
SilentGhost added the comment: Updated patch fixing the position issue. -- Added file: http://bugs.python.org/file45194/25953_5.diff ___ Python tracker ___ __

[issue25953] re fails to identify invalid numeric group references in replacement strings

2016-10-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Thank you for your contribution SilentGhost. -- stage: patch review -> commit review ___ Python tracker ___

[issue25953] re fails to identify invalid numeric group references in replacement strings

2016-10-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset cea983246919 by Serhiy Storchaka in branch '3.6': Issue #25953: re.sub() now raises an error for invalid numerical group https://hg.python.org/cpython/rev/cea983246919 New changeset 15e3695affa2 by Serhiy Storchaka in branch 'default': Issue #25953:

[issue28498] tk busy command

2016-10-23 Thread Miguel
Miguel added the comment: Hi klappnase, you are right with the function tk_busy_configure(). Maybe there is a little bit of code duplicated. I think that it's better to directly change the Tkinter function _configure() to make it more general: def _configure(self, cmd, cnf, kw): """

[issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10

2016-10-23 Thread STINNER Victor
STINNER Victor added the comment: timeit_autorange_numbers.patch: LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue28498] tk busy command

2016-10-23 Thread Miguel
Miguel added the comment: Tcl_GetBoolean() converts a boolean string to an integer 0 or 1: https://www.tcl.tk/man/tcl8.6/TclLib/GetInt.htm and then Py_BuildValue() converts the integer to a Python object: https://docs.python.org/2/c-api/arg.html -- _

[issue28498] tk busy command

2016-10-23 Thread Miguel
Miguel added the comment: Ok. Maybe the bug is here: Misc.getboolean() This is the required change: def getboolean(self, s): """Return a boolean value for Tcl boolean values true and false given as parameter.""" return bool(self.tk.getboolean(s)) -- ___

[issue25953] re fails to identify invalid numeric group references in replacement strings

2016-10-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Committed with additional changes. Fixed yet one occurrence of "invalid group reference" without group index, and made small style changes. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed _

[issue28115] Use argparse for the zipfile module

2016-10-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 042c923c5b67 by Serhiy Storchaka in branch '2.7': Issue #28115: Added tests for CLI of the zipfile module. https://hg.python.org/cpython/rev/042c923c5b67 New changeset 900c47c98711 by Serhiy Storchaka in branch '3.5': Issue #28115: Added tests for C

[issue28513] Documment zipfile CLI

2016-10-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Command-line interface of the zipfile module is supported long time, but it is not documented. Proposed patch documents it. It is based on the documentation of tarfile CLI. -- assignee: docs@python components: Documentation files: zipfile_cli_docs.

[issue28513] Document zipfile CLI

2016-10-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- title: Documment zipfile CLI -> Document zipfile CLI ___ Python tracker ___ ___ Python-bugs-list mail

[issue28115] Use argparse for the zipfile module

2016-10-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset fa275e570d52 by Serhiy Storchaka in branch 'default': Issue #28115: Command-line interface of the zipfile module now uses argparse. https://hg.python.org/cpython/rev/fa275e570d52 -- ___ Python tracker

[issue28498] tk busy command

2016-10-23 Thread klappnase
klappnase added the comment: As far as I can see, most internal Tkinter methods use _getboolean(), which currently looks like: def _getboolean(self, string): """Internal function.""" if string: return self.tk.getboolean(string) I am not 100% sure about this, but

[issue28511] Use the "U" format for parsing Unicode object arg in PyArg_Parse*

2016-10-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset d667913a81c6 by Serhiy Storchaka in branch 'default': Issue #28511: Use the "U" format instead of "O!" in PyArg_Parse*. https://hg.python.org/cpython/rev/d667913a81c6 -- nosy: +python-dev ___ Python track

[issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10

2016-10-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8e6cc952adc6 by Serhiy Storchaka in branch 'default': Issue #28469: timeit now uses the sequence 1, 2, 5, 10, 20, 50,... instead https://hg.python.org/cpython/rev/8e6cc952adc6 -- nosy: +python-dev ___ Pyt

[issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10

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

[issue28511] Use the "U" format for parsing Unicode object arg in PyArg_Parse*

2016-10-23 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: will you close the issue ? -- nosy: +matrixise ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28513] Document zipfile CLI

2016-10-23 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue28513] Document zipfile CLI

2016-10-23 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Serhiy, your patch seems to be good, you can merge it, I have tested it with sphinx and the documentation is fine. Thanks -- nosy: +matrixise ___ Python tracker

[issue28439] Remove redundant checks in PyUnicode_EncodeLocale and PyUnicode_DecodeLocaleAndSize

2016-10-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 94d34354bef1 by Serhiy Storchaka in branch 'default': Issue #28439: Remove redundant checks in PyUnicode_EncodeLocale and https://hg.python.org/cpython/rev/94d34354bef1 -- nosy: +python-dev ___ Python tra

[issue28439] Remove redundant checks in PyUnicode_EncodeLocale and PyUnicode_DecodeLocaleAndSize

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

[issue28488] shutil.make_archive (xxx, zip, root_dir) is adding './' entry to archive which is wrong

2016-10-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 847537b7924c by Serhiy Storchaka in branch '2.7': Issue #28488: shutil.make_archive() no longer adds entry "./" to ZIP archive. https://hg.python.org/cpython/rev/847537b7924c New changeset d4fce66ebe01 by Serhiy Storchaka in branch '3.5': Issue #284

[issue26656] Documentation for re.compile is a bit outdated

2016-10-23 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: What do you propose for the doc of re.compile ? -- nosy: +matrixise ___ Python tracker ___ ___ Pyth

[issue28514] Crash

2016-10-23 Thread Kamran
New submission from Kamran: Hi, I am writing to inform you about the Python Program. Whenever I go onto the program it works but as soon as I save a piece of work it crashes and freezes. After that it says Python.exe has stopped working. The Windows that I am using is Windows 7 Proffessional. Is

[issue28514] Python (IDLE?) freezes on file save on Windows

2016-10-23 Thread Emanuel Barry
Emanuel Barry added the comment: Could provide more information on the issue? Which program exactly is failing? Is it the IDLE editor? If you don't know what you're using, you can provide a screenshot as a last resort (but don't provide one if you can figure out the program that freezes). ---

[issue28498] tk busy command

2016-10-23 Thread klappnase
klappnase added the comment: Hi Miguel, about _configure() : the code you suggest: def _configure(self, cmd, cnf, kw): """Internal function.""" if kw: cnf = _cnfmerge((cnf, kw)) elif cnf: cnf = _cnfmerge(cnf) if cnf is None:

[issue25152] venv documentation doesn't tell you how to specify a particular version of python

2016-10-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: http://buildbot.python.org/all/builders/Docs%203.x/builds/2710/steps/lint/logs/stdio python3 tools/rstlint.py -i tools -i venv [2] library/venv.rst:27: default role used 1 problem with severity 2 found. Makefile:156: recipe for target 'check' failed --

[issue28514] Python (IDLE?) freezes on file save on Windows

2016-10-23 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Sorry Kamran, but you don't produce any information, there is a stacktrace, a backtrace ? In this case, we can't reproduce your issue and we can't help you. And, we can't provide a patch because you need it ASAP :/ -- nosy: +matrixise __

[issue28487] missing _math.o target in 2.7 Makefile

2016-10-23 Thread Skip Montanaro
Skip Montanaro added the comment: The problem is solved. It seems there were changes in my 2.7 checkout which hg update wouldn't overwrite. I vaguely remember applying somebody's patch for a bug quite awhile ago. Apparently, I failed to revert that change before moving on. I obviously wasn't

[issue28511] Use the "U" format for parsing Unicode object arg in PyArg_Parse*

2016-10-23 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Py

[issue25152] venv documentation doesn't tell you how to specify a particular version of python

2016-10-23 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: > [2] library/venv.rst:27: default role used > 1 problem with severity 2 found. I made a patch to address it. Please review. Thanks :) -- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file45196/issue25152.patch __

[issue25152] venv documentation doesn't tell you how to specify a particular version of python

2016-10-23 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: we can merge the patch of Mariatta -- nosy: +matrixise stage: resolved -> commit review ___ Python tracker ___

[issue28488] shutil.make_archive (xxx, zip, root_dir) is adding './' entry to archive which is wrong

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

[issue28515] Py3k warnings in Python 2.7 tests

2016-10-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Several warnings are emitted when run Python 2.7 tests with -Wd -3 options. 1. "DeprecationWarning: <> not supported in 3.x; use !=" and "DeprecationWarning: dict.has_key() not supported in 3.x; use the in operator" in Tools/scripts/fixcid.py. 2. "Depreca

[issue28515] Py3k warnings in Python 2.7 tests

2016-10-23 Thread R. David Murray
R. David Murray added the comment: I don't think it should ever be necessary to raise unhashable type from a __hash__ method. Can't you just set it to None? -- nosy: +r.david.murray ___ Python tracker ___

[issue28515] Py3k warnings in Python 2.7 tests

2016-10-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, this work just great! And even generate appropriate error message. -- ___ Python tracker ___

[issue28515] Py3k warnings in Python 2.7 tests

2016-10-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45198/tests_py3k_warns_2.patch ___ Python tracker ___ ___ Python-bugs-lis

[issue28498] tk busy command

2016-10-23 Thread GNJ
GNJ added the comment: http://www.gnjmotorsport.com/search-by-car/vauxhall/ -- nosy: +GNJ ___ Python tracker ___ ___ Python-bugs-list

[issue28498] tk busy command

2016-10-23 Thread Miguel
Miguel added the comment: Yes, sure. It will break code. Maybe it's better to be explicit than implicit (another Python motto). It's also necessary to change configure(). This is the code for my version of _configure() and configure(): def _configure(self, cmd, cnf, kw): """Internal

[issue26656] Documentation for re.compile is a bit outdated

2016-10-23 Thread Sworddragon
Sworddragon added the comment: The proposal is in the startpost. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue28498] tk busy command

2016-10-23 Thread Miguel
Miguel added the comment: It's also necessary in the same way to adapt these functions: itemconfigure(), entryconfigure(), image_configure(), tag_configure() and window_configure(). -- ___ Python tracker _

[issue28290] BETA report: Python-3.6 build messages to stderr: AIX and "not GCC"

2016-10-23 Thread Michael Felt
Michael Felt added the comment: re: the blake issue - I have ignored it as in not run any tests. Assistance would be to tell me how to easily test "blake" working or not working - before I head upstream. re: _POSIX_C_SOURCE and _XOPEN_SOURCE This is the logic in standards.h (AIX 5.3) +142

[issue28115] Use argparse for the zipfile module

2016-10-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7f01d9d471e5 by Serhiy Storchaka in branch '2.7': Issue #28115: ZIP creation test requires zlib. https://hg.python.org/cpython/rev/7f01d9d471e5 New changeset 7701e9cb8712 by Serhiy Storchaka in branch '3.5': Issue #28115: ZIP creation test requires

[issue28498] tk busy command

2016-10-23 Thread Miguel
Miguel added the comment: Your proposal also makes an extra computation: an item (not) belongs to a list if not self._w in cmd: cmd = _flatten((self._w, cmd)) Also it's more efficient to use this than the function _flaten() in that situation: if not self._w in cmd: cmd =

[issue27779] Sync-up docstrings in C version of the the decimal module

2016-10-23 Thread Stefan Krah
Stefan Krah added the comment: Lisa, thanks for the patch. I've left some comments -- some docstrings in the Python version are outdated, some not quite correct, some are not very clear (to me). I don't know how to proceed. Initially I thought it would be as easy as just taking over all Pyth

[issue18235] _sysconfigdata.py wrong on AIX installations

2016-10-23 Thread Michael Felt
Michael Felt added the comment: The value that works for LDSHARED is the value that LDCXXSHARED has. BLDSHARED is also broken (currently). 'BLDSHARED': './Modules/ld_so_aix xlc_r -bI:./Modules/python.exp -L/opt/lib', 'LDCXXSHARED': '/opt/lib/python2.7/config/ld_so_aix xlc_r -bI:/opt/lib/

[issue28498] tk busy command

2016-10-23 Thread klappnase
klappnase added the comment: Your changed _configure() will also break Canvas/Listbox.itemconfigure(), Menu.entryconfigure() and a number of other methods, Tix is also affected. It will also break third party extensions that use _configure(), like pybwidget. As another python motto says "Specia

[issue18235] _sysconfigdata.py wrong on AIX installations

2016-10-23 Thread Michael Felt
Michael Felt added the comment: correction: On 23-Oct-16 20:54, Michael Felt wrote: > except neither BLDSHARED nor LDCXXSHARED have taken the extra LDFLAG except neither LDSHARED nor LDCXXSHARED have taken the extra LDFLAG like BLDSHARED has. > that was exported before configure was called (in t

[issue28498] tk busy command

2016-10-23 Thread klappnase
klappnase added the comment: "Also it's more efficient to use this than the function _flaten() in that situation: if not self._w in cmd: cmd = (self._w,) + cmd " The construct with _flatten() was not my invention, it's probably something to discuss with Guido ;) The advantage of _

[issue28498] tk busy command

2016-10-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- Removed message: http://bugs.python.org/msg279271 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28498] tk busy command

2016-10-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Use "hg diff" command for creating a patch. -- stage: needs patch -> patch review Added file: http://bugs.python.org/file45199/tk_busy.patch ___ Python tracker __

[issue5830] heapq item comparison problematic with sched's events

2016-10-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue28457] Make public the current private known hash functions in the C-API

2016-10-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Semantic of _PyDict_GetItem_KnownHash is not clear. Should it correspond PyDict_GetItem or PyDict_GetItemWithError? See issue28123. -- dependencies: +_PyDict_GetItem_KnownHash ignores DKIX_ERROR return nosy: +serhiy.storchaka

[issue28498] tk busy command

2016-10-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45200/tk_busy.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue26656] Documentation for re.compile is a bit outdated

2016-10-23 Thread Matthew Barnett
Matthew Barnett added the comment: @Sworddragon: Your post says that it should be more generic or complete the list, but it doesn't make a suggestion as to what it should _actually_ say. Example: "Compile a regular expression pattern into a regular expression object, which can be used for matc

[issue28514] Python (IDLE?) freezes on file save on Windows

2016-10-23 Thread SilentGhost
Changes by SilentGhost : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue28498] tk busy command

2016-10-23 Thread Miguel
Miguel added the comment: This is my point of view: These functions are easy to change: itemconfigure(), entryconfigure(), image_configure(), tag_configure() and window_configure() It's only to add self._w in the proper place. Only one line per method Other third party extensions should not r

[issue28498] tk busy command

2016-10-23 Thread Miguel
Miguel added the comment: Hi Serhiy, I totally disagree of this change on your patch: +def tk_busy_status(self): +'''Returns the busy status of this window. +If the window presently can not receive user interactions, +True is returned, otherwise False.''' +ret

[issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2016-10-23 Thread Mike Kaplinskiy
Mike Kaplinskiy added the comment: Hey Nick, Sorry for the long delay. Unfortunately Python isn't my main work language anymore so working on this has proved to be quite a context switch. I'm going to try to finish this up now. The attached patch implements a new pattern for wrapping runpy -

[issue28498] tk busy command

2016-10-23 Thread klappnase
klappnase added the comment: "This is my point of view: These functions are easy to change: itemconfigure(), entryconfigure(), image_configure(), tag_configure() and window_configure() It's only to add self._w in the proper place. Only one line per method" At least Tix would have to be change

[issue28498] tk busy command

2016-10-23 Thread klappnase
klappnase added the comment: And another thing: "There is no test that shows that self.tk.getboolean is buggy." Well... $ python3 Python 3.4.2 (default, Oct 8 2014, 10:45:20) [GCC 4.9.1] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tkinter >>> ro

[issue28498] tk busy command

2016-10-23 Thread Miguel
Miguel added the comment: Yes, its true. The semantics of configure() is affected then if I ommit _flaten. I like elegancy and to dont repeat myself for this reason I made that suggestion. But the drawback is that maybe other external code that shouldn't rely on internal methods like _configur

[issue28498] tk busy command

2016-10-23 Thread Miguel
Miguel added the comment: Hi, I think that it's behaving well. Where is the bug here? root.tk.getboolean(root.tk_strictMotif()) getboolean() converts Tcl strings to Boolean Python values according to the definition of True and False in Tcl. getboolean is only used for converting strings to boo

[issue28498] tk busy command

2016-10-23 Thread Miguel
Miguel added the comment: It's not defined the semantics for things different than strings. -- ___ Python tracker ___ ___ Python-bugs-

[issue28498] tk busy command

2016-10-23 Thread klappnase
klappnase added the comment: The bug is that tk_strictMotif (which uses self.tk.getboolean() itself) returns 0 instead of False. I used the "nested" command to point out, that self.tk.getboolean() is broken when used with wantobjects=True, because it does *not* return proper boolean values , i

[issue28498] tk busy command

2016-10-23 Thread Miguel
Miguel added the comment: In the C source code that I am reading of tkinter: _tkinter.c. It seems that these parameters are not used: - wantobjects - useTk - syn - use It seems that it's dead code. I hope that somebody can tell me whether I am right. I suppose that now Python returns always P

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2016-10-23 Thread Walker Hale IV
New submission from Walker Hale IV: contextlib.ExitStack implies but does not explicitly state that its __enter__ method trivially returns self. This means that if a user invokes pop_all and then uses the resulting ExitStack instance in a with statement, the user will be relying on undocumente

[issue28517] Dead code in wordcode

2016-10-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: >>> def func(test): ... if test == 1: ... return 1 ... elif test == 2: ... return 2 ... return 3 ... >>> import dis >>> dis.dis(func) Python 3.5: 2 0 LOAD_FAST0 (test) 3 LOAD_CONST