[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

[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

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

[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

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

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

[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

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

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

[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

[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

[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

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

[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

[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

[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

[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

[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

[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

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

[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

<    1   2