[issue24528] Misleading exeption for await in comprehensions.
Ivan Levkivskyi added the comment: Yury, thank you for the patch, the error message is much clearer now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24528 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24129] Incorrect (misleading) statement in the execution model documentation
Ivan Levkivskyi added the comment: What holds the patch now? Should I do something or just wait? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24129 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24545] Issue with ssl package
Antoine Pitrou added the comment: We should probably change the default value for the *ssl_version* parameter. In the meantime, you can workaround this simply with: cert = ssl.get_server_certificate((, 443), ssl.PROTOCOL_SSLv23) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24545 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24547] What’s New In Python 3.4: stray (
New submission from Jakub Wilk: https://docs.python.org/3/whatsnew/3.4.html#multiprocessing reads: On Unix two new start methods, (spawn and forkserver, have been added for starting processes using multiprocessing. This stray ( should be removed. -- assignee: docs@python components: Documentation messages: 246043 nosy: docs@python, jwilk priority: normal severity: normal status: open title: What’s New In Python 3.4: stray ( ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24547 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24127] Fatal error in launcher: Job information querying failed
Changes by Zachary Ware zachary.w...@gmail.com: -- stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24127 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24544] Race condition and crash when embedding multi-thread script
Oleksiy Markovets added the comment: attached file -- Added file: http://bugs.python.org/file39841/main.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24544 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24545] Issue with ssl package
Changes by Christian Heimes li...@cheimes.de: -- nosy: +alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24545 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24545] Issue with ssl package
New submission from Kayne: I tried to use cert = ssl.get_server_certificate((, 443)) and it crashed with following error: Traceback (most recent call last): File PeerCertChainQuery.py, line 107, in module cert = ssl.get_server_certificate((options.host, 443)) File /opt/lib/python2.7/ssl.py, line 965, in get_server_certificate with closing(context.wrap_socket(sock)) as sslsock: File /opt/lib/python2.7/ssl.py, line 350, in wrap_socket _context=self) File /opt/lib/python2.7/ssl.py, line 566, in __init__ self.do_handshake() File /opt/lib/python2.7/ssl.py, line 788, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:581) Note that the configuration of apache server on the host has disabled ssl3 support and it only supports TLSV1, TLVS1.1, AND TLSV1.3. This also happened on Python 3.4.3. Much appreciated if you could have a look at what happened or suggest me how to get around this. -- components: Library (Lib) messages: 246037 nosy: kxl561 priority: normal severity: normal status: open title: Issue with ssl package type: crash versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24545 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24544] Race condition and crash when embedding multi-thread script
New submission from Oleksiy Markovets: INTRODUCTION While embedding python script in c++ application I faced random crashes with error: Fatal Python error: Py_EndInterpreter: not the last thread Aborted Even though I explicitly join each thread created with *threading* module. Please see attachment, this is simplest python script + c++ code which demonstrates problem. By using threading.setprofiler I was able to make problem appear each run. If you uncomment time.sleep(1) problem won't reproduce. Note: In main.cpp I manually create separate interpreter because in real-life application is multi-threaded and different thread uses different interpreters for at least some sand-boxing. INVESTIGATION I did some investigation, and here is what I found out: * Each new thread is started by calling *thread_PyThread_start_new_thread* from threadmodule.c. Basically this function creates new thread which executes *t_bootstrap* and adds this thread to interpreter's thread list. * *t_bootstrap* executes python function *Thread.__bootstrap* and when it's done, removes thread from interpreter's thread list. * *Thread.__bootstrap* runs *Thread.run()* (actually python code which should be executed in separate thread) and when it's done calls *Thread.__stop* (which by mean of condition variable sets Boolean flag Thread.__stopped) * *Thread.join* doesn't wait thread to exit, it only waits for *Thread.__stopped* flag to be set. So here is race condition: When main thread finished *Thread.join* it's only guaranteed that *Thread.run* is finished, but *t_bootstrap* still may be running (interpreter's thread list is not cleared). POSSIBLE SOLUTION To call Thread.__stop from *t_bootstrap* (instead of Thread.__bootstrap) after removing thread from interpreter's thread list. Or do not use detached threads and call something like *pthread_join* in *Thread.join*. Which is IMHO much clearer approach but also requires much more efforts. -- components: Extension Modules files: main.cpp messages: 246035 nosy: Oleksiy Markovets priority: normal severity: normal status: open title: Race condition and crash when embedding multi-thread script type: crash versions: Python 2.7 Added file: http://bugs.python.org/file39840/main.cpp ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24544 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24543] Configure script wrongly detects mc68881 with -flto option passed
New submission from marxin: I've just tried to build Python with {C,CXX,LD}FLAGS set to '-flto'. Unfortunately following conftest source file is fragile: cat /tmp/mc.c int main () { unsigned int fpcr; __asm__ __volatile__ (fmove.l %%fpcr,%0 : =g (fpcr)); __asm__ __volatile__ (fmove.l %0,%%fpcr : : g (fpcr)); ; return 0; } gcc --version: gcc (GCC) 5.1.1 20150424 (prerelease) gcc -c /tmp/mc.c /tmp/mc.c: Assembler messages: /tmp/mc.c:6: Error: no such instruction: `fmove.l %fpcr,%eax' /tmp/mc.c:7: Error: no such instruction: `fmove.l -4(%rbp),%fpcr' gcc -flto -c /tmp/mc.c As GCC does not produce assembly with -flto and -c (unless you append -ffat-lto-objects), the compilation success. Can you please write more robust configuration. Thanks, Martin -- messages: 246034 nosy: mli...@suse.cz priority: normal severity: normal status: open title: Configure script wrongly detects mc68881 with -flto option passed versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24543 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24533] Increased Test Coverage for Lib/random.py
Charles Nodell added the comment: Sounds fine! I look forward to seeing how to do this properly! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24533 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24543] Configure script wrongly detects mc68881 with -flto option passed
Changes by Stefan Krah ste...@bytereef.org: -- nosy: +schwab ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24543 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24127] Fatal error in launcher: Job information querying failed
Henrik Heimbuerger added the comment: Happy to report that in build 10159 of Windows 10 64-bit, this just started to work again. No reinstallation of pip needed! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24127 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24545] Issue with ssl package
Changes by Stefan Krah ste...@bytereef.org: -- type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24545 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24546] sequence index bug in random.choice
New submission from Serge Anuchin: It seems there is minor bug in random.choice. I've got traceback from my server with IndexError from random.choice, but sequence wasn't empty (seq value was: u'\u0411\u0413\u0414\u0416\u0418\u041b\u0426\u042b\u042d\ u042e\u042f\u0410\u0412\u0415\u041a\u041c\u0420\u0422\ u042312456789') Maybe I mistaken, but only explanation that I have for this exception is rounding by int() of random value that was very close to 1. TL;RD: int(0.5) 1 seq = 'test' seq[int(0.5 * len(seq))] # logic from random.choice IndexError: string index out of range Is it plausible explanation of exception or I'am wrong? -- components: Library (Lib) messages: 246038 nosy: Serge Anuchin, mark.dickinson, rhettinger priority: normal severity: normal status: open title: sequence index bug in random.choice type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24546 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24548] Broken link in the unittest documentation
New submission from Dmitry Kazakov: The Simple Smalltalk Testing: With Patterns link from https://docs.python.org/3.5/library/unittest.html is dead. I found 2 mirrors but I don't think any of them should replace the broken link. 1. http://testingsoftware.blogspot.com/2007/08/smalltalk-testing-with-patterns.html (ads and spam in comments) 2. http://live.exept.de/doc/online/english/tools/misc/testfram.htm (image link is broken) -- assignee: docs@python components: Documentation messages: 246044 nosy: docs@python, wau priority: normal severity: normal status: open title: Broken link in the unittest documentation type: enhancement versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24543] Configure script wrongly detects x64/x87/mc68881 with -flto option passed
Changes by Andreas Schwab sch...@linux-m68k.org: -- title: Configure script wrongly detects mc68881 with -flto option passed - Configure script wrongly detects x64/x87/mc68881 with -flto option passed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24543 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23992] multiprocessing: MapResult shouldn't fail fast upon exception
Charles-François Natali added the comment: Barring any objections, I'll commit within the next few days. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23992 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24543] Configure script wrongly detects mc68881 with -flto option passed
Andreas Schwab added the comment: That means these tests are broken as well: AC_MSG_CHECKING(for x64 gcc inline assembler) AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set x87 control word) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24543 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24549] string.format() should have a safe_substitute equivalent, to be run consecutively
R. David Murray added the comment: Why not use string.Template? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24549 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24549] string.format() should have a safe_substitute equivalent, to be run consecutively
New submission from azrdev: {1} {0}.format('one').format('two') should return two one, but throws IndexError: tuple index out of range This would allow partial replacements, similar to string.Template.safe_substitute() I suggest an analog construction (e.g. a method string.safe_format() ) -- components: Library (Lib) messages: 246047 nosy: azrdev priority: normal severity: normal status: open title: string.format() should have a safe_substitute equivalent, to be run consecutively type: enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24549 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24546] sequence index bug in random.choice
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24546 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24400] Awaitable ABC incompatible with functools.singledispatch
Roundup Robot added the comment: New changeset a9d38701536d by Yury Selivanov in branch '3.5': Issue #24400: Add one more unittest for CoroutineType.__await__ https://hg.python.org/cpython/rev/a9d38701536d -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24400 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24400] Awaitable ABC incompatible with functools.singledispatch
Roundup Robot added the comment: New changeset b2a3baa1c2b0 by Yury Selivanov in branch '3.5': Issue #24400: Mention that __instancecheck__ is used in abc.Awaitable and Coroutine https://hg.python.org/cpython/rev/b2a3baa1c2b0 New changeset 4bf1d332fe73 by Yury Selivanov in branch 'default': Merge 3.5 (issue #24400) https://hg.python.org/cpython/rev/4bf1d332fe73 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24400 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24508] Backport 3.5's Windows build project files to 2.7
Zachary Ware added the comment: Thanks for testing this, Steve! It sounds like PCbuild/readme.txt will need a significant update in the setup portion to cover the different ways to get what is needed (and to mention PC/VS9.0 as a simpler setup). I use third-party extension modules rarely enough (and even more rarely on Windows) that I'm not sure what a good set of test extension modules would be. I'm happy to run some tests if somebody can suggest some packages for it, including ones that come with binaries and ones that require compilation. With no negative votes standing, I plan to fix the readmes and commit this before the end of next week. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24508 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24536] os.pipe() should return a structsequence (or namedtuple.)
Ethan Furman added the comment: Nowhere else in the stdlib is 'readfd' defined, and 'writefd' is only used once in a test. I think tacking on the 'fd' is both too low level as well as misleading since these are not file descriptors. If there is no agreement on read/write (understandable since those are usually methods), then perhaps input/output? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24536 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24536] os.pipe() should return a structsequence (or namedtuple.)
Ethan Furman added the comment: Okay, scratch the not file descriptors part of my comment, but the rest still stands. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24536 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24536] os.pipe() should return a structsequence (or namedtuple.)
Ethan Furman added the comment: As for Niki's example: - -- src = os.pipe() -- src (3, 4) -- if not hasattr(src, 'read'): src = open(src) ... Traceback (most recent call last): File stdin, line 1, in module TypeError: invalid file: (3, 4) This fails now. If they pass a pipe tuple into the new code they'll just get a different error somewhere else, which seems fine to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24536 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24195] Add `Executor.filter` to concurrent.futures
Ethan Furman added the comment: Brian, given my comments in msg245016 are you willing to add the Executor.filter() function? -- versions: +Python 3.6 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24195 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24550] maxint on 64 bit platforms breaks os.read
New submission from Brian Mingus: The lower range for this bug may be anything greater than 32 bit maxint. Other modules such as multiprocessing are limited passing objects of size 32 bit maxint, even on 64 bit systems, likely due to this issue. I have demonstrated this by modifying multiprocessing/connection.py to use longs in send and recv, which it surfaces the following error (note that read is os.read). Traceback (most recent call last): File /usr/lib/python3.4/multiprocessing/process.py, line 254, in _bootstrap self.run() File /usr/lib/python3.4/multiprocessing/process.py, line 93, in run self._target(*self._args, **self._kwargs) File /usr/lib/python3.4/multiprocessing/pool.py, line 103, in worker initializer(*initargs) File /usr/local/lib/python3.4/dist-packages/gensim-0.11.1_1-py3.4-linux-x86_64.egg/gensim/models/ldamulticore.py, line 266, in worker_e_step chunk_no, chunk, worker_lda = input_queue.get() File /usr/lib/python3.4/multiprocessing/queues.py, line 96, in get res = self._recv_bytes() File /usr/lib/python3.4/multiprocessing/connection.py, line 216, in recv_bytes buf = self._recv_bytes(maxlength) File /usr/lib/python3.4/multiprocessing/connection.py, line 420, in _recv_bytes return self._recv(size) File /usr/lib/python3.4/multiprocessing/connection.py, line 383, in _recv chunk = read(handle, remaining) OverflowError: signed integer is greater than maximum Which can be traced back to this cpython code: https://github.com/python/cpython/blob/3.4/Modules/posixmodule.c#L8048-L8065 -- components: IO messages: 246063 nosy: Brian Mingus priority: normal severity: normal status: open title: maxint on 64 bit platforms breaks os.read type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24550 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24546] sequence index bug in random.choice
Tim Peters added the comment: random() may return 1.0 exactly That shouldn't be possible. Although the code does assume C doubles have at least 53 bits of mantissa precision (in which case it does arithmetic that's exact in at least 53 bits - cannot round up to 1.0; but _could_ round up if the platform C double has less than 53 bits of precision). py x = 0. py for i in range(1, 100): ... if int(i*x) == i: ... print i ... break ... 2049 Very surprising! Which platform Python is that? The loop runs to completion on my box: Python 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)] on win32 -- nosy: +tim.peters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24546 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24546] sequence index bug in random.choice
Tim Peters added the comment: FYI, where x = 1.0 - 2.**-53, I believe it's easy to show this under IEEE double precision arithmetic: For every finite, normal, double y 0.0, IEEE_multiply(x, y) y under the default (nearest/even) rounding mode. That implies int(x*i) i for every int i 0 representable as an IEEE double (including monstrous ints like 123456789 300). Which makes your output _extremely_ surprising, Steven ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24546 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24547] What’s New In Python 3.4: stray (
Roundup Robot added the comment: New changeset 74e75a9aa562 by Benjamin Peterson in branch '3.4': remove stray '(' (closes #24547) https://hg.python.org/cpython/rev/74e75a9aa562 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24547 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24515] docstring of isinstance
Steven D'Aprano added the comment: Closing. If anyone thinks the docs aren't clear enough, and has an alternate version they would like to suggest, you can re-open it. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24515 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24537] Py_Initialize unable to load the file system codec
Changes by Ned Deily n...@acm.org: -- components: +Windows -Extension Modules nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24537 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24546] sequence index bug in random.choice
Steven D'Aprano added the comment: Your example of int(0.5) returning 1 is misleading, because 0.999...95 is already 1.0. (1.0 - 1/2**53) = 0. is the nearest float distinguishable from 1.0. It seems to me that either random() may return 1.0 exactly (although I've never seen it) or that 0.*len(s) rounds up to len(s), which I guess is more likely. Sure enough, that first happens with a string of length 2049: py x = 0. py for i in range(1, 100): ... if int(i*x) == i: ... print i ... break ... 2049 However your string has length 35, and it certainly doesn't happen there: py int(x*len(s)) 34 -- nosy: +steven.daprano ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24546 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24548] Broken link in the unittest documentation
Changes by Ned Deily n...@acm.org: -- nosy: +ezio.melotti, michael.foord, rbcollins stage: - needs patch type: enhancement - versions: +Python 2.7, Python 3.4, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24540] Documentation about skipkeys parameter for json.dumps is incorrect
Ned Deily added the comment: Can you say where you are seeing this? The current 2.7 documentation for json reads: If skipkeys is True (default: False), then dict keys that are not of a basic type (str, unicode, int, long, float, bool, None) will be skipped instead of raising a TypeError. https://docs.python.org/2/library/json.html https://docs.python.org/3/library/json.html -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24540 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C properly
eryksun added the comment: In Windows 10 ReadFile doesn't set ERROR_OPERATION_ABORTED (995) for Ctrl+C when reading console input, but ReadConsole does. from ctypes import * kernel32 = WinDLL('kernel32', use_last_error=True) buf = (c_char * 1)() n = c_uint() kernel32.ReadFile(kernel32.GetStdHandle(-10), buf, 1, byref(n), None) Traceback (most recent call last): File stdin, line 1, in module KeyboardInterrupt get_last_error() 0 kernel32.ReadConsoleA(kernel32.GetStdHandle(-10), buf, 1, byref(n), None) Traceback (most recent call last): File stdin, line 1, in module KeyboardInterrupt get_last_error() 995 Add this to the list of reasons Python should be using the console API for interactive standard streams. As is Ctrl+C is killing the REPL since it gets interpreted as EOF. This bug probably applies to Windows 8, too. Could someone check? Background: In Windows 7 reading from the console is implemented with a common code path to make an LPC call (NtRequestWaitReplyPort) to the console host process, conhost.exe. This was all completely redesigned for Windows 8, which instead uses the ConDrv device driver. Now ReadFile calls NtReadFile, and ReadConsole calls NtDeviceIoControlFile. When splitting this up they apparently forgot to set ERROR_OPERATION_ABORTED for Ctrl+C in ReadFile. -- nosy: +eryksun versions: +Python 3.4, Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18597 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24549] string.format() should have a safe_substitute equivalent, to be run consecutively
Eric V. Smith added the comment: So let's say your function would be named safe_format. Then: {1} {0}.safe_format('one') would give: {1} one. Then: {1} one.safe_format('two') would be an error, because there's no index 1 in the args tuple. I can't imagine how you'd implement this function so it would know to start with index 1 on the second call, instead of 0 as usual. Or maybe it would decrement the index values it doesn't use, so that the result of the first call would be: {0} one. That seems very complex, especially when you throw in implicit argument numbering, named arguments, format specifiers, etc. I agree with David that string.Template might be better for you. On an unrelated note, I think that IndexError: tuple index out of range is a horrible error message for this case. I wouldn't mind an enhancement request to make that something like argument index '1' is out of range, only 1 argument supplied. Or something with better wordsmithing. -- components: +Interpreter Core -Library (Lib) nosy: +eric.smith versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24549 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24549] string.format() should have a safe_substitute equivalent, to be run consecutively
Steven D'Aprano added the comment: I don't think that this behaviour is desirable, certainly not by default. If I write {1} {0}.format('one') that's clearly a programming error and I should get an exception. Chaining a second .format method call afterwards does not make the first one any less of a mistake. I think that there may be a good argument to be made for a safe_format with *named* arguments, like string.Template, but not positional arguments. But that would require some discussion, to decide on the correct behaviour. And why not use string.Template in the first place, or make the chained calls a single call? {1} {0}.format('one', 'two') is clearly the most obvious way to do it. A slightly less obvious way: {{}} {}.format('one').format('two') -- nosy: +steven.daprano ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24549 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly
Timothy Cardenas added the comment: We are seeing this behavior influencing other libraries in python 3.4. This should never fail if timestamp and fromtimestamp are implemented correctly: from datetime import datetime t = datetime.utcnow().timestamp() t2 = datetime.utcfromtimestamp(t) assert t == t2, 'Moving from timestamp and back should always work' -- nosy: +trcarden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23517 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23630] support multiple hosts in create_server/start_server
STINNER Victor added the comment: I reviewed multibind.patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23630 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24400] Awaitable ABC incompatible with functools.singledispatch
Martin Panter added the comment: The last change to /Doc/conf.py seems to have screwed up my docs build. Was that an accident? $ make -C Doc/ htmlsphinx-build -b html -d build/doctrees -D latex_paper_size= . build/html Running Sphinx v1.2.3 loading pickled environment... done Theme error: no theme named 'classic' found (missing theme.conf?) make: *** [build] Error 1 [Exit 2] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24400 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24400] Awaitable ABC incompatible with functools.singledispatch
Roundup Robot added the comment: New changeset 68996acdec6f by Yury Selivanov in branch '3.5': docs/conf: Undo changes in b2a3baa1c2b0; issue #24400 https://hg.python.org/cpython/rev/68996acdec6f -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24400 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24400] Awaitable ABC incompatible with functools.singledispatch
Yury Selivanov added the comment: Thanks, Martin, it was indeed something that shouldn't been committed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24400 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com