[issue23835] configparser does not convert defaults to strings
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +lukasz.langa type: crash - behavior versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23835 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22035] Fatal error in dbm.gdbm
Serhiy Storchaka added the comment: The patch for issue3999 was rejected because Python internal state may be corrupted when the SIGSEGV signal is raised. This is not the case of this issue. gdbm fatal function is called when Python is in consistent state. So we free to use any Python C-API. But internal state of concrete GDBM_FILE may be corrupted, so we shouldn't use it after handling fatal error. This cause a leak, but I think that a leak with an exception is better than just a crash. May be different type of exception should be raised. May be we need FatalError that inherits from BaseException. Other external libraries used by the stdlib also can crash, and perhaps crashes can be converted to exceptions. This issue is only first in the series. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22035 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23834] socketmodule.c: add sock_call() to fix how the timeout is recomputed
STINNER Victor added the comment: sock_call-2.patch: add an inner looop in sock_call() to only retry func() when func() is interrupted by a signal. Limit also changes: try to only modify ctx around to call to sock_call(), move back some variables to the parent function. Rename the variable storing the result to result. Add some more comments in sock_call(). -- Added file: http://bugs.python.org/file38774/sock_call-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23834 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23836] PEP 475: Enhance faulthandler to handle better reentrant calls
Changes by STINNER Victor victor.stin...@gmail.com: Added file: http://bugs.python.org/file38776/traceback_eintr.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23836 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23836] PEP 475: Enhance faulthandler to handle better reentrant calls
Changes by STINNER Victor victor.stin...@gmail.com: Added file: http://bugs.python.org/file38777/faulthandler_eintr.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23836 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23836] PEP 475: Enhance faulthandler to handle better reentrant calls
New submission from STINNER Victor: While working on the PEP 475, I noticed that the faulthandler module doesn't handle well reentrant calls to its signal handlers. If a signal is received while faulthandler is displaying the traceback, faulthandler restarts to display a new traceback (and then finish to display the previous traceback). Moreover, faulthandler uses the C function write() to display the traceback and it ignores write() errors. It should retry write() if write() is interrupted by a signal (fails with EINTR). Attached py_write_noraise.patch: - Add a new _Py_write_noraise() function - Document functions releasing the GIL Attached traceback_eintr.patch: - Modify functions displaying traceback to use _Py_write_noraise() instead of write() Attached faulthandler_eintr.patch: - Add a reentrant flag to the two signal handlers of faulthandler - Modify faulthandler.dump_traceback() to call PyErr_CheckSignals(), to call the Python signal handler if a signal was received while faulthandler was displaying the traceback of all Python threads -- files: py_write_noraise.patch keywords: patch messages: 239776 nosy: haypo priority: normal severity: normal status: open title: PEP 475: Enhance faulthandler to handle better reentrant calls versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file38775/py_write_noraise.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23836 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23836] PEP 475: Enhance faulthandler to handle better reentrant calls
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23836 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23648] PEP 475 meta issue
STINNER Victor added the comment: New issue #23836: Enhance faulthandler to handle better reentrant calls. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23648 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22035] Fatal error in dbm.gdbm
STINNER Victor added the comment: 2015-04-01 10:39 GMT+02:00 Serhiy Storchaka rep...@bugs.python.org: Other external libraries used by the stdlib also can crash, and perhaps crashes can be converted to exceptions. This issue is only first in the series. I don't think that it's a good practice to try to workaround bugs. IMO it's better to modify libraries directly to allow users of the library to handle correctly errors. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22035 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23618] PEP 475: handle EINTR in the socket module (connect)
Roundup Robot added the comment: New changeset 8ec4acfdb851 by Victor Stinner in branch 'default': Issue #23618: Fix EINTR handling on Windows https://hg.python.org/cpython/rev/8ec4acfdb851 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23618 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23648] PEP 475 meta issue
Changes by STINNER Victor victor.stin...@gmail.com: -- dependencies: +PEP 475: Enhance faulthandler to handle better reentrant calls ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23648 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23837] read pipe transport tries to resume reading after loop is gone
New submission from Mathias Fröjdman: Script attached which reproduces the issue. Steps to reproduce: 0) Use python 3.4.3 on Linux. Does not repro with 3.4.0 or 3.4.2. 1) Create a child process with asyncio.create_child_exec and stdout=PIPE 2) loop yield from child.read(n) (i used n=2048, any other positive value StreamRead._limit ought to work too) 3) Write = StreamRead._limit * 2 + 1 (by default 2**17+1) bytes from child process and exit File referenced below: asyncio/streams.py feed_data is called when data arrives from the child process. Having more than 2 * self._limit bytes in self._buffer will lead to StreamReader pausing reading on line 372. feed_eof sets self._eof to True, but that value is not checked in relevant sections later. Child process exits, which will lead to self._loop = None being set apparently on line 405 of _UnixReadPipeTransport._call_connection_lost in asyncio/unix_events.py (could not find any other location where it would be set to None). After a number of read()s, self._maybe_resume_transport() is called when len(self._buffer) = self._limit (ie. = 64k left in buffer). self._paused will evaluate true too, so self._transport.resume_reading() is called on line 349. That will call self._loop.add_reader(self._fileno, self._read_ready) on line 364 of asyncio/unix_events.py. self._loop is None, so and AttributeError is raised when None has no add_reader attribute: Traceback (most recent call last): File child_reader.py, line 29, in module print('read {} bytes from child'.format(loop.run_until_complete(fail( File /home/frojma/python-3.4.3/lib/python3.4/asyncio/base_events.py, line 316, in run_until_complete return future.result() File /home/frojma/python-3.4.3/lib/python3.4/asyncio/futures.py, line 275, in result raise self._exception File /home/frojma/python-3.4.3/lib/python3.4/asyncio/tasks.py, line 238, in _step result = next(coro) File child_reader.py, line 15, in fail chunk = yield from child.stdout.read(2048) File /home/frojma/python-3.4.3/lib/python3.4/asyncio/streams.py, line 478, in read self._maybe_resume_transport() File /home/frojma/python-3.4.3/lib/python3.4/asyncio/streams.py, line 354, in _maybe_resume_transport self._transport.resume_reading() File /home/frojma/python-3.4.3/lib/python3.4/asyncio/unix_events.py, line 364, in resume_reading self._loop.add_reader(self._fileno, self._read_ready) -- components: asyncio files: child_reader.py messages: 239779 nosy: gvanrossum, haypo, mwf, yselivanov priority: normal severity: normal status: open title: read pipe transport tries to resume reading after loop is gone type: crash versions: Python 3.4 Added file: http://bugs.python.org/file38778/child_reader.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23837 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23799] Join started threads in tests
Roundup Robot added the comment: New changeset f8358f6e50e7 by Serhiy Storchaka in branch '2.7': Issue #23799: Added test.test_support.start_threads() for running and https://hg.python.org/cpython/rev/f8358f6e50e7 New changeset 8987218adc99 by Serhiy Storchaka in branch '3.4': Issue #23799: Added test.support.start_threads() for running and cleaning up https://hg.python.org/cpython/rev/8987218adc99 New changeset a2df4baa112b by Serhiy Storchaka in branch 'default': Issue #23799: Added test.support.start_threads() for running and cleaning up https://hg.python.org/cpython/rev/a2df4baa112b -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23799 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23841] py34 OrderedDict is using weakref for root reference
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23841 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23839] Clear caches after every test
Serhiy Storchaka added the comment: We should try to know how it impacts a performance. I suppose not too much, but may be my intuition lies me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23839 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23838] linecache and MemoryError
Serhiy Storchaka added the comment: getlines() already returns an empty list on OSError. Clearing the cache on MemoryError will help to avoid other MemoryErrors. And after this there is a large chance the repeated reading will be successful. In any case it wouldn't make worse. If don't change linecache, then we should patch all places where linecache is used: traceback, idlelib, warnings, trace, debugger, etc. I intentionally made the fix at the low level, so it fixes all issues in one place. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23841] py34 OrderedDict is using weakref for root reference
New submission from sorin: The standard library implementation of an OrderedDict (which is included in Python 3.4) uses a weakref for the root reference. https://hg.python.org/cpython/file/534b26837a13/Lib/collections/__init__.py#l74 This was reported initially on https://github.com/kennethreitz/requests/issues/2303 and at the moment there are no known workarounds. -- components: Library (Lib) messages: 239789 nosy: sorin priority: normal severity: normal status: open title: py34 OrderedDict is using weakref for root reference type: compile error versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23841 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12319] [http.client] HTTPConnection.putrequest not support chunked Transfer-Encodings to send data
Martin Panter added the comment: The incremental improvement thing sounds good. Here are some things which I think are orthogonal to sensible chunked encoding: * Automagic seeking to determine Content-Length * Setting Content-Length for iterables that are neither strings, iterators nor files (Issue 23350) * Latin-1 encoding of iterated items -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12319 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23839] Clear caches after every test
Serhiy Storchaka added the comment: max_rss is a little larger 500 MB after ran all testsuite (except bigmem tests) on 32-bit Linux. Only few tests needs more than 200 MB. But may be some 64-bit only tests consume more memory. If a test consume more than 1GiB of memory and is not decorated with bigmemtest, it should be considered as a bug. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23839 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Library (Lib) stage: - needs patch type: - resource usage ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23840 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser
Arfrever Frehtes Taifersar Arahesis added the comment: Also please apply inherit-doctype.v2.patch in 3.4 branch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19176 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23841] py34 OrderedDict is using weakref for root reference
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +rhettinger type: compile error - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23841 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23839] Clear caches after every test
STINNER Victor added the comment: Maybe tests known to fill caches should clear theirself caches at cleanup? Always clearing all caches may have an impact on performances and so makes tests longer. Caches are designed to speedup Python :-) We may add some helper functions in test.support for the most common caches, but not to clear *all* caches. By the way, forcing calls to gc.collect() may make tests more reliable. It would avoid to get warnings 4 lines after the test leaking a resource finished. But it's not easy to make this reliable, because unittest stores a lot of things. unittest.TestCase.run() stores exceptions which store a traceback which stores frames which store references to local variables. Instead of storing a whole sys.exc_info(), we can maybe use the new light traceback.TracebackException which only stores info required to format a traceback as text, without storing all these heavily objects creating reference cycles. (Hum, it becomes a little off-topic, sorry, we may open a new separated issue.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23839 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23839] Clear caches after every test
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23839 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23838] linecache and MemoryError
STINNER Victor added the comment: 2015-04-01 14:02 GMT+02:00 Serhiy Storchaka rep...@bugs.python.org: getlines() already returns an empty list on OSError. Oh, I misread getlines(), you're right. Clearing the cache on MemoryError will help to avoid other MemoryErrors. And after this there is a large chance I agree, but please avoid retrying on MemoryError. IMO clearing the cache and return [] is enough. If don't change linecache, then we should patch all places where linecache is used: traceback, idlelib, warnings, trace, debugger, etc. I intentionally made the fix at the low level, so it fixes all issues in one place. I agree. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23756] Tighten definition of bytes-like objects
Stefan Krah added the comment: I have a somewhat general concern: In the last year or so, issues seem to expand far beyond the scope that's indicated by the issue title. For example, I don't particularly care about the definition of bytes-like, but the patch contains changes to areas I *do* care about. I don't think all of the changes are an improvement: What is the flattened length, why does C-contiguous have to be explained? -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23756 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23839] Clear caches after every test
STINNER Victor added the comment: By the way, a workaround is also to run each test (file) in a new fresh process. It's a common way to work around memory fragmentation ;-) On some machines with limited resources this can cause multiple MemoryErrors. Do you have an idea of the memory usage of the Python test suite? You may run it with tracemalloc to get the memory peak from tracemalloc.get_traced_memory()[1]. I mean, memory is cheap nowadays. If you get MemoryError, it's probably more a bug than tests leaking more and more memory, no? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23839 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9232] Allow trailing comma in any function argument list.
Martin Panter added the comment: Actual post by Raymond: https://mail.python.org/pipermail/python-dev/2010-December/106790.html Just noticed there are some arguments for trailing commas in the FAQ: https://docs.python.org/dev/faq/design.html#why-does-python-allow-commas-at-the-end-of-lists-and-tuples -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9232 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23838] linecache and MemoryError
Serhiy Storchaka added the comment: OK, here is a patch that just clear the cache and returns an empty result. It is hard to write reliable test, but I think we will see the result on OpenIndiana buildbot. The question is left: should the patch be applied only on 3.5 or all versions? -- Added file: http://bugs.python.org/file38782/linecache_memoryerror_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23838] linecache and MemoryError
STINNER Victor added the comment: It is hard to write reliable test Ah? Why not using something like mock.patch('mock.updatecache', side_effect=MemoryError)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23756] Tighten definition of bytes-like objects
Serhiy Storchaka added the comment: +1 for the idea overall and the patch LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23756 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error
STINNER Victor added the comment: I sent an email to the python core mentorship mailing list to find a volunteer to fix this easy issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23840 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23838] linecache and MemoryError
New submission from Serhiy Storchaka: When format a traceback of MemoryError, linecache tries to read all lines of source file and likely raises a MemoryError. For example: http://buildbot.python.org/all/builders/x86%20OpenIndiana%203.x/builds/9712/steps/test/logs/stdio Traceback (most recent call last): File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/regrtest.py, line 1280, in runtest_inner test_runner() File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_socket.py, line 5340, in test_main support.run_unittest(*tests) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/support/__init__.py, line 1808, in run_unittest _run_suite(suite) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/support/__init__.py, line 1774, in _run_suite result = runner.run(suite) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/unittest/runner.py, line 176, in run test(result) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/unittest/suite.py, line 84, in __call__ return self.run(*args, **kwds) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/unittest/suite.py, line 122, in run test(result) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/unittest/suite.py, line 84, in __call__ return self.run(*args, **kwds) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/unittest/suite.py, line 122, in run test(result) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/unittest/case.py, line 625, in __call__ return self.run(*args, **kwds) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/unittest/case.py, line 585, in run self._feedErrorsToResult(result, outcome.errors) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/unittest/case.py, line 518, in _feedErrorsToResult result.addError(test, exc_info) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/unittest/runner.py, line 67, in addError super(TextTestResult, self).addError(test, err) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/unittest/result.py, line 17, in inner return method(self, *args, **kw) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/unittest/result.py, line 115, in addError self.errors.append((test, self._exc_info_to_string(err, test))) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/unittest/result.py, line 186, in _exc_info_to_string exctype, value, tb, limit=length, capture_locals=self.tb_locals) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/traceback.py, line 456, in __init__ capture_locals=capture_locals) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/traceback.py, line 341, in extract f.line File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/traceback.py, line 270, in line self._line = linecache.getline(self.filename, self.lineno).strip() File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/linecache.py, line 16, in getline lines = getlines(filename, module_globals) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/linecache.py, line 44, in getlines return updatecache(filename, module_globals) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/linecache.py, line 134, in updatecache lines = fp.readlines() MemoryError During handling of the above exception, another exception occurred: Traceback (most recent call last): File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/regrtest.py, line 532, in main result = runtest(*args, **kwargs) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/regrtest.py, line 967, in runtest display_failure=False) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/regrtest.py, line 1304, in runtest_inner msg = traceback.format_exc() File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/traceback.py, line 161, in format_exc return .join(format_exception(*sys.exc_info(), limit=limit, chain=chain)) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/traceback.py, line 115, in format_exception type(value), value, tb, limit=limit).format(chain=chain)) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/traceback.py, line 456, in __init__ capture_locals=capture_locals) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/traceback.py, line 341, in extract f.line File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/traceback.py, line 270, in line self._line = linecache.getline(self.filename, self.lineno).strip() File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/linecache.py, line 16, in getline lines = getlines(filename, module_globals) File
[issue23839] Clear caches after every test
New submission from Serhiy Storchaka: Some caches can grow unlimitedly during running the testsuite (in particular linecache). On some machines with limited resources this can cause multiple MemoryErrors. Many of these MemoryErrors can be avoided if clear caches between tests. Lib/test/regrtest.py already contains a code for cleaning caches, but it is used only with the -R option. -- components: Tests messages: 239782 nosy: ezio.melotti, haypo, michael.foord, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: Clear caches after every test type: resource usage versions: Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23839 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23756] Tighten definition of bytes-like objects
Martin Panter added the comment: After doing a bit of reading and experimenting, I think we should at least restrict bytes-like objects to “C-contiguous”. Any looser definition risks memoryview(byteslike).tobytes() returning the bytes in a different order than their true in-memory order. Fortran-style contiguous arrays aren’t enough: import _testbuffer, sys fortran = memoryview(_testbuffer.ndarray([11, 12, 21, 22], format=B, flags=0, shape=[2, 2], strides=[1, 2], offset=0)) fortran.f_contiguous True fortran.c_contiguous False fortran.tolist() [[11, 21], [12, 22]] tuple(bytes(fortran)) (11, 21, 12, 22) sys.stdout.buffer.write(fortran) Traceback (most recent call last): File stdin, line 1, in module BufferError: memoryview: underlying buffer is not C-contiguous So I am proposing a patch which: * Restricts the bytes-like object definition to C-contiguous buffers * Explains what I think is actually meant by “contiguous” in the C API buffer protocol page. Turns out it is generally a more strict definition than I originally assumed. * Explains why memoryview.tobytes() is out of order for non C-contiguous buffers * Has a couple other fixes taking into acount memoryview.tolist() doesn’t work for zero dimensions, and is nested for more than one dimension -- keywords: +patch Added file: http://bugs.python.org/file38780/c-contig.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23756 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23838] linecache and MemoryError
STINNER Victor added the comment: Proposed patch clears the cache and repeats an attempt to read source file, and returns empty result if the second attempt fails (as when the source file can't be read). IMO it's a bad idea. You should not retry an operation on MemoryError but only do you best to limit errors. I don't think that it's correct to return an empty list for getlines() on MemoryError. So you maybe chose the wrong module: you should handle MemoryError in the traceback module, not in the linecache module. It's just fine to return an empty string for FrameSummary.line. It's common to not being able to display a line: because the .py was removed (only the .pyc is available), invalid line number, invalid filename (string or stdin), etc. If you are motivated to make the traceback module more reliable, you should maybe also enhance _Py_DisplaySourceLine() in Python/traceback.c. You can probably ignore almost all errors in _Py_DisplaySourceLine() (except (Exception, MemoryError): pass). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error
New submission from STINNER Victor: If TextIOWrapper constructor fails in tokenize.open(), the open binary file is not closed and a ResourceWarning is emited. Try attached patch: $ python3 -Wd ~/tokenize_open_bug.py tokenize.open failed: unknown encoding for 'test.py': xxx /home/haypo/tokenize_open_bug.py:13: ResourceWarning: unclosed file _io.BufferedReader name='test.py' print(tokenize.open failed: %s % err) The fix is quite simple: add try: ... except: buffer.close(); raise. If someone wants to fix this issue, an unit test must be added, test based on my script and ensures that the buffer is closed (ex: mock tokenize._builtin_open and checks that close() was called). -- files: tokenize_open_bug.py keywords: easy messages: 239786 nosy: haypo priority: normal severity: normal status: open title: tokenize.open() leaks an open binary file on TextIOWrapper error versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file38781/tokenize_open_bug.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23840 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23838] linecache and MemoryError
STINNER Victor added the comment: Serhiy: you look to be interested in fixing Python to not fail badly under low memory condition. You may take a look at #19817 which proposes a function to arbitrary limit the memory allocated to Python. I fixed a lot of issues found by failmalloc, but they are still serious issues. For example, unit tests crash on subinterpreter tests with failmalloc, and there is also the memory allocation failure when raising MemoryError: see #19835. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23838] linecache and MemoryError
Serhiy Storchaka added the comment: On other side, linecache tests already use updatecache(). Here is a patch with a test. -- Added file: http://bugs.python.org/file38783/linecache_memoryerror_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23838] linecache and MemoryError
STINNER Victor added the comment: linecache_memoryerror_3.patch reviewed (comments on Rietveld). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23833] email.header.Header folding modifies headers that include semi-colons
R. David Murray added the comment: The header folding algorithm is...not all that smart. There's a better one in the new policies in email in python3, which does not have this problem (it does have a few others, but the plan is to treat them as bugs and fix them :) IMO this isn't worth fixing in Python2, but if you want to propose a patch I'll review it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23833 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23484] SemLock acquire() keyword arg 'blocking' is invalid
R. David Murray added the comment: behavior vs enhancment for doc changes is really pretty meaningless/arbitrary, IMO. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23484 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23838] linecache and MemoryError
STINNER Victor added the comment: The question is left: should the patch be applied only on 3.5 or all versions? linecache_memoryerror_2.patch looks good to me, but it would be better with an unit test. IMO Python 2.7 and 3.4 can be fixed too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23838] linecache and MemoryError
Serhiy Storchaka added the comment: This test depends on implementation details. I prefer to avoid adding such tests for trivial changes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23838] linecache and MemoryError
Changes by Serhiy Storchaka storch...@gmail.com: -- type: - resource usage versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2211] Cookie.Morsel interface needs update
R. David Murray added the comment: Heh, I thought it was closed. I guess my eyes were distracted by the 'fixed' resolution. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2211 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23824] in-place addition of a shadowed class field
R. David Murray added the comment: And I'm telling you that *this is how Python is designed*, and it is not going to change. Class attributes are *special*, for a reason. Please do not reopen this issue again. If you wish to pursue this further, the language design discussion forum is the python-ideas mailing list. Guido participates in that list; so, you can talk directly to the language designer about this if you wish. You aren't going to get a very warm reception by saying it is broken, though, because there is lots and lots of Python code that makes use of how class attributes work. And like I said they are special, so suggesting that the way other scopes work be changed is also pretty much a non-starter, I'm pretty sure. -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23824 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23779] imaplib authenticate raises TypeError if authenticator tries to abort
R. David Murray added the comment: Looks good to me, thanks. -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23779 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23837] read pipe transport tries to resume reading after loop is gone
STINNER Victor added the comment: Oh, it looks like all pause_reading() and resume_reading() methods of transports check the status the transport (especially the _closing attribute), except two transports: _UnixReadPipeTransport and _SSLProtocolTransport. For _SSLProtocolTransport, I don't think that it matters because this transport is not used directly, but through _SelectorSslTransport or _ProactorSocketTransport and these transports already check the status. Here is a patch for _UnixReadPipeTransport, without patch yet. -- keywords: +patch Added file: http://bugs.python.org/file38784/read_pipe_pause_reading.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23837 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23821] test_pdb fails under -O
Roundup Robot added the comment: New changeset 26778732099d by Serhiy Storchaka in branch '3.4': Issue #23821: Fixed test_pdb failure under -O. https://hg.python.org/cpython/rev/26778732099d New changeset 23442d957793 by Serhiy Storchaka in branch 'default': Issue #23821: Fixed test_pdb failure under -O. https://hg.python.org/cpython/rev/23442d957793 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23821 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23838] linecache and MemoryError
Roundup Robot added the comment: New changeset d96e714a by Serhiy Storchaka in branch '2.7': Issue #23838: linecache now clears the cache and returns an empty result on https://hg.python.org/cpython/rev/d96e714a New changeset 88a0e6cd93c3 by Serhiy Storchaka in branch '3.4': Issue #23838: linecache now clears the cache and returns an empty result on https://hg.python.org/cpython/rev/88a0e6cd93c3 New changeset ab2326c801c2 by Serhiy Storchaka in branch 'default': Issue #23838: linecache now clears the cache and returns an empty result on https://hg.python.org/cpython/rev/ab2326c801c2 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23821] test_pdb fails under -O
Serhiy Storchaka added the comment: Thank you for your review Xavier. -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23821 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23756] Tighten definition of bytes-like objects
R. David Murray added the comment: Oh, and about the general concern: I agree that this issue was apparently about the glossary entry, so making other changes is suspect and at a minimum requires adding relevant people from the experts list to nosy to get proper review of other proposed changes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23756 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23756] Tighten definition of bytes-like objects
R. David Murray added the comment: I found the explanation of C-contiguous vs Fortran-contiguous helpful (and I've programmed in both of those languages, though granted not much :). However, based on that it is not obvious to me why having a fortran-contiguous buffer prevents it from being used in the bytes-like object contexts (though granted the order might be surprising to someone who is not thinking about the memory ordering and just assuming C). I don't have much of an opinion on the other non-glossary-entry changes, but at a quick read I'm not sure how much clarity they add, if any. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23756 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23838] linecache and MemoryError
Serhiy Storchaka added the comment: Thank you for your review Victor. Will look on OpenIndiana buildbot. -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23756] Tighten definition of bytes-like objects
Serhiy Storchaka added the comment: What people are needed? The patch looks as great improvement to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23756 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23756] Tighten definition of bytes-like objects
R. David Murray added the comment: Stefan, since he's the current maintainer of the memoryview implementation. Fortunately he spotted the issue :) Maybe Antoine, too; he's done work in this area. I'll add him. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23756 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23830] Add AF_IUCV support to sockets
Neale Ferguson added the comment: Thanks. Question/responses in-line On 4/1/15, 11:14 AM, Amaury Forgeot d'Arc rep...@bugs.python.org wrote: Amaury Forgeot d'Arc added the comment: Hi, First, please fill and submit a Contribution Agreement: https://www.python.org/psf/contrib/ Done but I never got the email confirmation - it was not in my spam fold either. Then about the patch: - This is a patch against Python2.7, which is frozen for new developments. This change will only be applied to python 3.5 or later. Understood. - There are some tab characters in the diff Will fix - Names are limited to 8 characters, but there is no check. I truncate, but I will add a check to be more programmer friendly - Names must be padded with spaces. This is done automatically in connect(), but these extra spaces should be removed in makesockaddr() so that the same names are returned. Will do, I was going to let the caller strip() but I will do it here instead. Is there an existing strip routine that I could call rather than writing my own (trivial) stripper? Do I resubmit the patch in the bug/enhancement report I had created? Neale -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23830 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22117] Rewrite pytime.h to work on nanoseconds
Roundup Robot added the comment: New changeset 65ac8e587bb0 by Victor Stinner in branch 'default': Issue #22117, issue #23485: Fix _PyTime_AsMilliseconds() and https://hg.python.org/cpython/rev/65ac8e587bb0 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22117 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23731] Implement PEP 488
Changes by Brett Cannon br...@python.org: Removed file: http://bugs.python.org/file38785/be7d966b660a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23731 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23842] SystemError: ../Objects/longobject.c:998: bad argument to internal function
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23842 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23830] Add AF_IUCV support to sockets
Amaury Forgeot d'Arc added the comment: Hi, First, please fill and submit a Contribution Agreement: https://www.python.org/psf/contrib/ Then about the patch: - This is a patch against Python2.7, which is frozen for new developments. This change will only be applied to python 3.5 or later. - There are some tab characters in the diff - Names are limited to 8 characters, but there is no check. - Names must be padded with spaces. This is done automatically in connect(), but these extra spaces should be removed in makesockaddr() so that the same names are returned. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23830 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23485] PEP 475: handle EINTR in the select and selectors module
Roundup Robot added the comment: New changeset 65ac8e587bb0 by Victor Stinner in branch 'default': Issue #22117, issue #23485: Fix _PyTime_AsMilliseconds() and https://hg.python.org/cpython/rev/65ac8e587bb0 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23485 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23756] Tighten definition of bytes-like objects
Serhiy Storchaka added the comment: See also issue23376. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23756 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23731] Implement PEP 488
Changes by Brett Cannon br...@python.org: -- hgrepos: +303 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23731 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23731] Implement PEP 488
Changes by Brett Cannon br...@python.org: -- keywords: +patch Added file: http://bugs.python.org/file38785/be7d966b660a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23731 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23731] Implement PEP 488
Brett Cannon added the comment: Here is a patch that implements PEP 488 **except** for Windows installer stuff. I don't think the Windows changes need to block this patch going in, but I will need someone on Windows to help fix up PC/, PCbuild/, Tools/msi, Lib/distutils/command/bdist_msi.py, and Lib/distutils/command/bdist_wininst.py (if you just search for [pyo] you will find what needs an update). Otherwise if someone wants to give the patch a review you can feel free, else I will commit it at PyCon (do be aware that if you run tests under -O and -OO there are several failures that have nothing to do with this patch). -- nosy: +paul.moore, steve.dower, tim.golden, zach.ware stage: test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23731 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23842] SystemError: ../Objects/longobject.c:998: bad argument to internal function
New submission from Matthias Klose: an unreleased version of cinder fails a test when run with python 2.7 from the branch. I don't have a test case yet, but looking at the error message and list of fixed issues after the 2.7.9 release, the fix for issue #23098 could be the culprit. FAIL: cinder.tests.test_utils.GetBlkdevMajorMinorTestCase.test_get_blkdev_major_minor_file cinder.tests.test_utils.GetBlkdevMajorMinorTestCase.test_get_blkdev_major_minor_file -- _StringException: Traceback (most recent call last): File /build/buildd/cinder-2015.1~b3/cinder/tests/test_utils.py, line 721, in test_get_blkdev_major_minor_file dev = self._test_get_blkdev_major_minor_file('/dev/made_up_disk1') File /usr/lib/python2.7/dist-packages/mock.py, line 1210, in patched return func(*args, **keywargs) File /build/buildd/cinder-2015.1~b3/cinder/tests/test_utils.py, line 712, in _test_get_blkdev_major_minor_file dev = utils.get_blkdev_major_minor(test_file) File /build/buildd/cinder-2015.1~b3/cinder/utils.py, line 656, in get_blkdev_major_minor return get_blkdev_major_minor(devpath, False) File /build/buildd/cinder-2015.1~b3/cinder/utils.py, line 645, in get_blkdev_major_minor return '%d:%d' % (os.major(st.st_rdev), os.minor(st.st_rdev)) SystemError: ../Objects/longobject.c:998: bad argument to internal function Traceback (most recent call last): _StringException: Empty attachments: stderr stdout -- components: Extension Modules messages: 239826 nosy: doko, serhiy.storchaka priority: normal severity: normal status: open title: SystemError: ../Objects/longobject.c:998: bad argument to internal function versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23842 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23830] Add AF_IUCV support to sockets
Terry J. Reedy added the comment: The CA ack is a * added after your name here. May take a week. If you are asking whether to submit a new patch against 3.5, with suggested fixes, yes, please do . -- nosy: +terry.reedy stage: - patch review versions: +Python 3.5 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23830 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23842] SystemError: ../Objects/longobject.c:998: bad argument to internal function
STINNER Victor added the comment: return '%d:%d' % (os.major(st.st_rdev), os.minor(st.st_rdev)) Can you check if the error comes from os.major() or os.minor(), and please provide the value of st_rdev? You can modify the unit test to catch SystemError and raise a new exception with more information. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23842 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23484] SemLock acquire() keyword arg 'blocking' is invalid
Berker Peksag added the comment: I use enhancement for non-trivial documentation patches. Also, quoting from https://docs.python.org/devguide/triaging.html#type Also used for improvements in the documentation and test suite and for other refactorings. In this case, your patch fixes a documentation issue and improving current documentation by documenting {Lock,RLock}.acquire() and release() methods properly (documentation improvements can go into bugfix branches). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23484 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23731] Implement PEP 488
Changes by Brett Cannon br...@python.org: Added file: http://bugs.python.org/file38786/8ce8e9b1f3e7.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23731 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error
Matt Chung added the comment: Updated patch based off of haypo's comment. Changed except Exception as err: - except -- Added file: http://bugs.python.org/file38795/tokenize.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23840 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16991] Add OrderedDict written in C
Antoine Pitrou added the comment: From a cursory glance, I still think this is the wrong approach. There's a lot of complication due to the simple fact that it is subclassing from dict (and therefore trying to be ABI-compatible, kind of). The linked list scheme should be much simpler (perhaps it shouldn't be a linked list at all, actually: see Raymond's recent proposal). I understand a lot of work has gone into it, but I'm against the current proposal. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16991 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12849] Cannot override 'connection: close' in urllib2 headers
Changes by xiaobing jiang s7v7nisla...@gmail.com: -- nosy: +s7v7nisla...@gmail.com ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12849 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22977] Unformatted “Windows Error 0x%X” exception message on Wine
Martin Panter added the comment: All the other occurrences of capitalized %X that I can find are not using Python’s string formatting functions. Please point them out if you can, but all I can see are some using a Microsoft vfwprintf_s() API, some calling standard C sprintf(), sscanf(), fprintf(), strftime() and strptime() APIs, and of course native Python 2-style string formatting, which I assume should all support %X. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22977 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23834] socketmodule.c: add sock_call() to fix how the timeout is recomputed
Roundup Robot added the comment: New changeset 920b700d9509 by Victor Stinner in branch 'default': Issue #23834: Fix sock_call(), set deadline_initialized to recompute the timeout https://hg.python.org/cpython/rev/920b700d9509 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23834 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error
shiyao.ma added the comment: Based upon the previous review. Catch the TextWrapper, move the test into a function. -- Added file: http://bugs.python.org/file38796/tokenizeV2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23840 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23844] test_ssl: fails on recent libressl version with BAD_DH_P_LENGTH
Roundup Robot added the comment: New changeset 1ad7c0253abe by Benjamin Peterson in branch '3.4': replace 512 bit dh key with a 2014 bit one (closes #23844) https://hg.python.org/cpython/rev/1ad7c0253abe New changeset 4f2391e86643 by Benjamin Peterson in branch '2.7': replace 512 bit dh key with a 2014 bit one (closes #23844) https://hg.python.org/cpython/rev/4f2391e86643 New changeset c27585e43e50 by Benjamin Peterson in branch 'default': merge 3.4 (#23844) https://hg.python.org/cpython/rev/c27585e43e50 -- nosy: +python-dev resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23844 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23843] ssl.wrap_socket doesn't handle virtual TLS hosts
Antoine Pitrou added the comment: Not sure why you're using wrap_socket() directly. Most of the time you should be using a higher-level library instead (for example a HTTP(S) library). In any case, the doc already mentions that Starting from Python 3.2, it can be more flexible to use SSLContext.wrap_socket() instead. I leave this open in case other people feel positively about it. -- nosy: +alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23843 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23566] RFE: faulthandler.register() should support file descriptors
Wei Wu added the comment: @haypo, would you review issue23566_fd_tests_v2.patch? It's been a time since the last update of it. However I think the fd tests on windows is just fine to be skipped. So what's the next plan? Shall we continue to work on it or just resolve this issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23566 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16991] Add OrderedDict written in C
Eric Snow added the comment: Thanks for speaking up, Antoine. Keep in mind that a C implementation of OrderedDict has a strict compatibility requirement with the existing pure Python one. The Python implementation subclasses dict so the C implementation must as well. I agree that it would be simpler otherwise. It would have saved me a lot of headache! As to the linked list implementation, it does the job. I'm not trying to blaze any trails with this code. Furthermore, my implementation does not preclude a better one replacing it. I would welcome a better implementation. Until that appears, my implementation is what there is. :) Frankly, my interest does not lie in the a C OrderedDict, but in what I want to do one we have one. Since no one was willing to do that for me wink, I did it myself. That said, I feel like my implementation satisfies what is required and does so in a way that we can be satisfied with it indefinitely. It sounds like you feel it would be worse to land it than to not have a C implementation of OrderedDict. Obviously I don't feel the same way. :) Regardless, I think we both feel the same way that the amount of time I've spent on this shouldn't factor into determining that. Aside from subclassing dict and my linked list approach, do you have any other concerns? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16991 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23846] asyncio : ProactorEventLoop raised BlockingIOError when ThreadPoolExecutor has many workers
New submission from SeungHyun.Hwang: I tested on python3.4.2, windows 7 1. Only proactorEvent issued. 2. ThreadPoolExecutor has many workers (in the attached example file, worker count 20,000) 3. The loop does run_in_executor more call than worker count (in the attached example file, 40,000 calls) 4. After some random seconds, raise BlockingIOError BlockingIOError: [WinError 10035] A non-blocking socket operation could not be completed immediately. exception calling callback for Future at 0x1ab89ef0 state=finished returned NoneType Traceback (most recent call last): File c:\Python342\Lib\concurrent\futures\_base.py, line 297, in _invoke_callbacks callback(self) File c:\Python342\Lib\asyncio\futures.py, line 410, in lambda new_future._copy_state, fut)) File c:\Python342\Lib\asyncio\base_events.py, line 403, in call_soon_threadsafe self._write_to_self() File c:\Python342\Lib\asyncio\proactor_events.py, line 449, in _write_to_self self._csock.send(b'\0') I guess that proactor's _write_to_self method misses exception handle. proactor_events.py def _write_to_self(self): self._csock.send(b'\0') selector_events.py def _write_to_self(self): # This may be called from a different thread, possibly after # _close_self_pipe() has been called or even while it is # running. Guard for self._csock being None or closed. When # a socket is closed, send() raises OSError (with errno set to # EBADF, but let's not rely on the exact error code). csock = self._csock if csock is not None: try: csock.send(b'\0') except OSError: if self._debug: logger.debug(Fail to write a null byte into the self-pipe socket, exc_info=True) Ps: It's my first publication. Hope you understand my poor comment.. -- components: asyncio files: example_thread_executor.py messages: 239872 nosy: gvanrossum, haypo, kernel0, yselivanov priority: normal severity: normal status: open title: asyncio : ProactorEventLoop raised BlockingIOError when ThreadPoolExecutor has many workers type: crash versions: Python 3.4 Added file: http://bugs.python.org/file38801/example_thread_executor.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23846 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19511] lib2to3 Grammar file is no longer a Python 3 superset
Gregory P. Smith added the comment: This is blocking Python auto formatters from working properly on Python 3 syntax code. For example: https://github.com/google/yapf/issues/61 -- assignee: - gregory.p.smith nosy: +gregory.p.smith priority: low - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12319] [http.client] HTTPConnection.putrequest not support chunked Transfer-Encodings to send data
Changes by Demian Brecht demianbre...@gmail.com: Added file: http://bugs.python.org/file38797/issue12319_5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12319 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23840] tokenize.open() leaks an open binary file on TextIOWrapper error
Matt Chung added the comment: Based off of storchaka's comment, moving the -- Added file: http://bugs.python.org/file38799/tokenize.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23840 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23846] asyncio : ProactorEventLoop raised BlockingIOError when ThreadPoolExecutor has many workers
Changes by SeungHyun.Hwang thewhiteap...@gmail.com: -- type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23846 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19511] lib2to3 Grammar file is no longer a Python 3 superset
Changes by Gregory P. Smith g...@krypto.org: -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19511] lib2to3 Grammar file is no longer a Python 3 superset
Changes by Gregory P. Smith g...@krypto.org: -- versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22671] Typo in class io.BufferedIOBase docs
Martin Panter added the comment: read-defaults.v3.patch: * Split off test_RawIOBase_readall() * Changed BufferedIOBase tests to matrix of tuples * Added tests for empty buffer * Test that unused part of buffer remains untouched -- Added file: http://bugs.python.org/file38798/read-defaults.v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22671 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23844] test_ssl: fails on recent libressl version with BAD_DH_P_LENGTH
Antoine Pitrou added the comment: Thanks for the patch. It should probably also remove the old file, unless it's also used somewhere else? -- nosy: +pitrou stage: - patch review versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23844 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23738] Clarify documentation of positional-only default values
Martin Panter added the comment: pos-defaults.v2.patch includes the results of “make clinic” to fix the doc strings. Is there a consensus to use PEP 457’s slash “/” notation? At one point I think I saw Serhiy was concerned that it might be confusing. -- Added file: http://bugs.python.org/file38800/pos-defaults.v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23738 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22350] nntplib file write failure causes exception from QUIT command
Martin Panter added the comment: Serhiy, regarding _getresp() calling resp.decode(): You are probably right that a failure decoding the response line is recoverable in some circumstances, such a GROUP command. But in other cases, say an ARTICLE command, the response won’t have been fully drained, so the connection is no longer usable. I guess I could shift the error handling to a higher level if you think it is necessary. Regarding the workaround in my original post: It is not a good solution, because it is still trying to send a QUIT request and wait for a response in the error handler. If you are trying to interrupt a hanging network connection for example, you have to hit Ctrl+C twice, or wait a long time for the QUIT command to get some invalid data and raise its confusing protocol error. David: The error handling inside _getlongresp() is the main place that concerned me. But as I made the changes there I identified the other places I thought could raise unexpected exceptions (network errors) or block (therefore a KeyboardInterrupt is likely). Draining the response might be sensible for handling an error writing to the file in some cases. My /dev/full example was actually meant to be a simple example of more complicated exceptions, such as KeyboardInterrupt, network timeouts, or if the programmer wants to peek at the start of a large message and then abort the download. So it seems my simplified test case was misleading, because in these other cases, draining the response isn’t so appropriate. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22350 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23731] Implement PEP 488
Eric Snow added the comment: Thanks for doing this, Brett. It's so simple a change yet such a great one. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23731 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6766] Cannot modify dictionaries inside dictionaries using Managers from multiprocessing
Changes by Dan O'Reilly oreil...@gmail.com: -- nosy: +dan.oreilly versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6766 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23842] SystemError: ../Objects/longobject.c:998: bad argument to internal function
Matthias Klose added the comment: so the culprit is an optimization: Committed to 2.7 with small change: stat() and makedev() should return int instead of long if possible. the test case however expects a long. st_dev is now not always a long, but an int or long depending on the value. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23842 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23842] SystemError: ../Objects/longobject.c:998: bad argument to internal function
Matthias Klose added the comment: no, simpler: import os os.minor(os.makedev(8,65)) Traceback (most recent call last): File stdin, line 1, in module SystemError: ../Objects/longobject.c:998: bad argument to internal function os.major(os.makedev(8,65)) Traceback (most recent call last): File stdin, line 1, in module SystemError: ../Objects/longobject.c:998: bad argument to internal function -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23842 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23842] SystemError: ../Objects/longobject.c:998: bad argument to internal function
Changes by Matthias Klose d...@debian.org: -- nosy: +benjamin.peterson priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23842 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23836] PEP 475: Enhance faulthandler to handle better reentrant calls
Roundup Robot added the comment: New changeset 60e001ec141d by Victor Stinner in branch 'default': Issue #23836: Add _Py_write_noraise() function https://hg.python.org/cpython/rev/60e001ec141d New changeset d9b9e2a68e7c by Victor Stinner in branch 'default': Issue #23836: Document functions releasing the GIL in fileutils.c https://hg.python.org/cpython/rev/d9b9e2a68e7c New changeset 12e065efc821 by Victor Stinner in branch 'default': Issue #23836: Use _Py_write_noraise() to retry on EINTR in trip_signal() of https://hg.python.org/cpython/rev/12e065efc821 New changeset e3c97621d8b4 by Victor Stinner in branch 'default': Issue #23836: Use _Py_write_noraise() to retry on EINTR in child_exec() of https://hg.python.org/cpython/rev/e3c97621d8b4 New changeset 29ab05c5e9dc by Victor Stinner in branch 'default': Issue #23836: Use _Py_write_noraise() to retry on EINTR in _Py_DumpTraceback() https://hg.python.org/cpython/rev/29ab05c5e9dc New changeset f07b855afbb2 by Victor Stinner in branch 'default': Issue #23836: Fix the faulthandler module to handle reentrant calls https://hg.python.org/cpython/rev/f07b855afbb2 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23836 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23836] PEP 475: Enhance faulthandler to handle better reentrant calls
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23836 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com