[issue18219] csv.DictWriter is slow when writing files with large number of columns

2013-06-16 Thread Mikhail Traskin
Mikhail Traskin added the comment: Any way is fine with me. If you prefer to avoid having public filedset property, please use the attached patch. -- Added file: http://bugs.python.org/file30605/csvdictwriter.v2.patch ___ Python tracker

[issue18227] Use Python memory allocators in external libraries like zlib or OpenSSL

2013-06-16 Thread Aaron Iles
Changes by Aaron Iles aaron.i...@gmail.com: -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18227 ___ ___ Python-bugs-list mailing

[issue18203] Replace direct calls to malloc() with PyMem_Malloc() or PyMem_RawMalloc()

2013-06-16 Thread Aaron Iles
Changes by Aaron Iles aaron.i...@gmail.com: -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18203 ___ ___ Python-bugs-list mailing

[issue18229] attribute headers of http.server.BaseHTTPRequestHandler sometimes does not exists

2013-06-16 Thread Jordan Szubert
New submission from Jordan Szubert: it seems that problem is someone connecting to port 8080 with non-http client, could not find warning in documentation ---fragment of `less access.log` 81.172.30.254 - - [16/Jun/2013 11:36:58] ^SBitTorrent protocol^@^@^@^@^@^X^@^Ej 81.172.30.254

[issue18197] insufficient error checking causes crash on windows

2013-06-16 Thread Nick Coghlan
Nick Coghlan added the comment: Closing this on the assumption the bug is in the extension. Feel free to reopen if further investigation shows a problem in the interpreter core. -- nosy: +ncoghlan resolution: - invalid stage: - committed/rejected status: open - closed

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Brett Cannon
Brett Cannon added the comment: Seems to be fairly consistent on Windows but more random on Linux. I have also triggered it on my OS X machine randomly. Can't tell if it's a timing issue or some other test doing something bad. I'm worried solving it is going to require taking one of the

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Brett Cannon
Brett Cannon added the comment: Found the test cases to cause this:: ./python.exe -m test test_idle test_logging Adding Roger and Terry to see if they happen to remember any of the IDLE tests using logging or warnings in a way that could cause this. P.S.: I thought we had a script somewhere

[issue18113] Memory leak in curses.panel

2013-06-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is a problem with this patch. Py_XDECREF can execute arbitrary Python code and this code can call set_panel_userptr. Here is a reproducer (it causes segfault). -- resolution: fixed - stage: committed/rejected - commit review status: closed -

[issue18113] Memory leak in curses.panel

2013-06-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And here is a patch which fixes a segfault. But I can't write a test for it. -- keywords: +patch Added file: http://bugs.python.org/file30607/userptr_segfault.patch ___ Python tracker rep...@bugs.python.org

[issue13886] readline-related test_builtin failure

2013-06-16 Thread Brett Cannon
Brett Cannon added the comment: Issue #18230 is another test_builtin failure related to tty tests. -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13886 ___

[issue18230] test_builtin fails/hangs when run after test_getopt

2013-06-16 Thread Brett Cannon
New submission from Brett Cannon: If you run test_builtin after test_getopt it will hang. If you run test_getopt test_socket test_builtin it will fail in all tty-related tests for input(). Not sure if this is related to issue #17734 or #13886. -- components: Library (Lib) messages:

[issue17734] Failure when running test_builtin after test_genexps

2013-06-16 Thread Brett Cannon
Brett Cannon added the comment: Issue #18230 is another test_builtin failure related to tty tests. -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17734 ___

[issue17734] Failure when running test_builtin after test_genexps

2013-06-16 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/issue17734 ___

[issue18230] test_builtin fails/hangs when run after test_getopt

2013-06-16 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/issue18230 ___

[issue14015] surrogateescape largely missing from documentation

2013-06-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 55f611f55952 by Andrew Kuchling in branch '3.3': Describe 'surrogateescape' in the documentation. http://hg.python.org/cpython/rev/55f611f55952 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed

[issue17177] Deprecate imp

2013-06-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1b8f08c4efd5 by Brett Cannon in branch 'default': Issue #17177: The imp module is pending deprecation. http://hg.python.org/cpython/rev/1b8f08c4efd5 -- ___ Python tracker rep...@bugs.python.org

[issue17177] Deprecate imp

2013-06-16 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17177 ___

[issue18176] Builtins documentation refers to old version of UCD.

2013-06-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: Added file: http://bugs.python.org/file30608/bd092995907c.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18176 ___

[issue18176] Builtins documentation refers to old version of UCD.

2013-06-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Here is what grep revealed: $ find Doc -name \*.rst | xargs grep -n '6\.2\.0' Doc/library/stdtypes.rst:357: See http://www.unicode.org/Public/6.2.0/ucd/extracted/DerivedNumericType.txt Doc/library/unicodedata.rst:18:this database is compiled from the

[issue18223] Refactor test_tarfile

2013-06-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, sorry, I missed issue17689. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18223 ___ ___

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: test_idle, which runs the tests in idlelib/idle_test, currently comprises 9 test methods and perhaps 100 lines that do not, as far as I know, use warnings or logging. However, perhaps this has an effect: F:\Python\dev\cpython\PCbuildpython_d -m test test_idle

[issue18231] What's new in Python should explain what's new in UCD

2013-06-16 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: At the minimum, we should refer to unicode.org: http://www.unicode.org/versions/Unicode6.1.0/#Database_Changes (for Python 3.3), http://www.unicode.org/versions/Unicode6.2.0/#Database_Changes (for Python 3.4). We may also want to highlight changes that

[issue18231] What's new in Python should explain what's new in UCD

2013-06-16 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Documentation keywords: +easy nosy: +ezio.melotti stage: - needs patch type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18231

[issue18231] What's new in Python should explain what's new in UCD

2013-06-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Here is another change that I think deserves an explicit mention in What's New: Python 3.3.2 exec('a\u17B4 = 5') eval('a\u17B4') 5 Python 3.2.5 exec('a\u17B4 = 5') Traceback (most recent call last): File stdin, line 1, in module File string, line

[issue18057] Register NamespaceLoader with importlib.abc.Loader

2013-06-16 Thread Brett Cannon
Brett Cannon added the comment: Fixed in http://hg.python.org/cpython/rev/ebec625b13f9 -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18057

[issue18058] Define is_package for NamespaceLoader

2013-06-16 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18058 ___

[issue18058] Define is_package for NamespaceLoader

2013-06-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset ebec625b13f9 by Brett Cannon in branch 'default': Issues #18058, 18057: Make importlib._bootstrap.NamespaceLoader http://hg.python.org/cpython/rev/ebec625b13f9 -- nosy: +python-dev ___ Python tracker

[issue18232] running a suite with no tests is not an error

2013-06-16 Thread Robert Collins
New submission from Robert Collins: In bug https://bugs.launchpad.net/subunit/+bug/586176 I recorded a user request - that if no tests are found, tools consuming subunit streams should be able to consider that an error. There is an analogous situation though, which is that if discover returns

[issue17405] Add _Py_memset_s() to securely clear memory

2013-06-16 Thread Christian Heimes
Christian Heimes added the comment: I finally figured out why _Py_memset_s() wasn't available inside extension modules. The linker removes object files from the main binary unless one or more symbols from an object files are referenced somewhere. Objects/object.c has a workaround for

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Brett Cannon
Brett Cannon added the comment: I actually don't get the warnings when I run test_idle under regrtest. But what I did was followed a hunch and added a check for warnings.showwarning() and sure enough, it's been left modified by IDLE: PyShell replaces the function as a side-effect of import.

[issue18232] running a suite with no tests is not an error

2013-06-16 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Tests nosy: +ezio.melotti type: - enhancement versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18232 ___

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: I discovered the same thing a different way. Grepping Lib/*.py for 'Warning (from warnings module)' hits F:\Python\dev\cpython\Lib\idlelib\PyShell.py: 67: F:\Python\dev\cpython\Lib\idlelib\run.py: 34: Both monkey-patch warnings, when imported, to show warnings

[issue18147] SSL: diagnostic functions to list loaded CA certs

2013-06-16 Thread Christian Heimes
Christian Heimes added the comment: Updated patch with Antoine's review: * method is now called get_ca_certs() * cert_store_stats() returns total amount of X.509 as 'x509' key and X.509 certs with CA purpose in 'x509_ca'. * documentation -- Added file:

[issue18233] SSLSocket.getpeercertchain()

2013-06-16 Thread Christian Heimes
New submission from Christian Heimes: The patch implements a method getpeercertchain() on a SSLSocket. It returns the peer's certificate chain from the leaf cert to the root cert if available. It wraps SSL_get_peer_cert_chain(). SSL_get_peer_cert_chain() doesn't have to pull any additional

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

2013-06-16 Thread Pierrick Koch
Pierrick Koch added the comment: last patch, replaced: self.producer_fifo.appendleft([data, first]) by: self.producer_fifo.extendleft([data, first]) -- Added file: http://bugs.python.org/file30612/cpython.asyncore_3.patch ___ Python tracker

[issue18223] Refactor test_tarfile

2013-06-16 Thread Zachary Ware
Zachary Ware added the comment: Serhiy Storchaka added the comment: Oh, sorry, I missed issue17689. That's alright, this is a legitimately different issue that just happens to encompass the purpose of the other. As long as your patch hits all the points mine meant to, I'm not bothered :)

[issue18115] Use importlib.util.module_to_load in all loaders in importlib

2013-06-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 205aa49e5cd5 by Brett Cannon in branch 'default': Issue #18115: Abstract out managing the cleanup of modules to use in http://hg.python.org/cpython/rev/205aa49e5cd5 -- nosy: +python-dev ___ Python

[issue18115] Use importlib.util.module_to_load in all loaders in importlib

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

[issue18228] AIX locale parsing failure

2013-06-16 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo, lemburg, trent ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18228 ___ ___

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Vinay Sajip
Vinay Sajip added the comment: In the meanwhile, I will try using support.import_fresh_module('warnings') in test_logging, or better, saving and restoring warnings in test_idle. I agree the second option (changing test_idle) is better. The failing logging test is checking to ensure that the

[issue18223] Refactor test_tarfile

2013-06-16 Thread Michael Foord
Changes by Michael Foord mich...@voidspace.org.uk: -- nosy: -michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18223 ___ ___

[issue18224] pyvenv pydoc.py script causing AttributeErrors on Windows

2013-06-16 Thread Vinay Sajip
Vinay Sajip added the comment: The pyvenv pydoc script should be in the venv's Scripts folder, which is not (normally) on sys.path - the venv's Lib\site-packages is. Can you provide a small script which demonstrates the problem while confirming that the venv's Scripts folder has not been

[issue18076] Implement importlib.util.decode_source_bytes()

2013-06-16 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18076 ___

[issue18076] Implement importlib.util.decode_source_bytes()

2013-06-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset bdd60bedf933 by Brett Cannon in branch 'default': Issue #18076: Introduce imoportlib.util.decode_source(). http://hg.python.org/cpython/rev/bdd60bedf933 -- nosy: +python-dev ___ Python tracker

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Vinay, please comment on this: on my Win7-64 system, as least, test_logging seems broken without running test_idle first. F:\Python\dev\cpython\PCbuildpython_d -m test test_logging [1/1] test_logging dummy.py:42: UserWarning: Explicit Warning --

[issue18176] Builtins documentation refers to old version of UCD.

2013-06-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I have found another place where explicit UCD version is used in the docs: Doc/reference/lexical_analysis.rst:729:.. [#] http://www.unicode.org/Public/6.1.0/ucd/NameAliases.txt I am not sure how this case should be handled. The language reference was

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: I reverted the change to test_logging, reran, and it runs fine, at least twice. Before the revert, I checked that the only two changes were the intentional ones. I tried adding idle_test/test_zdummy.py with a tearDownModule that deletes

[issue18113] Memory leak in curses.panel

2013-06-16 Thread A.M. Kuchling
A.M. Kuchling added the comment: serhiy.storchaka: good point! I wonder if, for strict correctness, we should only incref obj (the new object) if set_panel_userptr() returns OK and not an error code. I've attached a new version of the patch that does this check, and also adds a test.

[issue18076] Implement importlib.util.decode_source()

2013-06-16 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- title: Implement importlib.util.decode_source_bytes() - Implement importlib.util.decode_source() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18076

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Vinay Sajip
Vinay Sajip added the comment: I would change the reverted test_logging to add print(logging._warnings_showwarning) before the failing assertions. If this is bound to the original warnings.showwarning implementation, all should be well. If it points to e.g. idle_showwarning, you would expect

[issue18228] AIX locale parsing failure

2013-06-16 Thread David Edelsohn
David Edelsohn added the comment: The problem is Lib/test/regrtest.py. _lc = [getattr(locale, lc) for lc in dir(locale) if lc.startswith('LC_')] The list of locales that start with 'LC_' includes LC_ALL. On AIX, at least, setlocal(LC_ALL,NULL) returns a string with the locales for each

[issue18234] Unicodedata module should provide access to codepoint aliases

2013-06-16 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: Python is aware of unicode codepoint aliases, but unicodedata does not provide a way to find aliases of a given codepoint: ucd.lookup('ESCAPE') == '\N{ESCAPE}' True ucd.lookup('RS') == '\N{RS}' True but ucd.name('\N{ESCAPE}') Traceback (most

[issue18235] _sysconfigdata.py wrong on AIX installations

2013-06-16 Thread David Edelsohn
New submission from David Edelsohn: _sysconfigdata.py includes information about how to build extension modules. On AIX this requires a wrapper script to build shared libraries. The file includes definitions like: 'BLDSHARED': './Modules/ld_so_aix gcc -pthread -bI:./Modules/python.exp',

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

2013-06-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I took another look at the library reference and it looks like when it comes to non-ascii digits support, the reference contradicts itself. On one hand, int(x, base=10) If x is not a number or if base is given, then x must be a string, bytes, or

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

2013-06-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: i opened issue18236 to address the issue of surrounding whitespace. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10581 ___

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread R. David Murray
R. David Murray added the comment: As a side note, the various warnings about the execution environment being modified do not appear when tests are run under unittest because those warnings are generated by regrtest itself. -- ___ Python tracker

[issue18237] unittest.assertRaisesRegex(p) example is wrong in docs

2013-06-16 Thread Jeff Tratner
New submission from Jeff Tratner: One of the examples for assertRaisesRegex(p) is wrong by one character. Current is: self.assertRaisesRegexp(ValueError, 'invalid literal for.*XYZ$', int, 'XYZ') The $ at the end is wrong because the actual error message is ValueError:

[issue18103] Create a GUI test framework for Idle

2013-06-16 Thread R. David Murray
R. David Murray added the comment: Oh, actually I do know why that is. It is because requires is called from test_main in test_urllibnet, which unittest bypasses. So if you are calling it in particular tests, then I presume that will be an issue for the unittest case. --

[issue18081] test_logging failure in WarningsTest on buildbots

2013-06-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: The only locale setting is IOBinding.py: 21 # Try setting the locale, so that we can find out what encoding to use locale.setlocale(locale.LC_CTYPE, ) This section, up to line 65, might be wrapped either by a function or if statement. There are only 2

[issue18238] test_signal.py wait_helper hangs on AIX

2013-06-16 Thread David Edelsohn
New submission from David Edelsohn: test_signal.py wait_helper hangs on AIX. Please skip the test on AIX for now to allow all other tests to run to completion. diff -r bdd60bedf933 Lib/test/test_signal.py --- a/Lib/test/test_signal.py Sun Jun 16 18:37:53 2013 -0400 +++

[issue18211] -Werror=statement-after-declaration problem

2013-06-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: Yes, we definitely need some way for CPython compiler flags to not infect everything built with distutils. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18211

[issue18211] -Werror=statement-after-declaration problem

2013-06-16 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/issue18211 ___

[issue18103] Create a GUI test framework for Idle

2013-06-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: I should have explicitly said 'all test methods in one test file'. I included ' caller is __main__' in the requires 'pass' condition. My first question was only about, for instance, running test_grep from the 'if __name__ ...' part of GrepDialog, For that, I

[issue18167] cgi.FieldStorage fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines

2013-06-16 Thread Rail Aliiev
Changes by Rail Aliiev r...@iqchoice.com: -- nosy: +rail ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18167 ___ ___ Python-bugs-list mailing list

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

2013-06-16 Thread Trent Nelson
Changes by Trent Nelson tr...@snakebite.org: -- nosy: +trent ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3329 ___ ___ Python-bugs-list mailing

[issue18203] Replace direct calls to malloc() with PyMem_Malloc() or PyMem_RawMalloc()

2013-06-16 Thread Trent Nelson
Changes by Trent Nelson tr...@snakebite.org: -- nosy: +trent ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18203 ___ ___ Python-bugs-list mailing

[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks

2013-06-16 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Exception messages are wrong. They contain name of source file instead of target file. -- resolution: fixed - stage: committed/rejected - status: closed - open ___ Python tracker

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

2013-06-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I have started a rough prototype for what I plan to eventually reimplement in C and propose as a patch here. https://bitbucket.org/alexander_belopolsky/misc/src/c175171cc76e/utoi.py?at=master Comments welcome. --

[issue18231] What's new in Python should explain what's new in UCD

2013-06-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: Are you sure that the permission to use KHMER VOWEL INHERENT AQ in an identifier is worth mentioning? Very few of the Python developers speak Khmer in the first place, let alone have the desire to use it in a Python identifier. -- nosy: +loewis