[issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize

2016-08-22 Thread Xiang Zhang
Xiang Zhang added the comment: v3 applies haypo's suggestion. -- Added file: http://bugs.python.org/file44192/list_resize_v3.patch ___ Python tracker ___

[issue25825] AIX shared library extension modules installation broken

2016-08-22 Thread David Edelsohn
David Edelsohn added the comment: > This bug was marked for 2.7 as well. Is there anything that needs to be done > for 2.7? It would be great if both patches were applied to 2.7 also. > How does patch 2 make the test_distutils situation worse? Is there anything > that should be done to

[issue25825] AIX shared library extension modules installation broken

2016-08-22 Thread Martin Panter
Martin Panter added the comment: It looks like the change from plain config to config- was made in Issue 9807 (r86731, 3.2). So the patch seems reasonable to me; it is just catching up with that change. This bug was marked for 2.7 as well. Is there anything that needs to be done for 2.7?

[issue27831] Python 3.4.5 leaks memory when attempting to load non-existent file

2016-08-22 Thread geeknik
New submission from geeknik: While fuzzing Python 3.4.5 with AFL, ASAN and libdislocator, I fat fingered the keyboard ASAN pops up a LeakSanitizer error. Apparently trying to open a non-existent file causes Python 3.4.5 to leak >880KB of memory. ./python: can't open file 'id:000109': [Errno

[issue27435] ctypes library loading and AIX - also for 2.7.X (and later)

2016-08-22 Thread Martin Panter
Martin Panter added the comment: I had understood that changing find_library() would only be useful in combination with the automatic RTDL_MEMBER detection. If you want to mention lack of support for AIX in the documentation, that is okay by me. If you want to propose an alternative

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 620b2e554be4 by Victor Stinner in branch 'default': Issue #27809: builtin___build_class__() uses fast call https://hg.python.org/cpython/rev/620b2e554be4 -- ___ Python tracker

[issue27830] Add _PyObject_FastCallKeywords(): pass keyword arguments as (key, value) pairs

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: Here is a first patch: * Add _PyObject_FastCallKeywords(): main entry point * Add _PyCFunction_FastCallKeywords(): implementation for C function, but currently it's just an empty skeleton * Rename fast_function() to PyFunction_FastCallKeywords() and ajust its

[issue27643] test_ctypes fails on AIX with xlc

2016-08-22 Thread Martin Panter
Martin Panter added the comment: Now I am confused. In we have [Me] If your compiler does not support “signed short” bitfields, maybe we just have to accept that ctypes supports it even though the compiler doesn’t, and skip the test. [Michael]

[issue27824] update ConfigParser docs regarding in-line comments

2016-08-22 Thread Joshua Haas
Joshua Haas added the comment: I'm not sure it's deprecated so much as moved. Python 3.5 includes an additional init parameter, so setting inline_comment_prefixes=';' allows inline comments even for values containing the ';' character, displaying the "expected behavior" described in my

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: According to discussions in the issue #27809, require a Python dict leads to inefficient code because a temporary dict may be required. The issue #27830 proposes to pass keyword arguments as (key, value) pairs. It should be used for the new METH_FASTCALL

[issue27830] Add _PyObject_FastCallKeywords(): pass keyword arguments as (key, value) pairs

2016-08-22 Thread STINNER Victor
New submission from STINNER Victor: In the issue #27809, I added support for keyword arguments to the function _PyObject_FastCallDict() (previously called _PyObject_FastCall). Keyword arguments are passed as a Python dictionary (dict). _PyObject_FastCallDict() is efficient when keyword

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset ef0110a52e24 by Victor Stinner in branch 'default': PyEval_CallObjectWithKeywords() uses fast call with kwargs https://hg.python.org/cpython/rev/ef0110a52e24 New changeset 5587d0dfab4c by Victor Stinner in branch 'default': Issue #27809: Use

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: Stefan Behnel: "I like the oneArg/noArg etc. macros. We use something similar in Cython." Oh, nice :-) Since they macros are private, I pushed fastcall_macros.patch. We can still rework them later if needed. "You can even use them to inline the METH_O and

[issue27820] Possible bug in smtplib when initial_response_ok=False

2016-08-22 Thread Mario Colombo
Mario Colombo added the comment: Yes, this (or something similar) totally bit me, when for another unrelated reason 'AUTH PLAIN' authentication failed: https://gist.github.com/macolo/bf2811c14d985d013dda0741bfd339e0 Python then tries auth_login, but doesn't send 'AUTH LOGIN' to the mail

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1aefb4c4a7b4 by Victor Stinner in branch 'default': _PyFunction_FastCallDict() supports keyword args https://hg.python.org/cpython/rev/1aefb4c4a7b4 New changeset 7924eac912fe by Victor Stinner in branch 'default': Issue #27809: Cleanup

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 263334a652ac by Victor Stinner in branch 'default': Rename _PyObject_FastCall() to _PyObject_FastCallDict() https://hg.python.org/cpython/rev/263334a652ac -- nosy: +python-dev ___ Python tracker

[issue27128] Add _PyObject_FastCall()

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: Ok, I see much better with concrete commits. I'm really happy that Cython also benefits from these enhancements. Note: handling keywords is likely to change quickly ;-) -- ___ Python tracker

[issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: I reviewed list_resize_v2.patch. -- nosy: +haypo ___ Python tracker ___ ___

[issue27814] contextlib.suppress: Add whitelist argument

2016-08-22 Thread Michael Büsch
Michael Büsch added the comment: >an implementation of the vastly *less* common pattern: Ok, here are some numbers. My codebase is about 32 kLOC. $ git grep suppressAllExc |wc -l 20 $ git grep contextlib\\.suppress |wc -l 17 (suppressAllExc being my local version to suppress Exception, but

[issue27826] Null-pointer dereference in tuplehash() function

2016-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Closing as won't fix. It is impractical to make marshal resilient against bytecode hacks and it is likewise impractical to put a NULL pointer check in-front of every dereference in the language. -- resolution: -> wont fix status: open -> closed

[issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize

2016-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is low priority. I will look at it during the sprint. As far as I know there is no bug here or performance problem; instead, the patch alters stable code and transfers responsibilities. -- priority: normal -> low

[issue27643] test_ctypes fails on AIX with xlc

2016-08-22 Thread Eric N. Vander Weele
Changes by Eric N. Vander Weele : Removed file: http://bugs.python.org/file44189/ctypes_test_sign_bitfields.diff ___ Python tracker ___

[issue27643] test_ctypes fails on AIX with xlc

2016-08-22 Thread Eric N. Vander Weele
Eric N. Vander Weele added the comment: > I believe that there is a specific reason that M, N, O, P, Q, R and S are "short". [...] Oops - this was an oversight when I created the patch. I just uploaded ctypes_test_sign_bitfields_2.diff, which is what I originally intended. -- Added

[issue27794] setattr a read-only property; the AttributeError should show the attribute that failed

2016-08-22 Thread Antti Haapala
Antti Haapala added the comment: I've got one idea about how to implement this, but it would require adding a new flag field to PyExc_AttributeError type. This flag, if set, would tell that the AttributeError in question was raised in C descriptor code or under similar circumstances, and that

[issue12713] argparse: allow abbreviation of sub commands by users

2016-08-22 Thread Vinay Sajip
Vinay Sajip added the comment: Mean culpa - I have jumped the gun on this. Sorry to all for the inconvenience. I have just got back after being away for a few days, and will revert the change shortly, if no one beats me to it. -- ___ Python

[issue12713] argparse: allow abbreviation of sub commands by users

2016-08-22 Thread Vinay Sajip
Vinay Sajip added the comment: *Mea culpa. Autocorrect :-( -- ___ Python tracker ___ ___ Python-bugs-list

[issue27643] test_ctypes fails on AIX with xlc

2016-08-22 Thread Michael Felt
Michael Felt added the comment: On 22-Aug-16 19:43, Eric N. Vander Weele wrote: > Eric N. Vander Weele added the comment: > > I came across this issue while researching where to post my patch (having > come across this while building Python 2.7 & 3.x on AIX via xlc). > >> In general in C, if a

[issue27435] ctypes library loading and AIX - also for 2.7.X (and later)

2016-08-22 Thread Michael Felt
Michael Felt added the comment: On 22-Aug-16 04:04, Martin Panter wrote: > Martin Panter added the comment: > > The ctypes tests all seem to be protected with code that checks for None, and > explicitly skip the test in that case. The skip message should be visible > when you run the test in

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread Stefan Behnel
Stefan Behnel added the comment: I just took a quick look at the fastcall_kwargs-2.patch for now. It looks ok in general, but it also adds quite some special code for the dict-to-locals mapping. Is the keyword argument calling case really that important? I mean, it requires creating a dict

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread Stefan Behnel
Stefan Behnel added the comment: I like the oneArg/noArg etc. macros. We use something similar in Cython. You can even use them to inline the METH_O and METH_NOARGS call cases (although I use inline functions for that in Cython). -- ___ Python

[issue25825] AIX shared library extension modules installation broken

2016-08-22 Thread Eric N. Vander Weele
Eric N. Vander Weele added the comment: > Patch1 looks fine to me, though I will have to rely on you people to verify > that it does what it’s supposed to. Do you want me to commit it straight > away, or wait for your follow-up patch? Independently, I have created a similar patch as well and

[issue27128] Add _PyObject_FastCall()

2016-08-22 Thread Stefan Behnel
Stefan Behnel added the comment: > What do you mean by "I copied your (no-kwargs) implementation"? I copied what you committed into CPython for _PyFunction_FastCall(): https://github.com/cython/cython/commit/8f3d3bd199a3d7f2a9fdfec0af57145b3ab363ca and then enabled its usage in a couple of

[issue27643] test_ctypes fails on AIX with xlc

2016-08-22 Thread Eric N. Vander Weele
Eric N. Vander Weele added the comment: I came across this issue while researching where to post my patch (having come across this while building Python 2.7 & 3.x on AIX via xlc). > In general in C, if a bit-field has type “int” without a signed or unsigned > qualifier, it is up to the

[issue27794] setattr a read-only property; the AttributeError should show the attribute that failed

2016-08-22 Thread Xiang Zhang
Xiang Zhang added the comment: One solution I can think of is alter the constructor of property() and add an optional name attribute to it. If users really care about the exception message, they can set the attribute to the property's name. If they don't care, everything remains the same as

[issue27794] setattr a read-only property; the AttributeError should show the attribute that failed

2016-08-22 Thread R. David Murray
R. David Murray added the comment: Not worth it. It would feel like boilerplate, and the situation where you want the information is almost invariably going to be one you didn't anticipate and so didn't "bother" with the name. Either that or you always have to do it, and the elegance of

[issue26331] PEP 515: Tokenizer: allow underscores for grouping in numeric literals

2016-08-22 Thread Xiang Zhang
Xiang Zhang added the comment: Hi Georg, I left several comments on Rietveld. Hope it helps. -- nosy: +xiang.zhang ___ Python tracker ___

[issue27828] Regression in http.cookies parsing with single key without value

2016-08-22 Thread Yuriy Zhuravlev
Yuriy Zhuravlev added the comment: >Any RFC I'm looking at says that the value is required, so your syntax is >simply not valid and is rejected by the parser. Perhaps but this cookies sets not by me (maybe JS ads widget or etc). And I can't fix it. I can't auth users because their cookies

[issue27784] Random failure of test_TCPServer() of test.test_socketserver.SocketServerTest and test_handle_accept() of test.test_asyncore.TestAPI_UseIPv6Select on FreeBSD buildbots

2016-08-22 Thread Berker Peksag
Berker Peksag added the comment: Here is another one on koobs-freebsd10: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/4809/steps/test/logs/stdio test_handle_accept was fine this time. And this one is from koobs-freebsd9:

[issue18139] email module should have a way to prepend and insert headers

2016-08-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I meant .items() -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18139] email module should have a way to prepend and insert headers

2016-08-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I've updated this to Python 3.6, but I don't know if there's time to design an API and implementation in the time left before beta 1. But a use case has come up, so I want to reboot this discussion (yes, it should go to email-sig too). Apparently ARC

[issue18139] email module should have a way to prepend and insert headers

2016-08-22 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- versions: +Python 3.6 -Python 3.4 ___ Python tracker ___

[issue27587] Issues, reported by PVS-Studio static analyzer

2016-08-22 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27587] Issues, reported by PVS-Studio static analyzer

2016-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 51627344fc58 by Berker Peksag in branch '3.5': Issue #27587: Move null pointer check earlier in _PyState_AddModule() https://hg.python.org/cpython/rev/51627344fc58 New changeset 7d90bf4780ff by Berker Peksag in branch 'default': Issue #27587: Merge

[issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize

2016-08-22 Thread Xiang Zhang
Xiang Zhang added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: fastcall_macros.patch: * Rename _PyObject_FastCall() to _PyObject_FastCallDict() * Add _PyObject_FastCall(func, args, nargs) macro * Add _PyObject_CallArg1(func, arg) macro * Add _PyObject_CallNoArg(func) macro The 3 new macros call _PyObject_FastCallDict().

[issue27824] update ConfigParser docs regarding in-line comments

2016-08-22 Thread R. David Murray
R. David Murray added the comment: The python3 docs do not mention inline comments. Perhaps we even want a documented deprecation here? -- ___ Python tracker

[issue27824] update ConfigParser docs regarding in-line comments

2016-08-22 Thread R. David Murray
R. David Murray added the comment: Alternate proposal. Replace that whole paragraph with: Configuration files may include comments, prefixed by specific characters (# and ;). Comments may appear on their own in an otherwise empty line. If a line has a value or section name that does not

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: > _PyObject_FastCallKeywords(PyObject **args, int nargs, PyObject **kwargs, int > nkwargs): nkwargs is the number of (key, value) pairs Hum, I don't know if it's worth to "split" the C array into two parts. Maybe it can be just:

[issue27818] Speed up number format spec parsing

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: -while (pos ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27213] Rework CALL_FUNCTION* opcodes

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: See also the issue #27809 "_PyObject_FastCall(): add support for keyword arguments" where we discuss if we can completely avoid the creation of a temporary dictionary to pass keyword arguments. -- ___ Python

[issue27128] Add _PyObject_FastCall()

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: I "moved" your msg273365 to the issue #27809. -- ___ Python tracker ___

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: "The problem is that passing keyword arguments as a dict is not the most efficient way due to an overhead of creating a dict. For now keyword arguments are pushed on the stack as interlaced array of keyword names and values. It may be more

[issue27828] Regression in http.cookies parsing with single key without value

2016-08-22 Thread Martin Panter
Martin Panter added the comment: I am not the biggest expert on cookie syntaxes, but maybe these reports are related: Issue 25228: Skip over invalid cookies by searching for a semicolon; needs confirming whether it reopens a security hole Issue 17340: Problem with a comma in (or preceding) a

[issue27674] Quote mark breaks http.cookies, Cookie.py processing

2016-08-22 Thread Martin Panter
Changes by Martin Panter : -- title: Quote mark breaks cookie processing -> Quote mark breaks http.cookies, Cookie.py processing ___ Python tracker

[issue23930] http.cookies.SimpleCookie doesn't parse comma-only separated cookies correctly

2016-08-22 Thread Martin Panter
Changes by Martin Panter : -- title: SimpleCookie doesn't parse comma-only separated cookies correctly -> http.cookies.SimpleCookie doesn't parse comma-only separated cookies correctly ___ Python tracker

[issue27818] Speed up number format spec parsing

2016-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. I expect that with the patch for issue27078 the effect of this optimization is even more significant. Years ago I wrote much larger patch that includes similar but even more aggressive microoptimization. But the effect was not very impressive for

[issue25228] Regression in http.cookies parsing with brackets and quotes

2016-08-22 Thread Martin Panter
Changes by Martin Panter : -- title: Regression in cookie parsing with brackets and quotes -> Regression in http.cookies parsing with brackets and quotes ___ Python tracker

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: Copy of msg273365 from the issue #27128: Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer)Date: 2016-08-22 12:29 The problem is that passing keyword arguments as a dict is not the most efficient way due to an overhead of creating a

[issue27829] test.regrtest: changed environment variables are not logged

2016-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2e23f7b9515c by Victor Stinner in branch 'default': Issue #27829: libregrtest.save_env: flush stderr https://hg.python.org/cpython/rev/2e23f7b9515c -- nosy: +python-dev ___ Python tracker

[issue1375011] http.cookies, Cookie.py: Improper handling of duplicate cookies

2016-08-22 Thread Martin Panter
Changes by Martin Panter : -- title: Improper handling of duplicate cookies -> http.cookies, Cookie.py: Improper handling of duplicate cookies ___ Python tracker

[issue27128] Add _PyObject_FastCall()

2016-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The problem is that passing keyword arguments as a dict is not the most efficient way due to an overhead of creating a dict. For now keyword arguments are pushed on the stack as interlaced array of keyword names and values. It may be more efficient to push

[issue27829] test.regrtest: changed environment variables are not logged

2016-08-22 Thread STINNER Victor
New submission from STINNER Victor: It's common to get a random "env failed" issue when tests are run by buildbots, but changed environment variables are not logged, so the "env changed "information cannot be used to fix the issue :-/ Example: -- ... 0:07:32 [160/402] test_io

[issue27829] test.regrtest: changed environment variables are not logged

2016-08-22 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +buildbot ___ Python tracker ___ ___

[issue16113] Add SHA-3 and SHAKE (Keccak) support

2016-08-22 Thread Christian Heimes
Christian Heimes added the comment: The maintenance burden is minimal. All six algorithms are just variants of the same KeccakP-1600 sponge construction with different initialization parameters for rate, capacity, delimiter and output size. SHAKEs have no default output len and another

[issue27828] Regression in cookie parsing with single key without value

2016-08-22 Thread SilentGhost
SilentGhost added the comment: The change was implemented in issue22796 and is listed in the what's new document. Any RFC I'm looking at says that the value is required, so your syntax is simply not valid and is rejected by the parser. -- nosy: +SilentGhost, pitrou resolution: -> not

[issue27768] ssl: add public API for IA-32 processor capabilities vector

2016-08-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: I still think it's a slippery slope to include such specialized APIs that most people don't know what to make of. This reminds me of `RAND_egd()`. If ChaCha20-Poly1305 is always /at least/ as secure as AES-GCM (and sometimes more), then we should simply

[issue27768] ssl: add public API for IA-32 processor capabilities vector

2016-08-22 Thread Alex Gaynor
Alex Gaynor added the comment: In this case, performance is security. Both AES-GCM and ChaCha20-Poly1305 are secure. Modulo one thing: GCM in software is hard to implement in constant-time, so it's strongly preferable to use it only when there's a hardware implementation. It works out nicely

[issue27768] ssl: add public API for IA-32 processor capabilities vector

2016-08-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Agreed with Gregory. I'm also surprised you consider selecting a cipher suite based on performance considerations rather than security. I'm not sure that's something we want to promote. (btw, AES speed is usually not a critical factor except in very specific

[issue27792] bool % int has inconsistent return type.

2016-08-22 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your work too. ;) You does the most important change. -- ___ Python tracker ___

[issue27792] bool % int has inconsistent return type.

2016-08-22 Thread Mark Dickinson
Mark Dickinson added the comment: issue27792_v2.patch LGTM. Thanks for the fix! -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue27792] bool % int has inconsistent return type.

2016-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset d998d87f0aa0 by Mark Dickinson in branch 'default': Issue #27792: force int return type for modulo operations involving bools. https://hg.python.org/cpython/rev/d998d87f0aa0 -- nosy: +python-dev ___

[issue27828] Regression in cookie parsing with single key without value

2016-08-22 Thread Yuriy Zhuravlev
New submission from Yuriy Zhuravlev: After I migrated my site to Python 3.5 from 3.4 many users of my site have not been able to login. After small research I found out that users cookies there was a key without value and new Python get empty SimpleCookie result. Example for Python 3.5.2:

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: @Stefan: Would you mind to review fastcall_kwargs-2.patch please? -- nosy: +scoder ___ Python tracker ___

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: Patch version 2: * add a fast-path to fastlocals_dict() when total_args==0 * Extract co_varnames assignement out of the loop (it's a constant) * Cleanup also the code to make it more readable -- Added file:

[issue27792] bool % int has inconsistent return type.

2016-08-22 Thread Xiang Zhang
Xiang Zhang added the comment: Oh, sorry. I forgot about long_long. Actually I did think for a while to search for a good function here. :( v2 uses long_long now. > I agree that the fast paths need looking at; it seems there's a fair bit of > redundancy there. But not in this issue, please!

[issue27128] Add _PyObject_FastCall()

2016-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7dd85b19c873 by Victor Stinner in branch 'default': Optimize call to Python function without argument https://hg.python.org/cpython/rev/7dd85b19c873 -- ___ Python tracker

[issue27128] Add _PyObject_FastCall()

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: > FYI: I copied your (no-kwargs) implementation over into Cython and I get > around 17% faster calls to Python functions with 2 positional arguments. Hey, cool! It's always cool to get performance enhancement without having to break the C API nor having to

[issue27128] Add _PyObject_FastCall()

2016-08-22 Thread Stefan Behnel
Stefan Behnel added the comment: FYI: I copied your (no-kwargs) implementation over into Cython and I get around 17% faster calls to Python functions with 2 positional arguments. -- ___ Python tracker

[issue27792] bool % int has inconsistent return type.

2016-08-22 Thread Mark Dickinson
Mark Dickinson added the comment: > BTW, Mark, do you think the fast path in long_mod is really needed? I agree that the fast paths need looking at; it seems there's a fair bit of redundancy there. But not in this issue, please! -- ___ Python

[issue27792] bool % int has inconsistent return type.

2016-08-22 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the patch. I think what we really want here is a call to `long_long` rather than `PyNumber_Long`; `PyNumber_Long` includes all the conversions using `__trunc__`, etc., which we don't need here. -- ___

[issue27539] negative Fraction ** negative int not normalized

2016-08-22 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, all. Closing as fixed. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue27539] negative Fraction ** negative int not normalized

2016-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7eea5b87f5fa by Mark Dickinson in branch '3.5': Issue #27539: Fix unnormalised Fraction.__pow__ result for negative exponent and base. Thanks Vedran Čačić. https://hg.python.org/cpython/rev/7eea5b87f5fa New changeset 902e82f71880 by Mark Dickinson

[issue27827] pathlib is_reserved fails for some reserved paths on Windows

2016-08-22 Thread Eryk Sun
New submission from Eryk Sun: pathlib._WindowsFlavour.is_reserved assumes Windows uses an exact match up to the file extension for reserved DOS device names. However, this misses cases involving trailing spaces and colons, such as the following examples: Trailing colon: >>>

[issue27821] IDLE custom keymaps don't work anymore (Windows, Python 3.6.0a3)

2016-08-22 Thread Vedran Čačić
Vedran Čačić added the comment: P.S. I tested and no, IDLE Classic Windows (nor anything else except Veky2, I deleted Veky) is not added to config-keys.cfg. My config-keys.cfg is [Veky2] toggle-auto-coloring = tabify-region = copy =

[issue27821] IDLE custom keymaps don't work anymore (Windows, Python 3.6.0a3)

2016-08-22 Thread Vedran Čačić
Vedran Čačić added the comment: Neither. I see _two_ rows, lower one is as you quoted. So: --Key Set ( ) Use a Built-in Key Set [IDLE Classic Windows --] (*) Use a Custom Key Set [IDLE Classic Windows --]

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: > Extensive callback interfaces like map() come to mind, where a large number > of calls becomes excessively time critical and might thus have made people > implement their own special purpose calling code. I didn't patch map_next() of Python/bltinmodule.c

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-22 Thread Stefan Behnel
Stefan Behnel added the comment: Extensive callback interfaces like map() come to mind, where a large number of calls becomes excessively time critical and might thus have made people implement their own special purpose calling code. However, I don't know any such code (outside of Cython) and

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: > There is a tiny bit of a backwards compatibility concern as the new function > signature would be incompatible with anything we had before, Right. If you call directly PyCFunction functions, you will likely get quickly a crash. But... who call directly

[issue27792] bool % int has inconsistent return type.

2016-08-22 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue27826] Null-pointer dereference in tuplehash() function

2016-08-22 Thread STINNER Victor
STINNER Victor added the comment: > And it is hard to protect from such situation in marshal.c. Python doesn't validate marshal nor bytecode. It's a deliberate choice to get best performances. -- nosy: +haypo ___ Python tracker

[issue27506] make bytes/bytearray translate's delete a keyword argument

2016-08-22 Thread Martin Panter
Martin Panter added the comment: Looks pretty good thanks Xiang. There’s one English grammar problem in a comment (see review), but I can fix that when I commit. -- stage: patch review -> commit review ___ Python tracker