[issue23285] PEP 475 - EINTR handling

2016-07-09 Thread mostafa shahdadi
Changes by mostafa shahdadi : Added file: http://bugs.python.org/file43674/b3b439d7dd40.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue27173] Modern Unix key bindings for IDLE

2016-07-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: The attached patch has a new function current_colors_and_keys that combines ideas and code from both CurrentTheme and CurrentKeys. The latter are now trivial wrappers. It has a new test_config that tests both this function and _warn. The changes to configdi

[issue26544] platform.libc_ver() returns incorrect version number

2016-07-09 Thread Nathaniel Smith
x27;t do the job :-(. -- nosy: +njs Added file: http://bugs.python.org/file43672/results-20160709-224820.csv ___ Python tracker <http://bugs.python.org/issue26544> ___

[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-09 Thread Xiang Zhang
Xiang Zhang added the comment: Attach a patch to fix this. -- keywords: +patch Added file: http://bugs.python.org/file43671/bytes_concat_overflow_check.patch ___ Python tracker _

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-09 Thread Ethan Furman
Ethan Furman added the comment: I need names. `aenum` already has an `AutoNumberEnum` (the one from the docs, no magic) so I hate to use the same name for the stdlib version with different behavior. So I either need a different name for the stdlib version, or a different name for the aenum v

[issue20767] Some python extensions can't be compiled with clang 3.4

2016-07-09 Thread mostafa shahdadi
Changes by mostafa shahdadi : -- components: +Installation, Interpreter Core, Library (Lib), Tests type: compile error -> performance versions: +Python 3.3, Python 3.4 ___ Python tracker ___

[issue26081] Implement asyncio Future in C to improve performance

2016-07-09 Thread INADA Naoki
INADA Naoki added the comment: OK. Here is current version. -- Added file: http://bugs.python.org/file43670/futures.patch ___ Python tracker ___

[issue26081] Implement asyncio Future in C to improve performance

2016-07-09 Thread Yury Selivanov
Yury Selivanov added the comment: > I'm working on this. Some bugs are fixed, but doesn't pass tests for now. Thanks a lot! I couldn't find time to finish this myself. I can definitely help you and review the patch once it's ready. > Yury, could you explain what the comment "This isn't a Fu

[issue26081] Implement asyncio Future in C to improve performance

2016-07-09 Thread INADA Naoki
INADA Naoki added the comment: Should I send pull request to github.com/python/asyncio? Or should I post patch here? -- ___ Python tracker ___ ___

[issue25507] IDLE: user code 'import tkinter; tkinter.font' should fail

2016-07-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: https://stackoverflow.com/questions/38276691/tkinter-nameerror-only-when-running-script-from-shell same problem with filedialog. -- ___ Python tracker ___

[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This should be fixed. -- components: +Interpreter Core stage: -> needs patch ___ Python tracker ___ _

[issue27474] Unify exception in _Py_bytes_contains for integers

2016-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: -> serhiy.storchaka stage: -> commit review ___ Python tracker ___ ___ Python

[issue27213] Rework CALL_FUNCTION* opcodes

2016-07-09 Thread Demur Rumed
Demur Rumed added the comment: Pybench is now only ~200ms slower instead of 1200ms slower. But the whole point of this patch is that CALL_FUNCTION_EX shouldn't be optimized for, so I'd much prefer real benchmarking results -- Added file: http://bugs.python.org/file43669/callfunc4.patch

[issue27274] [ctypes] Allow from_pointer creation

2016-07-09 Thread Eryk Sun
Eryk Sun added the comment: If your goal is to get a bytes object, I don't see the point of creating an array. string_at is simpler and more efficient. If you really must create an array, note that simple pointers (c_void_p, c_char_p, c_wchar_p) need special handling. They don't have a `conte

[issue27392] Add a server_side keyword parameter to create_connection

2016-07-09 Thread Guido van Rossum
Guido van Rossum added the comment: Hold on. It's weekend. I will review this when I am near a laptop again. --Guido (mobile) -- ___ Python tracker ___ _

[issue27392] Add a server_side keyword parameter to create_connection

2016-07-09 Thread Jim Fulton
Jim Fulton added the comment: > Why can't `wrap_socket` be used for wrapping client sockets? TOOWTDI and create_connection. I suppose we could remove (unadvertise) this functionality from create_connection. Then we'd have code bloat because backward compatibility. --

[issue27392] Add a server_side keyword parameter to create_connection

2016-07-09 Thread Yury Selivanov
Yury Selivanov added the comment: > wrap_socket implies that it's for wrapping client or server sockets, but it's > not. It's only for handling server sockets. Also, I prefer a name that > reflects goal, not mechanism. > I think the name should be discussed over here: > https://bugs.python.or

[issue27392] Add a server_side keyword parameter to create_connection

2016-07-09 Thread Jim Fulton
Jim Fulton added the comment: We need an executive (Guido) decision on the name of the new API. Yury wants wrap_socket. I don't like wrap_socket because: - It implies that it's for wrapping client and server sockets. (It shouldn't be for wrapping client sockets because TOOWTDI and create_

[issue27474] Unify exception in _Py_bytes_contains for integers

2016-07-09 Thread Xiang Zhang
New submission from Xiang Zhang: Now, `sys.maxsize+1 in b'foo'` raises "TypeError: 'int' does not support the buffer interface" which seems weird. In such case, I don't think there is any difference between sys.maxsize+1 and 256. So I suggest make it emits the same exceptions as `256 in b'foo'

[issue27274] [ctypes] Allow from_pointer creation

2016-07-09 Thread Memeplex
Memeplex added the comment: I have been happily using this helper function: def c_array(*args): if type(args[1]) is int: ptr, size = args return (ptr._type_ * size).from_address(ct.addressof(ptr.contents)) else: c_type, buf = args return (c_type * (len(buf

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-09 Thread Ethan Furman
Ethan Furman added the comment: The problem with testing the type of object a name refers to outside the class is it then becomes more difficult to make that an Enum member: class AddressType(Enum): pobox mailbox # third-party po box property Having to assign a value to `property`

[issue26081] Implement asyncio Future in C to improve performance

2016-07-09 Thread INADA Naoki
INADA Naoki added the comment: Passing all tests now. Yury, could you explain what the comment "This isn't a Future class; it's a BaseFuture" means? Should it be "_futures.Future" or "_futures.BaseFuture"? -- ___ Python tracker

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-09 Thread John Hagen
John Hagen added the comment: > What happens with `property`? > > - `property` is looked up in the class namespace Perhaps you've already considered this, I'm not intimately familiar with how classes are parsed and constructed but is it possible to determine if the object is a decorator? It

[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-09 Thread Xiang Zhang
New submission from Xiang Zhang: bytes_concat uses following code to check overflow: size = va.len + vb.len; if (size < 0): { PyErr_NoMemory(); goto done; } This is wrong since signed ints overflow is undefined bahaviour. But one point is that Python's Makefile defines -fwrapv with gcc

[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-09 Thread Xiang Zhang
Changes by Xiang Zhang : -- type: -> behavior versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-09 Thread Ethan Furman
Ethan Furman added the comment: A standard feature of Enum is that either space separated strings or a list of strings is accepted any where either is. _sunder_ names are the ones reserved for Enum use (such as _value_, _name_, and soon _order_ (for py2/py3 compatible code). -- _

[issue27392] Add a server_side keyword parameter to create_connection

2016-07-09 Thread Guido van Rossum
Guido van Rossum added the comment: I like the new method better. Submit away! --Guido (mobile) -- ___ Python tracker ___ ___ Python-

[issue27469] Unicode filename gets crippled on Windows when drag and drop

2016-07-09 Thread Steve Dower
Steve Dower added the comment: Got some digging done today and it looks like we're probably best to write our own drop handler. It can probably be embedded into the py.exe launcher, which will keep all the registration in the one file. At worst, we should switch to {86C86720-42A0-1069-A2E8-080

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-09 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jul 09, 2016, at 03:20 PM, Ethan Furman wrote: >As far as I can tell there is only one "good" way around this: > >- store any names you don't want auto-numbered into an `_ignore_` > attribute (this only needs to be global and built-in names that > are used

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-09 Thread Ethan Furman
Ethan Furman added the comment: There is one wrinkle with auto-numbering. Consider the following code: class Color(AutoNumberEnum): red green blue @property def cap_name(self): return self.name.upper() What happens with `property`? - `property` is looked up in the class namespac

[issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh

2016-07-09 Thread Xavier de Gaye
Xavier de Gaye added the comment: > The list of locations where '/bin/sh' is hard coded in the standard library: I have entered issue 27472. -- ___ Python tracker ___ __

[issue27392] Add a server_side keyword parameter to create_connection

2016-07-09 Thread Jim Fulton
Jim Fulton added the comment: I'd still like to find a way to handle already accepted server sockets. Can we decide on either: - a server_side flag to create_connection or - A new interface for handling an already accepted socket? I would call this handle_connection, but I'll take any name.

[issue26865] Meta-issue: support of the android platform

2016-07-09 Thread Xavier de Gaye
Xavier de Gaye added the comment: issue #27472: add the 'unix_shell' attribute to test.support -- dependencies: +add the 'unix_shell' attribute to test.support ___ Python tracker ___

[issue27472] add the 'unix_shell' attribute to test.support

2016-07-09 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- dependencies: +add the 'is_android' attribute to test.support ___ Python tracker ___ ___ Python-bugs-li

[issue27472] add the 'unix_shell' attribute to test.support

2016-07-09 Thread Xavier de Gaye
New submission from Xavier de Gaye: '/bin/sh' is hard-coded in few places in the test suite, but the Android shell is at '/system/bin/sh', see msg266084. -- assignee: xdegaye components: Tests messages: 270044 nosy: xdegaye priority: normal severity: normal stage: needs patch status: op

[issue1222585] C++ compilation support for distutils

2016-07-09 Thread Christian H
Changes by Christian H : -- nosy: +Christian H ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue27137] Python implementation of `functools.partial` is not a class

2016-07-09 Thread Nick Coghlan
Nick Coghlan added the comment: Emanuel's latest patch looks good to me, but after seeing yet another behaviour discrepancy between the two versions(static method vs instance method behaviour), I've proposed disallowing function/class mismatches as an explicit policy clarification in PEP 399:

[issue27469] Unicode filename gets crippled on Windows when drag and drop

2016-07-09 Thread Steve Dower
Steve Dower added the comment: Okay thanks. I'll see if I can track down the right one on Monday. -- assignee: -> steve.dower ___ Python tracker ___

[issue17213] ctypes loads wrong version of C runtime, leading to error message box from system

2016-07-09 Thread Keno Fischer
Keno Fischer added the comment: Yes, you are correct about it being only an issue in the embedding context. I agree that it might not be a good idea to do do this for every library, but I wanted to revive the discussion since this kind of thing seems like something that comes up frequently when

[issue27469] Unicode filename gets crippled on Windows when drag and drop

2016-07-09 Thread Adam Bartoš
Adam Bartoš added the comment: Without a handler the drop feature is disabled. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-09 Thread John Hagen
John Hagen added the comment: Is this something we want to get in before the next alpha in two days? Just wanted to bring up the deadline since this may be a feature people want to play around with during the alpha phase. Ethan, I'm happy to help with documentation or anything else.

[issue27469] Unicode filename gets crippled on Windows when drag and drop

2016-07-09 Thread Steve Dower
Steve Dower added the comment: Try removing the handler completely and see what the default behavior is. Otherwise, I'll do some research and figure out the right one. -- ___ Python tracker ___

[issue26081] Implement asyncio Future in C to improve performance

2016-07-09 Thread INADA Naoki
INADA Naoki added the comment: I'm working on this. Some bugs are fixed, but doesn't pass tests for now. https://github.com/methane/cpython/pull/5 -- nosy: +methane ___ Python tracker _

[issue17213] ctypes loads wrong version of C runtime, leading to error message box from system

2016-07-09 Thread Eryk Sun
Eryk Sun added the comment: This is only a problem for ctypes when python27.dll is used in an application that isn't manifested to load the "Microsoft.VC90.CRT" assembly. ctypes doesn't have this problem for a regular script run via the 2.7 version of python.exe, since the loader uses the pyth

[issue27027] add the 'is_android' attribute to test.support

2016-07-09 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- assignee: -> xdegaye ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue27027] add the 'is_android' attribute to test.support

2016-07-09 Thread Xavier de Gaye
Xavier de Gaye added the comment: New patch using the changes made in issue 27442. -- dependencies: -android: add platform.android_ver() keywords: +needs review -patch stage: -> patch review title: add is_android in test.support to detect Android platform -> add the 'is_android' attri

[issue27469] Unicode filename gets crippled on Windows when drag and drop

2016-07-09 Thread Eryk Sun
Eryk Sun added the comment: Yes, a different drop handler solves the problem. It doesn't have to be the exefile handler that's built into shell32.dll. Another handler could be used that preserves Unicode filenames and long paths. I tested in Windows 10.0.10586. -- ___

[issue27181] Add geometric mean to `statistics` module

2016-07-09 Thread Mark Dickinson
Mark Dickinson added the comment: > I would like to see them spelled-out: geometric_mean and harmonic_mean +1 -- ___ Python tracker ___

[issue27442] expose the Android API level in sysconfig.get_config_vars()

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

[issue26942] android: test_ctypes crashes on armv7

2016-07-09 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Maybe a libffi issue. The crash is still with libffi git-master and CPython hg-tip + `--with-system-libffi`. Reported to https://github.com/libffi/libffi/issues/262 -- nosy: +Chi Hsuan Yen ___ Python tracker

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 46567fda0b29 by Xavier de Gaye in branch 'default': Issue #27442: Expose the Android API level in sysconfig.get_config_vars() https://hg.python.org/cpython/rev/46567fda0b29 -- nosy: +python-dev ___ Python

[issue27469] Unicode filename gets crippled on Windows when drag and drop

2016-07-09 Thread Adam Bartoš
Adam Bartoš added the comment: Also, what versions of Windows does this affect? I have 64bit Vista, so maybe this is fixed in say Windows 10. -- ___ Python tracker ___ _

[issue27469] Unicode filename gets crippled on Windows when drag and drop

2016-07-09 Thread Adam Bartoš
Adam Bartoš added the comment: Thank you very much for the analysis. So Python Windows installers may be changed to set the other drop handler. If the short paths are problem, they may be converted to long ones when initializing `sys.argv`. -- ___ P

[issue6721] Locks in the standard library should be sanitized on fork

2016-07-09 Thread STINNER Victor
STINNER Victor added the comment: I suggest to close the issue as WONT FIX. Python code base is huge and Python depends on a lot of external code. We cannot warranty anything. It might be possible to track all kinds of locks with an infinite time. But I'm not sure that it's worth it. It is poss

[issue27466] [Copy from github user macartur] time2netscape missing comma

2016-07-09 Thread Senthil Kumaran
Senthil Kumaran added the comment: Fixed the redundant import as pointed by Evelyn on IRC. -- Added file: http://bugs.python.org/file43666/issue27466-v2.patch ___ Python tracker