[issue22381] update zlib in 2.7 to 1.2.8

2014-09-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3c343588f6a6 by doko in branch '2.7': - Issue #22381: Update zlib to 1.2.8. http://hg.python.org/cpython/rev/3c343588f6a6 -- nosy: +python-dev ___ Python tracker _

[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?

2014-09-10 Thread Evens Fortuné
Evens Fortuné added the comment: Look, the subject of this issue is to clarify the methods of the urllib.request.urlopen()'s return value for http(s) URLs. Nobody seemed to work on this for 4 months. That's why I tried to submit a patch after looking into the code to try to do my part to help.

[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?

2014-09-10 Thread R. David Murray
R. David Murray added the comment: I think I'm thinking of the Request API, and not the Response API. So ignore my comments about deprecation, I'm not sure what the status is. -- ___ Python tracker __

[issue22386] Python 3.4 logging.getLevelName() no longer maps string to level.

2014-09-10 Thread Alex Gaynor
Alex Gaynor added the comment: I believe something like the following diff restores the previous behavior (untested!): diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index a61c2b0..4a8f83e 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -129,7 +129,7 @@ def

[issue22386] Python 3.4 logging.getLevelName() no longer maps string to level.

2014-09-10 Thread Clark Boylan
New submission from Clark Boylan: Prior to http://hg.python.org/cpython/rev/5629bf4c6bba?revcount=60 logging.getLevelName(lvl) would map string lvl args like 'INFO' to the integer level value 20. After this change the string to int level mapping is removed and you can only map level to string.

[issue9951] introduce bytes.hex method

2014-09-10 Thread Mark Lawrence
Mark Lawrence added the comment: I'd say add memoryview.hex() here as everything seems related. Victor has also mentioned memoryview in msg226692. -- nosy: +BreamoreBoy ___ Python tracker _

[issue9951] introduce bytes.hex method

2014-09-10 Thread Nick Coghlan
Nick Coghlan added the comment: Open question: the current patch adds bytes.hex() and bytearray.hex(). Should we also add memoryview.hex(), or split that suggestion out to a separate proposal? -- ___ Python tracker

[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?

2014-09-10 Thread Martin Panter
Martin Panter added the comment: By removing the “addinfourl” methods for HTTP responses, you are making it unnecessarily hard to handle header fields and metadata from the response. I do not know of any other documented way of getting the eventual redirect target, other than geturl(). And cod

[issue22385] Allow 'x' and 'X' to accept bytes-like objects in string formatting

2014-09-10 Thread Nick Coghlan
Changes by Nick Coghlan : -- title: Allow 'x' and 'X' to accept bytes objects in string formatting -> Allow 'x' and 'X' to accept bytes-like objects in string formatting ___ Python tracker

[issue9951] introduce bytes.hex method

2014-09-10 Thread Nick Coghlan
Nick Coghlan added the comment: Good point Terry - I split the proposal to support bytes-like objects for 'x' and 'X' in string formatting out to issue 22385. For bytes.hex, I'm inclined to stick with the dirt simple option described in PEP 358: the exact behaviour of the current binascii.hexl

[issue9951] introduce bytes.hex method

2014-09-10 Thread HCT
HCT added the comment: @Terry natural bytes do not have space between them. I would think adding space is for typesetting situation which should be done by user's post-processing. I agree to not have any prefix to make .hex and from_hex uniform. the \x is the str representation of bytes when

[issue22385] Allow 'x' and 'X' to accept bytes objects in string formatting

2014-09-10 Thread Nick Coghlan
New submission from Nick Coghlan: Inspired by the discussion in issue 9951, I believe it would be appropriate to extend the default handling of the "x" and "X" format characters to accept arbitrary bytes-like objects. The processing of these characters would be as follows: "x": display a-f as

[issue9951] introduce bytes.hex method

2014-09-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: The proposal is to add a .hex method (similar to binascii.hexlify) that is the inverse of .fromhex (similar to binascii.unhexlify), as originally specified in PEP 358. http://legacy.python.org/dev/peps/pep-0358/ "The object has a .hex() method that does the rev

[issue9951] introduce bytes.hex method

2014-09-10 Thread Nick Coghlan
Nick Coghlan added the comment: Just as a recap of at least some of the *current* ways to do a bytes -> hex conversion: >>> import codecs >>> codecs.encode(b"abc", "hex") b'616263' >>> import binascii >>> binascii.hexlify(b"abc") b'616263' >>> import base64 >>> base64.b16encode(b"abc") b'616263

[issue9951] introduce bytes.hex method

2014-09-10 Thread HCT
HCT added the comment: @Victor binascii.hexlify('abc') doesn't work in 3.4. I assume this is a new thing for 3.5 >>> import binascii >>> binascii.hexlify('abc') Traceback (most recent call last): File "", line 1, in TypeError: 'str' does not support the buffer interface >>> >>> binascii.hex

[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?

2014-09-10 Thread R. David Murray
R. David Murray added the comment: Ah, I was looking at the http docs. I wonder if we just missed the urllib docs when we made the changes. Either that, or I'm misremembering things. -- ___ Python tracker __

[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?

2014-09-10 Thread Evens Fortuné
Evens Fortuné added the comment: To be honest, it may be inspired by what's written a few lines lower, for ftp, files dans data urls even though the return object is not the same as the http(s) urls http://hg.python.org/cpython/file/c499cc2c4a06/Doc/library/urllib.request.rst#l75 --

[issue22326] tempfile.TemporaryFile fails on NFS v4 filesystems

2014-09-10 Thread STINNER Victor
STINNER Victor added the comment: > It becomes then still a Python problem, as tempfile.TemporaryFile is not > generally usable any more. Well, it looks like you are the first one to complain, whereas the module is at least 10 years old. So it looks more like an issue in your setup (as you wr

[issue22338] test_json crash on memory allocation failure

2014-09-10 Thread STINNER Victor
STINNER Victor added the comment: > Modules/_json.c:1558: item = NULL; > You can move it outside of the loop. I prefer to set item to NULL just after PyList_SET_ITEM() to make it explicit that the list now owns the reference. > But may be it will be better to make this "item" variable local.

[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-09-10 Thread Matej Cepl
Matej Cepl added the comment: BTW, should I add anything for https://docs.python.org/3.5/whatsnew/3.5.html ? -- ___ Python tracker ___ ___

[issue22338] test_json crash on memory allocation failure

2014-09-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3ac9f9576ce6 by Victor Stinner in branch '3.4': Issue #22338: Fix a crash in the json module on memory allocation failure. http://hg.python.org/cpython/rev/3ac9f9576ce6 New changeset 135fc23e475c by Victor Stinner in branch 'default': (Merge 3.4) Is

[issue21951] tcl test change crashes AIX

2014-09-10 Thread STINNER Victor
STINNER Victor added the comment: "I'm not sure that tkinter_ckallock.patch is correct." Oh, when I read my message, I realized that I was not explicit enough. It looks like attemptckalloc() can be called with 0 at some places with tkinter_ckallock.patch. But I didn't check carefully, the pat

[issue22369] "context management protocol" vs "context manager protocol"

2014-09-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you David. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue21951] tcl test change crashes AIX

2014-09-10 Thread STINNER Victor
STINNER Victor added the comment: I'm not sure that tkinter_ckallock.patch is correct. Extract of attemptckalloc() manual page: "If the allocation fails, these functions will return NULL. Note that on some platforms, but not all, attempting to allocate a zero-sized block of memory will also ca

[issue21147] sqlite3 doesn't complain if the request contains a null character

2014-09-10 Thread STINNER Victor
STINNER Victor added the comment: sqlite_null_2.patch looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue22383] Crazy unicode : How g and ɡ look the same but are two different characters

2014-09-10 Thread STINNER Victor
STINNER Victor added the comment: Just avoid using such symbols in your application. -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue22380] Y2K compliance section in FAQ is 14 years too old

2014-09-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 071a2620917f by Benjamin Peterson in branch '3.4': y2k compliance, lol (closes #22380) http://hg.python.org/cpython/rev/071a2620917f New changeset 02c94b9451f8 by Benjamin Peterson in branch '2.7': y2k compliance, lol (closes #22380) http://hg.pytho

[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-09-10 Thread Matej Cepl
Matej Cepl added the comment: New version of the HTTPBasicPriorAuthHandler patch -- Added file: http://bugs.python.org/file36595/0001-Alternative-handler-adding-Authorization-header-even.patch ___ Python tracker _

[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?

2014-09-10 Thread R. David Murray
R. David Murray added the comment: Indeed, geturl is deprecated. I'm not sure where you see it documented, I don't see it. -- ___ Python tracker ___ ___

[issue22369] "context management protocol" vs "context manager protocol"

2014-09-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset cc5b183a2ad4 by Serhiy Storchaka in branch '3.4': Issue #22369: Change "context manager protocol" to "context management protocol". http://hg.python.org/cpython/rev/cc5b183a2ad4 New changeset ad568d52af4b by Serhiy Storchaka in branch 'default': Is

[issue21739] Add hint about expression in list comprehensions (https://docs.python.org/2/tutorial/datastructures.html#list-comprehensions)

2014-09-10 Thread R. David Murray
R. David Murray added the comment: Thanks! While this patch does sort-of go into a detail, it seems to me like it does it in a tutorial-appropriate fashion. I'm +1 on applying this. -- stage: needs patch -> commit review ___ Python tracker

[issue22380] Y2K compliance section in FAQ is 14 years too old

2014-09-10 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue22369] "context management protocol" vs "context manager protocol"

2014-09-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: docs@python -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue22380] Y2K compliance section in FAQ is 14 years too old

2014-09-10 Thread Georg Brandl
Georg Brandl added the comment: +1 -- nosy: +georg.brandl versions: -Python 3.1, Python 3.2, Python 3.3 ___ Python tracker ___ ___ Py

[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe

2014-09-10 Thread Aivar Annamaa
Changes by Aivar Annamaa : -- components: +Tkinter type: -> crash versions: +Python 3.4 ___ Python tracker ___ ___ Python-bugs-list m

[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe

2014-09-10 Thread Aivar Annamaa
New submission from Aivar Annamaa: Seems that the statement 'sys.stderr.write("Exception in Tkinter callback\n")' in Tk.report_callback_exception fails when the program is run with pythonw.exe, and brings down the whole process. A simple sample is attached. -- files: demo.py messages:

[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?

2014-09-10 Thread Evens Fortuné
Evens Fortuné added the comment: Well, there wasn't any indication before that the returned object was implementing the "addinfourl" interface. So I don't think we have lost anything. In what situation this interface is useful ? The following comment (that you had highlighted in your comment)

[issue21739] Add hint about expression in list comprehensions (https://docs.python.org/2/tutorial/datastructures.html#list-comprehensions)

2014-09-10 Thread Rose Ames
Rose Ames added the comment: Fwiw, I've seen a beginner be confused by this. Patch attached. -- keywords: +patch nosy: +superluser Added file: http://bugs.python.org/file36593/reword.patch ___ Python tracker _

[issue22383] Crazy unicode : How g and ɡ look the same but are two different characters

2014-09-10 Thread Ezio Melotti
Ezio Melotti added the comment: The same happens with 'l' and 'I' on some fonts. Forbid those chars or treat them as synonyms is not an option. -- resolution: -> not a bug stage: -> resolved status: open -> closed versions: -Python 3.1, Python 3.2, Python 3.3, Python 3.4

[issue22383] Crazy unicode : How g and ɡ look the same but are two different characters

2014-09-10 Thread Christian Kleineidam
New submission from Christian Kleineidam: g = 2 i = 2 ɡ = 1 a = g + i a >>> 4 Given the font on which this bug tracker runs it's possible to see why a is 4 and not 3. On the other hand there are plenty of fonts (such as Arial, Tahoma or Courier New) that display chr(103) and chr(609) the same

[issue22240] argparse support for "python -m module" in help

2014-09-10 Thread Miki Tebeka
Miki Tebeka added the comment: I don't like changing code just to accommodate testing. Will try to think of a way to solve this. -- ___ Python tracker ___ __

[issue22240] argparse support for "python -m module" in help

2014-09-10 Thread paul j3
paul j3 added the comment: One way to reduce the testing burden, and to be extra safe regarding backward compatibility is to make this action optional, rather than the default. For example, make `_prog_name` importable (i.e. change the name), and then expect the user to use it explicitly with:

[issue22382] sqlite3 connection built from apsw connection should raise IntegrityError, not DatabaseError

2014-09-10 Thread Ned Deily
Ned Deily added the comment: If you are reporting an issue with how apsw behaves, be aware that it is a third-party project, not in the Python standard library. As such, you should report the issue to its bug tracker (https://github.com/rogerbinns/apsw/issues) as listed in its PyPI entry: ht

[issue22382] sqlite3 connection built from apsw connection should raise IntegrityError, not DatabaseError

2014-09-10 Thread william tonkin
New submission from william tonkin: python Python 2.7.6 (default, Dec 23 2013, 13:16:30) [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> - test script - import apsw import sqlite3 print 'sqlite3.version:', sql

[issue9951] introduce bytes.hex method

2014-09-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: To answer Serhiy, the goal is to have a bytes method that represents bytes as bytes rather than as a mixture of bytes and encoded ascii characters. This would aid people who work with bytes that are not encoded ascii and that do not embed encoded ascii. It sho

[issue22381] update zlib in 2.7 to 1.2.8

2014-09-10 Thread Ned Deily
Ned Deily added the comment: OS X builds are posix builds so, by default, they dynamically link with the system-supplied zlib. The particular version varies by release: the most recent (10.9) supplies zlib 1.2.5. So updating the zlib in Modules should have no effect on OS X. Does that answe

[issue19232] Speed up _decimal import

2014-09-10 Thread Stefan Krah
Stefan Krah added the comment: We could speed up the import further by not importing collections in _decimal. That could be done once structseq fully implements the namedtuple protocol (for DecimalTuple). -- ___ Python tracker

[issue19232] Speed up _decimal import

2014-09-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8bf51cf94405 by Stefan Krah in branch 'default': Issue #19232: Speed up decimal import. Additionally, since _decimal is http://hg.python.org/cpython/rev/8bf51cf94405 -- nosy: +python-dev ___ Python track

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2014-09-10 Thread Dan O'Reilly
Dan O'Reilly added the comment: Is it possible to have this issue re-opened, so that the new patch is more likely to get attention? Or should I create a new issue for the multiprocessing patch? -- ___ Python tracker

[issue22087] _UnixDefaultEventLoopPolicy should either create a new loop or explicilty fail when get_event_loop() is called from a multiprocessing child process

2014-09-10 Thread Dan O'Reilly
Dan O'Reilly added the comment: Are any other changes needed here? I'm still not completely clear on what Victor meant with his last comment. -- ___ Python tracker ___ _

[issue22381] update zlib in 2.7 to 1.2.8

2014-09-10 Thread Steve Dower
Changes by Steve Dower : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue22240] argparse support for "python -m module" in help

2014-09-10 Thread Miki Tebeka
Miki Tebeka added the comment: Thanks Paul, will work on that. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue16104] Compileall script: add option to use multiple cores

2014-09-10 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue7744] Allow site.addsitedir insert to beginning of sys.path

2014-09-10 Thread Michael R. Bernstein
Michael R. Bernstein added the comment: And in case it isn't clear how such a method would help, here is what the earlier code would look like: import os import site dirname = 'lib' dirpath = os.path.join(os.path.dirname(__file__), dirname) site.insertsitedir(1, dirpat

[issue22379] Empty exception message of str.join

2014-09-10 Thread R. David Murray
R. David Murray added the comment: Thanks for the report and patch. The test doesn't fail before your patch. I think checkraises should be changed to make sure the message isn't empty. And yes, the tests should be added to 3.5. -- components: +Interpreter Core -ctypes nosy: +r.david.

[issue17442] code.InteractiveInterpreter doesn't display the exception cause

2014-09-10 Thread Claudiu Popa
Claudiu Popa added the comment: Here's the new version which fixes the comments from the review. -- Added file: http://bugs.python.org/file36592/issue17442_2.patch ___ Python tracker ___

[issue19746] No introspective way to detect ModuleImportFailure in unittest

2014-09-10 Thread R. David Murray
R. David Murray added the comment: Yeah, I figured out it was loader only errors after I read the code :) "load_tests not called" is very different from "load_tests produced an exception", so the text of the error message should be changed accordingly. I understood your use case more-or-less,

[issue17442] code.InteractiveInterpreter doesn't display the exception cause

2014-09-10 Thread Claudiu Popa
Claudiu Popa added the comment: Actually, no, it seems that I didn't receive any mail regarding them. I'll update the patch accordingly. -- ___ Python tracker ___ __

[issue9951] introduce bytes.hex method

2014-09-10 Thread STINNER Victor
STINNER Victor added the comment: New features cannot be added to Python 2 anymore, only to the current development version which is now Python 3.5. If new methods are added to bytes, they should be added to bytearray too. Maybe we should also consider add them to memoryview? memoryview has al

[issue17442] code.InteractiveInterpreter doesn't display the exception cause

2014-09-10 Thread Berker Peksag
Berker Peksag added the comment: Claudiu, did you see Jim Jewett's review on Rietveld? -- nosy: +berker.peksag ___ Python tracker ___

[issue22376] urllib2.urlopen().read().splitlines() opening a directory in a FTP server randomly returns incorrect result

2014-09-10 Thread Alan Evangelista
Alan Evangelista added the comment: duplicate of #22375. I closed that one because I wanted to edit the original bug description and I could not, preferred to create a new bug. R. David Murray's comment in #22375: "I think this was already fixed in issue 15002" -- ___

[issue22381] update zlib in 2.7 to 1.2.8

2014-09-10 Thread Matthias Klose
New submission from Matthias Klose: I'd like to update zlib in 2.7 to 1.2.8. zlib isn't used at all for posix builds, because it requires a system installed zlib. However I don't know what is is used for Windows and MacOSX. Please could somebody check? My rationale for the update is that the

[issue22373] PyArray_FromAny tries to deallocate double: 12 (d)

2014-09-10 Thread Riccardo
Riccardo added the comment: Great, i solved trying to avoid calls to python code in parallel regions. Thanks for pointing me in right direction, i wasn’t thinking at all to the GIL, i was convinced i had tryed everything and that it was a bug.. Regards On 10 Sep 2014, at 05:50, Stefan Behnel

[issue9951] introduce bytes.hex method

2014-09-10 Thread Chris Lasher
Changes by Chris Lasher : -- nosy: +gotgenes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue16830] Add skip_host and skip_accept_encoding to httplib/http.client

2014-09-10 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue22374] Replace contextmanager example and improve explanation

2014-09-10 Thread Martin Panter
Martin Panter added the comment: You should probably use try / finally in your context manager to always restore the attribute. Having said that, I recently wrote a similar context manager, and then later discovered there is already “unittest.mock.patch” and/or “unittest.mock.patch.object” via

[issue15955] gzip, bz2, lzma: add option to limit output size

2014-09-10 Thread Martin Panter
Martin Panter added the comment: If people are worried about the best low-level decompressor API, maybe leave that as a future enhancement, and just rely on using the existing file reader APIs. I would expect them to have a sensible decompressed buffer size limit, however “bzip2” and LZMA look

[issue20752] Difflib should provide the option of overriding the SequenceMatcher

2014-09-10 Thread Claudiu Popa
Changes by Claudiu Popa : -- nosy: -Claudiu.Popa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.