[issue22451] filtertuple, filterstring and filterunicode don't have optimization for PyBool_Type

2014-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: It is a bit late in the game for 2.7 micro-optimizations. FWIW, I don't think these weren't oversights. There isn't really much of a use case for the bool filter for strings and unicode inputs. And the case of tuple inputs isn't used much (lists are for

[issue22447] logging.config.fileConfig attempts to write to file even when none configured

2014-09-21 Thread Vinay Sajip
Vinay Sajip added the comment: I don't propose to make any changes to `fileConfig()`, for the following reasons: 1. It's not a bug, because there is no requirement to do what you suggest. You could (a) either not mention the handler in the config if you aren't going to use it, (b) use a

[issue19119] duplicate test name in Lib/test/test_heapq.py

2014-09-21 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: - patch review versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19119 ___

[issue22442] subprocess.check_call hangs on large PIPEd data.

2014-09-21 Thread Akira Li
Akira Li added the comment: What do you think? I would prefer to deprecate PIPE argument for subprocess.call(): issue DeprecationWarning in 3.5 and raise ValueError in 3.6+ I've uploaded a patch that issues the warning. -- keywords: +patch type: - enhancement versions: +Python 3.5

[issue11798] Test cases not garbage collected after run

2014-09-21 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11798 ___

[issue22451] filtertuple, filterstring and filterunicode don't have optimization for PyBool_Type

2014-09-21 Thread Joshua Landau
Joshua Landau added the comment: That sounds OK to me. It's a bit of a non-issue once you know about it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22451 ___

[issue22442] subprocess.check_call hangs on large PIPEd data.

2014-09-21 Thread juj
juj added the comment: Hmm, that path does it for stdout=PIPE in subprocess.call only? It could equally apply to stderr=PIPE in subprocess.call as well, and also to both stdout=PIPE and stderr=PIPE in subprocess.check_call? -- ___ Python tracker

[issue22417] PEP 476: verify HTTPS certificates by default

2014-09-21 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22417 ___

[issue22419] wsgiref request length

2014-09-21 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22419 ___

[issue22425] 2to3 import fixer writes dotted_as_names into import_as_names

2014-09-21 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22425 ___

[issue22407] re.LOCALE is nonsensical for Unicode

2014-09-21 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22407 ___

[issue22444] Floor divide should return int

2014-09-21 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22444 ___

[issue22450] urllib doesn't put Accept: */* in the headers

2014-09-21 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22450 ___

[issue22366] urllib.request.urlopen should take a context (SSLContext) argument

2014-09-21 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever title: urllib.request.urlopen shoudl take a context (SSLContext) argument - urllib.request.urlopen should take a context (SSLContext) argument ___ Python

[issue22449] SSLContext.load_verify_locations behavior on Windows and OSX

2014-09-21 Thread Christian Heimes
Christian Heimes added the comment: 'to respect' is the wrong term. /nitpicking The patch makes the code use the two env vars. Even with my patch the function doesn't respect SSL_CERT_DIR and SSL_CERT_FILE because Windows' cert store is still in use. On Linux and BSD the two env vars replace

[issue22452] addTypeEqualityFunc is not used in assertListEqual

2014-09-21 Thread Simon Zack
New submission from Simon Zack: Functions added by addTypeEqualityFunc is not used for comparing list elements in assertListEqual, and only used in assertEqual. It would be nice to have assertListEqual use functions added by addTypeEqualityFunc for comparisons of list elements. I think this

[issue22452] addTypeEqualityFunc is not used in assertListEqual

2014-09-21 Thread Simon Zack
Changes by Simon Zack simonz...@gmail.com: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22452 ___ ___ Python-bugs-list

[issue22449] SSLContext.load_verify_locations behavior on Windows and OSX

2014-09-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Do we have tests for SSL_CERT_DIR and SSL_CERT_FILE being respected? Otherwise, it might make sense to add one. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22449

[issue22452] addTypeEqualityFunc is not used in assertListEqual

2014-09-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: That sounds reasonable to me. Do you want to provide a patch? See https://docs.python.org/devguide/ for guidelines. -- nosy: +ezio.melotti, michael.foord, pitrou stage: - needs patch versions: +Python 3.5 ___ Python

[issue22445] Memoryviews require more strict contiguous checks then necessary

2014-09-21 Thread Sebastian Berg
Sebastian Berg added the comment: I am very sorry. The attached patch fixes this (not sure if quite right, but if anything should be more general then necessary). One test fails, but it looks like exactly the intended change. -- Added file:

[issue22451] filtertuple, filterstring and filterunicode don't have optimization for PyBool_Type

2014-09-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22451 ___

[issue22434] Use named constants internally in the re module

2014-09-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think I agree with Serhiy. Augmenting the import dependencies from the re module can have side effects. While the alternative (a custom Int subclass) isn't extremely pretty, it does the job. NamedIntConstant should be private, though. --

[issue22445] Memoryviews require more strict contiguous checks then necessary

2014-09-21 Thread Sebastian Berg
Changes by Sebastian Berg sebast...@sipsolutions.net: Added file: http://bugs.python.org/file36677/relaxed-strides-checking.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22445 ___

[issue22445] Memoryviews require more strict contiguous checks then necessary

2014-09-21 Thread Sebastian Berg
Changes by Sebastian Berg sebast...@sipsolutions.net: Added file: http://bugs.python.org/file36678/contiguous.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22445 ___

[issue22449] SSLContext.load_verify_locations behavior on Windows and OSX

2014-09-21 Thread Christian Heimes
Christian Heimes added the comment: There is only a test case for ssl.get_default_verify_paths(), but not for SSLContext or SSLSocket. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22449

[issue21332] subprocess bufsize=1 docs are misleading

2014-09-21 Thread Akira Li
Changes by Akira Li 4kir4...@gmail.com: Added file: http://bugs.python.org/file36679/subprocess-line-buffering-issue21332-ps5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21332 ___

[issue22445] Memoryviews require more strict contiguous checks then necessary

2014-09-21 Thread Sebastian Berg
Changes by Sebastian Berg sebast...@sipsolutions.net: Added file: http://bugs.python.org/file36680/contiguous.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22445 ___

[issue21332] subprocess bufsize=1 docs are misleading

2014-09-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: gregory.p.smith - stage: - commit review versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21332 ___

[issue21332] subprocess bufsize=1 docs are misleading

2014-09-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: The latest patch looks good to me. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21332 ___ ___

[issue22442] subprocess.check_call hangs on large PIPEd data.

2014-09-21 Thread Akira Li
Akira Li added the comment: @juj: DeprecationWarning is generated if PIPE is passed to call() as any positional or keyword argument in particular stdin, stdout, stderr. It also applies to check_call() that uses call() internally. -- ___ Python

[issue22434] Use named constants internally in the re module

2014-09-21 Thread Guido van Rossum
Guido van Rossum added the comment: OK, then if you want to review Serhiy's original patch that would be great. On Sun, Sep 21, 2014 at 5:12 AM, Antoine Pitrou rep...@bugs.python.org wrote: Antoine Pitrou added the comment: I think I agree with Serhiy. Augmenting the import dependencies

[issue22453] PyObject_REPR macro causes refcount leak

2014-09-21 Thread Chris Colbert
New submission from Chris Colbert: This is how the macro is defined in object.h: 2.7 /* Helper for passing objects to printf and the like */ #define PyObject_REPR(obj) PyString_AS_STRING(PyObject_Repr(obj)) 3.4 /* Helper for passing objects to printf and the like */ #define PyObject_REPR(obj)

[issue22452] addTypeEqualityFunc is not used in assertListEqual

2014-09-21 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22452 ___ ___

[issue22434] Use named constants internally in the re module

2014-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: NamedIntConstant should be private, though. Agree. I'll add underscore to NamedIntConstant and makecode before committing (as in enum patch). -- ___ Python tracker rep...@bugs.python.org

[issue17432] ucs2

2014-09-21 Thread SilentGhost
Changes by SilentGhost ghost@gmail.com: -- title: PyUnicode_ functions not accessible in Limited API on Windows - ucs2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17432 ___

[issue17432] PyUnicode_ functions not accessible in Limited API on Windows

2014-09-21 Thread SilentGhost
Changes by SilentGhost ghost@gmail.com: -- title: ucs2 - PyUnicode_ functions not accessible in Limited API on Windows ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17432 ___

[issue21079] EmailMessage.is_attachment == False if filename is present

2014-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Following expression looks more clear to me: c_d is not None and c_d.content_disposition == 'attachment' -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21079

[issue22452] addTypeEqualityFunc is not used in assertListEqual

2014-09-21 Thread Ezio Melotti
Ezio Melotti added the comment: Currently assertListEqual calls assertSequenceEqual, and assertSequenceEqual doesn't use any function to compare list elements -- it just does if item1 != item2: (https://hg.python.org/cpython/file/default/Lib/unittest/case.py). Checking the types of the two

[issue21332] subprocess bufsize=1 docs are misleading

2014-09-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 38867f90f1d9 by Antoine Pitrou in branch '3.4': Issue #21332: Ensure that ``bufsize=1`` in subprocess.Popen() selects line buffering, rather than block buffering. https://hg.python.org/cpython/rev/38867f90f1d9 New changeset 763d565e5840 by Antoine

[issue21332] subprocess bufsize=1 docs are misleading

2014-09-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Pushed! Thank you! -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21332 ___

[issue22442] subprocess.check_call hangs on large PIPEd data.

2014-09-21 Thread STINNER Victor
STINNER Victor added the comment: The first place to warn uses about dangerous function calls is the documentation, and your patch doesn't touch the documentation. You can for example suggest to use check_output(), getstatusouptut() or getoutput(). --

[issue22443] read(1) blocks on unflushed output

2014-09-21 Thread Sworddragon
Sworddragon added the comment: It works if -q 0 is given without the need of a workaround. So this was just a feature of apt that was causing this behavior. I think here is nothing more to do so I'm closing this ticket. -- resolution: - not a bug status: open - closed

[issue22423] Errors in printing exceptions raised in a thread

2014-09-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4baa474b4f31 by Serhiy Storchaka in branch '2.7': Issue #22423: Unhandled exception in thread no longer causes unhandled https://hg.python.org/cpython/rev/4baa474b4f31 New changeset 176579df4edd by Serhiy Storchaka in branch '3.4': Issue #22423:

[issue22454] Adding the opposite function of shlex.split()

2014-09-21 Thread Sworddragon
New submission from Sworddragon: There is currently shlex.split() that is for example useful to split a command string and pass it to subprocess.Popen with shell=False. But I'm missing a function that does the opposite: Building the command string from a list that could for example then be

[issue22423] Errors in printing exceptions raised in a thread

2014-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Senthil for your review. Committed with you suggestion. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22423 ___

[issue22423] Errors in printing exceptions raised in a thread

2014-09-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset c925b436467a by Serhiy Storchaka in branch '2.7': Issue #22423: Fixed debugging output of the GROUPREF_EXISTS opcode in the re https://hg.python.org/cpython/rev/c925b436467a New changeset e99a1df8db36 by Serhiy Storchaka in branch '3.4': Issue

[issue22415] Fix re debugging output

2014-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Committed with Antoine's suggestion. Thank you Antoine. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22415

[issue22415] Fix re debugging output

2014-09-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset d4630b1c8792 by Serhiy Storchaka in branch '2.7': Fixed issue #22415 number in Misc/NEWS for changeset c925b436467a. https://hg.python.org/cpython/rev/d4630b1c8792 New changeset 7b92518b2c21 by Serhiy Storchaka in branch '3.4': Fixed issue #22415

[issue22445] Memoryviews require more strict contiguous checks then necessary

2014-09-21 Thread Stefan Krah
Stefan Krah added the comment: Thanks! I still have to review the patch in depth, but generally I'm +1 now for relaxing the contiguity check. Curiously enough the existing code already considered e.g. shape=[1], strides=[-5] as contiguous. -- ___

[issue22435] socketserver.TCPSocket leaks socket to garbage collector if server_bind() fails

2014-09-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch looks of to me. -- versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22435 ___ ___

[issue22454] Adding the opposite function of shlex.split()

2014-09-21 Thread Ben Roberts
Ben Roberts added the comment: ' '.join(shlex.quote(x) for x in split_command) -- nosy: +roippi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22454 ___

[issue12728] Python re lib fails case insensitive matches on Unicode data

2014-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is preliminary patch which fixes case-insensitive regular expression matching of unicode strings. It is incomplete, it needs applying patches from issue17381, which fixes other aspects of case-insensitive matching. One bug is left for Turkish letters.

[issue22437] re module: number of named groups is limited to 100 max

2014-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which removes static limit. It is much more complicated than the first patch and I prefer first apply the first patch. Aren't 1000 groups enough for everyone? -- Added file: http://bugs.python.org/file36682/re_maxgroups_dynamic.patch

[issue22362] Warn about octal escapes 0o377 in re

2014-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If this is error, should the patch be applied to maintained releases? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22362 ___

[issue22454] Adding the opposite function of shlex.split()

2014-09-21 Thread Sworddragon
Sworddragon added the comment: Yes, it is possible to do this with a few other commands. But I think it would be still a nice enhancement to have a direct function for it. -- ___ Python tracker rep...@bugs.python.org

[issue22455] idna/punycode give wrong results on narrow builds

2014-09-21 Thread Buck Golemon
New submission from Buck Golemon: I have fixed the issue in my branch here: https://github.com/bukzor/cpython/commit/013e689731ba32319f05a62a602f01dd7d7f2e83 I don't propose it as a patch, but as a proof of concept and point of discussion. If there's no chance of shipping a fix in 2.7.9, feel

[issue22456] __base__ undocumented

2014-09-21 Thread Arfrever Frehtes Taifersar Arahesis
New submission from Arfrever Frehtes Taifersar Arahesis: __bases__ is documented, but __base__ is not. $ grep -r __base__ Doc $ grep -r __bases__ Doc Doc/c-api/object.rst:are different objects, *B*'s :attr:`~class.__bases__` attribute is searched in Doc/c-api/object.rst:a depth-first fashion

[issue22456] __base__ undocumented

2014-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think that __base__ was intended to be a non-guaranteed implementation detail for new-style classes just like __dictoffset__ and __flags__ . -- nosy: +gvanrossum, rhettinger ___ Python tracker

[issue22456] __base__ undocumented

2014-09-21 Thread Guido van Rossum
Guido van Rossum added the comment: Raymond is correct. __base__ is closely tied to the C implementation. I think it might be worth a mention, but with an explicit note that it is CPython-specific. It is sometimes useful, e.g. when wondering why a certain case of multiple inheritance is

[issue22454] Adding the opposite function of shlex.split()

2014-09-21 Thread Ben Roberts
Ben Roberts added the comment: For the record I am on board with a shlex.join. Even though the implementation is simple: - It is not obvious to many users if there are any gotchas by doing a ' '.join yourself, /even if/ you know that strings with spaces in them need to pass through

[issue22456] __base__ undocumented

2014-09-21 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: __base__ exists also in Jython and PyPy. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22456 ___

[issue22455] idna/punycode give wrong results on narrow builds

2014-09-21 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +lemburg, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22455 ___ ___ Python-bugs-list

[issue19119] duplicate test name in Lib/test/test_heapq.py

2014-09-21 Thread Ben Roberts
Ben Roberts added the comment: The major issue (there are other issues as well but not so difficult) is whether nlargest and nsmallest should support iterator that could be endless iterator or reject it (by checking __len__ attribute) straight away. Well, failing with an exception isn't

[issue4887] environment inspection and manipulation API is buggy, inconsistent with Python philosophy for wrapping native APIs

2014-09-21 Thread Martin Panter
Martin Panter added the comment: I suspect the $PATH example is a bad example. On my Linux setup, my initial PATH value is a customized path. After popping it and calling system(), I see a simpler default path, which is probably re-initialized somewhere else. I suspect there is no

[issue1159] os.getenv() not updated after external module uses C putenv()

2014-09-21 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1159 ___ ___ Python-bugs-list

[issue19119] duplicate test name in Lib/test/test_heapq.py

2014-09-21 Thread Ben Roberts
Ben Roberts added the comment: Attached patch fixes the tests. -- Added file: http://bugs.python.org/file36683/fix_heapq_tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19119 ___

[issue19111] 2to3 should remove from future_builtins import *

2014-09-21 Thread Kevin Christopher Henry
Kevin Christopher Henry added the comment: I'm interested in working on this, but it's not clear to me if this has been accepted as a bug. I converted a large project recently and was shocked to find that all 100+ files were broken because of the needless from future_builtins... line.

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-09-21 Thread Robert Collins
New submission from Robert Collins: python -m unittest discover -t . foo where foo is a package will not trigger load_tests in foo/__init__.py. To reproduce: mkdir -p demo/tests cd demo cat EOF tests/__init__.py import sys import os def load_tests(loader, tests, pattern): print(HI WE

[issue22442] subprocess.check_call hangs on large PIPEd data.

2014-09-21 Thread Akira Li
Akira Li added the comment: Victor, the message in my patch is copied almost verbatim from the current subprocess' documentation [1] [1] https://hg.python.org/cpython/file/850a62354402/Doc/library/subprocess.rst#l57 People use `call(cmd, stdout=PIPE)` as a *broken* way to suppress output

[issue22457] load_tests not invoked in root __init__.py when start=package root

2014-09-21 Thread mike bayer
Changes by mike bayer mike...@zzzcomputing.com: -- nosy: +zzzeek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22457 ___ ___ Python-bugs-list