[issue28691] python3.6 -Werror -c '"\c"' fails with an assertion error

2016-11-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset aa52ea2a7731 by Victor Stinner in branch '3.6': Fix warn_invalid_escape_sequence() https://hg.python.org/cpython/rev/aa52ea2a7731 -- nosy: +python-dev ___ Python tracker

[issue28691] python3.6 -Werror -c '"\c"' fails with an assertion error

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: Thanks Serhiy for your unit tests! I pushed with patch with your tests. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue28693] No HKSCS support in Windows cp950

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: Python supports native Windows code pages using codecs.code_page_encode() and codecs.code_page_decode() methods. See for example Lib/encodings/cp65001.py : this codec is not implemented in Python, but is a wrapper to native Windows functions (MultiByteToWideChar

[issue28690] Loop in re (regular expression) processing

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: It's not really a bug, but more a trap of regular expressions. It seems like you fixed your issue, so I close it. -- nosy: +haypo resolution: -> not a bug status: open -> closed ___ Python tracker

[issue28695] Add SSL_CTX_set_client_cert_engine

2016-11-15 Thread Christian Heimes
Changes by Christian Heimes : -- versions: +Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue28695] Add SSL_CTX_set_client_cert_engine

2016-11-15 Thread Christian Heimes
New submission from Christian Heimes: Python's ssl module does not support smartcard authentication of clients. In order to use an external engine like OpenSC's engine_pkcs11, SSLContext must be configured to use a loaded engine for client cert auth. It's really simple. Pseudo code without erro

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

2016-11-15 Thread INADA Naoki
INADA Naoki added the comment: > I don't understand well the effect of the hot attribute I compared lookdict_unicode_nodummy assembly by `objdump -d dictobject.o`. It looks completely same. So I think only difference is placement. hot functions are in .text.hot section and linker groups hot fu

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

2016-11-15 Thread INADA Naoki
INADA Naoki added the comment: > so I suggest to run benchmarks and check that it has a non negligible effect > on benchmarks ;-) When added _Py_HOT_FUNCTION to lookdict_unicode, lookdict_unicode_nodummy and lookdict_split (I can't measure L1 miss via `perf stat -d` because I use EC2 for bench

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

2016-11-15 Thread Lev Veshnyakov
New submission from Lev Veshnyakov: It's only in imap, in map it's ok. The following code explains the issue: from multiprocessing.pool import ThreadPool pool = ThreadPool(10) def gen(): yield 1 + '1' # here is an error try: next((pool.imap(str, gen( except: # Will be catched

[issue21449] Replace _PyUnicode_CompareWithId with _PyUnicode_CompareWithIdEqual

2016-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: _PyUnicode_FromId would not fail due to bad encoded data if use the Latin1 encoding. Seems encoded data always is ASCII. We could use PyErr_WriteUnraisable() for output a warning if it is not. -- ___ Python tracke

[issue28692] gettext: deprecate selecting plural form by fractional numbers

2016-11-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, of cause. Thank your for noticing this. -- Added file: http://bugs.python.org/file45487/gettext-non-int-plural-deprecate.patch ___ Python tracker __

[issue21449] Replace _PyUnicode_CompareWithId with _PyUnicode_CompareWithIdEqual

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

[issue28082] re: convert re flags to (much friendlier) IntFlag constants

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: The change 5fd69d4a93e0 (use IntFlag for re constants) made the "regex_compile" benchmark slower: Median +- std dev: [71c1970f27b6] 388 ms +- 3 ms -> [3cf248d10bed] 470 ms +- 4 ms: 1.21x slower -- ___ Python tracke

[issue27838] test_os.test_chown() failure on koobs-freebsd-{current, 9}

2016-11-15 Thread Kubilay Kocak
Kubilay Kocak added the comment: @Serhiy I have noticed that the failure is reproducible in the buildbot workers only when startup (of buildbot) is invoked via sudo, and not when started on first-boot (rc runs as root). In both situations, twistd then drops privs to --uid=buildbot --gid=buil

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

2016-11-15 Thread Davin Potts
Davin Potts added the comment: Using the supplied example, I was unable to reproduce what you described using either 3.5 or 3.6-beta on OS X 10.11. What platform are you using? (Perhaps it is platform specific.) -- nosy: +davin ___ Python tracker

[issue28692] gettext: deprecate selecting plural form by fractional numbers

2016-11-15 Thread Xiang Zhang
Xiang Zhang added the comment: I think the stacklevel should be 3. stacklevel = 3: ./python -Walways /tmp/a.py /tmp/a.py:2: DeprecationWarning: Plural value must be an integer, got float c2py('n!=1')(1.1) stacklevel = 4: ./python -Walways /tmp/a.py sys:1: DeprecationWarning: Plural value

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

2016-11-15 Thread Lev Veshnyakov
Lev Veshnyakov added the comment: Ubuntu 14.04 LTS, 3.13.0-83-generic, x86_64 -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue28692] gettext: deprecate selecting plural form by fractional numbers

2016-11-15 Thread Xiang Zhang
Xiang Zhang added the comment: Ohh, sorry. It should be 4 and I make a mistake. Sorry for the noise. Patch LGTM. -- ___ 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: So, I've checked twice, it's presented by me on python 3.4.3, and not by 3.5.2. So I will go deaper -- ___ Python tracker ___ _

[issue24329] __qualname__ and __slots__

2016-11-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka versions: +Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mail

[issue21449] Replace _PyUnicode_CompareWithId with _PyUnicode_CompareWithIdEqual

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: Please don't modify _PyUnicode_FromId(), I prefer to keep it as it is, decode from UTF-8. -- ___ Python tracker ___ ___

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

2016-11-15 Thread Roundup Robot
Roundup Robot 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 -- ___ Python tracker

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

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: > How about marking lookdict_unicode and lookdict_unicode_nodummy as hot? Ok, your benchmark results doens't look bad, so I marked the following functions as hot: - lookdict - lookdict_unicode - lookdict_unicode_nodummy - lookdict_split It's common to see the

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

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: hot3.patch: Mark additional functions as hot * PyNumber_AsSsize_t() * _PyUnicode_FromUCS1() * json: scanstring_unicode() * siphash24() * sre_ucs1_match, sre_ucs2_match, sre_ucs4_match I'm not sure about this patch. It's hard to get reliable benchmark results on

[issue28343] Bad encoding alias cp936 -> gbk: euro sign

2016-11-15 Thread Mingye Wang
Mingye Wang added the comment: Also, go to ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit936.txt for MS reference. -- ___ Python tracker ___ __

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

2016-11-15 Thread Martijn Pieters
Martijn Pieters added the comment: This bug affects all use of `file.__iter__` and interrupts (EINTR), not just sys.stdin. You can reproduce the issue by reading from a (slow) pipe in a terminal window and resizing that window, for example; the interrupt is not handled and a future call ends

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

2016-11-15 Thread STINNER Victor
STINNER Victor added the comment: I wrote hot3.patch when trying to make the following benchmarks more reliable: - logging_silent: rev 8ebaa546a033 is 20% slower than the average en 2016 - json_loads: rev 0bd618fe0639 is 30% slower and rev 8ebaa546a033 is 15% slower than the average on 2016 - re

[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 __

[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 ___ _

[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

[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 ___ ___

[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

[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: 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 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

[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

[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

[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

[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:

[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

[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

[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

[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

[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

[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: 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 ___ ___

[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

[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

[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

[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

[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
Changes by Lev Veshnyakov : -- nosy: +davin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[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 ___ ___

[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 ___ __

[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

[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:

[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

[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 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
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 --

[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' (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 _

[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

[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,

[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 ___ ___

[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

[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

[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

[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 ___

[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

[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 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

[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 __

[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 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

[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

[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

[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-

[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

[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 ___

[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 ___ ___

[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

[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 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

[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

[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 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 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

[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

[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

[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; 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; 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

[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

[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

[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

[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
Changes by Josh Rosenberg : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

  1   2   >