[issue20120] Percent-signs (%) in .pypirc should not be interpolated

2015-10-22 Thread Laszlo Nagy
Laszlo Nagy added the comment: When I uploaded via "setup.py register" and created a new user, then distutils saved the password in the wrong format! So maybe the password read part is a wontfix, but then the save part must be fixed. -- nosy: +nagylzs

[issue2506] Add mechanism to disable optimizations

2015-10-22 Thread Brett Cannon
Brett Cannon added the comment: I believe the python-ideas thread on this topic came to the conclusion that a -X flag -- e.g., `-X DisableOptimizations` -- would be a good way to turn off all optimizations. The flag could then either blindly set sys.dont_write_bytecode to True or set

[issue25410] Clean up and fix OrderedDict

2015-10-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Eric. A comment in PyODict_SetItem suggests to revert setting the value on the dict if adding new node failed. Following patch implements this suggestion. After committing the patch in issue25462 PyDict_DelItem can be replaced with

[issue25456] 3.4 _tkinter build fails, Windows 10, no tcl.h

2015-10-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: You closed prematurely. After _tkinter is built according to instructions, there is still the location mismatch bug, previously discussed, that causes 'import _tkinter' to fail with this somewhat misleading message "ImportError: DLL load failed: The specified

[issue18820] json.dump() ignores its 'default' option when serializing dictionary keys

2015-10-22 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: test needed -> patch review type: enhancement -> behavior versions: +Python 3.5, Python 3.6 ___ Python tracker

[issue25410] Clean up and fix OrderedDict

2015-10-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Following patch makes the code for the iterating a little simpler by merging common code. -- Added file: http://bugs.python.org/file40840/odict_iternext_simpler.patch ___ Python tracker

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2015-10-22 Thread STINNER Victor
STINNER Victor added the comment: I reviewed issue20504.diff on Rietveld. -- ___ Python tracker ___ ___

[issue24925] Allow doctest to find line number of __test__ strings if formatted as a triple quoted string.

2015-10-22 Thread Jurjen N.E. Bos
Jurjen N.E. Bos added the comment: Oops. Lousy editing, I should have used return instead of break. These 6 lines can be inserted in lib/doctest at line 1100: +if isinstance(obj, str) and source_lines is not None: +# This will find __test__ string doctests if and only if the

[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-10-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks, that was it. I actually want to not use the scroll bar unless needed for an extension with more than 15 or so settings, but that is another patch. Ditto for the list of extensions. This looks OK for now. --

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2015-10-22 Thread STINNER Victor
STINNER Victor added the comment: See also issue #24764: "cgi.FieldStorage.read_multi ignores Content-Length" (changeset 11e9f34169d1). -- ___ Python tracker

[issue25456] 3.4 _tkinter build fails, Windows 10, no tcl.h

2015-10-22 Thread Terry J. Reedy
New submission from Terry J. Reedy: Hg started crashing trying to update my 3.4 shared repository on Windows 10, so I deleted, rebuilt, and updated. Ran get_externals.bat, then pcbuild.sln. The one failure is _tkinter, which means no tkinter, no IDLE. 12>..\Modules\_tkinter.c(55): fatal

[issue25457] json dump fails for mixed-type keys when sort_keys is specified

2015-10-22 Thread Christian Tanzer
New submission from Christian Tanzer: In Python 3, trying to json-dump a dict with keys of different types fails with a TypeError when sort_keys is specified: python2.7 === Python 2.7.10 (default, May 29 2015, 10:02:30) [GCC 4.8.4] on linux2 Type "help", "copyright", "credits" or

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

2015-10-22 Thread Alexander Riccio
Alexander Riccio added the comment: Sorry for the delay: Gmail actually directed the update emails to my spam folder! Gmail said (something like): "It is in violation of Google's recommended email sender guidelines." ...and it's apparently not the first time this has happened with the python

[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-10-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset a96e39e20490 by Terry Jan Reedy in branch '2.7': Issue #24782: Limit width of canvas and hence IDLE settings dialog. https://hg.python.org/cpython/rev/a96e39e20490 New changeset 0847398f9b00 by Terry Jan Reedy in branch '3.4': Issue #24782: Limit

[issue25410] Clean up and fix OrderedDict

2015-10-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset a42c0c1c5133 by Serhiy Storchaka in branch '3.5': Issue #25410: C implementation of OrderedDict now uses type(self) instead of https://hg.python.org/cpython/rev/a42c0c1c5133 New changeset 10b965d59b49 by Serhiy Storchaka in branch 'default': Issue

[issue25456] 3.4 _tkinter build requires undocumented manual steps to be usable

2015-10-22 Thread Zachary Ware
Zachary Ware added the comment: Ok, fair enough; finding the DLLs is still an issue, but not the reported issue. I'll try to get a patch committed soon. -- assignee: -> zach.ware title: 3.4 _tkinter build fails, Windows 10, no tcl.h -> 3.4 _tkinter build requires undocumented manual

[issue25461] Unclear language (the word ineffective) in the documentation for os.walk

2015-10-22 Thread Bernt Røskar Brenna
Bernt Røskar Brenna added the comment: OK, I'll submit a patch -- ___ Python tracker ___ ___ Python-bugs-list

[issue25462] Avoid repeated hash calculation in C implementation of OrderedDict

2015-10-22 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: There are private _PyDict_*_KnownHash functions that allow to avoid repeated hash calculation in complex operations with a dict. Proposed patch makes C implementation of OrderedDict to use these functions. It is not just an optimization, it makes some

[issue25410] Clean up and fix OrderedDict

2015-10-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In very rare circumstances it is possible that after a series of modifications using raw dict methods, ma_keys becomes to point to the same address, but allocated keys array has different size. But the guard in _odict_get_index uses only the address as

[issue25461] Unclear language (the word ineffective) in the documentation for os.walk

2015-10-22 Thread R. David Murray
R. David Murray added the comment: As an English speaker, I prefer ineffective. Modifying dirnames does have an effect, it modifies dirnames. What it doesn't do (is ineffective at) is thereby altering the behavior of walk. If you want to avoid ineffective because its meaning is subtle (a

[issue24925] Allow doctest to find line number of __test__ strings if formatted as a triple quoted string.

2015-10-22 Thread Jurjen N.E. Bos
Jurjen N.E. Bos added the comment: I am not as good in making nice patches, but that code can be improved upon a bit as follows: +if isinstance(obj, str) and source_lines is not None: +# This will find __test__ string doctests if and only if the string +#

[issue25323] Bus error: 10 when executing recursive program

2015-10-22 Thread Ronald Oussoren
Ronald Oussoren added the comment: W.r.t. the bus error on OSX: see issue #18049, the default stack size on OSX is too small to reach the default recursion limit. -- ___ Python tracker

[issue25458] ftplib: command response shift - mismatch

2015-10-22 Thread Peter Pan
New submission from Peter Pan: When handling the transfer socket manually the asynchronous status message "226 transfer complete" on the control socket is falsely taken as response for the last sent command. ftplib reads the response too late and the command/response order becomes invalid. I

[issue25451] tkinter: PhotoImage transparency methods

2015-10-22 Thread STINNER Victor
Changes by STINNER Victor : -- title: PhotoImage transparency methods -> tkinter: PhotoImage transparency methods ___ Python tracker

[issue25452] Add __bool__() method to subprocess.CompletedProcess

2015-10-22 Thread STINNER Victor
STINNER Victor added the comment: Can you please give examples of use cases? (code) -- nosy: +haypo ___ Python tracker ___

[issue21709] logging.__init__ assumes that __file__ is always set

2015-10-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: I applied the same _srcfile setting cleanup to 2.7 as we ran into this at work with an embedded python stdlib. __file__ was set to something by the embedded importer, but to something different than the path seen on the actual code objects which appear to

[issue25460] Misc/.gdbinit uses preprocessor macro

2015-10-22 Thread Phil Weir
Phil Weir added the comment: Many thanks, Victor - python-gdb does work for GDB 7 (after a little confusion with python/python3.6dm naming and auto-load). That is very helpful. For reference, can confirm the error described above for GDB 6.8 and Python 3.6 (with DWARF-2 flags) and that the

[issue21709] logging.__init__ assumes that __file__ is always set

2015-10-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset da971f467f6e by Gregory P. Smith in branch '2.7': Issue #21709: Fix the logging module to not depend upon __file__ being set https://hg.python.org/cpython/rev/da971f467f6e New changeset bdb219a0219c by Gregory P. Smith in branch '2.7': Issue21709:

[issue25463] 2.7.10 glibc double free detected

2015-10-22 Thread William D Colburn
William D Colburn added the comment: I don't see the shell script attached anywhere. I'll just paste it here! -cut here- PYDEST=`pwd` wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz wget http://cython.org/release/Cython-0.23.4.tar.gz rm -rf Python-2.7.10 Cython-0.23.4

[issue23930] SimpleCookie doesn't parse comma-only separated cookies correctly

2015-10-22 Thread Kyle Graehl
Kyle Graehl added the comment: r"(\s+|;|$|,)" # Ending either at space, semicolon, or EOS. ( or comma...) I remember running into this same problem like 5 years ago. I added a comma as a valid regexp for ending the pattern, and removed it as a valid _LegalKeyChars I also think adding the

[issue25463] 2.7.10 glibc double free detected

2015-10-22 Thread William D Colburn
New submission from William D Colburn: Linking cython against the static libpython in a python install compiled with shared libraries causes a glibc error that a double free or corruption was found while importing site. I don't think it is cython's fault. Happens on RHEL6.6. Linux

[issue25464] Tix HList header_exists should be "exist"

2015-10-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: (Rob: FYI, a crash is something worse than just an exception.) I know very little about tix, so I don't know whether the bug is really passing 'exists' or that not being accepted. I think it is the latter. The offending function in class HList is def

[issue25464] Tix HList header_exists should be "exist"

2015-10-22 Thread Rob Williscroft
New submission from Rob Williscroft: The method header_exists of Tix HList raises: File "...\python3\lib\tkinter\tix.py", line 926, in header_exists return self.tk.call(self._w, 'header', 'exists', col) _tkinter.TclError: unknown option "exists". Must be cget, configure, create, delete,

[issue25464] Tix HList header_exists should be "exist"

2015-10-22 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +gpolo, serhiy.storchaka, terry.reedy ___ Python tracker ___

[issue17468] Generator memory leak

2015-10-22 Thread Vikas
Vikas added the comment: I see this comment : >> When iteration over a queryset raised an exception, the result cache >> remained initialized with an empty list, so subsequent iterations returned >> an empty list instead of raising an exception>> What if we catch the exceptions? Will that

[issue25459] EAGAIN errors in Python logging module

2015-10-22 Thread Henrique Andrade
New submission from Henrique Andrade: There is a particular bug we hit when using the Python logging module very consistently under the particular settings in which we run one of our applications. We are using Python 2.7.10 on RHEL7/RHEL6/Ubuntu14.04. Anyways, here is the symptom: Traceback

[issue25457] json dump fails for mixed-type keys when sort_keys is specified

2015-10-22 Thread Josh Rosenberg
Josh Rosenberg added the comment: As a workaround (should you absolutely need to sort keys by some arbitrary criteria), you can initialize a collections.OrderedDict from the sorted items of your original dict (using whatever key function you like), then dump without using sort_keys=True. For

[issue25447] TypeError invoking deepcopy on lru_cache

2015-10-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Although it was apparently an artifact of previous > implementations that the cache happened to be deep-copyable, > I hope this expectation can be restored with minimal fuss. Hmm, I'm surprised that a deepcopy ever worked. The LRU cache certainly wasn't

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-22 Thread Josh Rosenberg
Josh Rosenberg added the comment: Patch doesn't let me comment, but I believe to be strictly standards conformant, sigwinch_received should be declared as a `volatile sig_atomic_t`, not `char`. See:

[issue25457] json dump fails for mixed-type keys when sort_keys is specified

2015-10-22 Thread Josh Rosenberg
Josh Rosenberg added the comment: The Python 2 sort order is a result of the "arbitrary but consistent fallback comparison" (omitting details, it's comparing the names of the types), thus the "strange" sort order. Python 3 (justifiably) said that incomparable types should be incomparable

[issue25457] json dump fails for mixed-type keys when sort_keys is specified

2015-10-22 Thread Josh Rosenberg
Josh Rosenberg added the comment: Oops, minor flaw with that. It's str-ifying the tuples, not the keys, which could (in some cases) cause issues with keys whose reprs have different quoting. So you'd end up with lambdas. Boo. Anyway, corrected version (which would probably not be one-lined in

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-22 Thread Josh Rosenberg
Josh Rosenberg added the comment: Okay, sorry for repeated nitpicks, but I think you can keep the visibility of sigwinch_received as static like it was as char (to avoid having it be exported for potential use by other modules, though it won't gain any optimization benefits of static, since

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-22 Thread Eric Price
Eric Price added the comment: Hmm, hopefully the review tool works now. (I was generating the patch manually from a source tarball, not a checkout.) -- Added file: http://bugs.python.org/file40844/rl_sigwinch_update.patch ___ Python tracker

[issue23735] Readline not adjusting width after resize with 6.3

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

[issue23735] Readline not adjusting width after resize with 6.3

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

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-22 Thread Eric Price
Eric Price added the comment: Right, thanks, I've updated the patch. -- Added file: http://bugs.python.org/file40843/rl_sigwinch_update.patch ___ Python tracker

[issue25456] 3.4 _tkinter build fails, Windows 10, no tcl.h

2015-10-22 Thread Zachary Ware
Zachary Ware added the comment: 3.4 still requires Tcl/Tk to be built outside of VS, and its too late in the 3.4 release cycle to think about changing it. PCbuild\build.bat has been updated to do the Tcl/Tk build, though; run "PCbuild\build.bat -e -d" (remove '-d' for a Release build) once,

[issue25459] EAGAIN errors in Python logging module

2015-10-22 Thread STINNER Victor
STINNER Victor added the comment: What is the type of the stream? Is is a pipe or a regular file? Or a socket? Can you please format the patch as an unified patch please? -- nosy: +haypo ___ Python tracker

[issue25460] Misc/.gdbinit uses preprocessor macro

2015-10-22 Thread STINNER Victor
STINNER Victor added the comment: > GNU gdb (GDB) 7.9.50.20150218-cvs Since you have using a recent version of gdb supporting python scripting, you must test python-gdb.py which is more reliable and has more features. -- nosy: +haypo ___ Python

[issue25459] EAGAIN errors in Python logging module

2015-10-22 Thread Henrique Andrade
Henrique Andrade added the comment: The stream in this case (where I hit the bug) is just the console, but I suspect the same issue will affect other streams too. A key piece of information is that this is probably triggered by having a custom SIGPIPE handler, which my particular application

[issue25460] Misc/.gdbinit uses preprocessor macro

2015-10-22 Thread Phil Weir
New submission from Phil Weir: When using the sample .gdbinit, use of the _PyUnicode_AsString macro gives "No symbol "_PyUnicode_AsString" in current context." from GDB. This was first noticed when using downstream (Ubuntu) CPython 3.4/3.5 with debug symbols, and was reproduced by building

[issue25244] Idle: refine right-click behavior

2015-10-22 Thread Mark Roseman
Changes by Mark Roseman : -- nosy: +markroseman ___ Python tracker ___ ___

[issue25452] Add __bool__() method to subprocess.CompletedProcess

2015-10-22 Thread Richard Neumann
Richard Neumann added the comment: A useless use case is attached. Basically it boils down to having the ability to evaluate the CompletedProcess directly by if/else rather than comparing its returncode attribute to zero each time or handling the exception raised by check_returncode(). I use

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-22 Thread Eric Price
Eric Price added the comment: This patch seems to fix the issue for me, by installing a signal handler for SIGWINCH that sets a flag which is checked while waiting for input. One could make a simpler patch that just calls rl_resize_terminal() from the signal handler. That would essentially

[issue25453] Arithmetics with complex infinities is inconsistent with C/C++

2015-10-22 Thread Francesco Biscani
Francesco Biscani added the comment: @Mark Yes I understand that this is a thorny issue. I was kinda hoping NumPy would just forward complex arithmetic to the underlying C implementation, but apparently that's not the case (which OTOH makes sense as the use of C99 complex numbers is not that

[issue25461] Unclear language (the word ineffective) in the documentation for os.walk

2015-10-22 Thread Bernt Røskar Brenna
New submission from Bernt Røskar Brenna: At least for me (non-english speaker), the following is confusing: "Modifying dirnames when topdown is False is ineffective, because in bottom-up mode the directories in dirnames are generated before dirpath itself is generated." I suggest to replace

[issue25461] Unclear language (the word ineffective) in the documentation for os.walk

2015-10-22 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks for the report. This sounds like a reasonable request to me. Would you like to make a patch? (If so, you can check the devguide.) -- keywords: +easy nosy: +ezio.melotti stage: -> needs patch versions: +Python 3.4, Python 3.6