[issue25963] strptime not parsing some timezones

2016-01-01 Thread R. David Murray
R. David Murray added the comment: The code is shared by the two modules (it's in _strptime.py). So, yes. There is clearly a doc bug here (%Z needs a footnote in the table in the datetime docs), but there is no practical way to implement the parsing of arbitrary (non-locale) timezone

[issue25942] subprocess.call SIGKILLs too liberally

2016-01-01 Thread Martin Panter
Martin Panter added the comment: The reported problem is when no timeout is given. Perhaps it would be sufficient to: 1. Kill the child if any exception happens when a timeout is enforced 2. Never kill the child when there is no timeout If a timeout is specified, the current code is good

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-01 Thread Andrew Barnert
Andrew Barnert added the comment: > I don’t think you need to define __len__() to get an iterable, only > __getitem__(). The "old-style sequence protocol" means having a __getitem__ that works for values from 0 to __len__() and raises IndexError at __len__(). You don't need to be a complete

[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2016-01-01 Thread Ezio Melotti
Ezio Melotti added the comment: > It would help if there were some official guidance on what these things > mean -- I can't find anything written down anywhere that even documents > what you just said about how CPython proper uses them, so I imagine > people have come up with all kinds of

[issue16379] SQLite error code not exposed to python

2016-01-01 Thread Ezio Melotti
Ezio Melotti added the comment: I think the error message should display both the numeric code and also the error name if available. Instead of using a mapping, perhaps an Enum could be used instead. -- stage: needs patch -> patch review versions: +Python 3.6 -Python 3.4

[issue25987] collections.abc.Reversible

2016-01-01 Thread Andrew Barnert
New submission from Andrew Barnert: This came up as a side issue in the -ideas discussion on deprecating the old-style sequence protocol that came out of Guido's suggestion on https://github.com/ambv/typehinting/issues/170 (http://article.gmane.org/gmane.comp.python.ideas/37599): > I also

[issue25990] Pydoc fails on Python file with nonlocal

2016-01-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you have installed Python 3, perhaps you have the /usr/bin/pydoc3 symlink. Just use the pydoc3 command. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python

[issue25917] Fixing howto links in docs

2016-01-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 521a402ae177 by Senthil Kumaran in branch '3.4': Issue25917 : Fix howto links in docs. Point the reference documentation instead of wiki. https://hg.python.org/cpython/rev/521a402ae177 New changeset 6b9d8957aeef by Senthil Kumaran in branch '3.5':

[issue25917] Fixing howto links in docs

2016-01-01 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the helpful, patch. I modified it to include only the faq.rst and functions.rst and applied it. -- assignee: docs@python -> orsenthil nosy: +orsenthil stage: patch review -> resolved status: open -> closed

[issue23315] tempfile.mkdtemp fails with non-ascii paths on Python 2

2016-01-01 Thread Richard PALO
Richard PALO added the comment: I notice similar problems, as found when running the test suite for lxml 3.5.0 on python2.7 == ERROR: test_etree_parse_io_error (lxml.tests.test_io.ETreeIOTestCase)

[issue23315] tempfile.mkdtemp fails with non-ascii paths on Python 2

2016-01-01 Thread Richard PALO
Richard PALO added the comment: If I also add .encode('utf-8') to filename on line 278, that seems gets over the pathname problem. I guess it comes down to the fact that if sys.filesystemencoding() is utf-8, which in my case it is (on SunOS), I believe these conversion should be automatic.

[issue25992] test_gdb fails

2016-01-01 Thread Martin Panter
Changes by Martin Panter : -- components: +Macintosh nosy: +ned.deily, ronaldoussoren ___ Python tracker ___

[issue25909] Incorrect documentation for PyMapping_Items and like

2016-01-01 Thread Sonali Gupta
Sonali Gupta added the comment: The documentation in mapping.rst and the comments in abstract.h have been changed for PyMapping_Items, PyMapping_Keys and PyMapping_Values. -- Added file: http://bugs.python.org/file41472/bug.patch ___ Python tracker

[issue25986] Collections.deque maxlen: added in 2.6 or 2.7?

2016-01-01 Thread Terry J. Reedy
New submission from Terry J. Reedy: https://docs.python.org/2.6/library/collections.html#collections.deque has this line "Changed in version 2.6: Added maxlen parameter." https://docs.python.org/2.7/library/collections.html#collections.deque kept the sentence above and added this entry after

[issue25991] readline example eventually consumes all memory

2016-01-01 Thread Bruce Frederiksen
New submission from Bruce Frederiksen: The Example in the readline documentation (section 6.7 of the Library Reference) shows how to save your readline history in a file, and restore it each time you start Python. The problem with the Example is that it does not include a call to

[issue24899] Add an os.path <=> pathlib equivalence table in pathlib docs

2016-01-01 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: docs@python -> ezio.melotti stage: needs patch -> patch review versions: -Python 3.4 ___ Python tracker

[issue16731] xxlimited/xxmodule docstrings ambiguous

2016-01-01 Thread Camilla Montonen
Camilla Montonen added the comment: Changed xxlimited.c to xxmodule.c in the xxlimited.c docstring. -- versions: +Python 3.5, Python 3.6 -Python 3.4 Added file: http://bugs.python.org/file41467/issue16731.patch ___ Python tracker

[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2016-01-01 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: +Python 3.5, Python 3.6 -Python 3.2, Python 3.3 ___ Python tracker ___

[issue25778] winreg.EnumValue does not truncate strings correctly

2016-01-01 Thread Eryk Sun
Eryk Sun added the comment: The current test works for 3.x because we keep the full string length via PyUnicode_AsWideCharString(value, ) when creating a REG_SZ value. OTOH, 2.x Py2Reg gets the length via strlen. I'd prefer to make this consistent with 3.x by using the full string length from

[issue20008] Clean up/refactor/make discoverable test_decimal

2016-01-01 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue25054] Capturing start of line '^'

2016-01-01 Thread Ezio Melotti
Ezio Melotti added the comment: AFAIU the problem is at Modules/_sre.c:852: after matching, if the ptr is still at the start position, the start position gets incremented to avoid an endless loop. Ideally the problem could be avoided by marking and skipping the part(s) of the pattern that

[issue25916] wave module readframes now returns bytes not str

2016-01-01 Thread Martin Panter
Martin Panter added the comment: Patch 4 looks fine to me. -- ___ Python tracker ___ ___ Python-bugs-list

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-01 Thread Andrew Barnert
Andrew Barnert added the comment: > Also, if I understand your problem, Container would also be susceptible in > theory You're right, but not in the details. Being iterable (whether via __iter__ or via the old-style sequence protocol) makes you a container. But, again, false negatives for

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2016-01-01 Thread Andrew Barnert
Andrew Barnert added the comment: > If this patch goes ahead, I think the ABC documentation should clarify which > methods are checked for None and which aren’t. That seems fair. Also, as you pointed out on #25958, at least one other ABC has the same problem as Iterable: you can block the

[issue24033] Update _test_multiprocessing.py to use script helpers

2016-01-01 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks for the patch. I left a review on Rietveld. -- nosy: +ezio.melotti, haypo, serhiy.storchaka versions: +Python 3.6 ___ Python tracker

[issue25990] Pydoc fails on Python file with nonlocal

2016-01-01 Thread Steve Litt
Steve Litt added the comment: On Sat, 02 Jan 2016 02:23:27 + "R. David Murray" wrote: > R. David Murray added the comment: > > Are you sure you are running pydoc using python3? That error looks > like you are running it using python2, as does the command line you

[issue25778] winreg.EnumValue does not truncate strings correctly

2016-01-01 Thread Eryk Sun
Changes by Eryk Sun : Added file: http://bugs.python.org/file41470/issue25778_py36_2.patch ___ Python tracker ___

[issue25778] winreg.EnumValue does not truncate strings correctly

2016-01-01 Thread Eryk Sun
Changes by Eryk Sun : Added file: http://bugs.python.org/file41469/issue25778_py27_1.patch ___ Python tracker ___

[issue25916] wave module readframes now returns bytes not str

2016-01-01 Thread R. David Murray
R. David Murray added the comment: In those contexts, bytes should not be linked to the bytes object. -- ___ Python tracker ___

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2016-01-01 Thread Martin Panter
Martin Panter added the comment: IMO allowing any special method to be set to None seems to make more trouble than it is worth. Are there practical problems to address, or are they all theoretical? Ideally I think it would be better to require __reversed__() for reverse() to work, but such a

[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2016-01-01 Thread Martin Panter
Martin Panter added the comment: Issue 10289 proposes to link from len() to __len__() in the documentation. I think the limitation only needs to be documented for __len__(); there are other ways to invoke it as well. -- nosy: +martin.panter ___

[issue25989] documentation version switcher is broken fro 2.6, 3.2, 3.3

2016-01-01 Thread Vincent Davis
New submission from Vincent Davis: >From the documentation pages for python 2.7 and 3.4, 3.5, 3.6 it is possible >to select another python version in the breadcrumb at the top left of the >page. This is not available for python 2.6, 3.2 and 3.3. See related issue which is closed.

[issue25984] Expose a simple "is IEEE 754" flag in sys.float_info

2016-01-01 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +eric.smith, lemburg, mark.dickinson, stutzbach ___ Python tracker ___

[issue25990] Pydoc fails on Python file with nonlocal

2016-01-01 Thread R. David Murray
R. David Murray added the comment: Are you sure you are running pydoc using python3? That error looks like you are running it using python2, as does the command line you show (since on most systems the pydoc command comes from python2). (I don't know what you mean by "source file can

[issue25778] winreg.EnumValue does not truncate strings correctly

2016-01-01 Thread Eryk Sun
Eryk Sun added the comment: I've added a patch for 2.7 that updates Py2Reg to use PyString_GET_SIZE instead of strlen and updates Reg2Py to use strnlen instead of returning strings with embedded NULs. -- ___ Python tracker

[issue25992] test_gdb fails

2016-01-01 Thread Bryce Miller
Bryce Miller added the comment: Github repo version was 4935c6c381b196334b97aac4e9e4e8fee35b0947 -- ___ Python tracker ___

[issue20008] Clean up/refactor/make discoverable test_decimal

2016-01-01 Thread Stefan Krah
Stefan Krah added the comment: Is this a political nosying? -- ___ Python tracker ___ ___ Python-bugs-list

[issue25916] wave module readframes now returns bytes not str

2016-01-01 Thread R. David Murray
R. David Murray added the comment: Agree with Martin. Only the two audio module changes are correct. However, I think we can reduce ambiguity without compromising the meaning by changing "string of bytes" to "sequence of bytes" in both of those other cases. --

[issue25916] wave module readframes now returns bytes not str

2016-01-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Another uses of this idiom: "string of 16 bytes" in uuid.rst and uuid.py "string of *n* random bytes" in os.rst "string of bytes" in bytesio.c And a number of uses "bytestring", "byte string" and "bytes string". I think that either all occurrences should be

[issue6500] urllib2 maximum recursion depth exceeded

2016-01-01 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: patch review -> commit review ___ Python tracker ___

[issue25992] test_gdb fails

2016-01-01 Thread Bryce Miller
New submission from Bryce Miller: test_gdb fails for me on OSX Steps I did to duplicate: Checked out fresh '2.7' branch from https://github.com/python/cpython.git >From the new cypthon dir ran: ./configure make make test ./Lib/test/regrtest.py -v test_gdb Attached the full verbose output.

[issue25992] test_gdb fails

2016-01-01 Thread Bryce Miller
Changes by Bryce Miller : -- hgrepos: -329 ___ Python tracker ___ ___

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-01 Thread R. David Murray
R. David Murray added the comment: Absolutely you do not need to define __len__ to get an iterable. Length is not a property of an iterable (iterables can be indefinite in length or infinite in length). -- nosy: +r.david.murray ___ Python tracker

[issue25983] Add tests for multi-argument type()

2016-01-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: I presume that there are existing tests that class statements work. Is so, these implicitly test type(name, bases, namespace). But I can see value to test testing the two phases of class creation separately. Test 'class' with a mock type that records the

[issue25990] Pydoc fails on Python file with nonlocal

2016-01-01 Thread R. David Murray
Changes by R. David Murray : -- hgrepos: -328 ___ Python tracker ___ ___

[issue25990] Pydoc fails on Python file with nonlocal

2016-01-01 Thread Steve Litt
New submission from Steve Litt: Latest pydoc on Void linux 64 bit, I have no idea how to capture the version. Source file can be either Python 3.4 or 2.7, same result. ERROR MESSAGE: [slitt@mydesk ~]$ pydoc pydoc_fail problem in ./pydoc_fail.py - : invalid syntax (pydoc_fail.py, line 6)

[issue25916] wave module readframes now returns bytes not str

2016-01-01 Thread SilentGhost
Changes by SilentGhost : Added file: http://bugs.python.org/file41466/issue25916_4.diff ___ Python tracker ___

[issue25986] Collections.deque maxlen: added in 2.6 or 2.7?

2016-01-01 Thread R. David Murray
R. David Murray added the comment: 'parameter' and 'attribute' are two different things. I presume the documentation is accurate, but haven't checked :) -- nosy: +r.david.murray ___ Python tracker

[issue24899] Add an os.path <=> pathlib equivalence table in pathlib docs

2016-01-01 Thread Camilla Montonen
Camilla Montonen added the comment: This is a good one for beginner patch reviewers, so submitted this to the core-mentorship mailing list. -- nosy: +Winterflower ___ Python tracker

[issue25916] wave module readframes now returns bytes not str

2016-01-01 Thread SilentGhost
SilentGhost added the comment: Here is the updated patch. -- Added file: http://bugs.python.org/file41465/issue25916_3.diff ___ Python tracker ___

[issue25916] wave module readframes now returns bytes not str

2016-01-01 Thread R. David Murray
R. David Murray added the comment: As I said, I think it's like fixing style issues in code: only do it if you touch the docs for some other reason. But this patch is fine. Although we should fix the 'string' when it is really 'bytes' issues, if we can find them. Those are real bugs, not

[issue24263] unittest cannot load module whose name starts with Unicode

2016-01-01 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Library (Lib) keywords: +easy stage: patch review -> test needed versions: -Python 3.4 ___ Python tracker

[issue25988] collections.abc.Indexable

2016-01-01 Thread Andrew Barnert
New submission from Andrew Barnert: In an -ideas thread, Guido suggested (http://article.gmane.org/gmane.comp.python.ideas/37599): > If we want some way to turn something that just defines __getitem__ and > __len__ into a proper sequence, it should just be made to inherit from > Sequence,

[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2016-01-01 Thread Camilla Montonen
Camilla Montonen added the comment: The deficiency noticed by Terry has been at least partially corrected in the len() docs https://docs.python.org/2/library/functions.html#len Return the length (the number of items) of an object. The argument may be a sequence (such as a string, bytes, tuple,

[issue25959] tkinter - PhotoImage.zoom() causes segfault

2016-01-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: Tk ticket update: '''aspect added on 2015-12-28 00:30:33: I can reproduce this crash on 8.5.18 and 8.6.4, but it appears to be fixed in trunk: "not enough free memory for image buffer".''' We should see fix in 3.6. Doc addition is not exactly trivial, as

[issue23404] 'make touch' does not work with git clones of the source repository

2016-01-01 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +brett.cannon ___ Python tracker ___ ___

[issue25256] Add sys.debug_build public variable to check if Python was compiled in debug mode

2016-01-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Implementing sys.abiflags on Windows looks more general solution, and it doesn't increase the complexity of the stdlib. -- ___ Python tracker

[issue18543] urllib.parse.urlopen shouldn't ignore installed opener when called with any SSL argument

2016-01-01 Thread Martin Panter
Martin Panter added the comment: I closed Issue 18543 as a duplicate, which points out this also affects Python 2.7.9+, and can also be triggered by setting the “context” parameter. Overall, I am not comfortable with the complication and hacks in the current patch. Maybe it would be simpler

[issue25981] Intern namedtuple field names

2016-01-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: The benefits are tiny, but if the one line patch looks good, we might as well intern the _fields and save a few bytes. -- ___ Python tracker

[issue25942] subprocess.call SIGKILLs too liberally

2016-01-01 Thread Martin Panter
Martin Panter added the comment: Doesn’t this scenario apply equally to run(), or check_output() in 3.4? I suspect the explicit p.wait() call is not needed either. The context manager should already be calling wait(). One possible problem that I can think of: if you set a timeout, then

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2016-01-01 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker ___

[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2016-01-01 Thread Martin Panter
Martin Panter added the comment: I think there is a memory leak in the C code. I left some other minor suggestions as well, but it almost looks ready. -- ___ Python tracker

[issue23166] urllib2 ignores opener configuration under certain circumstances

2016-01-01 Thread Martin Panter
Martin Panter added the comment: I think these are essentially the same problem. It defeats any custom installed opener, not just custom HTTPS handlers. -- nosy: +martin.panter resolution: -> duplicate status: open -> closed superseder: -> urllib.parse.urlopen shouldn't ignore

[issue25942] subprocess.call SIGKILLs too liberally

2016-01-01 Thread STINNER Victor
STINNER Victor added the comment: The issue explained in 12494 is that the caller doesn't have access to the subprocess.Popen object. I disagree to not kill the process when an exception is raised, even KeyboardInterrupt. I also disagree to say that we kill an "arbitrary" process. IMHO it's

[issue25256] Add sys.debug_build public variable to check if Python was compiled in debug mode

2016-01-01 Thread STINNER Victor
STINNER Victor added the comment: The consensus was to add a new flag to sys.implementation. -- ___ Python tracker ___

[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2016-01-01 Thread Alessandro Cucci
Alessandro Cucci added the comment: Thanks @martin.panter, here is another patch made after your comments. -- Added file: http://bugs.python.org/file41464/issue19475_v12.patch ___ Python tracker

[issue2943] Distutils should generate a better error message when the SDK is not installed

2016-01-01 Thread Ilya Kamenshchikov
Ilya Kamenshchikov added the comment: please fix spent half a day to understand I need C compiler -- nosy: +Ilya Kamenshchikov ___ Python tracker ___

[issue25981] Intern namedtuple field names

2016-01-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Interesting, short string literals usually are interned, but they are not interned in tuple literal. >>> namespace = {} >>> exec('a = ["abc123"]\ndef abc123(): pass', namespace) >>> namespace['abc123'].__name__ is namespace['a'][0] True >>> exec('a =

[issue25778] winreg.EnumValue does not truncate strings correctly

2016-01-01 Thread Zachary Ware
Zachary Ware added the comment: Missed the boat on 3.4. I tried out the new test on 2.7, and it does not fail with no change to _winreg.c. Eryk, do you want to provide a patch for 2.7? I'm not interested enough to figure out what's going on there, but if you provide a patch I'll commit it.