[issue28701] Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString

2016-11-15 Thread INADA Naoki
INADA Naoki added the comment: Patch LGTM. But I don't know it's OK to commit it on 2.7, 3.5 and 3.6. -- nosy: +inada.naoki ___ Python tracker ___ ___

[issue28713] Recent tutorial for recent Python3 still uses IOError.

2016-11-15 Thread Daisuke Miyakawa
Changes by Daisuke Miyakawa : -- versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue28713] Recent tutorial for recent Python3 still uses IOError.

2016-11-15 Thread Daisuke Miyakawa
New submission from Daisuke Miyakawa: https://docs.python.org/3.5/tutorial/errors.html for arg in sys.argv[1:]: try: f = open(arg, 'r') except IOError: print('cannot open', arg) else: print(arg, 'has', len(f.readlines()), 'lines') f.close() Although

[issue26935] android: test_os fails

2016-11-15 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- dependencies: -android: add platform.android_ver() resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker __

[issue26931] android: test_distutils fails

2016-11-15 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- assignee: -> xdegaye stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list

[issue26920] android: test_sys fails

2016-11-15 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___ __

[issue21449] Replace _PyUnicode_CompareWithId with _PyUnicode_CompareWithIdEqual

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: _PyUnicode_CompareWithId is a private function. We can remove it if it has issues. -- ___ Python tracker ___ ___

[issue28673] When using pyro4 with more than 15 threads, python 2.7.12 cores frequently

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: By the way, you can try your application on Python 3.6 using PYTHONMALLOC=debug env var. Or retry your application on Python 2.7 recompiled using ./configure --with-pydebug. I would like to know if Python sees a buffer overflow. -- ___

[issue28673] When using pyro4 with more than 15 threads, python 2.7.12 cores frequently

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: Ok but can you also try faulthandler to see all frames of all threads? -- ___ Python tracker ___ ___

[issue26935] android: test_os fails

2016-11-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 80e4cb5888f3 by Xavier de Gaye in branch '3.6': Issue #26935: Fix broken Android dup2() in test_os https://hg.python.org/cpython/rev/80e4cb5888f3 New changeset da59b7084dbe by Xavier de Gaye in branch 'default': Issue #26935: Merge 3.6 https://hg.py

[issue28701] Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString

2016-11-15 Thread Xiang Zhang
Xiang Zhang added the comment: LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue28711] IDLE doesn't open

2016-11-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> terry.reedy components: +IDLE nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs

[issue28710] Sphinx incompatible markup in configparser.ConfigParser.

2016-11-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +easy stage: -> needs patch versions: +Python 2.7, Python 3.6, Python 3.7 -Python 3.4 ___ Python tracker ___ _

[issue28709] PyStructSequence_NewType is broken; makes GC type without setting Py_TPFLAGS_HEAPTYPE

2016-11-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue28625] multiprocessing.Pool.imap swallows exceptions thrown by generators

2016-11-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +davin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue26926] test_io large file test failure on 32 bits Android platforms

2016-11-15 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It seems to me there is something wrong with your test. For example decoding b'\x81\x8d' from CP1251 (as well from any other codepage!) gives you u'\x81\x8d', but codes 0x81 and 0x8D are assigned to different characters: 'Ѓ' (U+0402) and 'Ќ' (U+040C). 0x81

[issue26920] android: test_sys fails

2016-11-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 73bd65e2 by Xavier de Gaye in branch '3.6': Issue #26920: Fix not getting the locale's charset upon initializing the interpreter, https://hg.python.org/cpython/rev/73bd65e2 New changeset f358d849c14e by Xavier de Gaye in branch 'default': I

[issue28707] add 'directory' option to the http.server module

2016-11-15 Thread Xiang Zhang
Xiang Zhang added the comment: +1 for this idea. I use this command everyday in work and every time must cd to the directory is an annoyance. -- nosy: +xiang.zhang ___ Python tracker __

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-15 Thread Mingye Wang
Mingye Wang added the comment: > Python 3.4.3 on Cygwin also fails ``b'\x81\x8d'.encode('cp1252')``. ... but since Cygwin packagers did not enable Win32 APIs for their build, I cannot test the script directly. -- ___ Python tracker

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-15 Thread Mingye Wang
Changes by Mingye Wang : Added file: http://bugs.python.org/file45498/windows10_14959.txt ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-15 Thread Mingye Wang
New submission from Mingye Wang: Mappings for 0x81 and 0x8D in multiple Windows code pages diverge from what Windows does. Attached is a script that tests for this behavior. (These two bytes are not necessary the only problems, but for sure they are the most widespread and famous ones. Again,

[issue28625] multiprocessing.Pool.imap swallows exceptions thrown by generators

2016-11-15 Thread Elias Zamaria
Elias Zamaria added the comment: I tried my code in Python 3.6.0b3 and got the same result. -- versions: +Python 3.6 ___ Python tracker ___ __

[issue26072] pdb fails to access variables closed over

2016-11-15 Thread Antony Lee
Changes by Antony Lee : -- nosy: -Antony.Lee ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue26072] pdb fails to access variables closed over

2016-11-15 Thread Chun-Yu Tseng
Chun-Yu Tseng added the comment: Call for review again. Maybe xdegaye would like to take a look? I found this related issue: #21161 -- ___ Python tracker ___ ___

[issue28673] When using pyro4 with more than 15 threads, python 2.7.12 cores frequently

2016-11-15 Thread INADA Naoki
INADA Naoki added the comment: Can you check backtrace of main thread? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue28711] IDLE doesn't open

2016-11-15 Thread Bryan
New submission from Bryan: Hello there I am using python 2.7 on windows 10 because my college class requires it, I am having issues when trying to open the IDLE. When i click on it the blue ring loads and then noting happens. I started to have to issue when i was changing the key settings so i

[issue28709] PyStructSequence_NewType is broken; makes GC type without setting Py_TPFLAGS_HEAPTYPE

2016-11-15 Thread Josh Rosenberg
Changes by Josh Rosenberg : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue28673] When using pyro4 with more than 15 threads, python 2.7.12 cores frequently

2016-11-15 Thread Michael Hu
Michael Hu added the comment: (gdb) py-bt #4 Frame 0x7f0ab7a2db60, for file /etc/remoting/remoting_agent.zip/Pyro4/socketutil.py, line 463, in close (self=) self.sock.shutdown(socket.SHUT_RDWR) #7 Frame 0x7f0ab0001760, for file /etc/remoting/remoting_agent.zip/Pyro4/socketutil.py, line 453

[issue28709] PyStructSequence_NewType is broken; makes GC type without setting Py_TPFLAGS_HEAPTYPE

2016-11-15 Thread Josh Rosenberg
Josh Rosenberg added the comment: On further checking, looks like there is a lot of work that should be done to initialize heap types (see PyType_FromSpecWithBases) that PyStructSequeuence_Init2 doesn't do (because it thinks it's working on a static type). I think the solution here is decouple

[issue28710] Sphinx incompatible markup in configparser.ConfigParser.

2016-11-15 Thread Patrick Lehmann
New submission from Patrick Lehmann: Why does e.g. configparser.ConfigParser contain doc strings with Sphinx incompatible markup? The markup starts with back-tick, but ends with a single quote. Example: https://github.com/python/cpython/blob/master/Lib/configparser.py?ts=2#L26 Sphinx writes t

[issue28707] add 'directory' option to the http.server module

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: Julien Palard added the comment: > If we were able to pass an instance of SimpleHTTPRequestHandler instead of > its class, we'd be able to give the `directory` to the handler during the > `main()`, instead of using with `chdir` and `getcwd` to pass the informat

[issue28709] PyStructSequence_NewType is broken; makes GC type without setting Py_TPFLAGS_HEAPTYPE

2016-11-15 Thread Josh Rosenberg
Josh Rosenberg added the comment: Note: Uncommenting the line that forces Py_TPFLAGS_HEAPTYPE isn't enough, since it looks like the PyHeapTypeObject fields aren't initialized properly, causing seg faults if you access, for example, __name__/__qualname__ (or print the type's repr, which implici

[issue28709] PyStructSequence_NewType is broken; makes GC type without setting Py_TPFLAGS_HEAPTYPE

2016-11-15 Thread Josh Rosenberg
Changes by Josh Rosenberg : -- title: PyStructSequence_NewType is broken -> PyStructSequence_NewType is broken; makes GC type without setting Py_TPFLAGS_HEAPTYPE ___ Python tracker

[issue28709] PyStructSequence_NewType is broken

2016-11-15 Thread Josh Rosenberg
New submission from Josh Rosenberg: I could be missing something, but it looks like PyStructSequence_NewType is guaranteed broken. Specifically, it allocates the memory with PyType_GenericAlloc (use PyType_Type as the base), and PyType declares itself to have garbage collected instances, so th

[issue28709] PyStructSequence_NewType is broken

2016-11-15 Thread Josh Rosenberg
Changes by Josh Rosenberg : Added file: http://bugs.python.org/file45496/setup.py ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue28707] add 'directory' option to the http.server module

2016-11-15 Thread Julien Palard
Julien Palard added the comment: Hi Stéphane, Your patch is simple and elegant, but I'm asking myself a question about the idea to pass a class instead of an instance to the TCPServer ctor (I know that's not your choice). If we were able to pass an instance of SimpleHTTPRequestHandler instead

[issue28708] Low FD_SETSIZE limit on Windows

2016-11-15 Thread Steve Dower
Steve Dower added the comment: It looks like Modules/selectmodule.c already has the handling for when this gets large (and we really want to stop allocating the static array on the stack), which is a plus, but I'd want to see the performance cost to small selects if suddenly we're allocating 1

[issue28708] Low FD_SETSIZE limit on Windows

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: To implement an efficient event loop, IOCP is the way to do: the asyncio module supports it using ProactorEventLoop. -- nosy: +haypo ___ Python tracker ___

[issue28708] Low FD_SETSIZE limit on Windows

2016-11-15 Thread Zachary Ware
Changes by Zachary Ware : -- components: +Build, Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue28708] Low FD_SETSIZE limit on Windows

2016-11-15 Thread David Hirschfeld
New submission from David Hirschfeld: Back in 1999 the compile-time constant FD_SETSIZE was raised from (the default on Windows) 64 to 512 open sockets to support *serious async servers* http://bugs.python.org/issue210843 https://github.com/python/cpython/blame/master/Modules/selectmodule.c#L29

[issue28707] add 'directory' option to the http.server module

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: The new feature should be documented in Doc/library/http.server.rst, and maybe also Doc/whatsnew/3.7.rst. Is it possible to write an unit test? -- ___ Python tracker

[issue28707] add 'directory' option to the http.server module

2016-11-15 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue28707] add 'directory' option to the http.server module

2016-11-15 Thread Stéphane Wirtel
New submission from Stéphane Wirtel: When we execute the http.server module, the tool will use the current directory (os.getcwd()) but sometimes we would like to specify a directory on the command line. With the next patch, I try to fix this missing feature ;-) Just with python -m http.serve

[issue28673] When using pyro4 with more than 15 threads, python 2.7.12 cores frequently

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: Try to get the Python traceback of thread on the crash: try the faulthandler module. -- nosy: +haypo ___ Python tracker ___ ___

[issue28673] When using pyro4 with more than 15 threads, python 2.7.12 cores frequently

2016-11-15 Thread Michael Hu
Michael Hu added the comment: Core is uploaded for python 2.7.10 to assist debugging. -- Added file: http://bugs.python.org/file45492/core_python2.7.10.gz ___ Python tracker ___

[issue28670] PEP 235: Implement on every POSIX system, and clean up the C code for `import'

2016-11-15 Thread Michael Witten
Michael Witten added the comment: Guess what? Linux can access HFS+ and NTFS volumes. Firstly, how does that fit into your ideas for testing? It doesn't; however, you'll note that my own brief analysis did attempt to wrestle with this nuance. Secondly, it was (and is) clearly asinine to co

[issue28706] msvc9compiler does not find a vcvarsall.bat of Visual C++ for Python 9.0

2016-11-15 Thread Jiří Hofman
New submission from Jiří Hofman: When running "c:\Program Files\Python27\Scripts\pip2.7.exe" install wx following error occurs: Complete output from command "c:\program files\python27\python.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\jiri\\appdata\\local\\temp\\pip-build-

[issue28702] Confusing error message when None used in expressions, eg. "'NoneType' object has no attribute 'foo'"

2016-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Approximate counts. C code: ob_type->tp_name161 Py_TYPE(...)->tp_name 285 Python code: __class__.__name__ 224 __class__.__qualname__ 23 type(...).__name__ 112 type(...).__qualname__5 Is it worth changing about 800 places in CPython

[issue28702] Confusing error message when None used in expressions, eg. "'NoneType' object has no attribute 'foo'"

2016-11-15 Thread R. David Murray
R. David Murray added the comment: That presumably means adding special None support to all the places None can appear in a message, where now the code treats None like it does every other object. I'm not sure the added complexity is worth it, especially since NoneType would still creep in an

[issue28704] Fix create_unix_server to support Path-like objects (PEP 519)

2016-11-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset f8207c98eb5e by Yury Selivanov in branch '3.5': Issue #28704: Fix create_unix_server to support Path-like objects https://hg.python.org/cpython/rev/f8207c98eb5e New changeset 0d663f758adb by Yury Selivanov in branch '3.6': Merge 3.5 (issue #28704) h

[issue28700] test_dbm failure: KeyError: b'0' (intermittent in 3.5, reliable in 3.6)

2016-11-15 Thread Martin Panter
Martin Panter added the comment: Is the problem something like a missing C function prototype? Maybe you see compiler warnings, but the compiler and linker carry on with the wrong prototype. If you build with “make -s”, warnings might be easier to see. If my guess is right, this would be simil

[issue28704] Fix create_unix_server to support Path-like objects (PEP 519)

2016-11-15 Thread Yury Selivanov
New submission from Yury Selivanov: Proxy for https://github.com/python/asyncio/pull/462 -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue28704] Fix create_unix_server to support Path-like objects (PEP 519)

2016-11-15 Thread Yury Selivanov
Changes by Yury Selivanov : -- assignee: yselivanov components: asyncio nosy: gvanrossum, yselivanov priority: normal severity: normal stage: resolved status: open title: Fix create_unix_server to support Path-like objects (PEP 519) type: behavior versions: Python 3.6, Python 3.7 __

[issue28703] Fix asyncio.iscoroutinefunction to handle Mock objects

2016-11-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 179e556a50ce by Yury Selivanov in branch '3.5': Issue #28703: Fix asyncio.iscoroutinefunction to handle Mock objects. https://hg.python.org/cpython/rev/179e556a50ce New changeset 4d78290b1d8e by Yury Selivanov in branch '3.6': Merge 3.5 (issue #2870

[issue28703] Fix asyncio.iscoroutinefunction to handle Mock objects

2016-11-15 Thread Yury Selivanov
New submission from Yury Selivanov: Proxy for https://github.com/python/asyncio/pull/459 -- assignee: yselivanov components: asyncio messages: 280886 nosy: gvanrossum, yselivanov priority: normal severity: normal stage: resolved status: open title: Fix asyncio.iscoroutinefunction to hand

[issue28703] Fix asyncio.iscoroutinefunction to handle Mock objects

2016-11-15 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue28702] Confusing error message when None used in expressions, eg. "'NoneType' object has no attribute 'foo'"

2016-11-15 Thread Greg Ward
Greg Ward added the comment: Based on a brief conversation with Brett Cannon at PyCon Canada the other day. Thanks for the idea, Brett! -- nosy: +brett.cannon ___ Python tracker ___

[issue28702] Confusing error message when None used in expressions, eg. "'NoneType' object has no attribute 'foo'"

2016-11-15 Thread Greg Ward
New submission from Greg Ward: Python's error message when you let None accidentally sneak into an expression where it doesn't belong could be better. The canonical example is attribute lookup: >>> a = None >>> a.foo Traceback (most recent call last): File "", line 1, in AttributeError: 'No

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2016-11-15 Thread Eryk Sun
Changes by Eryk Sun : -- Removed message: http://bugs.python.org/msg280878 ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue21449] Replace _PyUnicode_CompareWithId with _PyUnicode_CompareWithIdEqual

2016-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: _PyUnicode_EqualToASCIIString() added in issue28701 would help in the patch for this issue. -- dependencies: +Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString ___ Python tracker

[issue28701] Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString

2016-11-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45491/PyUnicode_CompareWithASCIIString.cocci ___ Python tracker ___ ___

[issue28701] Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString

2016-11-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch replaces calls of public function PyUnicode_CompareWithASCIIString() with new private function _PyUnicode_EqualToASCIIString(). The problem with PyUnicode_CompareWithASCIIString() is that it returns -1 for the result "less than" and error,

[issue28670] PEP 235: Implement on every POSIX system, and clean up the C code for `import'

2016-11-15 Thread Brett Cannon
Brett Cannon added the comment: So there's no "promised behavior" that's missing in Python 2.7. If you read PEP 235 it's very clear what platforms it was meant for: cygwin, macOS, and Windows. There's no promise of supporting PYTHONCASEOK for POSIX in general so it isn't as if the PEP is not f

[issue28700] test_dbm failure: KeyError: b'0' (intermittent in 3.5, reliable in 3.6)

2016-11-15 Thread Greg Ward
Changes by Greg Ward : -- title: test_dbm failure: KeyError: b'0' (regression in 3.6) -> test_dbm failure: KeyError: b'0' (intermittent in 3.5, reliable in 3.6) ___ Python tracker _

[issue28700] test_dbm failure: KeyError: b'0' (regression in 3.6)

2016-11-15 Thread Greg Ward
Greg Ward added the comment: As suggested in http://bugs.python.org/issue14120, I installed libgdbm-dev, re-configured, and re-compiled. That fixes the problem. IMHO that's not good enough: if we're missing a dependency, then either configuring or building should fail. It's nice that the test

[issue28700] test_dbm failure: KeyError: b'0' (regression in 3.6)

2016-11-15 Thread Greg Ward
Greg Ward added the comment: Forgot to mention: I'm running: No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu 16.04.1 LTS Release:16.04 Codename: xenial with $ dpkg-query -W | grep dbm libgdbm3:amd64 1.8.3-13.1 --

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2016-11-15 Thread Eryk Sun
Eryk Sun added the comment: The issue tracker isn't a forum to answer general programming questions. Please ask this on python-list, and I'll try to help you there. -- ___ Python tracker __

[issue28700] test_dbm failure: KeyError: b'0' (regression in 3.6)

2016-11-15 Thread Greg Ward
New submission from Greg Ward: test_dbm.py fails reliably for me in 3.6, but in 3.5 it passes ~80% of the time. The failure in both cases is KeyError: b'0', which has come up previously in http://bugs.python.org/issue20094 and http://bugs.python.org/issue14120. But since we've switched from 20

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2016-11-15 Thread Alex Wang
Alex Wang added the comment: Hi Eryk, Thanks a lot for quick reply~ This is about the bug I filed: http://bugs.python.org/issue28698# I may still need your help to have a look the original case when I caught this issue: ​I am writing some test automation which call C DLL from Python, the C fu

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2016-11-15 Thread Eryk Sun
Changes by Eryk Sun : -- keywords: +easy stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27585] asyncio.Lock deadlock after cancellation

2016-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Looks like create_waiter() entered the with-statement but didn't leave it properly due to the cancellation, right? @1st1 any idea? async with bug or asyncio bug? -- ___ Python tracker

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2016-11-15 Thread Eryk Sun
Eryk Sun added the comment: The repr can't automatically dereference the string at the address because it may be an invalid pointer. ctypes was developed on Windows, for which, in Python 2, it (ab)uses the obsolete IsBadStringPtr[A|W] function [1]. This function should never be used in a multi

[issue26929] android: test_strptime fails

2016-11-15 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___ __

[issue28668] instanciation of multiprocessing.Queue raises ImportError in test_logging

2016-11-15 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue28699] Imap from ThreadPool behaves unexpectedly

2016-11-15 Thread Lev Veshnyakov
Changes by Lev Veshnyakov : -- nosy: +davin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue27585] asyncio.Lock deadlock after cancellation

2016-11-15 Thread Mathieu Sornay
Mathieu Sornay added the comment: I might have found another pathological case not fixed by https://github.com/python/asyncio/pull/393 Tested in 3.6.0b3 The deadlock.py file prints : DEADLOCK HERE _locked: False _waiters: deque([]) -- nosy: +msornay versions: +Python 3.6 -Python 3.5

[issue28699] Imap from ThreadPool behaves unexpectedly

2016-11-15 Thread Lev Veshnyakov
New submission from Lev Veshnyakov: Consider the following code: from multiprocessing.pool import ThreadPool pool = ThreadPool(10) def gen(): yield 1 + '1' # here is an error print(list(pool.imap(str, gen( # prints [] print(list(pool.map(str, gen( # raises TypeError The differenc

[issue21449] Replace _PyUnicode_CompareWithId with _PyUnicode_CompareWithIdEqual

2016-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Callers should be fixed to handle errors. This would make the code of callers more complex for small benefit. And perhaps we will add more callers (if replace PyUnicode_CompareWithASCII with new function). > Since currently _PyUnicode_CompareWithId is use

[issue28556] typing.py upgrades

2016-11-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset da2ac103d326 by Guido van Rossum in branch '3.5': Issue #28556: Allow keyword syntax for NamedTuple (Ivan Levkivskyi) (upstream #321) https://hg.python.org/cpython/rev/da2ac103d326 New changeset 38ec88a4e282 by Guido van Rossum in branch '3.6': Iss

[issue28698] Python 3.x ctypes c_wchar_p return is different from official documentation example

2016-11-15 Thread Alex Wang
New submission from Alex Wang: - Python Version Python 3.5.2 - Issue I found that the c_wchar_p and c_char_p return results behaves different from what it is based on ctypes doc. From the ctypes doc of Python 3.5: >>> c_wchar_p("Hello, World") c_wchar_p('Hello, World') It return the ctypes

[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-15 Thread Lev Veshnyakov
Lev Veshnyakov added the comment: Yes, I'm free to move to 3.5, now I'm seeing isn't there any problems in 3.5 according to this issue. -- ___ Python tracker ___ ___

[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-15 Thread Davin Potts
Davin Potts added the comment: If it only occurs in 3.4.x, is moving to 3.5 an option for you? -- versions: -Python 3.5 ___ Python tracker ___ __

[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-15 Thread Lev Veshnyakov
Lev Veshnyakov added the comment: It's hanging in a while loop in _handle_workers, /usr/lib/python3.4/multiprocessingpool.py:365. I can't figure out what is the reason. @staticmethod def _handle_workers(pool): thread = threading.current_thread() # Keep maintaining workers until the cac

[issue1633941] for line in sys.stdin: doesn't notice EOF the first time

2016-11-15 Thread Jun Wu
Jun Wu added the comment: haypo: The file.__iter__ EINTR issue may be better discussed as a separate bug report. It's not related to stdin or EOF or Windows. Since we have some EINTR fixes for Python 2.7.4, I think it's reasonable to fix the remaining EINTR issues for 2.7.13+. If I have read

[issue26929] android: test_strptime fails

2016-11-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3c6e5f83d235 by Xavier de Gaye in branch '3.6': Issue #26929: Skip some test_strptime tests failing on Android that https://hg.python.org/cpython/rev/3c6e5f83d235 New changeset 91e0cf7f8e30 by Xavier de Gaye in branch 'default': Issue #26929: Merge

[issue28668] instanciation of multiprocessing.Queue raises ImportError in test_logging

2016-11-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset a377e6987821 by Xavier de Gaye in branch '3.5': Issue 28668: Skip tests where instanciation of multiprocessing.Queue https://hg.python.org/cpython/rev/a377e6987821 New changeset e5404ba1b19e by Xavier de Gaye in branch '3.6': Issue 28668: Merge 3.5

[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-15 Thread Lev Veshnyakov
Lev Veshnyakov added the comment: I've reproduced it on 2 different machines: - on a MacBook in Docker (debian:jessie, python 3.4.2) - on another desktop (Ubuntu 14.04.1, 3.16.0-77-generic, x86_64, python 3.4.3) -- ___ Python tracker

[issue28697] asyncio.Lock, Condition, Semaphore docs don't mention `async with` syntax

2016-11-15 Thread Ulrich Petri
New submission from Ulrich Petri: The docs for asyncio's Lock, Condition and Semaphore should use the new clean `async with lock:` syntax instead of the older (and IMO rather ugly) `with (yield from lock):` version. -- assignee: docs@python components: Documentation, asyncio messages:

[issue28618] Decorate hot functions using __attribute__((hot)) to optimize Python

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: >> * json: scanstring_unicode() > > This doesn't look wise. This is specific to single extension module and > perhaps to single particular benchmark. Most Python code don't use json at > all. Well, I tried different things to make these bench

[issue28618] Decorate hot functions using __attribute__((hot)) to optimize Python

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: > New changeset cfc956f13ce2 by Victor Stinner in branch 'default': > Issue #28618: Mark dict lookup functions as hot > https://hg.python.org/cpython/rev/cfc956f13ce2 Here are benchmark results on the speed-python server: haypo@speed-python$ PYTHONPATH=~/perf p

[issue21449] Replace _PyUnicode_CompareWithId with _PyUnicode_CompareWithIdEqual

2016-11-15 Thread Xiang Zhang
Xiang Zhang added the comment: Since currently _PyUnicode_CompareWithId is used to compare a unicode with ascii identifiers for all cases, how about introduce a more specific function like _PyUnicode_EqualToASCIIId for this case? We can preserve _PyUnicode_CompareWithId for more general purpos

[issue21449] Replace _PyUnicode_CompareWithId with _PyUnicode_CompareWithIdEqual

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: > This issue is not just about readability or performance. It is about > correctness, since none of callers check for failure of > _PyUnicode_CompareWithId. Callers should be fixed to handle errors. -- ___ Python t

[issue1633941] for line in sys.stdin: doesn't notice EOF the first time

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: I don't see any simple solution to get a 100% reliable I/O stack on Python 2. Python 3.5 contains a pure Python implementation of the io module: _pyio.FileIO uses os.read() and os.write(). In Python 3.4 and older, the _pyio still used io.FileIO (implemented in

[issue21449] Replace _PyUnicode_CompareWithId with _PyUnicode_CompareWithIdEqual

2016-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Please don't modify _PyUnicode_FromId(), I prefer to keep it as it is, decode > from UTF-8. Then we should add handling of three special cases: PyUnicode_READY() fails, _PyUnicode_FromId() fails and both fail due to memory error. This means that should be

[issue1633941] for line in sys.stdin: doesn't notice EOF the first time

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: Martijn Pieters: Sadly, Python 2 I/O are full of bugs in corner cases :-/ First of all, in most cases, Python 2 uses the libc for I/O, but the libc has known bugs including segfaults: https://haypo-notes.readthedocs.io/python.html#bugs-in-the-c-stdio-used-by-th

[issue12268] file readline, readlines & readall methods can lose data on EINTR

2016-11-15 Thread Martijn Pieters
Martijn Pieters added the comment: Follow-up bug, readahead was missed: http://bugs.python.org/issue1633941 -- nosy: +mjpieters ___ Python tracker ___ ___

[issue28618] Decorate hot functions using __attribute__((hot)) to optimize Python

2016-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > * json: scanstring_unicode() This doesn't look wise. This is specific to single extension module and perhaps to single particular benchmark. Most Python code don't use json at all. What is the top of "perf report"? How this list intersects with the list of

[issue1633941] for line in sys.stdin: doesn't notice EOF the first time

2016-11-15 Thread Martijn Pieters
Martijn Pieters added the comment: It looks like readahead was missed when http://bugs.python.org/issue12268 was fixed. -- ___ Python tracker ___ _

[issue21090] File read silently stops after EIO I/O error

2016-11-15 Thread Martijn Pieters
Martijn Pieters added the comment: The Python 2.7 issue (using fread without checking for interrupts) looks like a duplicate of http://bugs.python.org/issue1633941 -- nosy: +mjpieters ___ Python tracker __

  1   2   >