[issue24068] statistics module - incorrect results with boolean input

2015-05-11 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24068 ___ ___

[issue20014] Makes array.array constructor accepts ascii-unicode typecode

2015-05-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20014 ___ ___

[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2015-05-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13566 ___ ___

[issue24134] assertRaises can behave differently

2015-05-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file39340/assert_raises_args_deprecation.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24134 ___

[issue24138] Speed up range() by caching and modifying long objects

2015-05-11 Thread Larry Hastings
Larry Hastings added the comment: I'd rather have the general-purpose freelist for ints too. How about we close this issue now, and assuming the freelist for ints goes in we can abandon this approach entirely. -- resolution: - rejected stage: patch review - resolved status: open -

[issue24138] Speed up range() by caching and modifying long objects

2015-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: According to my and Larry's measurements [1] the distribution of created int's by size during running Python tests is: On 32-bit Linux: int 42828741 13.40% 0 425353 0.99% 0.99%

[issue24138] Speed up range() by caching and modifying long objects

2015-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'd rather stick to the simple freelist approach. People interested in (allegedly) more ambitious designs can open new issues, together with patches to evaluate their efficiency. -- ___ Python tracker

[issue24164] Support pickling objects with __new__ with keyword arguments with protocol 2+

2015-05-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Pickling of objects of classes whose __new__ mandates the use of keyword-only arguments is supported with protocol 4 (using a new opcode NEWOBJ_EX). But it is possible to implement this feature with protocol 2+ (less efficiently than with NEWOBJ_EX).

[issue1602] windows console doesn't print or input Unicode

2015-05-11 Thread Nick Coghlan
Nick Coghlan added the comment: It sounds like fixing this properly requires fixing issue 17620 first (so the interactive interpreter actually uses sys.stdin), so I've flagged that as a dependency. -- dependencies: +Python interactive console doesn't use sys.stdin for input

[issue24138] Speed up range() by caching and modifying long objects

2015-05-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I like the idea of adding a free list of longs in Python 3, but I think we should extend this somewhat to cover more ground, e.g. by pre-allocating a block of 1 digit long objects, like we did for Python 2 ints, and perhaps allocate up to 4k (= 1 memory

[issue24138] Speed up range() by caching and modifying long objects

2015-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: [1] http://comments.gmane.org/gmane.comp.python.devel/153078 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24138 ___

[issue1602] windows console doesn't print or input Unicode

2015-05-11 Thread Paul Moore
Changes by Paul Moore p.f.mo...@gmail.com: -- nosy: +paul.moore ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list

[issue24138] Speed up range() by caching and modifying long objects

2015-05-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 11.05.2015 11:42, Serhiy Storchaka wrote: Pre-allocating a block has a disadvantage. It is hard to free allocated block. The program can create a lot of integers, then drop most of them, and request the memory for other needs, but blocks once

[issue24138] Speed up range() by caching and modifying long objects

2015-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, 1-4k RAM can be consumed just after the start up (it's only 100-300 integers) and never freed. What next? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24138

[issue24165] Free list for single-digits ints

2015-05-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch adds free list for single-digit PyLong objects. In Python tests 7% of created objects are ints. 50% of them are 15-bit (single-digit on 32-bit build), 75% of them are 30-bit (single-digit on 64-bit build). See the start of the discussion in

[issue1818] Add named tuple reader to CSV module

2015-05-11 Thread Skip Montanaro
Skip Montanaro added the comment: I looked at this six years ago. I still haven't found a situation where I pined for a NamedTupleReader. That said, I have no objection to committing it if others, more well-versed in current Python code and NamedTuples than I gives it a pass. Note that I

[issue24167] 2.4.X links on www.python.org/downloads/windows point to the wrong files

2015-05-11 Thread Paul Baker
New submission from Paul Baker: On the www.python.org/downloads/windows page, the Windows x86 MSI installer links for versions 2.4.4, 2.4.3, 2.4.2 and 2.4.0 point to the IA64 versions of the installers rather than the x86 versions. For example, the 2.4.4 link points to python-2.4.4.ia64.msi

[issue24165] Free list for single-digits ints

2015-05-11 Thread Brett Cannon
Brett Cannon added the comment: Any chance of running hg.python.org/benchmarks to see what kind of performance this would get us? -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24165

[issue24166] ArgumentParser behavior does not match generated help

2015-05-11 Thread Benjamin Schubert
New submission from Benjamin Schubert: When creating a ArgumentParser on which we attach a subparser with different options and then add a nargs=+ argument to the initial parser, the command format string generated does not match the behavior. for example it would generate : argparse_error.py

[issue24167] 2.4.X links on www.python.org/downloads/windows point to the wrong files

2015-05-11 Thread STINNER Victor
STINNER Victor added the comment: You should report bugs of the website to https://github.com/python/pythondotorg/issues -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24167

[issue24167] 2.4.X links on www.python.org/downloads/windows point to the wrong files

2015-05-11 Thread Paul Baker
Paul Baker added the comment: Done: https://github.com/python/pythondotorg/issues/751 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24167 ___

[issue24165] Free list for single-digits ints

2015-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Report on Linux xarax 3.13.0-52-generic #86-Ubuntu SMP Mon May 4 04:32:15 UTC 2015 i686 athlon Total CPU cores: 2 ### 2to3 ### 15.796000 - 15.652000: 1.01x faster ### etree_generate ### Min: 0.687270 - 0.715218: 1.04x slower Avg: 0.698458 - 0.722657: 1.03x

[issue23970] Update distutils.msvccompiler for VC14

2015-05-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 11.05.2015 21:03, Steve Dower wrote: Steve Dower added the comment: Simply because I didn't update the doc string :) I don't really want to put a version number on this file, since it isn't MSVC 14.0 specific - it's MSVC 14 and all future

[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2015-05-11 Thread Maciej Szulik
Maciej Szulik added the comment: Berker per your comment updated patch changing those two new methods (namely date.strptime and time.strptime) to be classmethod and not staticmethods. -- Added file: http://bugs.python.org/file39345/issue1100942.patch

[issue24157] test_urandom_fd_reopened failure on Mac OS X

2015-05-11 Thread Ned Deily
Ned Deily added the comment: Skip, looking at the test, it seems likely that there is unexpected writing to stdout in the subprocess. Can you add a print(out) in the test (around test_os.py:1273) to see what is actually being written on your machine? -- nosy: +ned.deily

[issue24159] Misleading TypeError when pickling bytes to a file opened as text

2015-05-11 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +alexandre.vassalotti, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24159 ___ ___

[issue16864] sqlite3.Cursor.lastrowid isn't populated when executing a SQL REPLACE statement

2015-05-11 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +ghaering stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16864 ___

[issue20362] longMessage attribute is ignored in unittest.TestCase.assertRegexpMatches etc

2015-05-11 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20362 ___ ___ Python-bugs-list mailing list

[issue23970] Update distutils.msvccompiler for VC14

2015-05-11 Thread Paul Moore
Paul Moore added the comment: I agree with Steve, we shouldn't be constrained to preserve all the undocumented internals of distutils - doing that in the past is what has made distutils essentially unmaintainable. I don't think there's a concrete example of real code that will be broken by

[issue23970] Update distutils.msvccompiler for VC14

2015-05-11 Thread Steve Dower
Steve Dower added the comment: I guess we need a third opinion. For me, the subclasses of CCompiler are undocumented and not a guaranteed interface (people using them directly are consenting adults). They're also an eyesore, so if I can clean them up without breaking the CCompiler interface

[issue24163] shutil.copystat fails when attribute security.selinux is present

2015-05-11 Thread Ned Deily
Ned Deily added the comment: Possibly related: Issue15238 (msg165591 re root) -- nosy: +hynek, ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24163 ___

[issue23970] Update distutils.msvccompiler for VC14

2015-05-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 11.05.2015 23:50, Paul Moore wrote: I agree with Steve, we shouldn't be constrained to preserve all the undocumented internals of distutils - doing that in the past is what has made distutils essentially unmaintainable. I don't think there's a

[issue23970] Update distutils.msvccompiler for VC14

2015-05-11 Thread Steve Dower
Steve Dower added the comment: Simply because I didn't update the doc string :) I don't really want to put a version number on this file, since it isn't MSVC 14.0 specific - it's MSVC 14 and all future versions. We don't check the build version anymore, though get_build_version() is still

[issue24165] Free list for single-digits ints

2015-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: You probably need a workload that uses integers quite heavily to see a difference. And even then, it would also depend on the allocation pattern. -- ___ Python tracker rep...@bugs.python.org

[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-11 Thread Yury Selivanov
Yury Selivanov added the comment: Nick, Guido, Updated patch attached. -- Added file: http://bugs.python.org/file39344/await_06.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24017 ___

[issue24165] Free list for single-digits ints

2015-05-11 Thread Stefan Behnel
Stefan Behnel added the comment: Well, as I've shown in issue 24076 (I'm copying the numbers here), even simple arithmetic expressions can benefit from a free-list. Basically anything that uses temporary integer results. Original: $ ./python -m timeit 'sum(range(1, 10))' 1000 loops, best

[issue24076] sum() several times slower on Python 3

2015-05-11 Thread Stefan Behnel
Stefan Behnel added the comment: Issue 24165 was created to pursue the path of a free-list for PyLong objects. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24076 ___

[issue24165] Free list for single-digits ints

2015-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, but I meant a realistic workload, not a micro-benchmark. There are tons of ways to make Python look faster on micro-benchmarks but that have no relevant impact on actual applications. (note that I'm still sympathetic to the freelist approach) --

[issue24165] Free list for single-digits ints

2015-05-11 Thread Stefan Behnel
Stefan Behnel added the comment: I got similar results on 64bits for my original patch (very similar to what Serhiy used now). The numbers are not really conclusive. Report on Linux leppy 3.13.0-46-generic #77-Ubuntu SMP Mon Mar 2 18:23:39 UTC 2015 x86_64 x86_64 Total CPU cores: 4 ### 2to3

[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-11 Thread Nick Coghlan
Nick Coghlan added the comment: Guido convinced me that having StopAsyncIteration inherit from Exception was the right approach, as it means errors are more likely to be of the we caught it when we shouldn't have variety, rather than the harder to debug an exception escaped when it shouldn't

[issue24165] Free list for single-digits ints

2015-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, sorry, Stefan, I didn't noticed your patch. I wouldn't write my patch if noticed your patch. int_free_list_2.patch adds free list only for single-digits ints. Following patch adds free list for multi-digit ints (3 on 32-bit build, 2 on 64-bit build)

[issue23970] Update distutils.msvccompiler for VC14

2015-05-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 11.05.2015 23:20, Steve Dower wrote: I guess we need a third opinion. For me, the subclasses of CCompiler are undocumented and not a guaranteed interface (people using them directly are consenting adults). They're also an eyesore, so if I can

[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3a3cc2b9a1b2 by Yury Selivanov in branch 'default': Issue 24017: Update NEWS file. https://hg.python.org/cpython/rev/3a3cc2b9a1b2 -- ___ Python tracker rep...@bugs.python.org

[issue6057] sqlite3 error classes should be documented

2015-05-11 Thread Radek Holý
Radek Holý added the comment: One reason why I would like to have it mentioned in the documentation is that the fact that it is not documented there causes sqlite3.Error to be missing in the objects.inv file generated by Sphinx so that enabling the nitpicky mode with intersphinx extension

[issue23970] Update distutils.msvccompiler for VC14

2015-05-11 Thread Steve Dower
Steve Dower added the comment: Things are already 'broken' for the new compiler version, so Python won't build properly with older versions of VC anymore (there are a few more changes, like removing _PyVerify_fd, that will make this even less likely - the new CRT is for too incompatible with

[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-11 Thread Nick Coghlan
Nick Coghlan added the comment: Latest version looks good to me (aside from a quibble about whether StopAsyncIteration should inherit from BaseException instead of Exception - see my review for details). Based on Guido's explanation in the review, I also suggested adding the following

[issue24168] Unittest discover fails with namespace package if the path contains the string same as the module name

2015-05-11 Thread Toshishige Hagihara
New submission from Toshishige Hagihara: There is a problem with unittest discovering with namespace packages. Given the following directory structure, the following command fails with the errors. # Directory Structure ``` /home/hagihara/test.cybozu/infra/forest/lib/python3/ cybozu/ # -

[issue24156] test.test_ssl.ThreadedTests unit test failed

2015-05-11 Thread Ned Deily
Ned Deily added the comment: There are places in the test suite that assume 127.0.0.1 is the standard loopback address and will fail if the system under test doesn't follow that convention; see, for example, the discussion in Issue22753. I suspect that, in your case, the system's host

[issue22385] Define a binary output formatting mini-language for *.hex()

2015-05-11 Thread Nick Coghlan
Nick Coghlan added the comment: Reviewing the items I had flagged as dependencies of issue 22555 for personal tracking purposes, I suggest we defer further consideration of this idea to 3.6 after folks have had a chance to get some experience with the basic bytes.hex() method. --

[issue15216] Support setting the encoding on a text stream after creation

2015-05-11 Thread Nick Coghlan
Nick Coghlan added the comment: Reviewing the items I had flagged as dependencies of issue 22555 for personal tracking purposes, I suggest we defer further consideration of this idea to 3.6 after folks have had a chance to get some experience with the interpreter defaulting to using

[issue22555] Tracking issue for adjustments to binary/text boundary handling

2015-05-11 Thread Nick Coghlan
Nick Coghlan added the comment: I just went through the still-open issues referenced from here, and recommended deferring further consideration of all of the remaining items to 3.6: * utilities for clearing out surrogates from strings: issue 18814 * treating wsgistr as a serialisation format:

[issue18814] Add utilities to clean surrogate code points from strings

2015-05-11 Thread Nick Coghlan
Nick Coghlan added the comment: I suggest we defer this one to 3.6 - I still think it's worth doing, but I don't think it's a major barrier to migration, and it would be good to get some real world experience with the new sys.stdin behaviour of defaulting to using surrogateescape in the POSIX

[issue22264] Add wsgiref.util.dump_wsgistr load_wsgistr

2015-05-11 Thread Nick Coghlan
Nick Coghlan added the comment: Reviewing the items I had flagged as dependencies of issue 22555 for personal tracking purposes, I suggest we defer further consideration of this idea to 3.6 and/or the creation of a WSGI 2.0 specification. -- versions: +Python 3.6 -Python 3.5

[issue24168] Unittest discover fails with namespace package if the path contains the string same as the module name

2015-05-11 Thread Eric Snow
Eric Snow added the comment: Just in case, please take a look at issues #17457 and #23882 to see if they already cover the bug. -- nosy: +eric.snow, rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24168

[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 957478e95b26 by Yury Selivanov in branch '3.4': asyncio: Support PEP 492. Issue #24017. https://hg.python.org/cpython/rev/957478e95b26 New changeset 44c1db190525 by Yury Selivanov in branch 'default': asyncio: Merge 3.4 -- Support PEP 492. Issue

[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-11 Thread Yury Selivanov
Yury Selivanov added the comment: Guido, Nick, Victor, Thanks for your reviews and guidance! The patch has been committed to the default branch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24017

[issue24168] Unittest discover fails with namespace package if the path contains the string same as the module name

2015-05-11 Thread Toshishige Hagihara
Toshishige Hagihara added the comment: Thanks for suggestion. I checked both issues and found that this bug is created in #17457 and #23882 does not fix it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24168

[issue9517] Make test.script_helper more comprehensive, and use it in the test suite

2015-05-11 Thread Christie
Christie added the comment: Hey @berker.peksag, @r.david.murray, @serhiy.storchaka, If you get a chance I've got some changes up for review at: * http://bugs.python.org/issue24033 * http://bugs.python.org/issue23981 Thanks! -- ___ Python tracker

[issue24033] Update _test_multiprocessing.py to use script helpers

2015-05-11 Thread Christie
Christie added the comment: Updated both tests in _test_mulitprocessing.py which were using sys.exectuable and Popen to use script_helpers instead, refactored script_helpers a bit to make this work. -- keywords: +patch Added file:

[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset eeeb666a5365 by Yury Selivanov in branch 'default': PEP 0492 -- Coroutines with async and await syntax. Issue #24017. https://hg.python.org/cpython/rev/eeeb666a5365 -- ___ Python tracker

[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-11 Thread Guido van Rossum
Guido van Rossum added the comment: Thank you Yury! You are a coding machine. On Mon, May 11, 2015 at 8:06 PM, Yury Selivanov rep...@bugs.python.org wrote: Yury Selivanov added the comment: Guido, Nick, Victor, Thanks for your reviews and guidance! The patch has been committed to the

[issue24161] PyIter_Check returns false positive for objects of type instance

2015-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0f7795edca65 by Raymond Hettinger in branch '2.7': Issue #24161: Document that PyIter_Check() returns false positives for old-style instances. https://hg.python.org/cpython/rev/0f7795edca65 -- nosy: +python-dev

[issue21795] smtpd.SMTPServer should announce 8BITMIME when supported and accept SMTPUTF8 without it

2015-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset e34ed02738bf by R David Murray in branch 'default': #21795: advertise 8BITMIME if decode_data is False. https://hg.python.org/cpython/rev/e34ed02738bf -- nosy: +python-dev ___ Python tracker

[issue24167] 2.4.X links on www.python.org/downloads/windows point to the wrong files

2015-05-11 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- resolution: - third party stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24167 ___

[issue21795] smtpd.SMTPServer should announce 8BITMIME when supported and accept SMTPUTF8 without it

2015-05-11 Thread R. David Murray
R. David Murray added the comment: Thanks, Milan. I tweaked some things and tried to sort out the docs for all the changes we have made to smtpd. If you see anything I screwed up let me know. -- resolution: - fixed stage: commit review - resolved status: open - closed type: -

[issue24166] ArgumentParser behavior does not match generated help

2015-05-11 Thread paul j3
paul j3 added the comment: I wouldn't describe this as bug, just a nuance on how parsers and subparsers play together. To the main parser, the subparser argument looks like another positional. It allocates strings to it and any following positionals based on their respective 'nargs'. The

[issue24161] PyIter_Check returns false positive for objects of type instance

2015-05-11 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24161 ___

[issue24155] Optimize heapify for better cache utililzation

2015-05-11 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24155 ___

[issue24155] Optimize heapify for better cache utililzation

2015-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset db87591fce01 by Raymond Hettinger in branch 'default': Issue #24155: Optimize heapify for better cache utililzation. https://hg.python.org/cpython/rev/db87591fce01 -- nosy: +python-dev ___ Python tracker

[issue24166] ArgumentParser behavior does not match generated help

2015-05-11 Thread paul j3
paul j3 added the comment: And the behavior does match the help {ls,du} ... vm [vm ...] It's just that one of the strings is allocated to the first `...`, whereas you expected it to be put in the second. -- ___ Python tracker

[issue23970] Update distutils.msvccompiler for VC14

2015-05-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Why are you removing the mcvs9compiler.py file when at the same time your are referencing it in the msvccompiler.py doc string ? --- a/Lib/distutils/msvccompiler.py +++ b/Lib/distutils/msvccompiler.py @@ -1,201 +1,120 @@ distutils.msvccompiler Contains