[issue25587] Useless addition in PyTuple_New

2015-11-09 Thread STINNER Victor

STINNER Victor added the comment:

The line "nbytes += " was removed 5 years ago by the changeset 7be8129ee0fd. 
It's maybe time to update your Python version? :-)

Only Python < 2.7 has the line, it was removed before Python 2.7.0 was tagged.

--
nosy: +haypo
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25465] Pickle uses O(n) memory overhead

2015-11-09 Thread Stefan Krah

Stefan Krah added the comment:

It's a Linux issue. Disable overcommitting of memory (at your own
peril) or set user limits (for example with djb's softlimit), then
the process will be killed instead of freezing the machine.

--
nosy: +skrah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25465] Pickle uses O(n) memory overhead

2015-11-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is a workaround for memory consumption, and Linux freezing is not Python 
issue.

--
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25263] test_tkinter fails randomly on the buildbots "AMD64 Windows10" (3.4, 3.5, 3.x)

2015-11-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Didn't help.

http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/1494/steps/test/logs/stdio
==
ERROR: test_use (tkinter.test.test_tkinter.test_widgets.ToplevelTest) 
(wid='0xbf300038')
--
Traceback (most recent call last):
  File 
"D:\buildarea\3.x.bolen-windows8\build\lib\tkinter\test\test_tkinter\test_widgets.py",
 line 96, in test_use
widget2 = self.create(use=wid)
  File 
"D:\buildarea\3.x.bolen-windows8\build\lib\tkinter\test\test_tkinter\test_widgets.py",
 line 70, in create
return tkinter.Toplevel(self.root, **kwargs)
  File "D:\buildarea\3.x.bolen-windows8\build\lib\tkinter\__init__.py", line 
2181, in __init__
BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra)
  File "D:\buildarea\3.x.bolen-windows8\build\lib\tkinter\__init__.py", line 
2138, in __init__
(widgetName, self._w) + extra + self._options(cnf))
_tkinter.TclError: integer value too large to represent

--

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7267] format method: c presentation type broken in 2.7

2015-11-09 Thread Walter Dörwald

Walter Dörwald added the comment:

Don't worry, I've switched to using Python 3 in 2012, where this isn't a 
problem. ;)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22499] [SSL: BAD_WRITE_RETRY] bad write retry in _ssl.c:1636

2015-11-09 Thread Stefan Krah

Stefan Krah added the comment:

I had a similar issue with ucspi-ssl that was fixed by following
the O'Reilly book's recommendations w.r.t WANT_READ/WANT_WRITE
with non-blocking sockets to the letter.

The recommendations are quite complex since apparently
WANT_READ/WANT_WRITE mean different things depending
on whether they occur *during a read* or *during a write*.


I haven't used Python's SSL module much: Since those flags
are exposed on the Python level, are users supposed to take
care of the above issues themselves for non-blocking sockets?

--
nosy: +skrah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25263] test_tkinter fails randomly on the buildbots "AMD64 Windows10" (3.4, 3.5, 3.x)

2015-11-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3f8998c2fbf9 by Serhiy Storchaka in branch 'default':
Issue #25263: Trying to fix test_use on Windows.
https://hg.python.org/cpython/rev/3f8998c2fbf9

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25263] test_tkinter fails randomly on the buildbots "AMD64 Windows10" (3.4, 3.5, 3.x)

2015-11-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Looks as there is also Tk bug. Perhaps on Windows (and Unix?) "winfo id" can 
return 64-bit integer, but the -use option works only with 32-bit integers.

Opened Tk ticket: http://core.tcl.tk/tk/tktview?name=5ee8af61e5 .

--
assignee:  -> serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25584] a recursive glob pattern fails to list files in the current directory

2015-11-09 Thread Xavier de Gaye

Xavier de Gaye added the comment:

FWIW the patch looks good to me.

I find the code in glob.py difficult to read as it happily joins regular 
filenames together with os.path.join() or attempts to list the files contained 
into a regular file (sic).  The attached diff makes the code more correct and 
easier to understand. It is meant to be applied on top of Serhiy's patch.

--
Added file: http://bugs.python.org/file40988/rglob_isdir.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1602] windows console doesn't print or input Unicode

2015-11-09 Thread Adam Bartoš

Adam Bartoš added the comment:

dead1ne: Hello, I'm maintaining a package that tries to solve this issue: 
https://github.com/Drekin/win-unicode-console . There are actually many related 
problems.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25589] test_ascii_formatd fails on Mac when built with Intel compiler

2015-11-09 Thread STINNER Victor

STINNER Victor added the comment:

See also issue #24999 about ICC compiler.

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25586] socket.sendall broken when a socket has a timeout

2015-11-09 Thread Martin Panter

Martin Panter added the comment:

Personally I would avoid big red warning boxes in 90% of the cases people 
suggest them, including this one. But maybe we can see what others think.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25591] improve test coverage for the imaplib

2015-11-09 Thread Maciej Szulik

New submission from Maciej Szulik:

Our current imaplib implementation lacks quite a few of tests and the ones 
present are written in different styles. I'd like to propose rewriting the test 
case with this new style I've developed during PyCon sprints along with David. 
Once we'll have the entire test suite in place it'll be safer to introduce any 
changes I'd like to cover, including updating the implementation to newest RFC 
3501 version.

--
components: email
files: new_imap_tests.diff
hgrepos: 322
keywords: patch
messages: 254417
nosy: barry, maciej.szulik, r.david.murray
priority: normal
severity: normal
status: open
title: improve test coverage for the imaplib
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file40991/new_imap_tests.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25585] Bad path leads to: ImportError: DLL load failed: %1 is not a valid Win32 application.

2015-11-09 Thread eryksun

eryksun added the comment:

Steve, do you think it's OK to abandon localization for exception messages? If 
so, should we be using English for all FormatMessage calls? It's a bit ugly 
that Python's exceptions and the CRT error messages are in English, but then 
whenever we call FormatMessage with LANG_NEUTRAL/SUBLANG_DEFAULT we're getting 
localized error text. For example, the import error in the following case has a 
mix or Russian and English:

import io, sys, ctypes
kernel32 = ctypes.WinDLL('kernel32')

MUI_LANGUAGE_NAME = 8
kernel32.SetThreadPreferredUILanguages(MUI_LANGUAGE_NAME, u'ru-RU\0', None)
kernel32.SetConsoleOutputCP(1251)
sys.stderr = io.TextIOWrapper(open(r'\\.\con', 'wb'), encoding='1251')
open('blah.pyd', 'w').close()

>>> import blah
Traceback (most recent call last):
  File "", line 1, in 
ImportError: DLL load failed: %1 не является приложением Win32.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25584] a recursive glob pattern fails to list files in the current directory

2015-11-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4532c4f37429 by Serhiy Storchaka in branch '3.5':
Issue #25584: Fixed recursive glob() with patterns starting with '**'.
https://hg.python.org/cpython/rev/4532c4f37429

New changeset 175cd763de57 by Serhiy Storchaka in branch 'default':
Issue #25584: Fixed recursive glob() with patterns starting with '**'.
https://hg.python.org/cpython/rev/175cd763de57

New changeset fefc10de2775 by Serhiy Storchaka in branch '3.5':
Issue #25584: Added "escape" to the __all__ list in the glob module.
https://hg.python.org/cpython/rev/fefc10de2775

New changeset 128e61cb3de2 by Serhiy Storchaka in branch 'default':
Issue #25584: Added "escape" to the __all__ list in the glob module.
https://hg.python.org/cpython/rev/128e61cb3de2

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25555] Fix parser and AST: fill lineno and col_offset when compiling AST from Python objects

2015-11-09 Thread STINNER Victor

STINNER Victor added the comment:

I backported the fix to Python 3.5. Since I'm not convinced that the bug can be 
triggered without modifying CPython (the bug only impacts FAT Python which 
installs a hook on the AST compiler), I don't want to backport it to Python 2.7 
to avoid the risk of regression.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25586] socket.sendall broken when a socket has a timeout

2015-11-09 Thread STINNER Victor

STINNER Victor added the comment:

I don't really understand why do even you consider the behaviour has a bug or a 
trap. On timeout, the most common behaviour is to give up on the whole client. 
I don't know code trying to resend the same data in case of timeout.

Describing the behaviour on the documentation helps, but no warning is need.

When you *read* data, it's different. It can be interesting to get the partial 
read.

--

For example, the asyncio.StreamReader.readexactly() coroutine raises an 
asyncio.IncompleteReadError exception which contains the partial data:

https://docs.python.org/dev/library/asyncio-stream.html#asyncio.StreamReader.readexactly

The HTTP client has a similar exception.

I proposed to add similar method to socket.socket which also raises a similar 
exception to return partial data: issue #1103213.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25584] a recursive glob pattern fails to list files in the current directory

2015-11-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Please open new issue for glob() optimization Xavier.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25585] Bad path leads to: ImportError: DLL load failed: %1 is not a valid Win32 application.

2015-11-09 Thread Steve Dower

Steve Dower added the comment:

For 3.6 I think it's fine, but people are almost certainly relying on the 
current message on their system and changing it at all for any existing release 
is unnecessary pain (3.5.1 *might* be okay, but only because it's so recent).

It would be nice to invest in some better diagnostics here, though with the ABI 
tag in 3.5 you're now unlikely to get an incompatible binary. File not found 
will be the most common message.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25592] distutils docs: data_files always uses sys.prefix

2015-11-09 Thread Jeroen Demeyer

New submission from Jeroen Demeyer:

The documentation for distutils claims that sys.exec_prefix is used in certain 
cases to install data_files, but this is simply not true (maybe it was true in 
the past or this sentence was copy/pasted from somewhere else?)

--
assignee: docs@python
components: Documentation
files: data_files_doc.patch
keywords: patch
messages: 254432
nosy: docs@python, jdemeyer
priority: normal
severity: normal
status: open
title: distutils docs: data_files always uses sys.prefix
versions: Python 2.7
Added file: http://bugs.python.org/file40993/data_files_doc.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24999] ICC compiler: ICC treats denormal floating point numbers as 0.0

2015-11-09 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Segfault in test_re.test_sre_character_class_literals() when Python is 
compiled by ICC -> ICC compiler: ICC treats denormal floating point numbers as 
0.0

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25584] a recursive glob pattern fails to list files in the current directory

2015-11-09 Thread Xavier de Gaye

Xavier de Gaye added the comment:

glob('invalid_dir/**', recursive=True) triggers the assert that was added by my 
patch in _rlistdir().

This new patch fixes this: when there is no magic character in the dirname part 
of a split(), and dirname is not an existing directory, then there is nothing 
to yield and the processing of pathname must stop (and thus in this case, no 
call is made to glob2() when basename is '**').

--
Added file: http://bugs.python.org/file40989/rglob_isdir_2.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25589] test_ascii_formatd fails on Mac when built with Intel compiler

2015-11-09 Thread Chris Hogan

New submission from Chris Hogan:

I successfully built Python on OS X 10.10 with the Intel compiler v15.  
However, running the regression tests gives me a "segmentation fault: 11" on 
test_ascii_formated.  I think this has to do with libffi, because when I build 
with the --use-system-ffi flag (using a libffi that I built) all the regression 
tests pass, but I get a seg fault when I try to import ctypes.  Using python's 
libffi I can import ctypes, but I get seg faults in the tests.  Looking at 
libffi's homepage, it looks like x86-64 Mac OS X isn't on the list of 
officially supported platforms.  I tried contacting the libffi-discuss mailing 
list about this but have received no response in a month.  Please let me know 
what other information I can provide.

--
components: Macintosh, Tests
messages: 254398
nosy: christopher.hogan, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: test_ascii_formatd fails on Mac when built with Intel compiler
type: crash
versions: Python 2.7, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21818] cookielib documentation references Cookie module, not cookielib.Cookie class

2015-11-09 Thread Georg Brandl

Georg Brandl added the comment:

The rules are as they are mostly for backwards compatibility. But it is rarely 
a problem since there is only one object with a given name.

:class:`Cookie` within the docs for cookielib would not be able to link to 
Cookie.Cookie since it is not found in its scope. :class:`Cookie.Cookie` works, 
as does :class:`~Cookie.Cookie`.

When you use the "find-in-any-namespace" syntax, i.e. :class:`.Cookie` the type 
*will* be taken into account.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25585] Bad path leads to: ImportError: DLL load failed: %1 is not a valid Win32 application.

2015-11-09 Thread Steve Dower

Steve Dower added the comment:

It does, but you need to identify the error code precisely and use that to 
provide the parameters when obtaining the message. It's more about localization 
than a general way of obtaining error text. Better off just using our own 
message in this case (which is probably a breaking change for 2.7...)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25585] Bad path leads to: ImportError: DLL load failed: %1 is not a valid Win32 application.

2015-11-09 Thread R. David Murray

R. David Murray added the comment:

OK, so it sounds like there are improvements we could make here if someone 
wants to work on it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-11-09 Thread Zachary Ware

Zachary Ware added the comment:

Stefan Krah wrote:
> If anyone worries that "-fp-model strict" will slow
> things down:  In the Python context these settings have
> no measurable impact:  A while ago I tested setting/restoring
> the control word *for every operation*, and even that did
> not have any impact.

If that's the case, would anyone (in particular, Steve, Tim or Tim) mind if we 
just made the default (for MSVC as well as ICC) /fp:strict?  It would be much 
easier to just change the global default than to try to either make it settable 
or to change it just when ICC is used.

As far as the segfault that this issue is actually about, compiling _sre.c with 
/Os seems to clear it up.  I believe Intel is looking into it deeper to 
determine whether it's an ICC bug or if there's something we should change in 
_sre.c.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25585] Bad path leads to: ImportError: DLL load failed: %1 is not a valid Win32 application.

2015-11-09 Thread STINNER Victor

STINNER Victor added the comment:

Does Windows provide a function to format a string using %1, %2, etc.?

Note: Python 3.6 uses the same code than Python 2.7.

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7267] format method: c presentation type broken in 2.7

2015-11-09 Thread STINNER Victor

STINNER Victor added the comment:

Walter Dörwald added the comment:
> Don't worry, I've switched to using Python 3 in 2012, where this isn't a 
> problem. ;)

Wow, cool! We still have 1 or 2 customers stuck with Python 2, haha.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25582] Fixed memory leaks in test_ctypes

2015-11-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e5d7cf9d6469 by Serhiy Storchaka in branch '3.4':
Issue #25582: Fixed 100 MB memory leak in test_ctypes.
https://hg.python.org/cpython/rev/e5d7cf9d6469

New changeset f14f6bce3321 by Serhiy Storchaka in branch '2.7':
Issue #25582: Fixed 100 MB memory leak in test_ctypes.
https://hg.python.org/cpython/rev/f14f6bce3321

New changeset ad4c6f4af909 by Serhiy Storchaka in branch '3.5':
Issue #25582: Fixed 100 MB memory leak in test_ctypes.
https://hg.python.org/cpython/rev/ad4c6f4af909

New changeset a6f6d8a6152f by Serhiy Storchaka in branch 'default':
Issue #25582: Fixed 100 MB memory leak in test_ctypes.
https://hg.python.org/cpython/rev/a6f6d8a6152f

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25589] test_ascii_formatd fails on Mac when built with Intel compiler

2015-11-09 Thread Zachary Ware

Zachary Ware added the comment:

Also, I haven't had an issue with this on my own machine.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25589] test_ascii_formatd fails on Mac when built with Intel compiler

2015-11-09 Thread Zachary Ware

Zachary Ware added the comment:

This doesn't seem to be a problem on the ICC buildbot; David, did you do 
anything special for libffi/ctypes?

--
nosy: +r.david.murray, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25582] Fixed memory leaks in test_ctypes

2015-11-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is still 32 MB leak in PointersTestCase.test_pointer_type_str_name in 
test_pointers.py in 2.7.

--
stage: patch review -> needs patch
type: behavior -> resource usage
versions:  -Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1602] windows console doesn't print or input Unicode

2015-11-09 Thread dead1ne

dead1ne added the comment:

I've tried addressing the output problem by subclassing TextIOWrapper to use 
the windows functions GetConsoleOutputCP and WideCharToMultiByte.

I've tested this as well as I can without figuring out how to install a better 
font for the windows console. It appears to work on both python 3.4 and 2.7 
although there may be an issue with 2.7 and CJK Extension B and higher 
codepoints.

Hopefully this is useful in finally resolving the issue. Also I think some 
maintenance patch for 2.7 is in order as currently it fails utterly if you set 
the console to 65001 since it doesn't recognize it. Had to wrap all print 
statements in try/except so it wouldn't fail before testing the wrapper.

--
nosy: +dead1ne
Added file: http://bugs.python.org/file40990/wincontest.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25555] Fix parser and AST: fill lineno and col_offset when compiling AST from Python objects

2015-11-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2d8988f64cea by Victor Stinner in branch '3.5':
Issue #2: Fix parser and AST: fill lineno and col_offset of "arg" node when
https://hg.python.org/cpython/rev/2d8988f64cea

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25589] test_ascii_formatd fails on Mac when built with Intel compiler

2015-11-09 Thread Ned Deily

Ned Deily added the comment:

Chris, how exactly are you running this test that fails and where does the test 
come from?  I may be overlooking something but I do not see any spelling of a 
test_ascii_formatted in the Python 3.5 source including its embedded ctypes.  
The ctypes shipped with Python certainly is supported on 64-bit OS X.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7267] format method: c presentation type broken in 2.7

2015-11-09 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: commit review -> resolved

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25590] tab-completition on instances repeatedly accesses attribute/descriptors values

2015-11-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Agreed with all your suggestions Martin. Do you want to write a patch?

--
stage: test needed -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-09 Thread Alexander Mohr

New submission from Alexander Mohr:

asyncio.selector_events.BaseSelectorEventLoop._sock_connect_cb is a callback 
based on the selector for a socket. There are certain situations when the 
selector triggers twice calling this callback twice, resulting in an 
InvalidStateError when it sets the Future to None.  The way I triggered this 
was by having several parallel connections to the same host in a 
multiprocessing script. I suggest analyzing why this callback can be called 
twice and figuring out what the correct fix is.  I monkey patched it by adding 
a fut.done() check at the top.  If this information is not enough I can try to 
provide a sample script. Its currently reproducing in a fairly involved 
multiprocessing script.

--
components: asyncio
messages: 254433
nosy: gvanrossum, haypo, thehesiod, yselivanov
priority: normal
severity: normal
status: open
title: _sock_connect_cb can be called twice resulting in InvalidStateError
type: behavior
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11822] Improve disassembly to show embedded code objects

2015-11-09 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: rhettinger -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23883] __all__ lists are incomplete

2015-11-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have added comments on Rietveld. Besides few stylistic nitpicks 
Issue23883_support_check__all__.v5.patch LGTM.

> But passing "self" to it feels a bit weird.

This is not new. There are other testing helpers in test.support that needs 
passing "self". If the helper is used many times in one test class, I prefer to 
make a method:

class SomeTest(TestCase):
check_something = test.support.check_something

def test_foo():
self.check_something('foo')

def test_bar():
self.check_something('bar')

But in this case I'm happy with the current API.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25567] shlex.quote doesn't work on bytestrings

2015-11-09 Thread Nan Wu

Nan Wu added the comment:

Added a patch for support this in `quote` method. What is a good example or a 
group of examples to demonstrate the usage in the document?

--
keywords: +patch
nosy: +Nan Wu
Added file: http://bugs.python.org/file40992/shlex_quote_bytes_support.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25585] Bad path leads to: ImportError: DLL load failed: %1 is not a valid Win32 application.

2015-11-09 Thread Steve Dower

Steve Dower added the comment:

Correction, *import* not found, and the only way to resolve it is to do a 
second scan of sys.path for the sole purpose of diagnostics. Probably more 
harmful than helpful.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7267] format method: c presentation type broken in 2.7

2015-11-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Then feel free to commit your patch please. It LGTM.

--
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7267] format method: c presentation type broken in 2.7

2015-11-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2f2c52c9ff38 by Victor Stinner in branch '2.7':
Issue #7267: format(int, 'c') now raises OverflowError when the argument is not
https://hg.python.org/cpython/rev/2f2c52c9ff38

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7267] format method: c presentation type broken in 2.7

2015-11-09 Thread STINNER Victor

STINNER Victor added the comment:

> Then feel free to commit your patch please. It LGTM.

Thanks for the review ;-)

@Walter: Sorry for the late fix (6 years later!).

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-09 Thread Daniel Plachotich

Daniel Plachotich added the comment:

You mean msg254341? As I mentioned recently, it still will raise an exception
in case of EROFS, ENOSPC and possibly other values, which, as in the case
with Windows, can be quite unexpected depending on platform and circumstances.

Of course there is no practical sense to continue when, for example, FS is
read-only (EROFS), but I think makedirs must be predictable: it should
first check and only then try to create, as it stated in the docstring.
When exist_ok=True and directory really exists, a user doesn't expect any
exceptions from the internally used mkdir, because it simply shouldn't be
called in this case.

By the way, why 3.2 and 3.3 were removed from the list? exist_ok was introduced 
in 3.2.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25589] test_ascii_formatd fails on Mac when built with Intel compiler

2015-11-09 Thread Chris Hogan

Chris Hogan added the comment:

Ned, the test is in Lib/test/test_ascii_formatd.py.  Sorry, I spelled it wrong 
originally.  Also, I guess it's only in 2.7.  My mistake.

--
versions:  -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25590] tab-completition on instances repeatedly accesses attribute/descriptors values

2015-11-09 Thread Ezio Melotti

New submission from Ezio Melotti:

Pressing  to invoke autocompletition on instances repeatedly accesses 
attributes/descriptors values:

>>> #  is used to indicate when/where I press 
>>> class Foo:
...   @property
...   def bar(self): print('Foo.bar called')
... 
>>> f = Foo()
>>> f.Foo.bar called 
Foo.bar called
Foo.bar called
Foo.bar called
Foo.bar called
Foo.bar called
Foo.bar called
Foo.bar called

f.__class__( f.__doc__f.__getattribute__(  f.__le__(
f.__new__(   f.__setattr__(   f.__weakref__
f.__delattr__(   f.__eq__(f.__gt__(f.__lt__(
f.__reduce__(f.__sizeof__(f.bar
f.__dict__   f.__format__(f.__hash__(  f.__module__ 
f.__reduce_ex__( f.__str__(   
f.__dir__(   f.__ge__(f.__init__(  f.__ne__(
f.__repr__(  f.__subclasshook__(  
>>> f.bFoo.bar called
Foo.bar called
Foo.bar called
Foo.bar called
ar
Foo.bar called

Each time I press , the property is called 4 times.  I'm not sure why the 
value is accessed at all, but even if there was a valid reason to do so, doing 
it once should be enough.

--
messages: 254415
nosy: ezio.melotti
priority: normal
severity: normal
stage: test needed
status: open
title: tab-completition on instances repeatedly accesses attribute/descriptors 
values
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-09 Thread Martin Panter

Martin Panter added the comment:

Yes that looks like an improvement, though I wonder what’s wrong with your 
original proposal (performance maybe?). In any case, it definitely needs a 
comment explaining the first isdir() avoids competing failures that mask 
EEXIST, and the exception handling avoids the race to create the directory.

A test case for the test suite would also be good. I understand it should be 
easy to do for Windows, just make a directory with an absolute path including a 
drive root like d:\.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25590] tab-completition on instances repeatedly accesses attribute/descriptors values

2015-11-09 Thread Martin Panter

Martin Panter added the comment:

Long story short: it is accessed due to the callable suffix check (Issue 
449227), and this check is less than optimal, meaning the attribute gets 
accessed up to four times per Tab press.

In 3.6, there are only two calls, one for the hasattr() call, and one for the 
getattr() call:

Foo.bar called
  File "/home/proj/python/cpython/Lib/rlcompleter.py", line 85, in complete
self.matches = self.attr_matches(text)
  File "/home/proj/python/cpython/Lib/rlcompleter.py", line 164, in attr_matches
hasattr(thisobject, word)):
  File "", line 3, in bar
Foo.bar called
  File "/home/proj/python/cpython/Lib/rlcompleter.py", line 85, in complete
self.matches = self.attr_matches(text)
  File "/home/proj/python/cpython/Lib/rlcompleter.py", line 165, in attr_matches
val = getattr(thisobject, word)
  File "", line 3, in bar

Before revision 4dbb315fe667 (Issue 25011), “words” was a list rather than a 
set. It gets two “bar” entries, one from dir(f) and one from dir(f.__class__). 
Maybe it is worth backporting set(), I dunno.

The hasattr() call was added in r65168 (Issue 3396) as a look-before-you-leap 
check to avoid the completer from dying from getattr() exceptions. IMO in this 
case it is better to “ask for forgiveness” by catching Exception from 
getattr(). This would be more robust to quirky and buggy attributes anyway.

Finally (or really, initially), getattr() was added in r64664 (Issue 449227). I 
think even if getattr() fails, the attribute name could still be output, just 
not with the callable suffix (which I partly disagree with anyway). It would 
have been like that previously. But I guess this is debatable, and a separate 
issue.

--
components: +Library (Lib)
nosy: +martin.panter, serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25584] a recursive glob pattern fails to list files in the current directory

2015-11-09 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file40987/rglob_zero_dirs_2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7267] format method: c presentation type broken in 2.7

2015-11-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25583] os.makedirs with exist_ok=True raises PermissionError on Windows 7^

2015-11-09 Thread Daniel Plachotich

Daniel Plachotich added the comment:

Maybe the solution is to leave OSError catching after the conditional
(probably with some additional comments):

   if not (exist_ok and path.isdir(name)):
  try:
  mkdir(name, mode)
  except OSError as e:
  if not exist_ok or e.errno != errno.EEXIST or not path.isdir(name):
  raise

This should solve the problem. It also gives more or less guarantee
that errno will be EEXIST, while the current code will also raise an exception
on EROFS (read-only FS), ENOSPC (no space left) in addition to EACCES on Windows
(and possibly some other values on various systems - who knows?).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13940] imaplib: Mailbox names are not quoted

2015-11-09 Thread Maciej Szulik

Maciej Szulik added the comment:

Currently working on a patch for this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7267] format method: c presentation type broken in 2.7

2015-11-09 Thread STINNER Victor

STINNER Victor added the comment:

> Both ways, with OverflowError and Py3k DeprecationWarning, are good to me. 
> What would you say about this Benjamin?

I prefer an OverflowError. I don't like having to enable a flag to fix a bug :-(

According to the issue title, it's really a bug: "format method: c presentation 
type *broken* in 2.7".

Note: The unit test may check the error message, currently the error message is 
irrevelant (it mentions unicode whereas bytes (str type) are used).

>>> format(-1, "c")
OverflowError: %c arg not in range(0x11) (wide Python build)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25588] Run test suite from IDLE idlelib.run subprocess

2015-11-09 Thread Terry J. Reedy

New submission from Terry J. Reedy:

This issue proposes stress testing idlelib.run by running code that already 
reports whether results are as expected or not -- the test_suite.  Since this 
one test will take at least as long as the test suite, and will probably need 
human intervention anyway, it would not be part of test_idle, but would be run 
separately manually, like htest.

IDLE runs user code in a user process started with subprocess.POpen(executable 
+ 'path/to/idlelib/run.py' + args + user_code_path) (with user_code_path 
omitted for shell restarts).  When run from the editor, the intent is to 
imitate 'python -i user_code_path'.

On python list, someone reported that running a program using pyqt5 (and qt5) 
hung on exit while running with python3 (on Ubuntu, no -i) worked.  I have 
asked for more details, including whether it works with -i included.  In the 
meanwhile, I wondered ...

While the run module might not be able to run programs with certain 3rd party 
imports, can it at least run programs restricted to stdlib imports and well 
enough behaved to run with python -i.  (A programs that, for instance, disables 
standard i/o streams would fail both in IDLE and with python.)  A test would be 
to at least run all stdlib tests, with the same result, as run otherwise on the 
same system.  The tests should be run in the user process itself and not in 
additional processes.  They could be run either all in one process or each in a 
new run process.

If successful, I will put code and instructions in a new 
idlelib/idle_test/rtest.py/txt.

--
assignee: terry.reedy
components: IDLE, Tests
messages: 254371
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Run test suite from IDLE idlelib.run subprocess
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25587] Useless addition in PyTuple_New

2015-11-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is no such code in current sources.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22643] Integer overflow in case_operation

2015-11-09 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21818] cookielib documentation references Cookie module, not cookielib.Cookie class

2015-11-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Georg, is it possible to tune Sphinx rules?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25586] socket.sendall broken when a socket has a timeout

2015-11-09 Thread Jakub Stasiak

Jakub Stasiak added the comment:

This is exactly what I'm thinking. Do you think it's sensible to move that 
sentence + some additional information (following your suggestion) into a 
"Warning" block?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25465] Pickle uses O(n) memory overhead

2015-11-09 Thread Herbert

Herbert added the comment:

It may be fair to note that I have no swap installed on one of the machines, 
just 16GB of RAM, on which the 'crash' happens. Hence I'm not sure how this 
affects paging, I would think there is no paging if there is no swap.

I can verify that the machine is 'stuck' for more than just several minutes (at 
least 30 minutes), nevertheless cannot confirm if this is due to the desktop 
environment or actually the kernel. I would agree to verify this first when I 
have access to the specific machines again.

Thank you for your input so far!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com