[issue26989] error in installation of ez_setup.py

2016-05-09 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___

[issue10808] ssl unwrap fails with Error 0

2016-05-09 Thread Hans-Peter Jansen
Hans-Peter Jansen added the comment: Poor old bug. Just being bitten from it today, while trying to package pyftpdlib on the openSUSE build service, which creates a clean reproducible build environment for all packages, and testing fails. Part of the game: openssl 1.0.1k, Python 2.7.8

[issue26974] Crash in Decimal.from_float

2016-05-09 Thread Mark Dickinson
Mark Dickinson added the comment: [Serhiy, on the second patch] > Disadvantages are that this changes behavior ignoring overriding > as_integer_ratio() and __abs__() and slightly slows down Python > implementation. None of those seem like big issues to me. Certainly we shouldn't care too much

[issue23213] subprocess communicate() hangs when stderr isn't closed

2016-05-09 Thread Thomas D.
Thomas D. added the comment: Yep, I agree with you. This can be closed. Thanks to your clarification the problem could be resolved upstream. The udev problem was resolved in https://github.com/systemd/systemd/issues/190 and the PHP problem has a pending PR

[issue26673] Tkinter error when opening IDLE configuration menu (Tcl/Tk 8.6)

2016-05-09 Thread Matthias Klose
Matthias Klose added the comment: Seen on Debian and Ubuntu as well. All these distros have in common to use Tcl/Tk 8.6. -- nosy: +doko title: Tkinter error when opening IDLE configuration menu -> Tkinter error when opening IDLE configuration menu (Tcl/Tk 8.6)

[issue26673] Tkinter error when opening IDLE configuration menu (Tcl/Tk 8.6)

2016-05-09 Thread Matthias Klose
Matthias Klose added the comment: using this as a work-around, not tested with Tcl/Tk 8.5 or older. --- a/Lib/idlelib/configDialog.py +++ b/Lib/idlelib/configDialog.py @@ -113,7 +113,11 @@ class ConfigDialog(Toplevel): def CreatePageFontTab(self): parent = self.parent -

[issue18531] Undocumented different between METH_KEYWORDS and **kws

2016-05-09 Thread Eric V. Smith
Eric V. Smith added the comment: Oops, sorry. I'm an idiot. I was running in a venv where python was python3. Checking with my installed 2.7.10, I see the expected error. -- ___ Python tracker

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

2016-05-09 Thread englabenny
Changes by englabenny : -- nosy: -englabenny ___ Python tracker ___ ___

[issue26983] float() can return not exact float instance

2016-05-09 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The float constructor can return an instance of float subclass. >>> class FloatSubclass(float): ... pass ... >>> class BadFloat: ... def __float__(self): ... return FloatSubclass(1.2) ... >>> type(float(BadFloat())) Comparing with other

[issue26974] Crash in Decimal.from_float

2016-05-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually the part of the second patch for Python implementation not always works correctly due to a bug (issue26983). We should either first fix issue26983 or use more complicated code. -- ___ Python tracker

[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-09 Thread Meador Inge
Meador Inge added the comment: Works fine on Darwin (OS X Yosemite 10.10.5): drago:cpython meadori$ uname -a Darwin drago 14.5.0 Darwin Kernel Version 14.5.0: Mon Jan 11 18:48:35 PST 2016; root:xnu-2782.50.2~1/RELEASE_X86_64 x86_64 -- nosy: +meador.inge

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-09 Thread Michael Felt
Michael Felt added the comment: New patch of the Lib/ctypes directory - BUT - this time as a delta based on 3.5.0. ++ changes from last patch ++ * OSError gets raised (as expected) by test/test_loading.py * test in util.py modified (libm is replaced by libc when "aix"), and added an additional

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-09 Thread Michael Felt
Michael Felt added the comment: New version of aixutil.py ++ Changes ++ * more comments * re-worked the 'searches' for matches after adding changing the way the output from _get_dumpH was read (now to an array using readlines). Also, p.stdout.close() and p.wait() are done within the _get_dumpH

[issue26984] int() can return not exact int instance

2016-05-09 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The int constructor can return an instance of int subclass. >>> class BadTrunc: ... def __trunc__(self): ... return True ... >>> int(BadTrunc()) True When __int__ returns non-exact int, at least a warning is emitted: >>> class BadInt: ...

[issue26985] Information about CodeType in inspect documentation is outdated

2016-05-09 Thread Xiang Zhang
New submission from Xiang Zhang: Information about CodeType in inspect documentation is outdated. It lacks attributes: co_kwonlyargcount, co_freevars, co_cellvars. And co_flags lacks many more options. These also apply to the comments of inspect.iscode source code. -- assignee:

[issue26632] __all__ decorator

2016-05-09 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Here's a standalone version for older Python 3's: http://public.readthedocs.io/en/latest/ https://pypi.python.org/pypi/atpublic -- ___ Python tracker

[issue26969] ascynio should provide a policy to address pass-loop-everywhere problem

2016-05-09 Thread Ilya Kulakov
Ilya Kulakov added the comment: > You don't know what else that coroutine is waiting for, and it may be waiting > for some I/O whose socket is registered with the other event loop. Since the > other event loop won't make progress, you'd be deadlocked. As an end user I know what my coroutines

[issue26969] ascynio should provide a policy to address pass-loop-everywhere problem

2016-05-09 Thread Guido van Rossum
Guido van Rossum added the comment: Instead of starting a new event loop, you should figure out a way to wait for an event in the existing loop. IIUC that loop runs in a different thread -- I think you can solve this by using a threading.Event that you set from a wrapper coroutine running in

[issue26986] Enhance PyFunction_New documentation

2016-05-09 Thread Xiang Zhang
New submission from Xiang Zhang: Doc of PyFunction_New[1] is not perfect. 1. *__module__* is not retrieved from *code* but *globals*. 2. Add descriptions for annotations and qualname. [1] https://docs.python.org/3/c-api/function.html#c.PyFunction_New -- files:

[issue26986] Enhance PyFunction_New documentation

2016-05-09 Thread Xiang Zhang
Changes by Xiang Zhang : -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker ___

[issue26969] ascynio should provide a policy to address pass-loop-everywhere problem

2016-05-09 Thread Ilya Kulakov
Ilya Kulakov added the comment: > If you're worried about blocking the event loop just to acquire the threading > lock that's part of threading.Event, you can use run_in_executor() I'm more worried to delay invocation of a "synchronous" report because of outstanding tasks in event loop's

[issue26673] Tkinter error when opening IDLE configuration menu (Tcl/Tk 8.6)

2016-05-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: Mark, changing the default font from Courier to TkFixedFont has introduced or exposed a bug in any of IDLE, tkinter, or tk 8.6.4 on Linux. The result is that trying to open the configuration menu fails with TclError. What do your think is the best solution?

[issue26673] Tkinter error when opening IDLE configuration menu (Tcl/Tk 8.6)

2016-05-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: Anyone seeing problem: In /Lib/idlelib/configHandler.py, about line 685, in "if size < 0:", change '<' to '<='. Remove the workaround of overriding 'TkFixedFont' with 'courier'. Does this fix the problem? -- ___

[issue24745] Better default font for editor

2016-05-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: This change caused a regression on Linux with 8.6.4 because TkFixedFont ends up with size = 0. Cannot open configuration file. See #26673. -- ___ Python tracker

[issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows

2016-05-09 Thread Steve Dower
Steve Dower added the comment: > Some quick Googling strongly suggests there's no reasonably general way to > overcome the Windows-defined MAXIMUM_WAIT_OBJECTS=64 for implementations that > call the Windows WaitForMultipleObjects(). The recommended way to deal with this is to spin up threads

[issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows

2016-05-09 Thread Steve Dower
Changes by Steve Dower : -- stage: -> needs patch type: -> behavior versions: +Python 3.6 ___ Python tracker ___

[issue26632] __all__ decorator

2016-05-09 Thread Ethan Furman
Ethan Furman added the comment: For the standalone version I suggest a disclaimer about the `from ... import *` ability. Something like: `from ... import *` should not be used with packages that do not have an __all__ unless they support that usage (check their docs). --

[issue26987] Comment/implementation disagreement in Thread._bootstrap_inner

2016-05-09 Thread Zachary Ware
New submission from Zachary Ware: The comment at Lib/threading.py:925 notes that sys.stderr should be used if possible, but the implementation uses self._stderr in spite of checking _sys.stderr is not None. I believe this was just an oversight in 644b677c2ae5, which added the check and also

[issue24185] Add Function for Sending File to Trash (or Recycling Bin)

2016-05-09 Thread Stephen Paul Chappell
Changes by Stephen Paul Chappell : -- nosy: +Zero ___ Python tracker ___ ___

[issue26987] Comment/implementation disagreement in Thread._bootstrap_inner

2016-05-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch! Yes, this is just my mistake. Could you please fix this? I can't commit right now. -- ___ Python tracker

[issue26984] int() can return not exact int instance

2016-05-09 Thread Mark Dickinson
Mark Dickinson added the comment: > But I think that the int constructor should convert its result to exact int. Agreed. See also issue 17576 and previous discussions on python-dev (thread started in March, but most of the messages in April): -

[issue26632] __all__ decorator

2016-05-09 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 09, 2016, at 04:19 PM, Ethan Furman wrote: >`from ... import *` should not be used with packages that do not have an >__all__ unless they support that usage (check their docs). Good idea; I added a warning-ish. --

[issue26987] Comment/implementation disagreement in Thread._bootstrap_inner

2016-05-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8842c02c02a2 by Zachary Ware in branch '3.5': Issue #26987: Correct implementation to match comment https://hg.python.org/cpython/rev/8842c02c02a2 New changeset 694dadd9f7bd by Zachary Ware in branch 'default': Closes #26987: Merge with 3.5

[issue26814] [WIP] Add a new _PyObject_FastCall() function which avoids the creation of a tuple or dict for arguments

2016-05-09 Thread Jakub Stasiak
Changes by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker ___ ___

[issue23507] Tuple creation is too slow

2016-05-09 Thread Jakub Stasiak
Changes by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker ___ ___

[issue6338] Error message displayed on stderr when no C compiler is present with ctypes

2016-05-09 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker ___ ___ Python-bugs-list

[issue26746] struct.pack(): trailing padding bytes on x64

2016-05-09 Thread Meador Inge
Meador Inge added the comment: I'm not to crazy about the trailing padding syntax either. The behavior is documented all the way back to Python 2.6. So, I would be hesitant to change it now. If the new 'T{...}' struct syntax from issue3132 ever gets added, then maybe we could address this

[issue26988] Add AutoNumberedEnum to stdlib

2016-05-09 Thread John Hagen
New submission from John Hagen: I suggest that the AutoNumberedEnum be added to the standard library for the following reasons: 1) Provides a fundamental tool for defining a unique, abstract set of coupled members 2) Avoids boilerplate @enum.unique for a very common use case of enumerations

[issue26988] Add AutoNumberedEnum to stdlib

2016-05-09 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +barry, eli.bendersky ___ Python tracker ___ ___

[issue26988] Add AutoNumberedEnum to stdlib

2016-05-09 Thread Ethan Furman
Ethan Furman added the comment: On the other hand, if you use aenum you can do: class Color(AutoNumber): red green blue And isn't that better*? ;) * For those in danger of swallowing their tongue over the magic involved: The magic is turned off as soon as any descriptor is

[issue26988] Add AutoNumberedEnum to stdlib

2016-05-09 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Wow Ethan, that's quite interesting. I'm not sure if I like it or not. :) It's better than having to assign a dummy value to the enum items, and if we did require that, I'd suggest just throwing away the values for autonumbering. But not having to specify

[issue26549] co_stacksize is calculated from unoptimized code

2016-05-09 Thread Meador Inge
Meador Inge added the comment: Strictly speaking, the stack size is calculated *after* the peephole optimizer is run, but the code that computes the stack depth operates on the basic block graph instead of the assembled and optimized byte code. Anyway, the conclusion is the same as Brett

[issue26988] Add AutoNumberedEnum to stdlib

2016-05-09 Thread Ethan Furman
Ethan Furman added the comment: It's in _EnumDict.__getitem__; there's some duplication in __setitem__ for supporting Python 2 (although with 2 you have to use either the empty tuple, or some other handy thing that may go in the __doc__ attribute, for example). --

[issue26989] error in installation of ez_setup.py

2016-05-09 Thread wangluyao
New submission from wangluyao: There were some wrong in my installion of my ez_setup.py.Because my compute is 64 bits,so I have to install ez_setup.py before I want to install pyserial-3.0.1-py2.py3-none-any.whl this model. But it tells me that"urllib2.URLError:" -- components:

[issue26989] error in installation of ez_setup.py

2016-05-09 Thread Xiang Zhang
Xiang Zhang added the comment: It seems pypi is blocked in China, :-( so try pypi mirror in China. ez_setup.py seems to have --download-base option to let you specify alternative URL. I don't think this is a bug. -- nosy: +xiang.zhang ___ Python

[issue14209] pkgutil.iter_zipimport_modules ignores the prefix parameter for packages

2016-05-09 Thread Łukasz Langa
Łukasz Langa added the comment: Brett, Facebook is using the proposed patch in prod since last year. It works fine. Maybe we should just include it for the time being? -- nosy: +lukasz.langa ___ Python tracker

[issue14209] pkgutil.iter_zipimport_modules ignores the prefix parameter for packages

2016-05-09 Thread Brett Cannon
Brett Cannon added the comment: I don't deal with pkgutil so I have no problem if you want to go ahead and apply the patch if you think it's reasonable to accept, Łukasz. -- ___ Python tracker

[issue26985] Information about CodeType in inspect documentation is outdated

2016-05-09 Thread Xiang Zhang
Xiang Zhang added the comment: Attach patch. -- keywords: +patch Added file: http://bugs.python.org/file42793/inspect_doc.patch ___ Python tracker ___

[issue26990] file.tell affect decoding

2016-05-09 Thread mfmain
New submission from mfmain: C:\tmp>hexdump badtell.txt 00: 61 20 6B 0D 0A D2 BB B0-E3 a k.. C:\tmp>type test.py with open(r'c:\tmp\badtell.txt', "r", encoding='gbk') as f: while True: pos = f.tell() line = f.readline();