[issue21042] ctypes.util.find_library() should return full pathname instead of filename in linux

2016-02-27 Thread Berker Peksag
Berker Peksag added the comment: I don't think we need an entry in whatsnew/3.6.rst for this (we already have documented the change in a versionchanged directive and a Misc/NEWS item) -- nosy: +berker.peksag ___ Python tracker

[issue25488] IDLE: Remove '', user_dir, and idlelib from sys.path when added

2016-02-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: In private email, eryk sun reports "/usr/bin/idle3 instead prepends 3 directories: ['', current_directory_absolute, '/usr/bin']. If I use the -r option to run a script, it instead prepends script_directory_relative, '', '/usr/bin']. I think these should be

[issue26393] random.shuffled

2016-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Terry. -- assignee: -> rhettinger resolution: -> rejected status: open -> closed ___ Python tracker

[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset fca9f02e10e5 by Martin Panter in branch '2.7': Issue #22836: Keep exception reports sensible despite errors https://hg.python.org/cpython/rev/fca9f02e10e5 -- nosy: +python-dev ___ Python tracker

[issue26450] make html fails on OSX

2016-02-27 Thread Martin Panter
Martin Panter added the comment: The only thing I can think of is checking the PATH environment variable. What is it inside the Makefile, and what is it when you run the command manually? -- ___ Python tracker

[issue26451] CSV documentation doesn't open with an example

2016-02-27 Thread Alex LordThorsen
New submission from Alex LordThorsen: Had a friend get stuck on the CSV documentation. They didn't know what a CSV was (to start with) and couldn't find an example that made sense to them. they went to other sources to figure out how to read CSV files in the end. I made this patch in the

[issue15663] Investigate providing Tcl/Tk 8.6 with OS X installers

2016-02-27 Thread Aivar Annamaa
Aivar Annamaa added the comment: install_name_tool can specify relative paths (see eg. https://wincent.com/wiki/@executable_path,_@load_path_and_@rpath). Therefore you don't need it in users' systems. I've used it successfully for bundling Python 3.5 and Tk 8.6 with my IDE, see

[issue26436] Add the regex-dna benchmark

2016-02-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: DNA matching can be done with difflib. Serious high-volume work should use compiled specialized matchers and aligners. This particular benchmark, explained a bit at https://benchmarksgame.alioth.debian.org/u64q/regexdna-description.html#regexdna,

[issue25488] IDLE: Remove '', user_dir, and idlelib from sys.path when added

2016-02-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: #25507 addresses the tkinter.font problem of Note 2 in the first message. -- title: IDLE: Remove '' and idlelib from sys.path when added -> IDLE: Remove '', user_dir, and idlelib from sys.path when added versions: -Python 3.4

[issue26450] make html fails on OSX

2016-02-27 Thread Martin Panter
Martin Panter added the comment: I suspect this is not OS X specific. The documentation that you linked says “Sphinx is maintained separately and is not included in this tree.” By your output I suspect you need to install the sphinx-build program. On Arch Linux I had to install it myself: $

[issue26450] make html fails on OSX

2016-02-27 Thread Martin Panter
Martin Panter added the comment: Sorry I didn’t read the last bit of your message where you run sphinx-build manually. So I take back my last comment :) -- status: closed -> open ___ Python tracker

[issue26450] make html fails on OSX

2016-02-27 Thread Martin Panter
Martin Panter added the comment: Yeah if you want to propose a specific change for the devguide, or even a patch, go right ahead :) -- ___ Python tracker

[issue26449] Tutorial on Python Scopes and Namespaces uses confusing 'read-only' terminology

2016-02-27 Thread Ezio Melotti
Ezio Melotti added the comment: I agree with Raymond. IMHO the term "read-only" does a good job at conveying the fact that you can still access/read the value of the variable but you can't assign to it. "read-only" is about /what/ you can do with the variable, even though it would also be

[issue25910] Fixing links in documentation

2016-02-27 Thread Martin Panter
Martin Panter added the comment: BTW it looks like the suspicious.csv file needs updating to compensate for this change: http://buildbot.python.org/all/builders/Docs%203.5/builds/654/steps/suspicious/logs/stdio WARNING: [using/unix:31] ":Packaging" found in

[issue26450] make html fails on OSX

2016-02-27 Thread Alex LordThorsen
New submission from Alex LordThorsen: Did a fresh hg clone of the python 3.6 code base (3.6.0a0) on OSX 10.10.5 and made a modification to a library rst. I went to build my changes and ran $ make html sphinx-build -b html -d build/doctrees -D latex_paper_size= . build/html make:

[issue26449] Tutorial on Python Scopes and Namespaces uses confusing 'read-only' terminology

2016-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, the learners in my Python classes seem to find the words "read-only" to be helpful. Also, I think "not visible" conveys the wrong mental model ("shadowed" being a little more accurate). I also disagree with saying that "variables are never

[issue21042] ctypes.util.find_library() should return full pathname instead of filename in linux

2016-02-27 Thread Martin Panter
Martin Panter added the comment: Thanks, this looks pretty good to me. I just need to remember to write a What’s New entry. -- ___ Python tracker ___

[issue25488] IDLE: Remove '', user_dir, and idlelib from sys.path when added

2016-02-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Upload: A listing of console (cross-platform) and icon (Windows-specific) IDLE starting methods and the effect on sys.path and current directory. I believe that some of the details of the 'constant' part of sys.path are system dependent, but stable across

[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-27 Thread Martin Panter
Martin Panter added the comment: FTR Python 2’s exception report in __del__() is a bit different, here is what it now looks like: >>> o = VeryBroken() >>> del o Exception __main__.BrokenStrException: in ignored -- resolution: -> fixed stage: commit review -> resolved status: open

[issue6294] Improve shutdown exception ignored message

2016-02-27 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> duplicate status: open -> closed superseder: -> Broken "Exception ignored in:" message on exceptions in __repr__ versions: +Python 3.5, Python 3.6 -Python 3.2 ___ Python tracker

[issue23041] csv needs more quoting rules

2016-02-27 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: needs patch -> patch review versions: +Python 3.6 -Python 3.5 ___ Python tracker

[issue26443] cross building extensions picks up host headers

2016-02-27 Thread Ned Deily
Changes by Ned Deily : -- nosy: +doko ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13573] csv.writer uses str() for floats instead of repr()

2016-02-27 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue13573] csv.writer uses str() for floats instead of repr()

2016-02-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset d3ac0214b7b8 by Raymond Hettinger in branch '2.7': Issue 13573: Document that csv.writer uses str() for floats instead of repr(). https://hg.python.org/cpython/rev/d3ac0214b7b8 -- ___ Python tracker

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-02-27 Thread Ned Deily
Changes by Ned Deily : -- nosy: +David.Edelsohn ___ Python tracker ___ ___ Python-bugs-list

[issue26440] tarfile._FileInFile.seekable is broken in stream mode

2016-02-27 Thread Ned Deily
Changes by Ned Deily : -- nosy: +lars.gustaebel ___ Python tracker ___ ___ Python-bugs-list

[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset cf70b1204e44 by Martin Panter in branch '3.5': Issue #22836: Keep exception reports sensible despite errors https://hg.python.org/cpython/rev/cf70b1204e44 New changeset 2b597e03f7f4 by Martin Panter in branch 'default': Issue #22836: Merge

[issue13573] csv.writer uses str() for floats instead of repr()

2016-02-27 Thread Berker Peksag
Berker Peksag added the comment: csv.writer() documentation says: "All other non-string data are stringified with str() before being written." https://docs.python.org/2.7/library/csv.html#csv.writer I guess adding a sentence to document the special case for floats wouldn't hurt.

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-02-27 Thread Ned Deily
Changes by Ned Deily : -- nosy: +ncoghlan, yselivanov ___ Python tracker ___ ___

[issue26453] SystemError on invalid numpy.ndarray / Path operation

2016-02-27 Thread Antony Lee
New submission from Antony Lee: Running ``` from pathlib import Path import numpy as np np.arange(30) / Path("foo") ``` raises ``` TypeError: argument should be a path or str object, not During handling of the above exception, another exception occurred: SystemError: returned a result

[issue26452] Wrong line number attributed to comprehension expressions

2016-02-27 Thread Greg Price
New submission from Greg Price: In a multi-line list comprehension (or dict or set comprehension), the code for the main expression of the comprehension is wrongly attributed to the *last* line of the comprehension, which might be several lines later. This makes for quite baffling tracebacks

[issue25910] Fixing links in documentation

2016-02-27 Thread SilentGhost
SilentGhost added the comment: Perhaps, I'm misreading the log output, but it seems to me that it's Doc/tools/susp-ignored.csv that needs updating. Here is the attached patch. -- ___ Python tracker

[issue26420] IDLE for Python 3.5.1 for x64 Windows exits when pasted a string with non-BMP characters

2016-02-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you start IDLE from the console with 'python -m idlelib' you should see a TclError message when pasting. This is a known limitation of tcl/tk. Printing gives a traceback in IDLE's shell. >>> print('\U00020BB7') Traceback (most recent call last): File

[issue26436] Add the regex-dna benchmark

2016-02-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: I believe Brett is asking whether the code looks like the sort of Python code that one of us might write, as opposed to 'language X in Python'. In my quick perusal, As far as I looked, I would say yes, except for using floats and while instead of int and for

[issue26407] csv.writer.writerows masks exceptions from __iter__

2016-02-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: The TypeError is correct. You passed a non-iterable. I agree that adding information, *if possible*, when 'non-iterable' is determined by an exception being raised, would be nice. I don't know how easy this would be. -- nosy: +terry.reedy stage:

[issue26442] Doc refers to xmlrpc.client but means xmlrpc.server

2016-02-27 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-02-27 Thread Barun Parruck
Barun Parruck added the comment: Sorry, the previous file had a bug. -- Added file: http://bugs.python.org/file42038/testfindlabels2.py ___ Python tracker

[issue26404] socketserver context manager

2016-02-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: This seems like an appropriate enhancement. I notice that the serve_forever examples did not previously have server_close(). Was this an oversight or will the server_close in __exit__ just be a no-op? -- nosy: +terry.reedy

[issue26283] zipfile can not handle the path build by os.path.join()

2016-02-27 Thread Anish Shah
Changes by Anish Shah : -- nosy: -anish.shah ___ Python tracker ___ ___

[issue26269] zipfile should call lstat instead of stat if available

2016-02-27 Thread Anish Shah
Changes by Anish Shah : -- nosy: -anish.shah ___ Python tracker ___ ___

[issue26252] Add an example to importlib docs on setting up an importer

2016-02-27 Thread Anish Shah
Changes by Anish Shah : -- nosy: -anish.shah ___ Python tracker ___ ___

[issue26415] Out of memory, trying to parse a 35MB dict

2016-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I though this might be tokenizer issue, but this is just large memory consumption for AST tree. Simpler example: ./python -c 'import ast; ast.parse("0,"*100, mode="eval")' It takes over 450MB of memory on 32-bit system, over 450 bytes per tuple item.

[issue26449] Tutorial on Python Scopes and Namespaces uses confusing 'read-only' terminology

2016-02-27 Thread Martijn Pieters
Changes by Martijn Pieters : -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker ___

[issue26394] Have argparse provide ability to require a fallback value be present

2016-02-27 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +bethard ___ Python tracker ___ ___ Python-bugs-list

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-02-27 Thread Barun Parruck
Barun Parruck added the comment: Four test cases have been included in the unittests, using the module unittest. One is the original one you gave me, the others are some that I played around with it, and thought would be useful to include. I would love some code reviews at this point!

[issue26449] Tutorial on Python Scopes and Namespaces uses confusing 'read-only' terminology

2016-02-27 Thread Martijn Pieters
New submission from Martijn Pieters: >From the 9.2. Python Scopes and Namespace section: > If a name is declared global, then all references and assignments go directly > to the middle scope containing the module’s global names. To rebind variables > found outside of the innermost scope, the

[issue26436] Add the regex-dna benchmark

2016-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I assume the code looks idiomatic to you? Sorry, I have not understood your question. Could you please reformulate? The performance of all Python versions is rough the same. 2.7 is about 8% slower than 3.2 and 3.3, 3.4-default are about 3-4% slower than

[issue26393] random.shuffled

2016-02-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: It is against our policy to wrap random half-line expressions as new function. Doing so would bloat Python until it became unusable. This should be rejected. -- nosy: +terry.reedy ___ Python tracker

[issue24663] ast.literal_eval does not handle empty set literals

2016-02-27 Thread yota moteuchi
yota moteuchi added the comment: Well, I would disagree with R. David Murray on this. literal_eval() is meant to safely parse literal pythons "containers" structures. {1, 2, 3} is a valid literal set(), why would an empty one not be parse-able as well. I can not predict, when I dump the

[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-02-27 Thread Eric Fahlgren
Eric Fahlgren added the comment: Lookin' good so far. How about we try it on all the opcodes that have arguments? See attached example for which I can see two obvious improvements: 1) It could be improved by taking apart that "args" list and using it to synthesize "sample_code" rather than

[issue26285] Garbage collection of unused input sections from CPython binaries

2016-02-27 Thread Alecsandru Patrascu
Changes by Alecsandru Patrascu : -- nosy: +gregory.p.smith, lemburg, scoder, steve.dower, zach.ware ___ Python tracker ___

[issue26436] Add the regex-dna benchmark

2016-02-27 Thread Brett Cannon
Brett Cannon added the comment: Terry's right about what I meant; is the code of such quality that you would let it into the stdlib? As for execution time, I would vote for increasing the input size to take 1 second as it's just going to get faster and faster just from CPU improvements

[issue26359] CPython build options for out-of-the box performance

2016-02-27 Thread Alecsandru Patrascu
Changes by Alecsandru Patrascu : -- nosy: +brett.cannon, gregory.p.smith, lemburg, pitrou, r.david.murray, scoder, skrah, steve.dower, zach.ware ___ Python tracker

[issue26436] Add the regex-dna benchmark

2016-02-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: I would add another kind of question: is it stressing something useful that isn't already stressed by the two other regex benchmarks we already have? Given that it seems built around a highly-specialized use case (DNA matching?) and we don't even know if