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

2016-08-01 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger, serhiy.storchaka, tim.peters ___ Python tracker

[issue27655] [Patch] Don't require presence of POLLPRI

2016-08-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: Why do you remove the flag rather than just making it a noop? -- nosy: +benjamin.peterson ___ Python tracker ___

[issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New

2016-08-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Mark, this is your code. Care to comment? -- assignee: -> mark.dickinson ___ Python tracker ___

[issue1621] Do not assume signed integer overflow behavior

2016-08-01 Thread Xiang Zhang
Xiang Zhang added the comment: I agree. For multibytecode, how about switching the positions of the two checks? If npendings + ctx->pendingsize overflows, the result can be anything, larger, smaller than or equal to MAXDECPENDING. For ast, although a SystemError may be raised but the message

[issue27558] SystemError with bare `raise` in threading or multiprocessing

2016-08-01 Thread Xiang Zhang
Xiang Zhang added the comment: Update the patch with Berker's suggestion: add test in test_threading instead of test_raise. Hope someone is willing to merge this. -- Added file: http://bugs.python.org/file43971/issue27558_v2.patch ___ Python tracker

[issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New

2016-08-01 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your replies. I update the patch with PyMem_Calloc. I think it's better than PyMem_Resize since we need to initialize the memory here, there is a memset(op->ob_item, 0, nbytes) below. -- Added file:

[issue1621] Do not assume signed integer overflow behavior

2016-08-01 Thread Martin Panter
Martin Panter added the comment: Looking over r60793, the overflow check at Modules/cjkcodecs/multibytecodec.c:836 looks vulnerable to being optimized away, because it can only detect the overflow if the line above has already overflowed. Perhaps change PY_SSIZE_T_MAX to MAXDECPENDING. I

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

2016-08-01 Thread Martin Panter
Martin Panter added the comment: The patch looks okay to me. -- stage: -> patch review ___ Python tracker ___

[issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New

2016-08-01 Thread Martin Panter
Martin Panter added the comment: It looks like PyMem_RESIZE() would be a truer equivalent than PyMem_Calloc(), since PyMem_MALLOC() does not initialize the memory. I would be happy with changing to that if you want. PyMem_Malloc() has been limited to PY_SSIZE_T_MAX since Issue 2620, although

[issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New

2016-08-01 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +mark.dickinson ___ Python tracker ___

[issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New

2016-08-01 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg271797 ___ Python tracker ___

[issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New

2016-08-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: The whole computation on that line is in size_t, so the use of PY_SIZE_MAX seems correct. -- nosy: +rhettinger, tim.peters ___ Python tracker

[issue27666] "stack smashing detected" in PyCursesWindow_Box

2016-08-01 Thread Steve Fink
New submission from Steve Fink: When attempting to run |hg chistedit|, which uses the python curses module, I am getting *** stack smashing detected ***: /usr/bin/python terminated The problem is in PyCursesWindow_Box in _cursesmodule.c: if (!PyArg_ParseTuple(args,"ll;vertint,horint",

[issue27665] Make create_server able to listen on several ports

2016-08-01 Thread Alexander Bayandin
Alexander Bayandin added the comment: Furthermore, there is a problem with overlapped ports for multiple created server objects. Also, I can quote a comment from 'original' issue: http://bugs.python.org/msg237794 -- ___ Python tracker

[issue27665] Make create_server able to listen on several ports

2016-08-01 Thread Alexander Bayandin
Alexander Bayandin added the comment: I think it is just handier than creating several server objects like it is already done for a list of hosts. For me in particular, need to have exactly the same logic for multiple ports which generates randomly and I want to have one predefined port for

[issue27665] Make create_server able to listen on several ports

2016-08-01 Thread Guido van Rossum
Guido van Rossum added the comment: IIRC we got a similar PR before. But what's the problem with creating multiple server objects? -- ___ Python tracker

[issue27665] Make create_server able to listen on several ports

2016-08-01 Thread Alexander Bayandin
New submission from Alexander Bayandin: Make create_server accept a list of ports to listen. Now it contains only code changes without updates in docs and tests. If these changes will be considered as helpful I'll be glad to add tests and update documentation for the method. --

[issue27477] IDLE: Switch search dialogs to ttk widgets, and other refinement

2016-08-01 Thread Mark Roseman
Mark Roseman added the comment: Have attached search.diff, which does an initial bit of cosmetics: adds inner frame with spacing, tweaks a couple labels, and for Mac and X11, puts the command buttons at the bottom of the dialog rather than on the right (where they remain on Windows).

[issue27664] Allow specifying prefix for thread name in concurrent.futures.ThreadPoolExecutor

2016-08-01 Thread Zachary Ware
Changes by Zachary Ware : -- stage: -> patch review versions: +Python 3.6 ___ Python tracker ___

[issue27664] Allow specifying prefix for thread name in concurrent.futures.ThreadPoolExecutor

2016-08-01 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___

[issue27664] Allow specifying prefix for thread name in concurrent.futures.ThreadPoolExecutor

2016-08-01 Thread Augie Fackler
New submission from Augie Fackler: This is mostly useful for when you've got a large number of threads and want to try and identify what threadpool is going nuts. -- components: Library (Lib) files: cpython.patch keywords: patch messages: 271790 nosy: durin42 priority: normal severity:

[issue27621] Finish IDLE Query dialog appearance and behavior.

2016-08-01 Thread Mark Roseman
Mark Roseman added the comment: I've attached query.patch, which does the cosmetic and layout changes, and adds a couple Mac-specific things. I've added the inline error message widget but don't use it yet (as this will involve changes to the subclasses and the tests, given errors will show

[issue27661] Add tzinfo= argument to datetime.combine

2016-08-01 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file43965/issue27661-3.diff ___ Python tracker ___

[issue27661] Add tzinfo= argument to datetime.combine

2016-08-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: >From review comments: Lib/datetime.py:1482: def combine(cls, date, time, tzinfo=True): On 2016/08/01 12:23:12, berkerpeksag wrote: > On 2016/08/01 08:47:14, SilentGhost wrote: > > This strikes me as an odd default value, why not use a more conventional

[issue27661] Add tzinfo= argument to datetime.combine

2016-08-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: >From review comments: Lib/datetime.py:1482: def combine(cls, date, time, tzinfo=True): On 2016/08/01 08:47:14, SilentGhost wrote: > This strikes me as an odd default value, why not use a more conventional None? This is the same default as used in the

[issue27661] Add tzinfo= argument to datetime.combine

2016-08-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The second patch includes documentation changes and addresses review commments. -- Added file: http://bugs.python.org/file43964/issue27661-2.diff ___ Python tracker

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

2016-08-01 Thread R. David Murray
R. David Murray added the comment: Erg. You mention your English proficiency and then I go using a colequialism :( "better C chops" means someone with more skill than I am currently exhibiting. -- ___ Python tracker

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

2016-08-01 Thread R. David Murray
R. David Murray added the comment: No, I was the one who missed something. Just ignore my comment and lets wait for someone with more current C chops to answer :) -- ___ Python tracker

[issue1005895] curses for win32

2016-08-01 Thread Matej Cepl
Matej Cepl added the comment: Well, basically any solution is better than nothing ;) -- nosy: +mcepl ___ Python tracker ___

[issue27663] Inconsistent CSV Writer Behaviour

2016-08-01 Thread G Young
G Young added the comment: Second time around does the charm. I see the hidden "-" in the scientific notation is causing this. Thanks! -- ___ Python tracker

[issue27663] Inconsistent CSV Writer Behaviour

2016-08-01 Thread G Young
G Young added the comment: That doesn't make sense to me. Can you explain how that is intended behaviour? I just changed from '-' to '?' in the lineterminator. -- ___ Python tracker

[issue27663] Inconsistent CSV Writer Behaviour

2016-08-01 Thread SilentGhost
SilentGhost added the comment: It is quoting the values when line terminator contains any of the special characters. Exactly like documented. https://docs.python.org/3/library/csv.html#csv.QUOTE_MINIMAL -- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open

[issue27663] Inconsistent CSV Writer Behaviour

2016-08-01 Thread G Young
New submission from G Young: When writing scientific notation to CSV with custom line-terminators, the behaviour is inconsistent depending on the line-terminator you use. In the file provided, two different line-terminator result in one quoting the number as a string and the other not. IMO

[issue19837] Wire protocol encoding for the JSON module

2016-08-01 Thread Nick Coghlan
Nick Coghlan added the comment: dump_bytes() would be a binary counterpart to dumps() The dump() case is already handled more gracefully, as the implicit encoding to UTF-8 can live on the file-like object, rather than needing to be handled by the JSON encoder. I'm still not 100% sure on its

[issue27589] asyncio doc: issue in as_completed() doc

2016-08-01 Thread Hynek Schlawack
Hynek Schlawack added the comment: More explicitly: The doc sells the function short. If you have a bunch of futures and want to know as soon as one of them is ready: this is the function for you. The only hint that this is the actual behavior comes from the *name* of the function; not the

[issue19837] Wire protocol encoding for the JSON module

2016-08-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Does dump_bytes() return bytes (similar to dumps()) or write to binary stream (similar to dump())? -- ___ Python tracker

[issue19837] Wire protocol encoding for the JSON module

2016-08-01 Thread Nick Coghlan
Nick Coghlan added the comment: I'm currently migrating a project that predates requests, and ended up needing to replace several "json.loads" calls with a "_load_json" helper that is just an alias for json.loads in Python 2, and defined as this in Python 3: def _load_json(data):

[issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New

2016-08-01 Thread Xiang Zhang
New submission from Xiang Zhang: List_New checks against PY_SIZE_MAX. The upper bound of PyMem_Malloc is PY_SSIZE_T_MAX. Instead of simply changing the constant, another method is delegating overflow check to PyMem_Calloc, so we can avoid the check in unnecessary check in PyMem_Malloc. But I

[issue27643] test_ctypes fails on AIX with xlc

2016-08-01 Thread aixtools
aixtools added the comment: On 30-Jul-16 02:51, Martin Panter wrote: > Martin Panter added the comment: > > Looks like your Python 3 build is messed up. Maybe it doesn’t like running > from a different directory. I would try from the main build directory, and > note the test_bitfields has an

[issue27632] build on AIX fails when builddir != srcdir, more than bad path to ld_so_aix

2016-08-01 Thread Michael Felt
Michael Felt added the comment: Yes, clearly related (maybe even duplicate). What surprised me is that after I copied ld_so_aix to where it was expected I still see a premature end with: Traceback (most recent call last): File

[issue27661] Add tzinfo= argument to datetime.combine

2016-08-01 Thread SilentGhost
Changes by SilentGhost : -- nosy: +SilentGhost ___ Python tracker ___ ___

[issue27575] dict viewkeys intersection slow for large dicts

2016-08-01 Thread David Su
Changes by David Su : Added file: http://bugs.python.org/file43961/performance_test.sh ___ Python tracker ___

[issue27575] dict viewkeys intersection slow for large dicts

2016-08-01 Thread David Su
Changes by David Su : Added file: http://bugs.python.org/file43960/dictview_intersection_test.py ___ Python tracker ___

[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-01 Thread Rolf Krahl
Rolf Krahl added the comment: *ping* It's more then four weeks ago that I revised my patch, still waiting for review. I also still need feedback on the question whether the new EncodingError exception introduced by Damien should be kept or whether I should change this to a ValueError.

[issue27575] dict viewkeys intersection slow for large dicts

2016-08-01 Thread David Su
David Su added the comment: Attached is a patch that I had been working on. Could you please review and provide me with some feedback? Thanks! -- keywords: +patch Added file: http://bugs.python.org/file43959/dict_view_intersection.patch ___ Python

[issue1621] Do not assume signed integer overflow behavior

2016-08-01 Thread Antti Haapala
Antti Haapala added the comment: I don't believe Python would really ever work on a platform with non-8-bit-bytes, I believe there are way too much assumptions *everywhere*. You can program in C on such a platform, yes, but not that sure about Python. And on 8-bit-byte platfomrs, there is no