[issue17860] subprocess docs lack info how to use output result

2013-06-13 Thread Ronald Oussoren
Ronald Oussoren added the comment: I don't agree that adding a table/picture is the only thing that can be done, or even that it is a good idea. IMHO the subprocess documentation is clear enough about the distinction between bytes and string, especially in the section about convenience

[issue17860] subprocess docs lack info how to use output result

2013-06-13 Thread Ezio Melotti
Ezio Melotti added the comment: Also in the Python 3 docs we don't compare the current behavior with Python 2. Ronald patch LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17860 ___

[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-13 Thread Ned Deily
Ned Deily added the comment: Looks good to me, other than that the doc change should include a version added directive (which can be added by the committer): .. function:: clear_cache() + .. versionadded:: 3.4 + Clear the filecmp cache. This may be useful if a file is compared so

[issue17860] subprocess docs lack info how to use output result

2013-06-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17860 ___ ___ Python-bugs-list

[issue17010] Windows launcher ignores active virtual environment

2013-06-13 Thread Vinay Sajip
Vinay Sajip added the comment: Recent changes to the launcher mean that for a shebang line of #!/usr/bin/env python, the path is searched for a Python executable. This will include the Python executable in an activated venv, so I am closing this issue. The change is already available for

[issue17010] Windows launcher ignores active virtual environment

2013-06-13 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17010 ___

[issue18048] Merging test_pep263.py and test_coding.py

2013-06-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 00a199c265c3 by Serhiy Storchaka in branch 'default': Issue #18048: Rename test_pep263.py to test_source_encoding.py. http://hg.python.org/cpython/rev/00a199c265c3 New changeset 3b906421245d by Serhiy Storchaka in branch 'default': Issue #18048:

[issue18048] Merging test_pep263.py and test_coding.py

2013-06-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Merging itself is trivial. The trick is how preserve the history of both files. Unfortunately this can't be represented in one mercurial patch. Three commits needed for this. -- resolution: - fixed stage: - committed/rejected status: open - closed

[issue17010] Windows launcher ignores active virtual environment

2013-06-13 Thread Piotr Dobrogost
Piotr Dobrogost added the comment: @Vinay Is there any discussion which lead to this change? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17010 ___

[issue18202] Minor fixes for test_coding

2013-06-13 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is a patch which contains followed changes: * Use bytes in test_exec_valid_coding(). Encoding instruction is ignored in strings. * Use non-ascii data in test_exec_valid_coding() to check that encoding is working. * Use explicit file encoding in

[issue18202] Minor fixes for test_coding

2013-06-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file30569/test_coding.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18202 ___

[issue18202] Minor fixes for test_coding

2013-06-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file30570/test_coding.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18202 ___

[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-13 Thread Mark Levitt
Mark Levitt added the comment: Cool. I've gone ahead and generated a new patch with the version added directive included. -- Added file: http://bugs.python.org/file30571/18149-3.patch ___ Python tracker rep...@bugs.python.org

[issue17010] Windows launcher ignores active virtual environment

2013-06-13 Thread Vinay Sajip
Vinay Sajip added the comment: Is there any discussion which lead to this change? http://mail.python.org/pipermail/python-dev/2013-May/125939.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17010

[issue18179] SMTP.local_hostname is undocumented

2013-06-13 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file30572/issue18179.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18179

[issue17860] subprocess docs lack info how to use output result

2013-06-13 Thread Ronald Oussoren
Changes by Ronald Oussoren ronaldousso...@mac.com: -- assignee: docs@python - ronaldoussoren stage: needs patch - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17860 ___

[issue13238] Add shell command helpers to subprocess module

2013-06-13 Thread Paul Moore
Paul Moore added the comment: There's also https://pypi.python.org/pypi/sarge One other thing I *often* want to do when scripting commands is to capture output, but provide some form of progress reporting (something like a dot per line of output, usually). That's annoyingly verbose with

[issue18193] Move imp.reload() to importlib

2013-06-13 Thread Berker Peksag
Berker Peksag added the comment: Here's a patch. Changes: - Used types.ModuleType instead of type(sys) - Updated imp and importlib docs - Moved test_imp.ReloadTests to test_importlib.test_api.ReloadTests -- keywords: +patch nosy: +berker.peksag stage: test needed - patch review Added

[issue8402] Add a function to escape metacharacters in glob/fnmatch

2013-06-13 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8402 ___ ___ Python-bugs-list

[issue17925] asynchat.async_chat.initiate_send : del deque[0] is not safe

2013-06-13 Thread Xavier de Gaye
Xavier de Gaye added the comment: Attached are two test cases for this patch. test_simple_producer still fails with the new patch because it should be: self.producer_fifo.extendleft([first, data]) instead of: self.producer_fifo.appendleft([data, first]) The order of the items in the

[issue17860] subprocess docs lack info how to use output result

2013-06-13 Thread anatoly techtonik
anatoly techtonik added the comment: On Thu, Jun 13, 2013 at 9:20 AM, Ezio Melotti rep...@bugs.python.orgwrote: Also in the Python 3 docs we don't compare the current behavior with Python 2. That's most unfortunate. Major PITA comes from attempts to port existing code. --

[issue17860] subprocess docs lack info how to use output result

2013-06-13 Thread anatoly techtonik
anatoly techtonik added the comment: _failed_ attempts to port existing code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17860 ___ ___

[issue3329] API for setting the memory allocator used by Python

2013-06-13 Thread STINNER Victor
STINNER Victor added the comment: This patch does not propose a simple API to reuse internal debug hooks when replacing system (PyMem) allocators. Ok, this is now fixed with new patch (version 5). Nick does not want a new environment variable, so I added instead a new function

[issue17925] asynchat.async_chat.initiate_send : del deque[0] is not safe

2013-06-13 Thread Andrew Stormont
Andrew Stormont added the comment: I think you mean: self.producer_fifo.extendleft([data, first]) Instead of: self.producer_fifo.extendleft([first, data]) No? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17925

[issue18203] Replace calls to malloc() with PyMem_Malloc()

2013-06-13 Thread STINNER Victor
New submission from STINNER Victor: The issue #3329 proposes an API to replace memory allocator functions. But Python calls directly malloc(), realloc() and free() in some functions, so custom allocators would not be used there. Examples of functions calling malloc/realloc/free directly:

[issue3329] API for setting the memory allocator used by Python

2013-06-13 Thread STINNER Victor
STINNER Victor added the comment: To be exhaustive, another patch should be developed to replace all calls for malloc/realloc/free by PyMem_Malloc/PyMem_Realloc/PyMem_Free. I created issue #18203 for this point. PyObject_Malloc() is still using mmap() or malloc() internally for example.

[issue18203] Replace calls to malloc() with PyMem_Malloc()

2013-06-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Be aware about external code which allocate memory itself (i.e. expat). -- nosy: +serhiy.storchaka stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18203

[issue17860] subprocess docs lack info how to use output result

2013-06-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Surely there are already good places to help with 2-3 transition? The Library Reference is not such a place. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org

[issue18203] Replace calls to malloc() with PyMem_Malloc()

2013-06-13 Thread STINNER Victor
STINNER Victor added the comment: Be aware about external code which allocate memory itself (i.e. expat). Well, I know that it will hard to cover 100% of the stdlib. I just want to replace the most obvious calls. Some libraries can be configured to use a custom memory allocators: - zlib:

[issue10581] Review and document string format accepted in numeric data type constructors

2013-06-13 Thread Nick Coghlan
Nick Coghlan added the comment: I think PEP 393 gives us a quick way to fast parsing: if the max char is 128, just roll straight into normal processing, otherwise do the normalisation and all decimal digits are from the same script steps. There are almost certainly better ways to do the

[issue18203] Replace calls to malloc() with PyMem_Malloc()

2013-06-13 Thread Christian Heimes
Christian Heimes added the comment: expat has a XML_Memory_Handling_Suite. You just have to replace XML_ParserCreate() and XML_ParserCreateNS with XML_ParserCreate_MM(). -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org

[issue18163] Add a 'key' attribute to KeyError

2013-06-13 Thread Mark Dickinson
Mark Dickinson added the comment: +1. I recently chastised a colleague for doing raise KeyError(long_message) instead of raise KeyError(missing_item). When I went to the standard library to support my POV, I found (to my chagrin) a big mix of the two styles. from collections import

[issue18201] distutils write into symlinks instead of replacing them

2013-06-13 Thread Éric Araujo
Éric Araujo added the comment: There are a handful of issues related to symlinks handling in distutils. From the discussion on #15205 , the state of things is that basically distutils has no defined behaviour with respect to symlinks, and it’s not clear to me what the desired behaviour would

[issue18201] distutils write into symlinks instead of replacing them

2013-06-13 Thread Michał Górny
Michał Górny added the comment: Well, I don't see much relevance between the two bugs, to be honest :). I think this bug is more of a symptom of a deeper issue with the way distutils is installing files. But the issue is causing repeating issues for our users, and I don't really know what is

[issue18203] Replace calls to malloc() with PyMem_Malloc()

2013-06-13 Thread Georg Brandl
Georg Brandl added the comment: We have to be careful with the GIL: PyMem_*() functions can only be called when holding the GIL. Some libraries can be configured to use a custom memory allocators: [...] We should probably uses these functions to reuse Python allocators (PyMem_Malloc())

[issue14044] IncompleteRead error with urllib2 or urllib.request -- fine with urllib, wget, or curl

2013-06-13 Thread raylu
raylu added the comment: The URL works for me. While wget does download it successfully, I get the following output: $ wget http://info.kingcounty.gov/health/ehs/foodsafety/inspections/XmlRest.aspx\?Zip_Code\=98199 --2013-06-13 12:15:21--

[issue18204] distutils error showing upload error message

2013-06-13 Thread Matt Perry
New submission from Matt Perry: Distutils attempts r.read() instead of request.read() when showing an upload error message. -- assignee: eric.araujo components: Distutils files: disutils_error_message.diff keywords: patch messages: 191088 nosy: eric.araujo, tarek, unshift priority:

[issue18205] PyOS_ReadlineFunctionPointer violates PyMem_Malloc() API: the GIL is not hold

2013-06-13 Thread STINNER Victor
New submission from STINNER Victor: The callback PyOS_ReadlineFunctionPointer (used to read a line from the standard input) must return a buffer allocated by PyMem_Malloc(), but PyOS_Readline() releases the GIL before calling PyOS_ReadlineFunctionPointer. Simplified extract of

[issue18205] PyOS_ReadlineFunctionPointer violates PyMem_Malloc() API: the GIL is not hold

2013-06-13 Thread STINNER Victor
STINNER Victor added the comment: Here is a patch for Python 3.4. -- keywords: +patch Added file: http://bugs.python.org/file30577/readline_gil.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18205

[issue18205] PyOS_ReadlineFunctionPointer violates PyMem_Malloc() API: the GIL is not hold

2013-06-13 Thread STINNER Victor
STINNER Victor added the comment: Oh, this is a duplicate of #16742, read also the thread on python-dev: http://mail.python.org/pipermail/python-dev/2012-December/123225.html -- resolution: - duplicate status: open - closed ___ Python tracker

[issue16742] PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe

2013-06-13 Thread STINNER Victor
STINNER Victor added the comment: I just found the readline/GIL issue while working on #18203. I created #18205 but then I found this issue. I just closed #18205 as a duplicate. Here is a patch for Python 3.4. -- Copy of the initial message (msg191089): The callback

[issue18203] Replace calls to malloc() with PyMem_Malloc()

2013-06-13 Thread STINNER Victor
STINNER Victor added the comment: We have to be careful with the GIL: PyMem_*() functions can only be called when holding the GIL. (...) I think there's a potential problem here :) I didn't understand the motivation to require the GIL held for PyMem_Malloc(). I searched in the source code

[issue18205] PyOS_ReadlineFunctionPointer violates PyMem_Malloc() API: the GIL is not hold

2013-06-13 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- superseder: - PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18205

[issue16742] PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe

2013-06-13 Thread STINNER Victor
STINNER Victor added the comment: See the following thread on python-dev, the root problem is that PyMem_Malloc() cannot be called with the GIL held. This is a bug in my opinion, and it should be fixed. http://mail.python.org/pipermail/python-dev/2013-June/126822.html --

[issue18206] There is no license.html on www.python.org

2013-06-13 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18206 ___ ___

[issue18206] There is no license.html on www.python.org

2013-06-13 Thread py.user
New submission from py.user: [guest@localhost ~]$ python3 Python 3.3.0 (default, Sep 29 2012, 22:07:38) [GCC 4.7.2 20120921 (Red Hat 4.7.2-2)] on linux Type help, copyright, credits or license for more information. license() See http://www.python.org/3.3/license.html 404 answer from

[issue18206] There is no license.html on www.python.org

2013-06-13 Thread Georg Brandl
Georg Brandl added the comment: This broke because we now have release 3.3.0 instead of 3.3. But it's easy to add a redirect, which I've done now. In the future, site.py should be fixed to say 3.3.0 or 3.3.X depending on the current bugfix version. --

[issue18202] Minor fixes for test_coding

2013-06-13 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18202 ___ ___ Python-bugs-list

[issue3329] API for setting the memory allocator used by Python

2013-06-13 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3329 ___ ___ Python-bugs-list mailing list

[issue18206] license url in site.py should always use X.Y.Z form of version number

2013-06-13 Thread R. David Murray
R. David Murray added the comment: For anyone who wants to work on this: the license URL is printed if only if the license file can't be found. -- keywords: +easy nosy: +r.david.murray stage: - needs patch title: There is no license.html on www.python.org - license url in site.py

[issue18199] Windows: support path longer than 260 bytes using \\?\ prefix

2013-06-13 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: No long filename support for Windows - Windows: support path longer than 260 bytes using \\?\ prefix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18199

[issue18197] insufficient error checking causes crash on windows

2013-06-13 Thread STINNER Victor
STINNER Victor added the comment: Can you explain why fileno() does fail? Do you have an idea of how many open file descriptor do you have? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18197

[issue8106] SSL session management

2013-06-13 Thread Christian Heimes
Changes by Christian Heimes li...@cheimes.de: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8106 ___ ___

[issue18207] OpenSSL may ignore seconds in notAfter

2013-06-13 Thread Christian Heimes
New submission from Christian Heimes: I'm doing some testing with old versions of OpenSSL. Some versions like 0.9.8i from 15 Sep 2008 ignore seconds in notAfter field: ./python -m test test_ssl test_hashlib [1/2] test_ssl test test_ssl failed -- Traceback (most recent call last): File

[issue18200] Update stdlib to use ModuleNotFoundError

2013-06-13 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18200 ___

[issue18200] Update stdlib to use ModuleNotFoundError

2013-06-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8d28d44f3a9a by Brett Cannon in branch 'default': Issue #18200: Update the stdlib (except tests) to use http://hg.python.org/cpython/rev/8d28d44f3a9a -- nosy: +python-dev ___ Python tracker

[issue18200] Update stdlib to use ModuleNotFoundError

2013-06-13 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- assignee: - brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18200 ___ ___

[issue10581] Review and document string format accepted in numeric data type constructors

2013-06-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: PEP 393 implementation has already added the fast path to decimal encoding: http://hg.python.org/cpython/diff/8beaa9a37387/Objects/unicodeobject.c#l1.3735 What we can do, however, is improve performance of converting non-ascii numerals by looking up

[issue1611154] os.path.exists(file/) failure on Solaris 9

2013-06-13 Thread A.M. Kuchling
A.M. Kuchling added the comment: Here's an updated version of the patch. It at least compiles and runs on MacOS, but I don't have a Solaris installation to check whether it still fixes the problem on Solaris 9. Note that, according to