[issue18219] csv.DictWriter is slow when writing files with large number of columns
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 rep...@bugs.python.org http://bugs.python.org/issue18219 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18227] Use Python memory allocators in external libraries like zlib or OpenSSL
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 list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18203] Replace direct calls to malloc() with PyMem_Malloc() or PyMem_RawMalloc()
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 list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18229] attribute headers of http.server.BaseHTTPRequestHandler sometimes does not exists
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 - - [16/Jun/2013 11:38:11] ^NU+008E^@f¸ãÄòQ;³xU+0092b^C^HÄA7 81.172.30.254 - - [16/Jun/2013 11:39:22] ^SBitTorrent protocol^@^@^@^@^@^X^@^Ej 81.172.30.254 - - [16/Jun/2013 11:40:35] ÃU+008D¬0æzU+0093zr^DU+009B2]WQ Exception happened during processing of request from ('81.172.30.254', 63650) Traceback (most recent call last): File c:\Python33\lib\socketserver.py, line 306, in _handle_request_noblock self.process_request(request, client_address) File c:\Python33\lib\socketserver.py, line 332, in process_request self.finish_request(request, client_address) File c:\Python33\lib\socketserver.py, line 345, in finish_request self.RequestHandlerClass(request, client_address, self) File c:\Python33\lib\socketserver.py, line 666, in __init__ self.handle() File c:\Python33\lib\http\server.py, line 400, in handle self.handle_one_request() File c:\Python33\lib\http\server.py, line 380, in handle_one_request if not self.parse_request(): File c:\Python33\lib\http\server.py, line 283, in parse_request self.send_error(400, Bad request version (%r) % version) File c:\Python33\lib\http\server.py, line 428, in send_error self.send_response(code, message) File c:\Python33\lib\http\server.py, line 443, in send_response self.log_request(code) File c:\Users\joru\Dropbox\programowanie\demoniszcze\server\_lowerHTTP.py, line 30, in log_request xff=req.headers.get('X-Forwarded-For') AttributeError: '_HNDL_3' object has no attribute 'headers' # _HNLD_3 derives from http.server.BaseHTTPRequestHandler -- assignee: docs@python components: Documentation messages: 191264 nosy: docs@python, joru priority: normal severity: normal status: open title: attribute headers of http.server.BaseHTTPRequestHandler sometimes does not exists type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18229 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18197] insufficient error checking causes crash on windows
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18197 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18081] test_logging failure in WarningsTest on buildbots
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 failing instance's list of tests and then slowly pruning it down to find the trigger (if it's not a timing thing). -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18081] test_logging failure in WarningsTest on buildbots
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 which helped do a binary search for what tests cause a failure but I can't find it. Am I imagining things? -- nosy: +kbk, roger.serwy, terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18113] Memory leak in curses.panel
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 - open Added file: http://bugs.python.org/file30606/userptr-segfault.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18113 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18113] Memory leak in curses.panel
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 http://bugs.python.org/issue18113 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13886] readline-related test_builtin failure
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18230] test_builtin fails/hangs when run after test_getopt
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: 191270 nosy: brett.cannon priority: normal severity: normal stage: needs patch status: open title: test_builtin fails/hangs when run after test_getopt type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18230 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17734] Failure when running test_builtin after test_genexps
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17734] Failure when running test_builtin after test_genexps
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17734 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18230] test_builtin fails/hangs when run after test_getopt
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18230 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14015] surrogateescape largely missing from documentation
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14015 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17177] Deprecate imp
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 http://bugs.python.org/issue17177 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17177] Deprecate imp
Changes by Brett Cannon br...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17177 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18176] Builtins documentation refers to old version of UCD.
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18176] Builtins documentation refers to old version of UCD.
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 `UCD version 6.2.0 Doc/library/unicodedata.rst:19:http://www.unicode.org/Public/6.2.0/ucd`_. Doc/library/unicodedata.rst:169:.. [#] http://www.unicode.org/Public/6.2.0/ucd/NameAliases.txt Doc/library/unicodedata.rst:171:.. [#] http://www.unicode.org/Public/6.2.0/ucd/NamedSequences.txt I added a note next to UNIDATA_VERSION = 6.2.0 in makeunicodedata.py script. The makeunicodedata.py would be a place to put code that would update the docs automatically, but with only two affected files I don't think this is worth the effort. Chances are at least unicodedata.rst will benefit from a manual review to reflect any substantive changes in the UCD. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18223] Refactor test_tarfile
Serhiy Storchaka added the comment: Oh, sorry, I missed issue17689. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18223 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18081] test_logging failure in WarningsTest on buildbots
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 [1/1] test_idle Warning -- os.environ was modified by test_idle Warning -- locale was modified by test_idle 1 test altered the execution environment: test_idle Of course, the idle test code itself does no such modification. So I have no idea what the warning is about or how to stop it. F:\Python\dev\cpython\PCbuildpython_d -m test.test_idle which runs under unittest, does not produce the warning. The other test files that use tcl/tk/tkinter, test_tcl, test_tk, test_ttk_guionly, and test_ttk_textonly, produce the os.environ warning but not the locale warning. I duplicated the failure with the command you gave. Substituting _tcl or _tk for _idle removes the error. So perhaps the locale alteration, however it happens, is the problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18231] What's new in Python should explain what's new in UCD
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 directly affect python programs. For example addition of new characters accepted as decimal digits in UCD 6.1.0. -- assignee: docs@python messages: 191278 nosy: belopolsky, docs@python priority: normal severity: normal status: open title: What's new in Python should explain what's new in UCD versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18231 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18231] What's new in Python should explain what's new in UCD
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18231] What's new in Python should explain what's new in UCD
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 1 a឴ = 5 ^ SyntaxError: invalid character in identifier -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18231 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18057] Register NamespaceLoader with importlib.abc.Loader
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18058] Define is_package for NamespaceLoader
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18058] Define is_package for NamespaceLoader
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 rep...@bugs.python.org http://bugs.python.org/issue18058 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18232] running a suite with no tests is not an error
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 without error, running the resulting suite is worthless, as it has no tests. This is a bit of a sliding slope - what if discover finds one test when there should be 1000's ? Anyhow, filing this because there's been a few times when things have gone completely wrong that it would have helped CI systems detect that. (For instance, the tests package missing entirely, but tests were being scanned in the whole source tree, so no discover level error occurred). I'm thinking I'll add a '--min-tests=X' parameter to unittest.main, with the semantic that if there are less than X tests executed, the test run will be considered a failure, and folk can set this to 1 for the special case, or any arbitrary figure that they want for larger suites. -- messages: 191282 nosy: michael.foord, rbcollins priority: normal severity: normal status: open title: running a suite with no tests is not an error ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18232 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17405] Add _Py_memset_s() to securely clear memory
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 PyCapsule_Type: /* Hack to force loading of pycapsule.o */ PyTypeObject *_PyCapsule_hack = PyCapsule_Type; I have updated my patch. -- Added file: http://bugs.python.org/file30609/pymemsets.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17405 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18081] test_logging failure in WarningsTest on buildbots
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. Not sure how you want to fix it. Using warnings.catch_warnings() during import would solve it, but I don't know if that's how you want to go in case that showwarnings replacement is needed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18232] running a suite with no tests is not an error
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18081] test_logging failure in WarningsTest on buildbots
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 'the Idle way' ;-). I am not sure which test file indirectly imports PyShell, but one must. Idle was written to be run from the command line. It was not written to be imported but not run, as in a test environment, or to be run as part of another script. Roger, can the monkey patching be put in a function that is only called when Idle runs? Perhaps in PyShell.main and run.main? There is no need to reformat warning sent to the console (if there is one) during import, before Idle starts. Can the monkey-patching be undone when Python exits (in case it is being run from within a script)? In the meanwhile, I will try using support.import_fresh_module('warnings') in test_logging, or better, saving and restoring warnings in test_idle. [Although the alteration warnings are red-herrings for this issue, I am sure silencing them, including in tkinter tests, would be a good idea.] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18147] SSL: diagnostic functions to list loaded CA certs
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: http://bugs.python.org/file30610/ssl_ca_stats3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18233] SSLSocket.getpeercertchain()
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 data from the peer. The information is already exchanged for cert validation. -- files: ssl_peerchertchain.patch keywords: patch messages: 191287 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: SSLSocket.getpeercertchain() type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30611/ssl_peerchertchain.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18233 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17925] asynchat.async_chat.initiate_send : del deque[0] is not safe
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 rep...@bugs.python.org http://bugs.python.org/issue17925 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18223] Refactor test_tarfile
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 :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18223 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18115] Use importlib.util.module_to_load in all loaders in importlib
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 tracker rep...@bugs.python.org http://bugs.python.org/issue18115 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18115] Use importlib.util.module_to_load in all loaders in importlib
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18228] AIX locale parsing failure
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo, lemburg, trent ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18228 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18081] test_logging failure in WarningsTest on buildbots
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 original warnings implementation is used when an explicit file is passed to warnings.showwarning, but it assumes that original implementation is the one in warnings when comparing the output from that (supposed) original implementation. +1 to restoring the environment and locale in test_idle, too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18223] Refactor test_tarfile
Changes by Michael Foord mich...@voidspace.org.uk: -- nosy: -michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18223 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18224] pyvenv pydoc.py script causing AttributeErrors on Windows
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 added to sys.path? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18224 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18076] Implement importlib.util.decode_source_bytes()
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18076] Implement importlib.util.decode_source_bytes()
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 rep...@bugs.python.org http://bugs.python.org/issue18076 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18081] test_logging failure in WarningsTest on buildbots
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 -- warnings.filters was modified by test_logging test test_logging failed -- Traceback (most recent call last): File F:\Python\dev\cpython\lib\test\test_logging.py, line 1779, in test_warnings_no_handlers self.assertEqual(len(logger.handlers), 1) AssertionError: 0 != 1 Relevant code: with warnings.catch_warnings(): logging.captureWarnings(True) self.addCleanup(logging.captureWarnings, False) # confirm our assumption: no loggers are set logger = logging.getLogger(py.warnings) self.assertEqual(logger.handlers, []) warnings.showwarning(Explicit, UserWarning, dummy.py, 42) self.assertEqual(len(logger.handlers), 1) self.assertIsInstance(logger.handlers[0], logging.NullHandler) Since the above lines have not been touched in 2 years, and presumably worked before, perhaps something changed in warnings.catchwarnings or logging.capturewarnings so that NullHandler is no longer added. With import_fresh_module added to the test.support import (line 69) and warnings imported with warnings = import_fresh_module('warnings'); cpython\PCbuildpython_d -m test test_logging produces the same error as above, so it works to eliminate the effect of Idle running first, and could be used as a temporary fix. Side note: on Win7, should I see this? test_basic (test.test_logging.NTEventLogHandlerTest) ... skipped 'win32evtlog/win32evtlogutil required for this test.' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18176] Builtins documentation refers to old version of UCD.
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 deliberately written so that it avoids mentioning specific version of Unicode. For example, PropList.txt in the Identifiers and keywords section is linked to the location of the latest published PropList.txt: http://unicode.org/Public/UNIDATA/PropList.txt. This means that as of today, all versions of documentation (3.0 through 3.4) refere to Unicode 6.2.0 version of this file. This may be misleading for the users of the older python versions. In the same section, there is a reference top a non-normative HTML file listing all valid identifier characters for Unicode 4.1. I would suggest that instead of linking to an external resource we generate a similar table (possibly in ReST format) in makeunicodedata.py and include it with documentation. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18081] test_logging failure in WarningsTest on buildbots
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 sys.modules['warnings']. This 'works' in that the original failure passes, as with the change to test_logging, and 'dummy.py:42: UserWarning: Explicit' is printed. But with test_logging unchanged from when it ran and passed, I see the same 0 != 1 error as in the last message plus Traceback (most recent call last): File F:\Python\dev\cpython\lib\test\test_logging.py, line 1757, in test_warnings self.assertGreater(s.find(UserWarning: I'm warning you...\n), 0) AssertionError: -1 not greater than 0 -- keywords: +patch Added file: http://bugs.python.org/file30613/zdummy.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18113] Memory leak in curses.panel
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. (OTOH, looking at the ncurses 5.9 source code, set_panel_userptr() only returns an error if the panel object is NULL, which should never happen because Python reports an error if the panel creation fails. So maybe the rc == ERR check is pointless.) -- Added file: http://bugs.python.org/file30614/userptr_segfault_revised.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18113 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18076] Implement importlib.util.decode_source()
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18081] test_logging failure in WarningsTest on buildbots
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 to get a failure, as idle_showwarning formats warning messages differently from what warnings.showwarning is originally bound to. I think the right fix is to take the approach that logging does: have PyShell.py grow a captureWarnings(bool) function which either captures the old values before setting idle_showwarning/idle_formatwarning or restores them, according to the Boolean passed in. The PyShell.captureWarnings(True) could be called from PyShell module-level code if a side-effect free import is unavoidable, but test_idle could call PyShell.captureWarnings(False) to put things back as they were. I would have thought you could avoid side-effects by having the PyShell.captureWarnings(True) called from somewhere in the code path followed from if __name__ == '__main__', or from test_idle code. Re. Your side note - IIRC that skip of the NTEventLogHandler is expected, unless you install some win32 components which aren't shipped with stock Python (Mark Hammond's pywin32 project, available on SourceForge). They are shipped with other Python distributions, e.g. ActivePython. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18228] AIX locale parsing failure
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 locale category. Lib/locale.py for getlocale() specifically says: category may be one of the LC_* value except LC_ALL. The following patch fixes the AIX testing problem. diff -r bdd60bedf933 Lib/test/regrtest.py --- a/Lib/test/regrtest.py Sun Jun 16 18:37:53 2013 -0400 +++ b/Lib/test/regrtest.py Sun Jun 16 22:05:52 2013 -0700 @@ -1231,7 +1231,7 @@ elif os.path.isdir(support.TESTFN): shutil.rmtree(support.TESTFN) -_lc = [getattr(locale, lc) for lc in dir(locale) if lc.startswith('LC_')] +_lc = [getattr(locale, lc) for lc in dir(locale) if lc.startswith('LC_') and lc != 'LC_ALL'] def get_locale(self): pairings = [] for lc in self._lc: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18228 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18234] Unicodedata module should provide access to codepoint aliases
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 recent call last): File stdin, line 1, in module ValueError: no such name ucd.name('\N{RS}') Traceback (most recent call last): File stdin, line 1, in module ValueError: no such name -- messages: 191300 nosy: belopolsky priority: normal severity: normal status: open title: Unicodedata module should provide access to codepoint aliases type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18234 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18235] _sysconfigdata.py wrong on AIX installations
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', 'LDSHARED': './Modules/ld_so_aix gcc -pthread -bI:./Modules/python.exp', 'LINKCC': './Modules/makexp_aix Modules/python.exp . libpython3.4dm.a; gcc ' '-pthread', 'MAKESETUP': './Modules/makesetup', which is correct in the build directory, but is not correct for the install directory. The paths do not correspond to the installed location of ld_so_aix and makexp_aix in lib/pythonX.Y/config . -- components: Extension Modules messages: 191301 nosy: David.Edelsohn priority: normal severity: normal status: open title: _sysconfigdata.py wrong on AIX installations type: behavior versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18235 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10581] Review and document string format accepted in numeric data type constructors
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 bytearray instance representing an integer literal in radix base. Optionally, the literal can be preceded by + or - (with no space in between) and surrounded by whitespace. http://docs.python.org/3/library/functions.html#int .. suggests that only an integer literal will be accepted by int(), but on the other hand, a note in the Numeric Types section says: The numeric literals accepted include the digits 0 to 9 or any Unicode equivalent (code points with the Nd property). http://docs.python.org/3/library/stdtypes.html#typesnumeric It also appears that surrounded by whitespace part is not entirely correct: '\N{RS}'.isspace() True int('123\N{RS}') Traceback (most recent call last): File stdin, line 1, in module ValueError: invalid literal for int() with base 10: '123\x1e' This is probably a bug in the current implementation and I will open a separate issue for that. -- versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10581 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10581] Review and document string format accepted in numeric data type constructors
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18081] test_logging failure in WarningsTest on buildbots
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 rep...@bugs.python.org http://bugs.python.org/issue18081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18237] unittest.assertRaisesRegex(p) example is wrong in docs
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: invalid literal for int() with base 10: 'XYZ' (with a ``'`` at the end). Two options for fixing. Option 1 - remove $ self.assertRaisesRegexp(ValueError, 'invalid literal for.*XYZ', int, 'XYZ') Option 2 - add ' self.assertRaisesRegexp(ValueError, 'invalid literal for.*XYZ\'$', int, 'XYZ') Same example is shown for assertRaisesRegex, so applies to both. And for completeness...here's something you can run to see the error [couldn't figure out how to attach two files]: import unittest class MyTest(unittest.TestCase): def test_example(self): # this fails self.assertRaisesRegexp(ValueError, 'invalid literal for.*XYZ$', int, 'XYZ') def test_option1(self): self.assertRaisesRegexp(ValueError, 'invalid literal for.*XYZ', int, 'XYZ') def test_option2(self): self.assertRaisesRegexp(ValueError, 'invalid literal for.*XYZ\'$', int, 'XYZ') unittest.main() -- assignee: docs@python components: Documentation files: unittest.patch keywords: patch messages: 191306 nosy: docs@python, jtratner priority: normal severity: normal status: open title: unittest.assertRaisesRegex(p) example is wrong in docs versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file30615/unittest.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18103] Create a GUI test framework for Idle
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18103 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18081] test_logging failure in WarningsTest on buildbots
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 os.environ accesses and no settings in Idle. This alteration might be inherited from tkinter. File tkinter/_fix.py sets TCL/TK/TIX_LIBRARY if they are not already. This seem innocuous as far as other tests go. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18238] test_signal.py wait_helper hangs on AIX
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 +++ b/Lib/test/test_signal.py Mon Jun 17 00:10:01 2013 -0700 @@ -593,6 +593,7 @@ assert_python_ok('-c', code) +@unittest.skipIf(sys.platform == aix7, Test hangs on AIX) @unittest.skipUnless(hasattr(signal, 'pthread_sigmask'), 'need signal.pthread_sigmask()') def wait_helper(self, blocked, test): -- components: Tests messages: 191310 nosy: David.Edelsohn priority: normal severity: normal status: open title: test_signal.py wait_helper hangs on AIX type: behavior versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18238 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18211] -Werror=statement-after-declaration problem
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18211] -Werror=statement-after-declaration problem
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18211 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18103] Create a GUI test framework for Idle
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 verified as part of #18081 that setting support.use_resources is possible. My second question was about running all tests in one test_idle file from the command line. If not possible, so be it. I just need to document the limitation. Since multiple skips are acceptable, the 'framework' patch for this issue will just be a change to README explaining the use of the gui resource and when it is needed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18103 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18167] cgi.FieldStorage fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines
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 Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3329] API for setting the memory allocator used by Python
Changes by Trent Nelson tr...@snakebite.org: -- nosy: +trent ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3329 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18203] Replace direct calls to malloc() with PyMem_Malloc() or PyMem_RawMalloc()
Changes by Trent Nelson tr...@snakebite.org: -- nosy: +trent ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18203 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks
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 rep...@bugs.python.org http://bugs.python.org/issue17222 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10581] Review and document string format accepted in numeric data type constructors
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10581 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18231] What's new in Python should explain what's new in UCD
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18231 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com