[issue20699] Document that binary IO classes work with bytes-likes objects

2016-05-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset bd41151a7429 by Martin Panter in branch '3.5': Issue #20699: Document that “io” methods accept bytes-like objects https://hg.python.org/cpython/rev/bd41151a7429 New changeset c1b40a29dc7a by Martin Panter in branch 'default': Issue #20699: Merge io

[issue26083] ValueError: insecure string pickle in subprocess.Popen on Python 2

2016-05-27 Thread Alok Singhal
Alok Singhal added the comment: I think there is a small problem with the fix in changeset 268d13c7e939 (msg258029). It copies the string from the return value of _eintr_retry_call() twice. I am attaching a trivial fix. -- keywords: +patch nosy: +AlokSinghal Added file:

[issue27137] functools.partial: Inconsistency between Python and C implementations

2016-05-27 Thread Emanuel Barry
Emanuel Barry added the comment: Attached patch turns the Python implementation of functools.partial into a class. The implementation is as close to the C version as possible, except __repr__ where I went for a different, more Pythonic approach (output is identical). I haven't yet added

[issue26149] Suggest PyCharm Community as an editor for Unix platforms

2016-05-27 Thread Ketan Bhatt
Ketan Bhatt added the comment: I would want to work on this, for 2 days. This is going to be my first contribution to python, please bear with me if i make some silly mistake. Looking forward to your support. Thank you -- nosy: +Ketan Bhatt ___

[issue27142] Default int value with xmlrpclib / xmlrpc.client

2016-05-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: XML-RPC Specification: http://xmlrpc.scripting.com/spec.html . -- nosy: +loewis, serhiy.storchaka ___ Python tracker

[issue27137] functools.partial: Inconsistency between Python and C implementations

2016-05-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 I prefer to keep the current clean, easy-to-understand, easy-to-get-right code which complies with the documented API. I see no real benefit in twisting the code around to match non-guaranteed implementation details. --

[issue27141] Fix collections.UserList shallow copy

2016-05-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please add a test case. -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___

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

2016-05-27 Thread Martin Panter
Martin Panter added the comment: Strictly speaking, Python 2.7 never had special support for RTLD_MEMBER or find_library(). That is why I am unsure about many of these changes being done in 2.7. They seem more like new features than bug fixes. Especially once you start talking about a smart

[issue27043] Describe what ‘inspect.cleandoc’ does to synopsis line.

2016-05-27 Thread Ben Finney
Ben Finney added the comment: On 27-May-2016, Nathan Harold wrote: > > Split version (cleandoc2.patch): > >Clean up indentation from docstrings that are indented to line up >with blocks of code. > >All leading whitespace is removed from the first line. Any >leading

[issue27143] python 3.5 conflict with Mailman, ebtables and firewalld

2016-05-27 Thread Rubén Rivero Capriles
Rubén Rivero Capriles added the comment: # whereis python python: /usr/bin/python /usr/bin/python2.7 /usr/bin/python2.7-config /usr/lib/python2.7 /usr/lib64/python2.7 /etc/python /usr/local/bin/python3.5-config /usr/local/bin/python3.5m-config /usr/local/bin/python3.5m

[issue26553] Write HTTP in uppercase

2016-05-27 Thread Martin Panter
Martin Panter added the comment: Thankyou Nathan, and also Anish & Aatish. For the record, it is normally enough to do a patch against the latest (3.6), and any minor conflicts can be sorted out when applying it to 3.5. In this case the 3.5 and 3.6 patches were basically the same. But the

[issue26553] Write HTTP in uppercase

2016-05-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4275181c4229 by Martin Panter in branch '3.5': Issue #26553: Capitalization of HTTP, HTTPS, FTP, and URL https://hg.python.org/cpython/rev/4275181c4229 New changeset 8c92ebcca83f by Martin Panter in branch 'default': Issue #26553: Merge

[issue27143] python 3.5 conflict with Mailman, ebtables and firewalld

2016-05-27 Thread Rubén Rivero Capriles
New submission from Rubén Rivero Capriles: My current python version is 3.5 which I installed yesterday. How can I get rid of 2,7. Python 3.5 should be the one running. While: Installing mailman. An internal error occurred due to a bug in either zc.buildout or in a recipe being used: Traceback

[issue20699] Document that binary IO classes work with bytes-likes objects

2016-05-27 Thread Martin Panter
Martin Panter added the comment: Porting this to Python 2 uncovered a few flaws that I am unsure how to best handle. In this patch I have added workarounds, but perhaps we can find better fixes. 1. The io.BytesIO.write() C implementation does not accept array.array() objects. I suspect it

[issue5784] raw deflate format and zlib module

2016-05-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4c88d6d18e85 by Martin Panter in branch '3.5': Issue #5784: Expand documentation and tests for zlib wbits parameter https://hg.python.org/cpython/rev/4c88d6d18e85 New changeset 4d4f27fc70d5 by Martin Panter in branch 'default': Issue #5784: Merge

[issue27135] nested list produced with multiplication is linked to the same list

2016-05-27 Thread Emanuel Barry
Emanuel Barry added the comment: The reason why Python behaves like that in this case is a side-effect of the way the data model is implemented. Lists are a mutable data type, which means that referencing the same list - which is what you are doing - as opposed to creating a new one each

[issue26372] Popen.communicate not ignoring BrokenPipeError

2016-05-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue18373] let code force str(bytes) to raise an exception

2016-05-27 Thread Daniel Holth
Daniel Holth added the comment: My reasoning was that str(bytes) would normally be called so rarely that who cares. On Fri, May 27, 2016, at 09:02 AM, STINNER Victor wrote: > > STINNER Victor added the comment: > > strbytes.patch of #27134: adding calls to >

[issue5784] raw deflate format and zlib module

2016-05-27 Thread Martin Panter
Martin Panter added the comment: Apparently zlib only supports windowBits (wbits) = 0 since v1.2.3.5. I added a version check in the Python 3 tests, which seems to have solved the buildbot problems (OpenIndiana and OS X buildbots). In Python 2 I removed the test, because Python 2 has no

[issue18373] let code force str(bytes) to raise an exception

2016-05-27 Thread Daniel Holth
Daniel Holth added the comment: Better to continue discussion here. Attached is my second, simpler version of the feature. A context manager is included: with string.StrBytesRaises(): str(b'bytes') # raises an exception In a normal program, you might just set the flag to True, but in a

[issue5784] raw deflate format and zlib module

2016-05-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0df93ab07a8f by Martin Panter in branch '2.7': Issue #5784: Cannot test wbits=0 unless we know we have zlib v1.2.3.5 https://hg.python.org/cpython/rev/0df93ab07a8f -- ___ Python tracker

[issue5784] raw deflate format and zlib module

2016-05-27 Thread STINNER Victor
STINNER Victor added the comment: > In Python 2 I removed the test, because Python 2 has no > zlib.ZLIB_RUNTIME_VERSION to check. It makes sense. You didn't touch the C code of the module, only doc. -- ___ Python tracker

[issue18373] let code force str(bytes) to raise an exception

2016-05-27 Thread STINNER Victor
STINNER Victor added the comment: strbytes.patch of #27134: adding calls to PyThreadState_GetDict()+PyDict_GetItemString() seems inefficient for a rare use case I would prefer to modify the existing Py_BytesWarningFlag flag. The flag is process-wide. If it's an issue, we can use a

[issue27136] sock_connect fails for bluetooth (and probably others)

2016-05-27 Thread pyptr2
Changes by pyptr2 : -- components: +Library (Lib) versions: +Python 3.5 ___ Python tracker ___

[issue5784] raw deflate format and zlib module

2016-05-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset ca49614989dd by Martin Panter in branch '3.5': Issue #5784: wbits=0 apparently added in zlib v1.2.3.5 https://hg.python.org/cpython/rev/ca49614989dd New changeset 1771f0ac9fc2 by Martin Panter in branch 'default': Issue #5784: Merge zlib from 3.5

[issue27129] Wordcode, part 2

2016-05-27 Thread STINNER Victor
STINNER Victor added the comment: > if the co_code object is remaining a bytes object then it seems intuitive to > keep f_lasti as a bytes offset Right. > In reality most of the results on github all seem to be copying a few > distinct uses. So maybe backwards compatibiltiy isn't so

[issue27136] sock_connect fails for bluetooth (and probably others)

2016-05-27 Thread pyptr2
Changes by pyptr2 : Added file: http://bugs.python.org/file43028/test_async_btsock.py ___ Python tracker ___

[issue27136] sock_connect fails for bluetooth (and probably others)

2016-05-27 Thread pyptr2
pyptr2 added the comment: s/prevents/causes/ -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue5784] raw deflate format and zlib module

2016-05-27 Thread STINNER Victor
STINNER Victor added the comment: Failure on Python 2.7: http://buildbot.python.org/all/builders/x86%20OpenIndiana%202.7/builds/3348/steps/test/logs/stdio == ERROR: test_wbits (test.test_zlib.CompressObjectTestCase)

[issue27129] Wordcode, part 2

2016-05-27 Thread Demur Rumed
Demur Rumed added the comment: https://github.com/search?q=f_lasti=Code Popular use of f_lasti is checking it for -1, checking the instruction at the byte offset of f_lasti, checking the argument with code[f_lasti+1] (Some bad code checking f_lasti+3 which'll break with 3.6) abarnert

[issue27136] sock_connect fails for bluetooth (and probably others)

2016-05-27 Thread pyptr2
New submission from pyptr2: Base{Selector,Proactor}EventLoop each have a sock_connect() method, both of which unconditionally "try" to run base_events' _check_resolved_address() which is apparently meant to raise an exception when called with an unresolved IP hostname. (because on some OSes

[issue27134] allow str(bytes) raises an exception to be controlled programmatically

2016-05-27 Thread Daniel Holth
Daniel Holth added the comment: Continuing discussion in the older bug -- resolution: -> duplicate status: open -> closed ___ Python tracker ___

[issue18373] implement sys.get/setbyteswarningflag()

2016-05-27 Thread Daniel Holth
Changes by Daniel Holth : Removed file: http://bugs.python.org/file30787/byteswarningflag.patch ___ Python tracker ___

[issue27043] Describe what ‘inspect.cleandoc’ does to synopsis line.

2016-05-27 Thread Nathan Harold
Nathan Harold added the comment: Split version (cleandoc2.patch): Clean up indentation from docstrings that are indented to line up with blocks of code. All leading whitespace is removed from the first line. Any leading whitespace that can be uniformly removed from the second

[issue18373] let code force str(bytes) to raise an exception

2016-05-27 Thread Daniel Holth
Daniel Holth added the comment: Then you prefer the older three year old patch that adds to pystate.h ? http://bugs.python.org/review/18373/#ps8545 I remember not being happy with how complicated it turned out, and perhaps having problems with not wanting the "warn once" behavior? It seems more

[issue27137] functools.partial: Inconsistency between Python and C implementations

2016-05-27 Thread Emanuel Barry
New submission from Emanuel Barry: functools.partial is a class in C, but the Python implementation is a function. This doesn't matter for most use cases where you only want the end result of the call to partial. A simple line in the REPL tells me enough (or so I thought) that I wouldn't

[issue27137] functools.partial: Inconsistency between Python and C implementations

2016-05-27 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue27137] functools.partial: Inconsistency between Python and C implementations

2016-05-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> rhettinger ___ Python tracker ___

[issue27137] functools.partial: Inconsistency between Python and C implementations

2016-05-27 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list

[issue5784] raw deflate format and zlib module

2016-05-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I would write the test as: v = tuple(map(int, zlib.ZLIB_RUNTIME_VERSION.split("."))) supports_wbits_0 = v >= (1, 2, 3, 5) -- nosy: +serhiy.storchaka ___ Python tracker

[issue27139] Increased test coverage for statistics.median_grouped

2016-05-27 Thread Julio C Cardoza
Changes by Julio C Cardoza <21ago7...@gmail.com>: -- components: Tests files: test_median_grouped.patch keywords: patch nosy: juliojr77 priority: normal severity: normal status: open title: Increased test coverage for statistics.median_grouped versions: Python 3.6 Added file:

[issue27136] sock_connect fails for bluetooth (and probably others)

2016-05-27 Thread Guido van Rossum
Guido van Rossum added the comment: I cannot run your test program. Can you explain what it does and what you expected? Also, watch your language. -- ___ Python tracker

[issue27138] FileFinder.find_spec() docstring needs to be corrected.

2016-05-27 Thread Eric Snow
New submission from Eric Snow: Looks like we weren't careful when we added find_spec(). :) This issue is just to track the change. I'll push the fix shortly. -- assignee: eric.snow messages: 266506 nosy: brett.cannon, eric.snow priority: normal severity: normal stage: needs patch

[issue27138] FileFinder.find_spec() docstring needs to be corrected.

2016-05-27 Thread Eric Snow
Changes by Eric Snow : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue27138] FileFinder.find_spec() docstring needs to be corrected.

2016-05-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset ac9c1aeecfb4 by Eric Snow in branch '3.5': Issue #27138: Fix the doc comment for FileFinder.find_spec(). https://hg.python.org/cpython/rev/ac9c1aeecfb4 -- nosy: +python-dev ___ Python tracker

[issue27138] FileFinder.find_spec() docstring needs to be corrected.

2016-05-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4348fb8cae27 by Eric Snow in branch 'default': Issue #27138: Fix the doc comment for FileFinder.find_spec(). https://hg.python.org/cpython/rev/4348fb8cae27 -- ___ Python tracker

[issue5784] raw deflate format and zlib module

2016-05-27 Thread STINNER Victor
STINNER Victor added the comment: I agree Serhiy :-) i hesitated to propose exactly the same change. -- ___ Python tracker ___

[issue27140] Opcode for creating dict with constant keys

2016-05-27 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue27095] Simplify MAKE_FUNCTION

2016-05-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In general the patch LGTM, besides few minor comments. But new implementation uses longer bytecode for annotations. Current code packs argument names in one constant tuple: $ ./python -m dis def f(x: int, y: str, z: float): pass 1 0 LOAD_NAME

[issue27136] sock_connect fails for bluetooth (and probably others)

2016-05-27 Thread pyptr2
pyptr2 added the comment: The test program should try to connect to a bluetooth device, using asyncio. The bluetooth address is obviously made up, so it would likely fail to do so, but it should not raise an exception before even trying: $ python3.5 test_async_btsock.py Traceback (most recent

[issue27135] nested list produced with multiplication is linked to the same list

2016-05-27 Thread Matthew Tanous
Matthew Tanous added the comment: It makes sense, except for this case is not true when "x" is an immutable data type - it appears as though something like [5] * n creates a list of totally separate elements (even if they start as the same thing). It is difficult to see a case where I would

[issue27140] Opcode for creating dict with constant keys

2016-05-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: BUILD_MAP, BUILD_MAP_UNPACK and BUILD_MAP_UNPACK_WITH_CALL need pushing key-value pairs on the stack. If keys and values are not constant, this is correct order of evaluating them. But if keys are constant (very common case), the order of pushing them

[issue27135] nested list produced with multiplication is linked to the same list

2016-05-27 Thread Emanuel Barry
Emanuel Barry added the comment: You do raise a valid point, sequence repetition (*) on lists of mutable objects serves very little purpose. However, as I stated, it is a side-effect of the data model and changing it would be yet another special case, which aren't special enough to break the

[issue27141] Fix collections.UserList shallow copy

2016-05-27 Thread Bar Harel
New submission from Bar Harel: I have encountered a weird behavior in collections.UserList. Using copy.copy() on an instance results in a new instance of UserList but with the same underlying list. Seems like self.copy() works great but __copy__ was not overridden to allow copy.copy to work

[issue27126] Apple-supplied libsqlite3 on OS X is not fork safe; can cause crashes

2016-05-27 Thread Evan Jones
Evan Jones added the comment: I have a crazy idea, but I'm not 100% sure how to implement it: If Python was able to detect and report this error in a friendly way, it would allow people to easily understand what is happening and to work around it. How can we do it? First idea: In the

[issue27136] sock_connect fails for bluetooth (and probably others)

2016-05-27 Thread Yury Selivanov
Yury Selivanov added the comment: > Maybe the form requirements for Bluetooth addresses are different than for IP > or ipv6? I guess the validation should be protocol-specific. Right, I've just looked at the code [1]. We should return from _ipaddr_info if family is not an AF_UNSPEC, AF_INET

[issue27142] Default int value with xmlrpclib / xmlrpc.client

2016-05-27 Thread Julien
New submission from Julien: I tried to execute the following code, but `xmlrpclib` is raising an exception: >>> import xmlrpclib >>> data = """ ... ... test_method ... ... ... ... ... ...

[issue27136] sock_connect fails for bluetooth (and probably others)

2016-05-27 Thread Guido van Rossum
Guido van Rossum added the comment: Maybe the form requirements for Bluetooth addresses are different than for IP or ipv6? I guess the validation should be protocol-specific. -- ___ Python tracker

[issue27136] sock_connect fails for bluetooth (and probably others)

2016-05-27 Thread Yury Selivanov
Yury Selivanov added the comment: >> Maybe the form requirements for Bluetooth addresses are different than for >> IP or ipv6? I guess the validation should be protocol-specific. > > Right, I've just looked at the code [1]. We should return from _ipaddr_info > if family is not an AF_UNSPEC,

[issue25926] problems with "times" keyword in itertools.repeat

2016-05-27 Thread Nofar Schnider
Changes by Nofar Schnider : Removed file: http://bugs.python.org/file43025/itertools.rst ___ Python tracker ___

[issue25926] problems with "times" keyword in itertools.repeat

2016-05-27 Thread Nofar Schnider
Nofar Schnider added the comment: Issue #25926 Changed all "equivalent to" occurrences to "roughly equivalent to" -- hgrepos: +344 nosy: +Nofar Schnider Added file: http://bugs.python.org/file43025/itertools.rst ___ Python tracker

[issue27120] xmllib unable to parse in UTF8 format

2016-05-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue222587. Seems this was the reason why the xmllib module was deprecated. Use the xml package for parsing XML (xml.etree.ElementTree, xml.dom.minidom, xml.sax, etc). -- resolution: -> wont fix ___

[issue27120] xmllib unable to parse in UTF8 format

2016-05-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: test needed -> resolved status: open -> closed ___ Python tracker ___

[issue25926] problems with "times" keyword in itertools.repeat

2016-05-27 Thread Nofar Schnider
Nofar Schnider added the comment: Attached a diff All occurrences of "equivalent to" are switched to "roughly equivalent to" -- hgrepos: +345 keywords: +patch Added file: http://bugs.python.org/file43026/issue25926.diff ___ Python tracker

[issue27126] Apple-supplied libsqlite3 on OS X is not fork safe; can cause crashes

2016-05-27 Thread Ronald Oussoren
Ronald Oussoren added the comment: There is a clear gap between two use cases for Python on OSX: 1) Integrate nicely with Apple stuff 2) Be useful as a development platform for software that will be deployed on Linux machines. Both use cases are valid, but have slightly different trade-offs.

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2016-05-27 Thread Marco Buttu
Marco Buttu added the comment: The error message is misleading: >>> s = '{names[-1]} loves {0[1]}' >>> s.format(('C', 'Python'), names=('Dennis', 'Guido')) Traceback (most recent call last): ... TypeError: tuple indices must be integers or slices, not str -- nosy: +marco.buttu

[issue27135] nested list produced with multiplication is linked to the same list

2016-05-27 Thread Matthew Tanous
Matthew Tanous added the comment: I'm aware that it's how Python works at present. My point was that this is awkward and counter-intuitive, with no purpose I can see worth serving. "That's just how it works" seems to me a rather insufficient answer, especially for such a seemingly trivial

[issue5784] raw deflate format and zlib module

2016-05-27 Thread Martin Panter
Changes by Martin Panter : -- stage: patch review -> commit review versions: -Python 3.4 ___ Python tracker ___

[issue27136] sock_connect fails for bluetooth (and probably others)

2016-05-27 Thread Yury Selivanov
Yury Selivanov added the comment: pyptr2, can you reproduce this with latest asyncio (from github.com/python/asyncio)? -- ___ Python tracker ___

[issue5784] raw deflate format and zlib module

2016-05-27 Thread Martin Panter
Martin Panter added the comment: > v = tuple(map(int, zlib.ZLIB_RUNTIME_VERSION.split("."))) > supports_wbits_0 = v >= (1, 2, 3, 5) That was basically my first thought. But I didn’t want to presume that every element of the version is an integer. For instance, the current string in the