[issue22878] PEP 477 (ensurepip backport to 2.7.9): make install and make altinstall integration
Changes by Ned Deily n...@acm.org: -- assignee: ned.deily components: Build nosy: ned.deily priority: normal severity: normal status: open title: PEP 477 (ensurepip backport to 2.7.9): make install and make altinstall integration versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22878 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22193] Add _PySys_GetSizeOf()
Roundup Robot added the comment: New changeset 3537994fa43b by Serhiy Storchaka in branch '2.7': Issue #22193: Fixed integer overflow error in sys.getsizeof(). https://hg.python.org/cpython/rev/3537994fa43b New changeset df5c6b05238e by Serhiy Storchaka in branch '3.4': Issue #22193: Fixed integer overflow error in sys.getsizeof(). https://hg.python.org/cpython/rev/df5c6b05238e New changeset b7651f9be4a1 by Serhiy Storchaka in branch 'default': Issue #22193: Fixed integer overflow error in sys.getsizeof(). https://hg.python.org/cpython/rev/b7651f9be4a1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22193 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22823] Use set literals instead of creating a set from a list
Roundup Robot added the comment: New changeset f4e75efdc7f1 by Serhiy Storchaka in branch 'default': Issue #22823: Use set literals instead of creating a set from a tuple. https://hg.python.org/cpython/rev/f4e75efdc7f1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22823 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22823] Use set literals instead of creating a set from a list
Serhiy Storchaka added the comment: Can you also make a separate mock patch and assign it to Michael Foord for review? Here is a patch. It also replaces constructing sets from generators with set comprehensions. -- assignee: serhiy.storchaka - michael.foord nosy: +michael.foord stage: needs patch - patch review Added file: http://bugs.python.org/file37201/set_literal_mock.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22823 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22193] Add _PySys_GetSizeOf()
Serhiy Storchaka added the comment: Also fixed an error in _PySys_GetSizeOf declaration (thanks yomgui1). Thanks all for reviews and found bugs. -- stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22193 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18348] Additional code pages for EBCDIC
roskakori added the comment: I just released a package on PyPI that adds various EBCDIC codecs for Python 2.6+ and Python 3.1+, see https://pypi.python.org/pypi/ebcdic. I agree with Marc-Andre, maintaining this is easier as separate package. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18348 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18348] Additional code pages for EBCDIC
STINNER Victor added the comment: There are more and more codecs on PyPI. I would be nice to have a list somewhere. @roskakori: Could you please create a page at https://wiki.python.org/ ? Example: https://wiki.python.org/moin/Codecs -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18348 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22870] urlopen timeout failed with SSL socket
Dave Tian added the comment: Hi David, Thanks for your quick response. I have tried Python 3.4.2 using urllib.request.urlopen() - still not working. Below is the backtrace. I am not sure if this is a bug of PySSL_SSLread, which returns nothing yet without timeout. If you want me to dig into this deeper, just let me know. Thanks, Dave Tian dave.jing.t...@gmail.com obj=urllib.request.urlopen(url, timeout=20) ^CTraceback (most recent call last): File stdin, line 1, in module File /Users/daveti/Python-3.4.2/Lib/urllib/request.py, line 153, in urlopen return opener.open(url, data, timeout) File /Users/daveti/Python-3.4.2/Lib/urllib/request.py, line 461, in open response = meth(req, response) File /Users/daveti/Python-3.4.2/Lib/urllib/request.py, line 571, in http_response 'http', request, response, code, msg, hdrs) File /Users/daveti/Python-3.4.2/Lib/urllib/request.py, line 493, in error result = self._call_chain(*args) File /Users/daveti/Python-3.4.2/Lib/urllib/request.py, line 433, in _call_chain result = func(*args) File /Users/daveti/Python-3.4.2/Lib/urllib/request.py, line 676, in http_error_302 return self.parent.open(new, timeout=req.timeout) File /Users/daveti/Python-3.4.2/Lib/urllib/request.py, line 455, in open response = self._open(req, data) File /Users/daveti/Python-3.4.2/Lib/urllib/request.py, line 473, in _open '_open', req) File /Users/daveti/Python-3.4.2/Lib/urllib/request.py, line 433, in _call_chain result = func(*args) File /Users/daveti/Python-3.4.2/Lib/urllib/request.py, line 1217, in https_open context=self._context, check_hostname=self._check_hostname) File /Users/daveti/Python-3.4.2/Lib/urllib/request.py, line 1177, in do_open r = h.getresponse() File /Users/daveti/Python-3.4.2/Lib/http/client.py, line 1172, in getresponse response.begin() File /Users/daveti/Python-3.4.2/Lib/http/client.py, line 375, in begin self.headers = self.msg = parse_headers(self.fp) File /Users/daveti/Python-3.4.2/Lib/http/client.py, line 261, in parse_headers line = fp.readline(_MAXLINE + 1) File /Users/daveti/Python-3.4.2/Lib/socket.py, line 371, in readinto return self._sock.recv_into(b) File /Users/daveti/Python-3.4.2/Lib/ssl.py, line 746, in recv_into return self.read(nbytes, buffer) File /Users/daveti/Python-3.4.2/Lib/ssl.py, line 618, in read v = self._sslobj.read(len, buffer) KeyboardInterrupt On Nov 15, 2014, at 3:36 AM, R. David Murray rep...@bugs.python.org wrote: R. David Murray added the comment: It sounds like the bug is that PySSL_SSLread didn't raise the timeout? Any idea if this is still a problem in python3? (Could possibly have changed on trunk as well, as SSL is being updated in 2.7.9.) -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22870 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22870 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18813] Speed up slice object processing
Changes by Stefan Behnel sco...@users.sourceforge.net: Removed file: http://bugs.python.org/file31421/faster_PyEval_SliceIndex.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18813 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22869] Split pylifecycle.c out from pythonrun.c
Antoine Pitrou added the comment: +1 on the principle. reference count printing is duplicated (lifecycle prints it at shutdown, pythonrun at the interactive prompt) You could make it an API in object.c. * pythonrun references PyInspect_Flag directly without an extern declaration * This particular oddity wasn't introduced by this patch, but it turns out PyOptimize_Flag lives in compile.c, rather than with the other global flags in pythonrun.c. It's also declared as a public data API in pydebug.h Should be easy to fix as well :-) -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22869 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22870] urlopen timeout failed with SSL socket
R. David Murray added the comment: I won't be the one, as I'm not conversant with the ssl C code. What would be helpful right now would be a recipe for reproducing the problem. -- nosy: +alex, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22870 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22824] Update reprlib to use set literals
Roundup Robot added the comment: New changeset cf5b910ac4c8 by Raymond Hettinger in branch 'default': Issue #22824: Simplify reprlib output format for empty arrays https://hg.python.org/cpython/rev/cf5b910ac4c8 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22824 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22876] ip_interface can't be broadcast or number net
R. David Murray added the comment: Well, it can be the network, even though it isn't typically (and some devices don't support it...I'm pretty sure I remember doing it on a Cisco, though I wouldn't swear to it without testing :). Same is true for broadcast, though that would be *really* questionable and I doubt many devices support it. (At least, I couldn't find any RFC that says those two addresses are actually reserved in all contexts). I know of two situations in which it is specifically not true: the simplest (which could be special cased) is a two ip (point to point) subnet. The other is a routed subnet: a subnet where the subnet is routed to a router/firewall, and the router/firewall NATs those addresses to some internal addresses. Conceptually, every IP in the subnet can be an interface IP. -- nosy: +r.david.murray versions: +Python 3.4, Python 3.5 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18813] Speed up slice object processing
Serhiy Storchaka added the comment: Are there any benchmarks? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18813 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22864] Add filter to multiprocessing.Pool
Travis Thieman added the comment: Why is it insufficient to run a synchronous 'filter' over the list returned by 'Pool.map'? These functional constructs are inherently composable, and we should favor composing simple implementations of each rather than implementing special cases of them throughout the stdlib. I think there's a clear reason for 'map' to be parallelizable because the function you're applying over the iterable could be quite expensive. 'filter' would only benefit from this if the comparison you're running is expensive, which seems like an unlikely and ill-advised use case. You can also rewrite your expensive 'filter' as a 'map' if you really need to. -- nosy: +travis.thieman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22864 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21614] Case sensitivity problem in multiprocessing.
Ben Yelsey added the comment: Hi, could you please list more exact steps to reproduce, e.g. directory/file layout and import statements? -- nosy: +inlinestyle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21614 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22825] Modernize TextFile
Éric Araujo added the comment: I would not touch any internal parts of distutils, such as TextFile. It is not a public class meant for general usage. The code is not ideal but not broken. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22825 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18813] Speed up slice object processing
Stefan Behnel added the comment: As mentioned, the fannkuch benchmark benefits quite a bit from the fast path, by 8%. It was a while ago when I tested, though, so I don't have exact numbers ATM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18813 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22876] ip_interface can't be broadcast or number net
Вячеслав added the comment: These addresses are used by each interface in the network and they can not be the address of the interface, of course have the technology ip-unnumbered. But it's more a special case. but I was confused behavior: set(ip_network(u'192.168.1.0/29')) set([IPv4Address(u'192.168.1.5'), IPv4Address(u'192.168.1.6'), IPv4Address(u'192.168.1.7'), IPv4Address(u'192.168.1.2'), IPv4Address(u'192.168.1.3'), IPv4Address(u'192.168.1.4'), IPv4Address(u'192.168.1.0'), IPv4Address(u'192.168.1.1')]) for i in ip_network(u'192.168.1.0/29').hosts(): ... print i ... 192.168.1.1 192.168.1.2 192.168.1.3 192.168.1.4 192.168.1.5 192.168.1.6 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22536] subprocess should include filename in FileNotFoundError exception
Travis Thieman added the comment: The attached patch includes the first element in args in _execute_child to the OSError exception subclass. This correctly populates the 'filename' field on the resulting exception. A test is also included that fails without the patch. -- keywords: +patch nosy: +travis.thieman Added file: http://bugs.python.org/file37202/22536-subprocess-exception-filename.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22536 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22876] ip_interface can't be broadcast or number net
Вячеслав added the comment: Probably worth noting that network is unnumbered in ip_network and ip_interface functions. Based on this flag to decide whether there is a possibility to use the network address and broadcast address in the network What do you think about this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22823] Use set literals instead of creating a set from a list
Terry J. Reedy added the comment: mock patch LGTM -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22823 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22823] Use set literals instead of creating a set from a list
Raymond Hettinger added the comment: IMO, the _non_defaults set comprehension in mock.py ought to be replaced with a set of internable string constants. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22823 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17293] uuid.getnode() MAC address on AIX
koobs added the comment: I only attached the 2.7 build log because the failures from 3.4 and 3.x are identical, copying them here for completeness: From 3.4: == ERROR: test_arp_getnode (test.test_uuid.TestUUID) -- Traceback (most recent call last): File /usr/home/buildbot/python/3.4.koobs-freebsd10/build/Lib/test/test_uuid.py, line 324, in test_arp_getnode node = uuid._arp_getnode() File /usr/home/buildbot/python/3.4.koobs-freebsd10/build/Lib/uuid.py, line 364, in _arp_getnode ip_addr = socket.gethostbyname(socket.gethostname()) socket.gaierror: [Errno 8] hostname nor servname provided, or not known -- Ran 18 tests in 0.209s From 3.x: == ERROR: test_arp_getnode (test.test_uuid.TestUUID) -- Traceback (most recent call last): File /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_uuid.py, line 325, in test_arp_getnode node = uuid._arp_getnode() File /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/uuid.py, line 362, in _arp_getnode ip_addr = socket.gethostbyname(socket.gethostname()) socket.gaierror: [Errno 8] hostname nor servname provided, or not known -- -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17293 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22879] Make set's add and discard methods return useful information
New submission from Brecht Machiels: set's add() method would be a little bit more useful if it would return True if the added value was already present in the set, and False if it wasn't (or the other way around). Similarly, discard() could report whether the discarded value was present in the set or not. I suppose this could cost a couple of extra cycles and I'm not sure this is acceptable. For discard() there's always remove() that offers similar behavior. add() does not have an alternative that offers check-and-add behavior. -- components: Library (Lib) messages: 231226 nosy: brechtm priority: normal severity: normal status: open title: Make set's add and discard methods return useful information type: enhancement versions: Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22879 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22879] Make set's add and discard methods return useful information
R. David Murray added the comment: Hmm. The fact that it could be either way around makes it less attractive. That is, if it isn't intuitively obvious what the truth value would mean, it is probably a bad idea to have this behavior. -- nosy: +r.david.murray, rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22879 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22878] PEP 477 (ensurepip backport to 2.7.9): make install and make altinstall integration
New submission from Ned Deily: As part of PEP 477, the attached patch backports to Python 2.7.9 the configure and Makefile integration for ensurepip from Python 3 (PEP 453 / Issue19553). As described in PEP 477, for Python 2 ensurepip is not enabled by default by configure. If there are no comments, I'll plan to apply it for 2.7.9 in a few days. -- keywords: +patch nosy: +ncoghlan stage: - patch review Added file: http://bugs.python.org/file37203/pep477_make.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22878 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22879] Make set's add and discard methods return useful information
Raymond Hettinger added the comment: This has come up once before and it was rejected for several reasons including the one David mentioned. In Python, code reads more clearly with the usual: for elem in iterable: if elem not in seen: seen.add(elem) do_something(elem) Than with: for elem in iterable: if not seen.add(elem): do_something(elem) That latter is less self-evident about what it does. Also, I think there were lessons drawn from Guido's decision to not incorporate the C-language feature of both assigning and testing in a conditional: while((c = fgetc(fp)) != EOF) -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22879 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22823] Use set literals instead of creating a set from a list
Terry J. Reedy added the comment: OK, someone can copy and paste this. non_defaults = { '__get__', '__set__', '__delete__', '__reversed__', '__missing__', '__reduce__', '__reduce_ex'__, '__getinitargs__', '__getnewargs__', '__getstate__', '__setstate__', '__getformat__', '__setformat__', '__repr__', '__dir__', '__subclasses__', '__format__', ) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22823 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22880] hmac.new docs show optional args incorrectly
New submission from Roy Smith: At https://docs.python.org/2/library/hmac.html, hmac.new() is shown as hmac.new(key[, msg[, digestmod]]) This implies that digestmod can only be given if msg is given. This is incorrect. Either can be given without the other. -- assignee: docs@python components: Documentation messages: 231231 nosy: docs@python, roysmith priority: normal severity: normal status: open title: hmac.new docs show optional args incorrectly versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22880 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22536] subprocess should include filename in FileNotFoundError exception
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag stage: - patch review versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22536 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22869] Split pylifecycle.c out from pythonrun.c
Nick Coghlan added the comment: It turns out *all* the global config variations are in pydebug.h (and they're basically the only thing in there, aside from the environment variable access macro). That seems a little weird to me (perhaps historical due to the early global config variables being debugging related?), but for now I've just added a couple of comments cross referencing pydebug.h from pylifecycle.c and vice-versa. The latest version of the patch: - moves the reference count block allocation printing to object.[ch] as Antoine suggested (Macro = _PY_DEBUG_PRINT_TOTAL_REFS(); Symbol = _PyDebug_PrintTotalRefs()) - moves Py_OptimizeFlag to pylifecycle.c together with the other global configuration flags (and tweaks the order of definitions to exactly match the order of declarations in pydebug.h) Since the extern declaration is actually there in pydebug.h, the reference to Py_InspectFlag from pythonrun.c is actually fine for now (although removing that direct reference will likely end up being part of the PEP 432 implementation). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22869 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22869] Split pylifecycle.c out from pythonrun.c
Nick Coghlan added the comment: I think this is ready to go now, unless anyone spots any major flaws I missed. -- stage: patch review - commit review Added file: http://bugs.python.org/file37204/split_pythonrun_v3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22869 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22869] Split pylifecycle.c out from pythonrun.c
Nick Coghlan added the comment: Oops, global config variations above should have been global config variable declarations. I guess my brain decided that was too much typing and jammed the last two words together :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22869 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com