[issue21806] Add tests for turtle.TPen class
Changes by ingrid h...@ingridcheung.com: -- components: Tests files: TPen_tests.patch keywords: patch nosy: ingrid, jesstess priority: normal severity: normal status: open title: Add tests for turtle.TPen class versions: Python 3.5 Added file: http://bugs.python.org/file35688/TPen_tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21806 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21807] SysLogHandler closes TCP connection after first message
New submission from Omer Katz: import logging import logging.handlers import socket logger = logging.getLogger('mylogger') handler = logging.handlers.SysLogHandler(('', logging.handlers.SYSLOG_TCP_PORT), socktype=socket.SOCK_STREAM) formatter = logging.Formatter('%(name)s: [%(levelname)s] %(message)s') handler.setFormatter(formatter) logger.addHandler(handler) logger.info(TEST 1) logger.info(TEST 2) I have verified that this code only sends 'TEST 1' to Splunk and syslog-ng on both Python 2.7 and Python 3.4. After that, the connection appears closed. UDP on the other hand works just fine. -- components: Library (Lib) messages: 220961 nosy: Omer.Katz priority: normal severity: normal status: open title: SysLogHandler closes TCP connection after first message versions: Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21807 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21758] Not so correct documentation about asyncio.subprocess_shell method
Roundup Robot added the comment: New changeset 24c356168cc8 by Victor Stinner in branch '3.4': Closes #21758: asyncio doc: mention explicitly that subprocess parameters are http://hg.python.org/cpython/rev/24c356168cc8 New changeset b57cdb945bf9 by Victor Stinner in branch 'default': (Merge 3.4) Closes #21758: asyncio doc: mention explicitly that subprocess http://hg.python.org/cpython/rev/b57cdb945bf9 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21758 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21758] Not so correct documentation about asyncio.subprocess_shell method
STINNER Victor added the comment: A string can be a bytes string or a character string. I modified the documentation to be more explicitly, but IMO it's fine to keep string term in unit tests and error messages. You should not get the string error message if you pass a bytes or str object. -- resolution: fixed - stage: resolved - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21758 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21808] 65001 code page not supported
New submission from Maries Ionel Cristian: cp65001 is purported to be an alias for utf8. I get these results: C:\Python27chcp 65001 Active code page: 65001 C:\Python27python Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win32 Type help, copyright, credits or license for more information. import locale LookupError: unknown encoding: cp65001 LookupError: unknown encoding: cp65001 locale.getpreferredencoding() LookupError: unknown encoding: cp65001 And on Python 3.4 chcp doesn't seem to have any effect: C:\Python34chcp 65001 Active code page: 65001 C:\Python34python Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import locale locale.getpreferredencoding() 'cp1252' locale.getlocale() (None, None) locale.getlocale(locale.LC_ALL) (None, None) -- components: Interpreter Core, Unicode, Windows messages: 220964 nosy: ezio.melotti, haypo, ionel.mc priority: normal severity: normal status: open title: 65001 code page not supported versions: Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21808 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21595] asyncio: Creating many subprocess generates lots of internal BlockingIOError
Roundup Robot added the comment: New changeset 46c251118799 by Victor Stinner in branch '3.4': Closes #21595: asyncio.BaseSelectorEventLoop._read_from_self() now reads all http://hg.python.org/cpython/rev/46c251118799 New changeset 513eea89b80a by Victor Stinner in branch 'default': (Merge 3.4) Closes #21595: asyncio.BaseSelectorEventLoop._read_from_self() now http://hg.python.org/cpython/rev/513eea89b80a -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21595 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21595] asyncio: Creating many subprocess generates lots of internal BlockingIOError
STINNER Victor added the comment: I commited asyncio_read_from_self.patch into Tulip, Python 3.4 and 3.5. If someone is interested to work on more advanced enhancement, please open a new issue. Oh by, a workaround is to limit the number of concurrent processes. Without the patch, ./python test_subprocess_error.py 5 1000 (max: 5 concurrenet processes) emits a lot of BlockingIOError: [Errno 11] Resource temporarily unavailable message. With the patch, I start getting messages with 140 concurrent processes, which is much better :-) IMO more than 100 concurrent processes is crazy, don't do that at home :-) I mean processes with a very short lifetime. The limit is the number of SIGCHLD per second, so the number of processes which end at the same second. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21595 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21326] asyncio: request clearer error message when event loop closed
STINNER Victor added the comment: The initial issue is now fixed, thanks for the report Mark Dickinson. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21326 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1191964] add non-blocking read and write methods to subprocess.Popen
Changes by STINNER Victor victor.stin...@gmail.com: -- title: asynchronous Subprocess - add non-blocking read and write methods to subprocess.Popen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1191964 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21365] asyncio.Task reference misses the most important fact about it, related info spread around intros and example commentary instead
STINNER Victor added the comment: Victor, since you wrote much of the asyncio doc, any comment on this request? Please write a patch. The change is ok. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21365 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16399] argparse: append action with default list adds to list instead of overriding
SylvainDe added the comment: As this is likely not to get solved, is there a recommanded way to work around this issue ? Here's what I have done : import argparse def main(): Main function parser = argparse.ArgumentParser() parser.add_argument('--foo', action='append') for arg_str in ['--foo 1 --foo 2', '']: args = parser.parse_args(arg_str.split()) if not args.foo: args.foo = ['default', 'value'] print(args) printing Namespace(foo=['1', '2']) Namespace(foo=['default', 'value']) as expected but I wanted to know if there a more argparse-y way to do this. I have tried using `set_defaults` without any success. Also, as pointed out the doc for optparse describes the behavior in a simple way : The append action calls the append method on the current value of the option. This means that any default value specified must have an append method. It also means that if the default value is non-empty, the default elements will be present in the parsed value for the option, with any values from the command line appended after those default values. -- nosy: +SylvainDe ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16399 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21809] Building Python3 on VMS - External repository
New submission from John Malmberg: With issue 16136 VMS support was removed for Python V3 A test build of the in-development branch using the UNIX instruction and the current GNV product with a few minor tweaks produced a Python.exe interpreter that is somewhat functional. Most of the issues that showed up in the build process were either bugs in the VMS C library, or that Python would prefer some additional libraries would be present. These issues are common to porting other software to VMS, and not something that the Python project should need to concern it self with. I have setup a repository on the Sourceforge VMS-PORTS project, and a VMS specific discussion thread for doing the port. https://sourceforge.net/p/vms-ports/discussion/portingprojects/thread/333ab40a/ This is not intended as a fork of the Python project, rather it is a project to provide the build and runtime environment that Python 3 will need on VMS. Description on how to use this repository on VMS: https://sourceforge.net/p/vms-ports/cpython/ci/default/tree/readme The plan is to keep the current status in this file. https://sourceforge.net/p/vms-ports/cpython/ci/default/tree/vms_source/cpython/vms/aaa_readme.txt -- components: Build hgrepos: 257 messages: 220970 nosy: John.Malmberg priority: normal severity: normal status: open title: Building Python3 on VMS - External repository type: enhancement versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21809 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21808] 65001 code page not supported
eryksun added the comment: cp65001 was added in Python 3.3, for what it's worth. For me codepage 65001 (CP_UTF8) is broken for most console programs. Windows API WriteFile gets routed to WriteConsoleA for a console buffer handle, but WriteConsoleA has a different spec. It returns the number of wide characters written instead of the number of bytes. Then WriteFile returns this number without adjusting for the fact that 1 character != 1 byte. For example, the following writes 5 bytes (3 wide characters), but WriteFile returns that NumberOfBytesWritten is 3: import sys, msvcrt from ctypes import windll, c_uint, byref windll.kernel32.SetConsoleOutputCP(65001) 1 h_out = msvcrt.get_osfhandle(sys.stdout.fileno()) buf = '\u0100\u0101\n'.encode('utf-8') n = c_uint() windll.kernel32.WriteFile(h_out, buf, len(buf), ... byref(n), None) Āā 1 n.value 3 len(buf) 5 There's a similar problem with ReadFile calling ReadConsoleA. ANSICON (github.com/adoxa/ansicon) can hook WriteFile to fix this for select programs. However, it doesn't hook ReadFile, so stdin.read remains broken. import locale locale.getpreferredencoding() 'cp1252' The preferred encoding is based on the Windows locale codepage, which is returned by kernel32!GetACP, i.e. the 'ANSI' codepage. If you want the console codepages that were set at program startup, look at sys.stdin.encoding and sys.stdout.encoding: windll.kernel32.SetConsoleCP(1252) 1 windll.kernel32.SetConsoleOutputCP(65001) 1 script = r''' ... import sys ... print(sys.stdin.encoding, sys.stdout.encoding) ... ''' subprocess.call('py -3 -c %s' % script) cp1252 cp65001 0 locale.getlocale() (None, None) locale.getlocale(locale.LC_ALL) (None, None) On most POSIX platforms nowadays, Py_Initialize sets the LC_CTYPE category to its default value by calling setlocale(LC_CTYPE, ) in order to obtain the locale's charset without having to switch locales. On the other hand, the bootstrapping process for Windows doesn't use the C runtime locale, so at startup LC_CTYPE is still in the default C locale: locale.setlocale(locale.LC_CTYPE, None) 'C' This in turn gets parsed into the (None, None) tuple that getlocale() returns: locale._parse_localename('C') (None, None) -- nosy: +eryksun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21808 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21808] 65001 code page not supported
STINNER Victor added the comment: The support of the code page 65001 (CP_UTF8, cp65001) was added in Python 3.3. It is usually used for the OEM code page. The chcp command changes the Windows console encoding which is used by sys.{stdin,stdout,stderr).encoding. locale.getpreferredencoding() is the ANSI code page. Read also: http://unicodebook.readthedocs.org/operating_systems.html#code-pages http://unicodebook.readthedocs.org/programming_languages.html#windows cp65001 is purported to be an alias for utf8. No, cp65001 is not an alias of utf8: it handles surrogate characters differently. The behaviour of CP_UTF8 depends on the flags and the Windows version. If you really want to use the UTF-8 codec: force the stdio encoding using PYTHONIOENCODING envrionment variable: https://docs.python.org/dev/using/cmdline.html#envvar-PYTHONIOENCODING Setting the Windows console encoding to cp65001 using the chcp command doesn't make the Windows console fully Unicode compliant. It is a little bit better using TTF fonts, but it's not enough. See the old issue #1602 opened 7 years ago and not fixed yet. Backporting the cp65001 codec requires too many changes in the codec code. I made these changes between Python 3.1 and 3.3, I don't want to redo them in Python 2.7 because it may break backward compatibility. For example, in Python 3.3, the strict mode really means strict, whereas in Python 2.7, code page codecs use the default flags which is not strict. See: http://unicodebook.readthedocs.org/operating_systems.html#encode-and-decode-functions So I'm in favor of closing the issue as wont fix. The fix is to upgrade to Python 3! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21808 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default.
Saimadhav Heblikar added the comment: Attached is a patch which adds linenumbering to IDLE. [1] is the current discussion regarding this topic at idle-dev. This patch is a initial patch. It is missing menu and config additions. I have posted it in this state, so that we can catch platform specific bugs and performance related issues(if any). In the patch, all major additions are in a new file LineNumber.py. This is keeping easier debugging in mind. The code will be restructured in the next version of the patch, which will have the above said additions and performance optimization(if any). I will be working on menu additions, config dialog additions and performance optimization in the mean time. For those who are interested, I used tk.call(self.text, 'dlineinfo', '%d.0' % linenum) instead of text.dlineinfo('%d.0' % linenum), because using any text.* method, used to cause a continuous increase in memory usage. I found this out the hard way, when, earlier I was making repeated text.index() calls. --- [1] - https://mail.python.org/pipermail/idle-dev/2014-June/003456.html -- nosy: +jesstess versions: +Python 3.5 -Python 3.3 Added file: http://bugs.python.org/file35689/line-numbering-v1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17535 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19870] Backport Cookie fix to 2.7 (httponly / secure flag)
INADA Naoki added the comment: Could someone review this? While this is not a regression or bug, I think this is an important feature when writing HTTP clients. -- nosy: +naoki ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19870 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21808] 65001 code page not supported
Mark Lawrence added the comment: See also Issue20574. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21808 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21805] Argparse Revert config_file defaults
R. David Murray added the comment: I don't understand your use case. As a user I would expect a switch to either set the value to true or to false, not to toggle it based on some default that might be changed in a configuration file. But, your method of accomplishing your goal looks fine to me, except that it is unnecessarily verbose. You can just write: const=not config_defaults['verbose'] You might also want to make the help text conditional, so that the user knows whether the switch is going to turn verbosity on or off. You *could* write your own store_opposite action routine, but that seems like overkill, especially if you decide to also make the help text conditional. Given how simple this is to do, I'm rejecting the feature request. -- nosy: +r.david.murray resolution: - rejected stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21805 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21807] SysLogHandler closes TCP connection after first message
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21807 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21808] 65001 code page not supported
R. David Murray added the comment: I agree with Haypo, because if he isn't interested in doing it, it is unlikely anyone else will find the problem tractable :) Certainly not anyone else on the core team. But, the danger of breaking things in 2.7 is the clincher. -- nosy: +r.david.murray resolution: - wont fix stage: - resolved status: open - closed versions: -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21808 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21809] Building Python3 on VMS - External repository
R. David Murray added the comment: Is the purpose of this issue just informational, then? It would be better to have a listing of active platform forks somewhere in the docs, I think, assuming we don't already. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21809 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21808] 65001 code page not supported
eryksun added the comment: Setting the Windows console encoding to cp65001 using the chcp command doesn't make the Windows console fully Unicode compliant. It is a little bit better using TTF fonts, but it's not enough. See the old issue #1602 opened 7 years ago and not fixed yet. It's annoyingly broken for me due to the problems with WriteFile and ReadFile. print('\u0100') Ā Note the extra line because write() returns that 2 characters were written instead of 3 bytes. So the final linefeed byte gets written again. Let's buy 4 and get 1 free: print('\u0100' * 4) Ā -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21808 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1576313] os.execvp[e] on win32 fails for current directory
Mark Lawrence added the comment: The patch deliberately says Windows msvcrt to distinguish it from the Python module of the same name. -- Added file: http://bugs.python.org/file35690/Issue1576313.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1576313 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19870] Backport Cookie fix to 2.7 (httponly / secure flag)
R. David Murray added the comment: If it really wasn't a bug, we couldn't backport it. However, we generally treat RFC non-compliance issues as bugs unless fixing them is disruptive (and this one isn't because I took care to maintain backward compatibility in the original patch), so it is OK to fix it. Since this is a backport and fairly straightforward, Berker can just commit it once he's up and running with his push privileges. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19870 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21808] 65001 code page not supported
STINNER Victor added the comment: It's annoyingly broken for me due to the problems with WriteFile and ReadFile. sys.stdout.write() doen't use WriteFile. Again, see the issue #1602 if you are interested to improve the Unicode support of the Windows console. A workaround is for example to play with IDLE which has a better Unicode support. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21808 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11352] Update cgi module doc
Mark Lawrence added the comment: @Pierre can you submit a clean patch as requested in msg214267? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11352 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9739] Output of help(...) is wider than 80 characters
Mark Lawrence added the comment: @Terry is this something you could take on? -- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9739 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21808] 65001 code page not supported
eryksun added the comment: sys.stdout.write() doen't use WriteFile. Again, see the issue #1602 if you are interested to improve the Unicode support of the Windows console. _write calls WriteFile because Python 3 sets standard I/O to binary mode. The source is distributed with Visual Studio, so here's the relevant excerpt from write.c: else { /* binary mode, no translation */ if ( WriteFile( (HANDLE)_osfhnd(fh), (LPVOID)buf, cnt, (LPDWORD)written, NULL) ) { dosretval = 0; charcount = written; } else dosretval = GetLastError(); } In a debugger you can trace that WriteFile detects the handle is a console buffer handle (the lower 2 tag bits are set on the handle), and redirects the call to WriteConsoleA, which makes an LPC interprocess call to the console server (e.g. csrss.exe or conhost.exe). The LPC call, and associated heap limit, is the reason you had to modify _io.FileIO.write to limit the buffer size to 32767 when writing to the Windows console. See issue 11395. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21808 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21163] asyncio task possibly incorrectly garbage collected
STINNER Victor added the comment: Ok, I agree that this issue is very tricky :-) The first problem in asyncio-gc-issue.py is that the producer keeps *weak* references to Queue object, so the Queue objects are quickly destroyed, especially if gc.collect() is called explicitly. When yield from queue.get() is used in a task, the task is paused. The queue creates a Future object and the task registers its _wakeup() method into the Future object. When the queue object is destroyed, the internal future object (used by the get() method) is destroyed too. The last reference to the task was in this future object. As a consequence, the task is also destroyed. While there is a bug in asyncio-gc-issue.py, it's very tricky to understand it and I think that asyncio should help developers to detect such bugs. I propose attached patch which emits a warning if a task is destroyed whereas it is not done (its status is still PENDING). I wrote a unit test which is much simpler than asyncio-gc-issue.py. Read the test to understand the issue. I added many comments to explain the state. -- My patch was written for Python 3.4+: it adds a destructor to the Task class, and we cannot add a destructor in Future objects because these objects are likely to be part of reference cycles. See the following issue which proposes a fix: https://code.google.com/p/tulip/issues/detail?id=155 Using this fix for reference cycle, it may be possible to emit also the log in Tulip (Python 3.3). -- keywords: +patch resolution: remind - Added file: http://bugs.python.org/file35691/log_destroyed_pending_task.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21163 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21163] asyncio doesn't warn if a task is destroyed during its execution
Changes by STINNER Victor victor.stin...@gmail.com: -- title: asyncio task possibly incorrectly garbage collected - asyncio doesn't warn if a task is destroyed during its execution ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21163 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21741] Convert most of the test suite to using unittest.main()
Roundup Robot added the comment: New changeset 706fab0213db by Zachary Ware in branch 'default': Issue #21741: Add st_file_attributes to os.stat_result on Windows. http://hg.python.org/cpython/rev/706fab0213db -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21741 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21741] Convert most of the test suite to using unittest.main()
Changes by Zachary Ware zachary.w...@gmail.com: -- Removed message: http://bugs.python.org/msg220987 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21741 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21719] Returning Windows file attribute information via os.stat()
Zachary Ware added the comment: Committed as 706fab0213db (with the wrong issue number), with just a couple of comment tweaks (mostly to shorten a couple more lines) and some committer drudge-work. Thanks for your contribution, Ben! -- assignee: - zach.ware resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21719 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21808] 65001 code page not supported
STINNER Victor added the comment: @eryksun: I agree that using the Python interactive interpreter in the Windows console has many important issues when using non-ASCII characters. But the title of this issue and the initial message is about the code page 65001. The *code page* is supported in Python 3.3 and we are not going to backport the Python codec in Python 2.7. For issues specific to the *Windows console*, there is already an open issue: #1602. It looks like you understand well the problem, so please continue the discussion there. This issue is closed. Stop commenting a closed issue, others will not see your messages (the issue is not listed in the main bug tracker page). (Except if someone is interested to backport the Python codec of the Windows code page 65001 in Python 2.7, so we may reopen the issue.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21808 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21719] Returning Windows file attribute information via os.stat()
Ben Hoyt added the comment: Great, thanks for committing! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21719 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20295] imghdr add openexr support
Claudiu Popa added the comment: Here's an updated patch with a small exr test file. -- Added file: http://bugs.python.org/file35692/issue20295.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20295 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15993] Windows: 3.3.0-rc2.msi: test_buffer fails
Steve Dower added the comment: I'd be fine to reconsider if a previously-demonstrated bug is now demonstrated-fixed. However, if the actual bug persists, optimization should be disabled for all code, not just for the code that allows to demonstrate the bug. I'm okay with that. I thought you meant never enable optimizations with that compiler ever again, which is obviously ridiculous and I should have dismissed the idea on that basis rather than posting a snarky response. Sorry. It seems to me that at the time the wrong branch is taken, f-id could be in the registers in the wrong order (same as in msg170985), but when the error message is printed, the value is read from memory. This is just a guess of course. I checked that and the registers are fine. Here's the snippet of disassembly I posted with the bug I filed: mov edx,dword ptr [edi+4] ; == 0x4000 mov ecx,dword ptr [edi]; == 0x0001 testedx,edx ; should be cmp edx,4000h or equiv. ja lbl1 ; 'default:' jb lbl2 ; should be je after change above cmp ecx,21h jbe lbl2 ; should probably be lbl3 lbl1: ; default: ... lbl2: cmp ecx,1 jne lbl3 ; case 0x4001 ... It's clearly an incorrect `test` opcode, and I'd expect switch statements where the first case is a 64-bit integer larger than 2**32 to be rare - I've certainly never encountered one before - which is why such a bug could go undiscovered. When I looked at the disassembly for memoryview it was fine. I actually spent far longer than I should have trying to find the bug that was no longer there... Also bear in mind that I'm working with VC14 and not VC10, so the difference is due to the compiler and not simply time or magic :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15993 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21807] SysLogHandler closes TCP connection after first message
Vinay Sajip added the comment: Some information appears to be missing from your snippet: the default logger level is WARNING, so no INFO messages would be expected. Have you set logging.raiseExceptions to a False value? Are you sure that no network error is occurring? How can you be sure the other end isn't closing the connection? I ask these questions, because there is no code called to explicitly close the socket, unless an error occurs. Also, no one else has ever reported this problem, and this code hasn't changed in a long time, IIRC. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21807 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21758] Not so correct documentation about asyncio.subprocess_shell method
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21758 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18017] ctypes.PyDLL documentation
Mark Lawrence added the comment: @Marc can you prepare a patch for this issue? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18017 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16272] C-API documentation clarification for tp_dictoffset
Mark Lawrence added the comment: @Chris can you prepare a patch for this? -- nosy: +BreamoreBoy versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16272 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21599] Argument transport in attach and detach method in Server class in base_events file is not used
STINNER Victor added the comment: The Server class is hardcoded in create_server() and create_unix_server(), it's not possible to pass an arbitrary class. Only the AbstractServer class is documented, and only close() and wait_for_close() methods: https://docs.python.org/dev/library/asyncio-eventloop.html#asyncio.AbstractServer So it's possible to break the API. The Server API is not really public. @Guido, @Yury: what do you think? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21599 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20493] select module: loop if the timeout is too large (OverflowError timeout is too large)
Changes by STINNER Victor victor.stin...@gmail.com: -- title: asyncio: OverflowError('timeout is too large') - select module: loop if the timeout is too large (OverflowError timeout is too large) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20493 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18612] More elaborate documentation on how list comprehensions and generator expressions relate to each other
Mark Lawrence added the comment: Both list comprehension and generator expression are defined in the glossary https://docs.python.org/3/glossary.html, so what else can be done? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18612 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18669] curses.chgat() moves cursor, documentation says it shouldn't
Mark Lawrence added the comment: Can we have a comment on this please. -- nosy: +BreamoreBoy versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18669 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21447] Intermittent asyncio.open_connection / futures.InvalidStateError
STINNER Victor added the comment: I'm unable to reproduce the issue with Python 3.5 (development version). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21447 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18588] timeit examples should be consistent
Mark Lawrence added the comment: @Steven you're into timeit, do you have anything to add here? -- nosy: +BreamoreBoy, steven.daprano ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18588 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18703] To change the doc of html/faq/gui.html
Mark Lawrence added the comment: It looks as if there's nothing to be done here, is that correct? -- nosy: +BreamoreBoy versions: -Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18703 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6673] Uncaught comprehension SyntaxError eats up all memory
Mark Lawrence added the comment: Assuming that documentation changes are needed, who's best placed to do them? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6673 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21741] Convert most of the test suite to using unittest.main()
Zachary Ware added the comment: @Terry: This is part of the ongoing effort of issues #16748 and #10967 (and possibly others). My ultimate goal along those lines is to eradicate support.run_unittest, and this is a step in that direction. I think there's enough support here to skip python-dev :). My testing has been limited (by time, mostly) to just a non-verbose run to confirm that nothing errors after the patch. It seems Serhiy has tested more extensively, though. @Raymond: May I ask why you removed 3.4 from versions? Most of the changes like this in individual modules have been made on all open 3.x branches (most that I've been involved in were in the 3.3 maintenance period). I don't feel strongly enough about making sure this is in 3.4 to argue if you have a good reason, though. @Serhiy: Thanks for testing this! The reference counting in individual modules has been dying a slow death, long ago replaced by regrtest's -R option. For the modules with base classes included in testing, I'm inclined to either leave them as patched (since they don't actually add any tests and their overhead is minimal) or remove them from the patch and deal with them in a new issue; I'm leaning toward the first option. For the wait tests, I would rather remove them from the patch and deal with them separately. @Terry, Raymond, Michael, David, and Serhiy: thanks for the support! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21741 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16399] argparse: append action with default list adds to list instead of overriding
paul j3 added the comment: It should be easy to write a subclass of Action, or append Action, that does what you want. It just needs a different `__call__` method. You just need a way of identifying an default that needs to be overwritten as opposed to appended to. def __call__(self, parser, namespace, values, option_string=None): current_value = getattr(namspace, self.dest) if 'current_value is default': setattr(namespace, self.dest, values) return else: # the normal append action items = _copy.copy(_ensure_value(namespace, self.dest, [])) items.append(values) setattr(namespace, self.dest, items) People on StackOverFlow might have other ideas. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16399 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18703] To change the doc of html/faq/gui.html
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18703 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21680] asyncio: document event loops
STINNER Victor added the comment: On Windows, the default event loop is _WindowsSelectorEventLoop which calls select.select(). On Windows, select() only accepts socket handles: http://msdn.microsoft.com/en-us/library/windows/desktop/ms740141%28v=vs.85%29.aspx Only file descriptors of sockets are accepted for add_reader() and add_writer()? This event loop doesn't support subprocesses. On Windows, the proactor event loop can be used instead to support subprocesses. But this event loop doesn't support add_reader() nor add_writer() :-( This event loop doesn't support SSL. On Windows, the granularity of the monotonic time is usually 15.6 msec. I don't know if it's interesting to mention it. The resolution is different if HPET is enabled on Windows. On Mac OS X older than 10.9 (Mavericks), selectors.KqueueSelector is the default selector but it doesn't character devices like PTY. The SelectorEventLoop can be used with SelectSelector or PollSelector to handle character devices on Mac OS X 10.6 (Snow Leopard) and later. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21680 ___ ___ 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
Demian Brecht added the comment: The problem here as far as I can tell is that the underlying file object (addinfourl) blocks while waiting for a full response from the server. As detailed in section 8.1 of RFC 2616, requests and responses can be pipelined, meaning requests can be sent while waiting for full responses from a server. The suggested change of overriding headers is only a partial solution as it doesn't allow for non-blocking pipelining. @Martin Panter: My suggestion for you would simply be to use http.client (httplib) as R. David Murray suggests, which doesn't auto-inject the Connection header. Also, a server truncating responses when Connection: close is sent sounds like a server-side bug to me. Unless you're a server maintainer (or have access to the developers), have you tried reaching out to them to request a fix? -- nosy: +dbrecht ___ 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
[issue18612] More elaborate documentation on how list comprehensions and generator expressions relate to each other
uglemat added the comment: Yeah, I guess it's pretty obvious that generator expressions are not list comprehensions from the glossary. I'll close the bug. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18612 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9770] curses.isblank function doesn't match ctype.h
akira added the comment: I've fixed isblank to accept tab instead of backspace and added tests for character classification functions from curses.ascii module that have corresponding analogs in ctype.h. They've uncovered issues in isblank, iscntrl, and ispunct functions. Open questions: - is it a security bug (backspace is treated as tab in isblank())? If it is then 3.1, 3.2, 3.3 branches should also be updated [devguide]. If not then only 2.7, 3.4, and default branches should be changed. [devguide]: http://hg.python.org/devguide/file/9794412fa62d/devcycle.rst#l105 - iscntrl() mistakenly returns false for 0x7f but c11 defines it as a control character. Should iscntrl behavior (and its docs) be changed to confirm? Should another issue be opened? - ispunct() mistakenly returns true for control characters such as '\n'. The documentation says (paraphrasing) 'any printable except space and alnum'. string.printable includes '\n' but 'printing character' in C11 does not include the newline. Moreover curses.ascii.isprint follows C behavior and excludes control characters. Should another issue be opened to return false from ispunct() for control characters such as '\n'? - ispunct() mistakenly returns true for non-ascii characters such as 0xff - negative integer values: C functions are defined for EOF macros (some negative value) and the behavior is undefined for any other negative integer value. What should be curses.ascii.is* predicates behavior? Should Python guarantee that False is returned? - curses.ascii.isspace/.isblank doesn't raise TypeError for bytes, None on Python 3 - should constants from string module be used? What is more fundamental: string.digits or curses.ascii.isdigit? - no tests for: isascii, isctrl, ismeta (they are not defined in ctype.h). It is unclear what the behaviour should be e.g., isascii mistakenly returns True for negative ints, ismeta returns True for any non-ascii character including Unicode letters. It is not clear how isctrl is different from iscntrl. -- keywords: +patch nosy: +akira Added file: http://bugs.python.org/file35693/curses_ascii_isblank_issue9770.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9770 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20068] collections.Counter documentation leaves out interesting usecase
Mark Lawrence added the comment: I'm -0 on this as it seems to be six of one, half a dozen of the other, but I don't get the final say :) -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20068 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21163] asyncio doesn't warn if a task is destroyed during its execution
Richard Kiss added the comment: The more I use asyncio, the more I am convinced that the correct fix is to keep a strong reference to a pending task (perhaps in a set in the eventloop) until it starts. Without realizing it, I implicitly made this assumption when I began working on my asyncio project (a bitcoin node) in Python 3.3. I think it may be a common assumption for users. Ask around. I can say that it made the transition to Python 3.4 very puzzling. In several cases, I've needed to create a task where the side effects are important but the result is not. Sometimes this task is created in another task which may complete before its child task begins, which means there is no natural place to store a reference to this task. (Goofy workaround: wait for child to finish.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21163 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14903] dictobject infinite loop in module set-up
Gregory P. Smith added the comment: Can you provide specific details of exactly which python package from which distro is installed on the machines? Are the machines hardware or VMs? if they are VMs, what version of what VM system and what hardware are the VMs running on? I'm asking because someone at work is seeing a potentially similar problem from an ubuntu python2.7-minimal package - i don't know which version - they can pipe in here and provide that and any other details that may be relevant. -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14903 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9972] PyGILState_XXX missing in Python builds without threads
Mark Lawrence added the comment: Can somebody check to see if this is still a problem, I've only got a Windows PC. -- nosy: +BreamoreBoy type: - behavior versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9972 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21810] SIGSEGV in PyObject_Malloc when ARENAS_USE_MMAP
New submission from John-Mark Bell: In low-memory scenarios, the Python 2.7 interpreter may crash as a result of failing to correctly check the return value from mmap in new_arena(). This changeset appears to be the point at which this issue was introduced: http://hg.python.org/cpython/rev/4e43e5b3f7fc Looking at the head of the 2.7 branch in Mercurial, we see the issue is still present: http://hg.python.org/cpython/file/cf70f030a744/Objects/obmalloc.c#l595 On failure, mmap will return MAP_FAILED ((void *) -1), whereas malloc will return NULL (0). Thus, the check for allocation failure on line 601 will erroneously decide that the allocation succeeded in the mmap case. The interpreter will subsequently crash once the invalid address is accessed. I've attached a potential fix for this issue. -- components: Interpreter Core files: obmalloc.diff keywords: patch messages: 221013 nosy: John-Mark.Bell priority: normal severity: normal status: open title: SIGSEGV in PyObject_Malloc when ARENAS_USE_MMAP type: crash versions: Python 2.7 Added file: http://bugs.python.org/file35694/obmalloc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21810 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20068] collections.Counter documentation leaves out interesting usecase
Raymond Hettinger added the comment: The introductory example already shows both ways of using a Counter: 1) How to tally one at a time: cnt = Counter() for word in ['red', 'blue', 'red', 'green', 'blue', 'blue']: cnt[word] += 1 2) How to count directly from a list: words = re.findall(r'\w+', open('hamlet.txt').read().lower()) Counter(words).most_common(10) -- assignee: docs@python - rhettinger resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20068 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21741] Convert most of the test suite to using unittest.main()
Raymond Hettinger added the comment: My ultimate goal along those lines is to eradicate support.run_unittest, and this is a step in that direction. I think there's enough support here to skip python-dev :). Not really. There is support here for using unittest.main() whereever it fits and cleans-up the code. That is not the same as saying we can eliminate support.run_unittest(). That is likely a more thorny issue and may affect users outside the standard library. @Raymond: May I ask why you removed 3.4 from versions? Because we don't backport this sort of change. The ship for version 3.4 has sailed. There's no point in rewriting history for something that isn't a bug fix, documentation fix, or performance regression. Also, who knows who is already relying on the current setup and would have their code broken in the next micro-release. (Second law of time travel: the past is infinitely fragile and the future is infinitely mallable) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21741 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3425] posixmodule.c always using res = utime(path, NULL)
R. David Murray added the comment: This is no longer an issue in Python3; there utimes is used if it is available (if utimensat is not). Since this doesn't affect the platforms actually supported by python2.7, I'm closing this as out of date. -- nosy: +r.david.murray resolution: - out of date stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3425 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18588] timeit examples should be consistent
Raymond Hettinger added the comment: I did find it somewhat confusing when trying to interpret the timeit documentation. Perhaps that is a good thing. Making good, repeatable, meaningful timings where you have a clear interpretation of the results is non-trivial, learned skill. Cross-checking results and explaining differences are fundamental skills. There is really no reason the docs should try to make it look easier that it really is (running the tool is easy, but interpreting results sometimes isn't). Being a somewhat pedantic and trivial patch, I'm fine if you want to close it wontfix. That is reasonable. I don't that this has caused any actual impediment to learning how to use timeit. The docs have been somewhat successful in that regard. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18588 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21741] Convert most of the test suite to using unittest.main()
Zachary Ware added the comment: Raymond Hettinger added the comment: I think there's enough support here to skip python-dev :). Not really. There is support here for using unittest.main() whereever it fits and cleans-up the code. That is not the same as saying we can eliminate support.run_unittest(). That is likely a more thorny issue and may affect users outside the standard library. Apologies, my remark was in response to Terry's suggestion that this particular issue should go through python-dev, and was only meant to apply to this issue, not the elimination of run_unittest. If/when the day that is possible comes, I will consult python-dev as appropriate. @Raymond: May I ask why you removed 3.4 from versions? Because we don't backport this sort of change. The ship for version 3.4 has sailed. There's no point in rewriting history for something that isn't a bug fix, documentation fix, or performance regression. Also, who knows who is already relying on the current setup and would have their code broken in the next micro-release. (Second law of time travel: the past is infinitely fragile and the future is infinitely mallable) While I appreciate that, the note at the top of https://docs.python.org/3/library/test.html gives me the impression that anyone using code from the test package should either know better or expect their code to break any time they upgrade. That is, that the test package is exempt from the usual backward compatibility restrictions. I would rather apply to both 3.4 and default for ease of future merges, but again, since the changes are so small (on a per-module level), I won't fight for it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21741 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14534] Add method to mark unittest.TestCases as do not run.
Ezio Melotti added the comment: +1 on the idea. While the mixin method works and it's not overly complex, it might not be immediately obvious to those unfamiliar with it and to those reviewing the code (i.e. there's no clear hint about the reason why the base class doesn't inherit from TestCase directly). Using mixins also adds duplication and might results in tests not being run if one adds a new class and forgets to add TestCase in the mix. A decorator would solve these problems nicely, and a bit of magic under the hood seems to me an acceptable price to pay. -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14534 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16272] C-API documentation clarification for tp_dictoffset
eryksun added the comment: It could also mention the generic getter and setter functions for the PyGetSetDef that were added in 3.3: PyType_GenericGetDict and PyType_GenericSetDict. https://docs.python.org/3/c-api/object.html#c.PyType_GenericGetDict -- nosy: +eryksun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16272 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9972] PyGILState_XXX missing in Python builds without threads
Ned Deily added the comment: 75503c26a17f for Python 3.3 added WITH_THREADS protection to the PyGILState_{Ensure|Release} definitions in Include/pystate.h. -- nosy: +ned.deily resolution: - out of date stage: - resolved status: open - closed versions: +Python 3.3 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9972 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21810] SIGSEGV in PyObject_Malloc when ARENAS_USE_MMAP
Changes by Ned Deily n...@acm.org: -- nosy: +benjamin.peterson, neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21810 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_CONST
Mark Lawrence added the comment: Given the last two comments can this be closed as won't fix? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6133 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8502] support plurals in pygettext
Mark Lawrence added the comment: Patch has been applied so this can be closed. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8502 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18017] ctypes.PyDLL documentation
eryksun added the comment: 16.17.2.2 already has a warning after it introduces CDLL, OleDLL, and WinDLL: The Python global interpreter lock is released before calling any function exported by these libraries, and reacquired afterwards. It links to the glossary entry: https://docs.python.org/3/glossary.html#term-global-interpreter-lock It wouldn't hurt to elaborate and box this warning. Subsequently, PyDLL is documented to *not* release the GIL. Also, section 16.17.2.4 documents that CFUNCTYPE and WINFUNCTYPE functions release the GIL and PYFUNCTYPE functions will *not* release the GIL. -- nosy: +eryksun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18017 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20957] test_smptnet Fail instead of Skip if SSL-port is unavailable
Mark Lawrence added the comment: Can somebody review the attached patch please. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20957 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13102] xml.dom.minidom does not support default namespaces
Mark Lawrence added the comment: From the statement in msg144927 this can be closed as not a bug. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13102 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21720] TypeError: Item in ``from list'' not a string message
Ezio Melotti added the comment: Do you want to propose a patch? I think the standard message in these cases is along the lines of TypeError: fromlist argument X must be str, not unicode -- keywords: +easy nosy: +ezio.melotti stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21720 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10978] Add optional argument to Semaphore.release for releasing multiple threads
Mark Lawrence added the comment: Seems good to proceed as there are no dissenters. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10978 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21810] SIGSEGV in PyObject_Malloc when ARENAS_USE_MMAP
Roundup Robot added the comment: New changeset 012b5c9c062d by Charles-François Natali in branch '2.7': Issue #21810: Backport mmap-based arena allocation failure check. http://hg.python.org/cpython/rev/012b5c9c062d -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21810 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21810] SIGSEGV in PyObject_Malloc when ARENAS_USE_MMAP
Charles-François Natali added the comment: Thanks for the report. The patch introducing mmap() to limit memory fragmentation was applied initially only to the Python 3 branch (3.2 at that time IIRC). This problem was spotted a couple days later, and fixed: http://hg.python.org/cpython/rev/ba8f85e16dd9 I guess the backport to Python 2.7 didn't backport the subsequent fix. -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21810 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9148] os.execve puts process to background on windows
Mark Lawrence added the comment: I've changed the nosy list according to the experts index for the os module and Windows, sorry if I've named anyone I shouldn't have. -- nosy: +BreamoreBoy, loewis, steve.dower, tim.golden, zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9148 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19415] test_gdb fails when using --without-doc-strings on Fedora 19
Mark Lawrence added the comment: @Nick/Dave, any comment on this problem? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19415 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21690] re documentation: re.compile links to re.search / re.match instead of regex.search / regex.match
Roundup Robot added the comment: New changeset 88a1f3cf4ed9 by Ezio Melotti in branch '2.7': #21690: fix a couple of links in the docs of the re module. Noticed by Julian Gilbey. http://hg.python.org/cpython/rev/88a1f3cf4ed9 New changeset 9090348a920d by Ezio Melotti in branch '3.4': #21690: fix a couple of links in the docs of the re module. Noticed by Julian Gilbey. http://hg.python.org/cpython/rev/9090348a920d New changeset 590ad80784bf by Ezio Melotti in branch 'default': #21690: merge with 3.4. http://hg.python.org/cpython/rev/590ad80784bf -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21690 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21690] re documentation: re.compile links to re.search / re.match instead of regex.search / regex.match
Ezio Melotti added the comment: Fixed, thanks for the report! -- assignee: docs@python - ezio.melotti nosy: +ezio.melotti stage: - resolved status: open - closed type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21690 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13223] pydoc removes 'self' in HTML for method docstrings with example code
Berker Peksag added the comment: I guess the tests --without-doc-strings are broken: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/6900/steps/test/logs/stdio Attached patch fixes these failures. -- nosy: +berker.peksag versions: +Python 3.5 -Python 3.2, Python 3.3 Added file: http://bugs.python.org/file35695/issue13223_tests.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13223 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17062] An os.walk inspired replacement for pkgutil.walk_packages
Mark Lawrence added the comment: Could somebody review the attached patch please. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17062 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21738] Enum docs claim replacing __new__ is not possible
Ezio Melotti added the comment: Is this common enough that it deserves to be documented? -- components: +Documentation nosy: +ezio.melotti type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21738 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21739] Add hint about expression in list comprehensions (https://docs.python.org/2/tutorial/datastructures.html#list-comprehensions)
Ezio Melotti added the comment: If we don't want to go into the details of why it's not equivalent, using roughly equivalent might be enough. -- keywords: +easy nosy: +ezio.melotti stage: - needs patch type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21739 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21740] doctest doesn't allow duck-typing callables
Ezio Melotti added the comment: Would using callable() instead of inspect.isfunction() be ok? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21740 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21740] doctest doesn't allow duck-typing callables
Antoine Pitrou added the comment: Ezio Melotti added the comment: Would using callable() instead of inspect.isfunction() be ok? I'm not sure, because it would also select classes. I guess we need something a bit smarter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21740 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20457] Use partition and enumerate make getopt easier
Ezio Melotti added the comment: Based on Raymond's comment I'm going to close this. Thanks anyway for the patch. -- resolution: - rejected stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20457 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1043134] Add preferred extensions for MIME types
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: test needed - patch review versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1043134 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21811] Anticipate fixes to 3.x and 2.7 for OS X 10.10 Yosemite support
New submission from Ned Deily: Apple recently announced an upcoming public beta and anticipated fall release of the next version of OS X, 10.10 Yosemite. As usual, developer previews of 10.10 have been made under non-disclosure since the exact details of 10.10 may change prior to the final release. However, by inspection, there are definitely some issues in Python that will need to be addressed for 10.10 and beyond. There are a number of places within the cpython code base where decisions are made based on either the running system version or the OS X ABI (e.g. the value of MACOSX_DEPLOYMENT_TARGET) that the interpreter was built with or is being built with. Most of the current tests do string comparisons of these values which will not work properly with a two-digit version number ('10.10' '10.9' -- True). At a minimum, this will likely have the following effects: 1. When running current 3.4.1 and 2.7.7 binary installers on 10.10, building C extension modules will likely result in an incorrect universal platform name, for example, x86_64 instead of intel, and that could affect extension module file names and wheel or egg names. 2. In addition, when building Python on 10.10, standard library and third-party extension modules may be built with obsolete link options (-bundle -bundle_loader python rather than -bundle -undefined dynamic_lookup) and some extension module builds may fail as a result. 3. Various tests in the Python test suite may fail, including test_distutils, test__osx_support, and test_sysconfig. Note that versions of Python older than 3.4 and 2.7 are no longer eligible for bug fixes under python-dev policy but are likely to have similar and/or additional problems. And, again, there may be other issues identified once 10.10 is released in its final form. -- assignee: ned.deily components: Build, Macintosh, Tests messages: 221042 nosy: ned.deily priority: normal severity: normal status: open title: Anticipate fixes to 3.x and 2.7 for OS X 10.10 Yosemite support versions: Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21811 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21811] Anticipate fixes to 3.x and 2.7 for OS X 10.10 Yosemite support
Changes by Ned Deily n...@acm.org: -- keywords: +patch Added file: http://bugs.python.org/file35696/issue_21811_yosemite_support.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21811 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21811] Anticipate fixes to 3.x and 2.7 for OS X 10.10 Yosemite support
Changes by Ned Deily n...@acm.org: Added file: http://bugs.python.org/file35698/issue_21811_yosemite_support_configure_27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21811 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21811] Anticipate fixes to 3.x and 2.7 for OS X 10.10 Yosemite support
Changes by Ned Deily n...@acm.org: Added file: http://bugs.python.org/file35697/issue_21811_yosemite_support_configure_3x.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21811 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18410] Idle: test SearchDialog.py
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18410 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20254] Duplicate bytearray test on test_socket.py
Mark Lawrence added the comment: Could somebody review the simple patch please. -- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20254 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21811] Anticipate fixes to 3.x and 2.7 for OS X 10.10 Yosemite support
Ned Deily added the comment: The attached patches should address the above issues. There is a common patch that applies to the current default, 3.4, and 2.7 branches and branch specific patches (one of r default and 3.4, the other for 2.7) for configure.ac changes. As usual, run autoreconf after applying to update configure itself. -- nosy: +benjamin.peterson, larry, ronaldoussoren priority: normal - release blocker stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21811 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20091] An index entry for __main__ in 30.5 runpy is missing
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy stage: - needs patch type: - enhancement versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20091 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20446] ipaddress: hash similarities for ipv4 and ipv6
Mark Lawrence added the comment: Can someone comment on this issue please. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20446 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com