[issue25770] expose name, args, and kwargs from methodcaller

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

functools.partial is not the only precedence.

The "kwargs" attribute is used in following classes:

concurrent.futures.process._CallItem
concurrent.futures.process._WorkItem
concurrent.futures.thread._WorkItem
inspect.BoundArguments
sched.Event
threading.Timer
unittest.mock._patch
weakref.finalize._Info

The "kwds" attribute is used in following class: 
contextlib._GeneratorContextManager.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue25770] expose name, args, and kwargs from methodcaller

2016-02-24 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Now that partial() has started down the path of using "keywords", it seems 
reasonable to stick with that name.  In pure python code, we mostly use **kwds 
or **kwargs but there are other variants and not much consistency, so spelling 
out keywords isn't unreasonable in that regard.  That said, if it feels weird 
to you, ask Guido what his thoughts are.

--

___
Python tracker 

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



[issue26415] Out of memory, trying to parse a 35MB dict

2016-02-24 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +rhettinger

___
Python tracker 

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



[issue26415] Out of memory, trying to parse a 35MB dict

2016-02-24 Thread A. Skrobov

A. Skrobov added the comment:

A practical note: if, instead of importing crash.py, I do a json.loads, with a 
few extra transformations:

with open("crash.py") as f: holo_table={tuple(int(z) for z in k.split(', ')):v 
for k,v in 
json.loads(f.readlines()[0][13:].replace('(','"').replace(')','"')).iteritems()}

--the whole data structure loads in a jiffy.

Makes me wonder why this roundabout approach is so much more efficient than the 
native parsing.

--

___
Python tracker 

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



[issue26430] quote marks problem on loaded file

2016-02-24 Thread quetzal

quetzal added the comment:

solution found.
as Silentghost was saying, the problem was in the encoding of the quotemarks... 
and somes other /ecute and web encoding... unseeabble directly in my navigator, 
and not directly in free-access by a simple xxx.replace(a,b)... 
the translation was not complete, and i omit to verify it before to come 
here... sorry... but it was really weird

--

___
Python tracker 

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



[issue26431] string template substitute tests

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This already is tested in test_pep292.py.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26431] string template substitute tests

2016-02-24 Thread Greg McCoy

New submission from Greg McCoy:

Wrote test for string template substitute

--
components: Tests
files: mywork.patch
keywords: patch
messages: 260837
nosy: Greg McCoy
priority: normal
severity: normal
status: open
title: string template substitute tests
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file42023/mywork.patch

___
Python tracker 

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



[issue26323] Add assert_called() and assert_called_once() methods for mock objects

2016-02-24 Thread Amit Saha

Amit Saha added the comment:

Thanks Michael, so looks like we are all set for merging this?

--

___
Python tracker 

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



[issue26430] quote marks problem on loaded file

2016-02-24 Thread quetzal

quetzal added the comment:

thanks silentghost for tested it... i'm gonna try to see what happened be 
there...

--

___
Python tracker 

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



[issue26428] The range for xrange() is too narrow on Windows 64-bit

2016-02-24 Thread Eryk Sun

Eryk Sun added the comment:

> No, I meant to write xrange(). My point is there is no crasher 
> if this change didn't occur.

Oh, by 'still functions' you meant that it doesn't cause an access violation 
that crashes the process, as opposed to raising an OverflowError that can be 
handled.

--

___
Python tracker 

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



[issue26428] The range for xrange() is too narrow on Windows 64-bit

2016-02-24 Thread Brett Cannon

Brett Cannon added the comment:

No, I meant to write xrange(). My point is there is no crasher if this change 
didn't occur.

--

___
Python tracker 

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



[issue5824] SocketServer.DatagramRequestHandler Broken under Linux

2016-02-24 Thread Martin Panter

Changes by Martin Panter :


--
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



[issue26430] quote marks problem on loaded file

2016-02-24 Thread SilentGhost

SilentGhost added the comment:

OK, sorry, but this is just nonsense. What most likely happens in your case is 
that the file doesn't contain a standard ASCII double quote, but one of it's 
fancy siblings.

For the note: I did test and naturally wasn't able to reproduce this.

--
resolution:  -> not a bug
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



[issue26428] The range for xrange() is too narrow on Windows 64-bit

2016-02-24 Thread Eryk Sun

Eryk Sun added the comment:

> xrange() still functions if you give it a value larger than `long`

What do you mean? Did you mean to write range() instead of xrange()? Both range 
and xrange in Python 2 use a C long for the start, stop, step, and length 
values. With how they get used this generally isn't a problem, which is why no 
one previously created an issue for this.

--
nosy: +eryksun

___
Python tracker 

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



[issue26430] quote marks problem on loaded file

2016-02-24 Thread quetzal

quetzal added the comment:

well, silentghost... a .txt file, or an .html and that's all... if there's some 
text into... just find a pattern with some  - " - 

import the file in python(iddle)

and type :

if '''pattern''' in file:
__ print('ok')
else:
__ print('none')

i don't think that a file is really necessary... you'll do certainly better 
than me in testing...

--

___
Python tracker 

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



[issue26428] The range for xrange() is too narrow on Windows 64-bit

2016-02-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> rejected
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



[issue1757072] Zipfile robustness

2016-02-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> out of date
stage: test needed -> 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



[issue24229] pathlib.Path should have a copy() method

2016-02-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> rejected
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



[issue26428] The range for xrange() is too narrow on Windows 64-bit

2016-02-24 Thread Brett Cannon

Brett Cannon added the comment:

I agree that it's a new feature since xrange() still functions if you give it a 
value larger than `long` (right?) and there's nothing saying it has to support 
the full size of an index.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue26430] quote marks problem on loaded file

2016-02-24 Thread SilentGhost

SilentGhost added the comment:

Could you please upload the test file that would allow us to reproduce this 
behaviour.

--
nosy: +SilentGhost

___
Python tracker 

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



[issue26430] quote marks problem on loaded file

2016-02-24 Thread quetzal

quetzal added the comment:

the word "string" got an "s" for sure, or it will not match it... but the 
problem is not about typography :D

--

___
Python tracker 

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



[issue26430] quote marks problem on loaded file

2016-02-24 Thread quetzal

New submission from quetzal:

impossible to match a string pattern with a quotation mark in an opened file 
[code]
file = '''it's an opened file made of "strings"'''
if '''"string"''' in file:
print('ok')
else:
print('none')
[/code]
in iddle, it works with no difficulties...
but if the file comes from an file = open(fileadress).read()

the same code return nothing... it do not find the pattern string, and just 
because of double quote marks (i've not tried with some other marks)

for me it's a bug, because it do works well, if their no quotation marks

--
messages: 260826
nosy: quetzal
priority: normal
severity: normal
status: open
title: quote marks problem on loaded file
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue26429] os.path.dirname returns empty string instead of "." when file is in current directory

2016-02-24 Thread Eryk Sun

Eryk Sun added the comment:

os.path.dirname is documented as the first element of os.path.split, which in 
turn is documented to be empty when there's no slash in the path. 

An empty string is treated as the current directory by os.path.abspath. This is 
in line with an empty element in the PATH environment variable. Also, Python's 
sys.path uses an empty string for the current directory. If you want a dot for 
display and logging purposes, normalize via os.path.normpath:

>>> os.path.normpath('')
'.'

--
nosy: +eryksun

___
Python tracker 

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



[issue26429] os.path.dirname returns empty string instead of "." when file is in current directory

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is documented behavior and changing this will break existing code (for 
example see the implementation of glob.glob()).

If you need this, a workaround is simple and idiomatic: ``os.path.dirname(path) 
or os.curdir``.

--
nosy: +serhiy.storchaka
resolution:  -> rejected
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



[issue26429] os.path.dirname returns empty string instead of "." when file is in current directory

2016-02-24 Thread Eric V. Smith

Eric V. Smith added the comment:

Changing to just 3.6, since that's the only place we could change the behavior.

That said, I'd be -1 on making such a change. It would no doubt break some 
existing code.

--
nosy: +eric.smith
type:  -> enhancement
versions:  -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue26428] The range for xrange() is too narrow on Windows 64-bit

2016-02-24 Thread Mark Dickinson

Mark Dickinson added the comment:

I hate to say it, but I think this would count as an enhancement rather than a 
bugfix: there's nothing documented about the range of `xrange`.

--

___
Python tracker 

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



[issue26429] os.path.dirname returns empty string instead of "." when file is in current directory

2016-02-24 Thread Chaitanya Mannem

New submission from Chaitanya Mannem:

Don't know if this is for windows compatibility or whatever but I think it 
makes more sense if os.path.dirname would return "." if the file passed in was 
in the current directory.

--
components: Library (Lib)
messages: 260821
nosy: Chaitanya Mannem
priority: normal
severity: normal
status: open
title: os.path.dirname returns empty string instead of "." when file is in 
current directory
versions: Python 2.7, Python 3.2, Python 3.3, 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



[issue26428] The range for xrange() is too narrow on Windows 64-bit

2016-02-24 Thread STINNER Victor

STINNER Victor added the comment:

> (e.g on 64-bit Windows)

Platforms with sizeof(long) < sizeof(size_t), I only know one platform: Windows 
64-bit.

Since this change only impacts Windows 64-bit, we must compile (to check for 
compilation warnings) and run tests with this patch on Windows 64-bit.

Many other similar issues has been fixed in Python 3. I'm not sure that it's 
worth to spend too much time on supporting the full 64-bit range on Python 2, 
it's almost a new feature no?

Examples:

* issue #9611: FileIO not 64-bit safe under Windows  (Python 2 fixed)
* issue #9566: Compilation warnings under x64 Windows  (not fixed in Python 2)
* issue #16367: io.FileIO.readall() is not 64-bit safe on Windows  (Python 2 
fixed)
* issue #17931: PyLong_FromPid() is not correctly defined on Windows 64-bit 
(not fixed in Python 2?)
* issue #15792: Fix compiler options for x64 builds on Windows  (not fixed in 
Python 2)
* etc.

--
title: The range for xrange() is too narrow -> The range for xrange() is too 
narrow on Windows 64-bit

___
Python tracker 

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



[issue26427] w* format in PyArg_ParseTupleAndKeywords for optional argument

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is a duplicate of issue23927.

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> getargs.c skipitem() doesn't skip 'w*'

___
Python tracker 

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



[issue26376] Tkinter root window won't close if packed.

2016-02-24 Thread Sam Yeager

Sam Yeager added the comment:

This occurs even when the window is large and/or packed with multiple elements.

--

___
Python tracker 

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



[issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

With fixed issue26428 you could use xrange() for testing this issue.

--

___
Python tracker 

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



[issue26428] The range for xrange() is too narrow

2016-02-24 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The xrange() object works with integers in the range of C long, not Py_ssize_t. 
Thus the idiomatic expression xrange(len(seq)) can fail for real sequences if 
sys.maxint < sys.maxsize (e.g on 64-bit Windows).

Proposed patch changes the xrange() implementation to use Py_ssize_t instead of 
C long.

--
components: Interpreter Core
files: xrange_py_ssize_t.patch
keywords: patch
messages: 260816
nosy: benjamin.peterson, haypo, mark.dickinson, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: The range for xrange() is too narrow
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file42022/xrange_py_ssize_t.patch

___
Python tracker 

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



[issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1

2016-02-24 Thread Eryk Sun

Eryk Sun added the comment:

> the sq_length slot in the weakproxy type is set to proxy_length.

Nice. Its tp_getattro gets in the way of using __len__ directly, but this can 
be side stepped by manually binding the descriptor:

class Test(object):
def __len__(self):
return 2**31 + 5

>>> t = Test()
>>> p = weakref.proxy(t)
>>> p.__len__()
2147483653L
>>> type(p).__len__.__get__(p)()
-2147483643

--

___
Python tracker 

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



[issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> xrange() constructor is implemented in C and looks to use C long for
> parameters. This issue is specific to 64-bit Windows with 32-bit C long, so
> xrange() doesn't seem to work here.

What about xrange(-1, 2**31-1)? In any case the fact that xrange works not 
with Py_ssize_t, but with long, looks as a bug. I'll open a separate issue for 
this.

> > Or weakref?
> 
> What do you mean? Which object? weakref.ref() has no length.

I see that the sq_length slot in the weakproxy type is set to proxy_length.

--

___
Python tracker 

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



[issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1

2016-02-24 Thread STINNER Victor

STINNER Victor added the comment:

> mmap.mmap(-1, 2**31 + 5) could be used here.

Yeah, I hesitated to use mmap, but I'm not really a big fan of using directly a 
mmap object in test_descr. Unit tests are supposed to only test one thing.


> If the pages are never touched it won't increase the working set size. It 
> merely maps the address range with demand-zero pages.

It depends on the Kernel configuration. On Solaris, overcommit is disable by 
default.

I prefer to use a regular Python str. Or maybe use a custom Python object for 
which we can control the output of __len__()?

--

___
Python tracker 

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



[issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1

2016-02-24 Thread Eryk Sun

Eryk Sun added the comment:

mmap.mmap(-1, 2**31 + 5) could be used here. If the pages are never touched it 
won't increase the working set size. It merely maps the address range with 
demand-zero pages.

Unpatched:

>>> mmap.mmap(-1, 2**31 + 5).__len__()
-2147483643

Patched:

>>> mmap.mmap(-1, 2**31 + 5).__len__()
2147483653L

--
nosy: +eryksun

___
Python tracker 

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



[issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1

2016-02-24 Thread STINNER Victor

STINNER Victor added the comment:

> Could we use the xrange() object for testing?

xrange() constructor is implemented in C and looks to use C long for 
parameters. This issue is specific to 64-bit Windows with 32-bit C long, so 
xrange() doesn't seem to work here.


> Or weakref?

What do you mean? Which object? weakref.ref() has no length.


> Using a bigmem test for this issue looks excessive.

Well, I was too lazy to develop a C extension (add something to _testcapi) just 
for this tiny bug.

I also like tests really testing the final feature (the bug reported in this 
issue).

I failed to find an existing Python object with __len__() implemented in C 
which doesn't need to allocate 2^31 bytes to test this bug.

--

___
Python tracker 

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



[issue26039] More flexibility in zipfile interface

2016-02-24 Thread Thomas Kluyver

Thomas Kluyver added the comment:

Oh, I see test_interleaved now, which does test overlapping reads of two files 
from the same zip file.

Do you want that clarified in the docs - which don't currently mention the lock 
at all - or in a comment in the module?

--

___
Python tracker 

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



[issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Using a bigmem test for this issue looks excessive. Could we use the xrange() 
object for testing? Or weakref?

--

___
Python tracker 

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



[issue26039] More flexibility in zipfile interface

2016-02-24 Thread Thomas Kluyver

Thomas Kluyver added the comment:

My initial patch would have allowed passing a readable file-like object into 
zipfile. I was persuaded that allowing ZipFile.open() to return a writable 
object was a more intuitive and flexible API.

Concurrent writes with zf.open(mode='w') should be impossible, because it only 
allows one open handle at a time. It still uses the lock inside _ZipWriteFile, 
so concurrent writes to a single handle should be serialised.

I would not recommend anyone try to do concurrent access to a single ZipFile 
object from multiple threads or coroutines. It's quite stateful, there is no 
mention of concurrency in the docs, and no tests I can see that try concurrent 
access. The only thing that might be safe is reading from two files inside the 
zip file (which shouldn't be changed by this), but I wouldn't want to guarantee 
even that.

--

___
Python tracker 

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



[issue26427] w* format in PyArg_ParseTupleAndKeywords for optional argument

2016-02-24 Thread Victor Halperin

New submission from Victor Halperin:

Two functions read the format string in Python/getargs.c: convertitem() for 
present arguments and skipitem() for missing ones. They must agree on the 
format; in fact, a comment to this effect is written right above convertitem(). 
Nevertheless, skipitem() only allows '*' modifier with 's' and 'z' formats, 
unlike convertitem(), that correctly processes 'w*'. As a result, 'w*' works if 
an array arguments is supplied, and fails if it is omitted. Suggested fix: add 
c == 'w' comparison to the line with *format == '*' in skipitem().

--
components: Interpreter Core
files: getargs.c
messages: 260807
nosy: VHalperin
priority: normal
severity: normal
status: open
title: w* format in PyArg_ParseTupleAndKeywords for optional argument
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file42021/getargs.c

___
Python tracker 

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



[issue26384] UnboundLocalError in socket._sendfile_use_sendfile

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This issue can be tested without moking os.fstat():

class F:
def fileno(self):
return fd
with socket.socket() as sock:
fd = os.open(os.curdir, os.O_RDONLY)
os.close(fd)
self.assertRaises(socket._GiveupOnSendfile,
  sock._sendfile_use_sendfile, F())

os.fstat() can raise not only OSError. It may be worth to test also with fd = 
2**1000 and fd = None.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue25136] Python doesn't find Xcode 7 SDK stub libraries

2016-02-24 Thread Ned Deily

Ned Deily added the comment:

I've committed Tim's patches with some additional comments for release in 
2.7.12, 3.5,2, and 3.6.0 and have added a note about using 'xcode-select 
--install' to the Mac/README files.  (The Developer's Guide already documents 
this.)  Thanks again, Tim.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
title: Python doesn't find Xcode 7 stub libraries -> Python doesn't find Xcode 
7 SDK stub libraries
versions:  -Python 3.4

___
Python tracker 

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



[issue25136] Python doesn't find Xcode 7 stub libraries

2016-02-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 157eb9d40bf9 by Ned Deily in branch '2.7':
Issue #25136: Add reference to 'xcode-select --install' to Mac README.
https://hg.python.org/cpython/rev/157eb9d40bf9

New changeset 61752c7ea9c7 by Ned Deily in branch '3.5':
Issue #25136: Add reference to 'xcode-select --install' to Mac README.
https://hg.python.org/cpython/rev/61752c7ea9c7

New changeset 2c4448bbed1f by Ned Deily in branch 'default':
Issue #25136: merge from 3.5
https://hg.python.org/cpython/rev/2c4448bbed1f

--

___
Python tracker 

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



[issue25136] Python doesn't find Xcode 7 stub libraries

2016-02-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 59d797915dca by Ned Deily in branch '2.7':
Issue #25136: Support Apple Xcode 7's new textual SDK stub libraries.
https://hg.python.org/cpython/rev/59d797915dca

New changeset b0490b8af7aa by Ned Deily in branch '3.5':
Issue #25136: Support Apple Xcode 7's new textual SDK stub libraries.
https://hg.python.org/cpython/rev/b0490b8af7aa

New changeset db6c1308eb31 by Ned Deily in branch 'default':
Issue #25136: merge from 3.5
https://hg.python.org/cpython/rev/db6c1308eb31

--
nosy: +python-dev

___
Python tracker 

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



[issue26302] cookies module allows commas in keys

2016-02-24 Thread Jason R. Coombs

Jason R. Coombs added the comment:

Thanks Anish for the patch, now slated for Python 3.5.2 and Python 3.6.

--
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



[issue26426] email examples: incorrect use of email.headerregistry.Address

2016-02-24 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue26176] EmailMessage example doesn't work

2016-02-24 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue26302] cookies module allows commas in keys

2016-02-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 758cb13aaa2c by Anish Shah  in branch '3.5':
Issue #26302: Correctly identify comma as an invalid character for a cookie 
(correcting regression in Python 3.5).
https://hg.python.org/cpython/rev/758cb13aaa2c

New changeset 91eb7ae951a1 by Jason R. Coombs in branch 'default':
Issue #26302: merge from 3.5
https://hg.python.org/cpython/rev/91eb7ae951a1

--
nosy: +python-dev

___
Python tracker 

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



[issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1

2016-02-24 Thread STINNER Victor

STINNER Victor added the comment:

> Could you write a test?

Done.

--
Added file: http://bugs.python.org/file42020/wrap_lenfunc-2.patch

___
Python tracker 

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



[issue26424] QPyNullVariant

2016-02-24 Thread STINNER Victor

STINNER Victor added the comment:

Not a bug in *Python*.

--
nosy: +haypo
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue26424] QPyNullVariant

2016-02-24 Thread Ronald Oussoren

Ronald Oussoren added the comment:

This appears to be an issue with the QGis application and not a problem with 
Python itself.

See the following URL for support on QGis: 


Regards,

  Ronald

--

___
Python tracker 

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



[issue26426] email examples: incorrect use of email.headerregistry.Address

2016-02-24 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report. This is a duplicate of issue 26176. Would you like to 
send a patch?

--
nosy: +berker.peksag
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> EmailMessage example doesn't work

___
Python tracker 

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



[issue26426] email examples: incorrect use of email.headerregistry.Address

2016-02-24 Thread Jakub Wilk

New submission from Jakub Wilk:

https://docs.python.org/3/library/email-examples.html#examples-using-the-provisional-api
 contains the following code:

from email.headerregistry import Address
...
msg['From'] = Address("Pepé Le Pew", "p...@example.com")
msg['To'] = (Address("Penelope Pussycat", "penel...@example.com"),
 Address("Fabrette Pussycat", "fabre...@example.com"))

But Address takes just the username, not the whole email address, as the second 
argument. So this should be written as:

msg['From'] = Address("Pepé Le Pew", "pepe", "example.com")
...

or:

msg['From'] = Address("Pepé Le Pew", addr_spec="p...@example.com")
...

--
assignee: docs@python
components: Documentation
messages: 260796
nosy: docs@python, jwilk
priority: normal
severity: normal
status: open
title: email examples: incorrect use of email.headerregistry.Address

___
Python tracker 

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



[issue26387] Crash calling sqlite3_close with invalid pointer

2016-02-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage:  -> test needed
versions:  -Python 3.4

___
Python tracker 

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



[issue26387] Crash calling sqlite3_close with invalid pointer

2016-02-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26415] Out of memory, trying to parse a 35MB dict

2016-02-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26421] string_richcompare invalid check Py_NotImplemented

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If your type is not PyStringObject, why it has the Py_TPFLAGS_STRING_SUBCLASS 
flag set?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26425] 'TypeError: object of type 'NoneType' has no len()' in 'splitdrive'

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is not related to issue22587. The problem is that 
sysconfig.get_config_var("CC") returns None. This may be a bug in the distutils 
package, in the bsddb3 extension, in MinGW32, or in user configuration.

--
components: +Distutils
nosy: +dstufft, eric.araujo, serhiy.storchaka

___
Python tracker 

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



[issue26049] Poor performance when reading large xmlrpc data

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is no special infrastructure. You can just provide two files. One script 
should implement simple server that produces large output. Other script should 
implement the client that makes a number of requests and measure the time. Of 
course you can implement this in one file using multiprocessing if you prefer.

--

___
Python tracker 

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



[issue26405] tkinter askopenfilename doubleclick issue on windows

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thus this is not Python bug.

--
resolution:  -> third party
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



[issue25801] ResourceWarning in test_zipfile64

2016-02-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue26405] tkinter askopenfilename doubleclick issue on windows

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Can't reproduce the bug on Linux.

Try to run pure Tcl/Tk script (install ActiveTcl and use the "wish" command). 
If the bug is reproduced, this is Tk bug.

--
nosy: +terry.reedy
Added file: http://bugs.python.org/file42019/issue26405.tcl

___
Python tracker 

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



[issue25995] os.walk() consumes a lot of file descriptors

2016-02-24 Thread Martin Panter

Martin Panter added the comment:

The change seems to be causing some Windows buildbot failures 
:

==
ERROR: test_walk_bad_dir (test.test_os.BytesWalkTests)
--
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\test_os.py", line 
931, in test_walk_bad_dir
root, dirs, files = next(walk_it)
  File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\test\test_os.py", line 
1027, in walk
for broot, bdirs, bfiles in os.walk(os.fsencode(top), **kwargs):
  File "C:\buildbot.python.org\3.5.kloth-win64\build\lib\os.py", line 372, in 
walk
entries = list(scandir(top))
TypeError: os.scandir() doesn't support bytes path on Windows, use Unicode 
instead

==
ERROR: test_walk_bottom_up (test.test_os.BytesWalkTests)
ERROR: test_walk_prune (test.test_os.BytesWalkTests)

Was this line

entries = list(scandir(top))

meant to be

entries = list(scandir_it)

--
nosy: +martin.panter
status: closed -> open

___
Python tracker 

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



[issue26386] tkinter - Treeview - .selection_add and selection_toggle

2016-02-24 Thread Anish Shah

Changes by Anish Shah :


--
nosy:  -anish.shah

___
Python tracker 

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



[issue25913] base64.a85decode adobe flag incorrectly utilizes <~ as a marker causing error

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Soren for your report, thank you Swati for your patch, and thank you 
Martin for your review.

--
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage: test needed -> 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



[issue25913] base64.a85decode adobe flag incorrectly utilizes <~ as a marker causing error

2016-02-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ce5bf3290621 by Serhiy Storchaka in branch '3.5':
Issue #25913: Leading <~ is optional now in base64.a85decode() with adobe=True.
https://hg.python.org/cpython/rev/ce5bf3290621

New changeset 90d5473b8673 by Serhiy Storchaka in branch 'default':
Issue #25913: Leading <~ is optional now in base64.a85decode() with adobe=True.
https://hg.python.org/cpython/rev/90d5473b8673

--
nosy: +python-dev

___
Python tracker 

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



[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-24 Thread STINNER Victor

STINNER Victor added the comment:

I like the idea of enhance code writing exception reports, I'm strongly opposed 
to modify repr() to ignore exceptions. I would to be noticed when repr() fails 
badly.

I like how the logging module catchs any formating error and logs an error when 
the formatting fails.

--

___
Python tracker 

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



[issue26386] tkinter - Treeview - .selection_add and selection_toggle

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is the patch with tests.

But I like the idea to make the selection_*() methods conforming with the 
delete() and detach() methods in 3.6.

--
keywords: +patch
stage: test needed -> patch review
Added file: http://bugs.python.org/file42018/ttk_treeview_selection.patch

___
Python tracker 

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



[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-24 Thread STINNER Victor

STINNER Victor added the comment:

I reviewed unraisable-continue.v4.patch, comments on Rietveld.

Would it be possible to include at least the name of the exception type in the 
error message? It's less likely than writing Py_TYPE(obj)->tp_name failed, than 
error in exc.__str() no?

--

___
Python tracker 

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



[issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1

2016-02-24 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Integer overflow in wrap_lenfunc() on 64-bit build of Windows -> Integer 
overflow in wrap_lenfunc() on 64-bit build of Windows with len > 2**31-1

___
Python tracker 

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



[issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows

2016-02-24 Thread STINNER Victor

STINNER Victor added the comment:

> You need to call `x.__len__()` explicitly.

Ah ok :-) I didn't read carefully the initial message.

Attached patch should fix the issue on Python 2.7. It uses the same function 
than builtin_len() to cast the C Py_ssize_t to a Python int or long.

--
keywords: +patch
Added file: http://bugs.python.org/file42017/wrap_lenfunc.patch

___
Python tracker 

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



[issue26423] Integer overflow in wrap_lenfunc() on 64-bit build of Windows

2016-02-24 Thread STINNER Victor

Changes by STINNER Victor :


--
title: __len__() returns 32 bit int on windows leading to overflows -> Integer 
overflow in wrap_lenfunc() on 64-bit build of Windows

___
Python tracker 

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



[issue26423] __len__() returns 32 bit int on windows leading to overflows

2016-02-24 Thread Georg Brandl

Georg Brandl added the comment:

You need to call `x.__len__()` explicitly.

--

___
Python tracker 

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



[issue26423] __len__() returns 32 bit int on windows leading to overflows

2016-02-24 Thread STINNER Victor

STINNER Victor added the comment:

I tested Python 2.7 on Windows, downloaded from python.org:

* 32-bit:

  - 'x'*(2**31+5) fails with OverflowError as expected
  - len('x' * (sys.maxsize // 2)) returns 2**30-1 as a Python int
  - for length larger with 'x' * (sys.maxsize // 2), I get a MemoryError, 
probably because of a integer overflow in the C code, or maybe because malloc() 
failed, I don't know

* 64-bit:

  - len('x' * (2**32 + 5)) returns 2**32 + 5 (a positive number) as a Pyhon long
  - len('x' * (2**31 + 5)) returns 2**31 + 5 (a positive number) as a Pyhon long
  - len('x' * (2**31 - 5)) returns 2**31 - 5 (a positive number) as a Pyhon int

Limits :

* 32-bit: sys.maxint == 2**31-1, sys.maxsize == 2**31-1 == sys.maxint
* 64-bit: sys.maxint == 2**31-1, sys.maxsize == 2**63-1


It looks like the issue is specific to Python compiled by Continuum ("Anaconda" 
flavor)?

--
nosy: +pitrou

___
Python tracker 

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



[issue26423] __len__() returns 32 bit int on windows leading to overflows

2016-02-24 Thread Mark Dickinson

Mark Dickinson added the comment:

> This is a 32-bit build ("win32"), no?

No. "win32" appears for both 32-bit and 64-bit builds on Windows. This is a 
64-bit build. `sys.maxint` is 2**31 - 1, and `sys.maxsize` is 2**63 - 1. 
They're not equal.

I can reproduce the issue with a stock Python, on both 2.7 and 3.5.

--
components: +Interpreter Core
priority: normal -> high
stage:  -> needs patch

___
Python tracker 

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



[issue26423] __len__() returns 32 bit int on windows leading to overflows

2016-02-24 Thread STINNER Victor

STINNER Victor added the comment:

> __len__() always returns an int which on windows machines is tied to the size 
> of a c long and is always 32 bits even if it's compiled for 64 bit.

Hum, I don't understand this statement. It looks like the code uses Py_ssize_t 
everywhere and Py_ssize_t is supposed to be able to store a whole pointer, so 
be 64-bit when Python is compiled in 64-bit mode.

> Python 2.7.8 |Anaconda 2.1.0 (64-bit)| (default, Jul  2 2014, 15:12:11) [MSC 
> v.1500 64 bit (AMD64)] on win32

This is a 32-bit build ("win32"), no? max.size is 2147483647 on 32-bit mode if 
I recall correctly. On 64-bit, it's 9223372036854775807. By the way, on 64-bit, 
sys.maxsize == sys.maxint.


In Python 2:

len(obj) => builtin_len() => PyObject_Size() which returns a Py_ssize_t

For string, PyObject_Size() => string_length() => Py_SIZE(obj) => ((PyVarObject 
*)obj)->ob_size

PyVarObject.ob_size has the type Py_ssize_t.

builtin_len() gets a Py_ssize_t which is converted to a Python int or long with 
PyInt_FromSsize_t().

PyInt_FromSsize_t() creates an int if the value fits into a C long, or it calls 
_PyLong_FromSsize_t().


Difference in Python 3:

builtin_len() also gets a Py_ssize_t, but it calls PyLong_FromSsize_t() (since 
Python short integers as gone, long became int in Python 3).

string_length() is replaced with unicode_length() => PyUnicode_GET_LENGTH() => 
(PyASCIIObject *)obj)->length and PyASCIIObject.length type is Py_ssize_t.

--
nosy: +haypo

___
Python tracker 

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



[issue26424] QPyNullVariant

2016-02-24 Thread MARTA Roggero

New submission from MARTA Roggero:

Good morning,

I use the latest version of QGIS (Lyon) in MAC and have se the default Python 
version 2.7. Moreover, I have installed all the required python modules and 
GDAL.

It was working before, but now, when I click on the "Browse" button in Vector-> 
Geoprocessing->Union, it returns the following error (actually, it returns this 
error whenever I click on any "browse" button in QGIS):

Error during execution of Python code :

TypeError: QgsEncodingFileDialog(QWidget parent=None, QString 
caption=QString(), QString directory=QString(), QString filter=QString(), 
QString encoding=QString()): argument 3 has unexpected type 'QPyNullVariant' 
Traceback (most recent call last):
  File 
"/Applications/QGIS.app/Contents/Resources/python/plugins/fTools/tools/doGeoprocessing.py",
 line 125, in outFile
(self.shapefileName, self.encoding) = ftools_utils.saveDialog(self)
  File 
"/Applications/QGIS.app/Contents/Resources/python/plugins/fTools/tools/ftools_utils.py",
 line 327, in saveDialog
fileDialog = QgsEncodingFileDialog(parent, 
QCoreApplication.translate("fTools", "Save output shapefile"), dirName, 
filtering, encode)
TypeError: QgsEncodingFileDialog(QWidget parent=None, QString 
caption=QString(), QString directory=QString(), QString filter=QString(), 
QString encoding=QString()): argument 3 has unexpected type 'QPyNullVariant'


Versione Python: 2.7.10 (default, Oct 23 2015, 18:05:06) [GCC 4.2.1 Compatible 
Apple LLVM 7.0.0 (clang-700.0.59.5)] 
Versione di QGIS: 2.12.1-Lyon Lyon, exported 


I cannot enter the path manually. It does not allow me to click in the blank 
field.

Thanks for every answer,
Marta

--
components: Macintosh
messages: 260772
nosy: MARTA Roggero, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: QPyNullVariant
type: compile error
versions: Python 2.7

___
Python tracker 

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



[issue26404] socketserver context manager

2016-02-24 Thread Aviv Palivoda

Aviv Palivoda added the comment:

Updated the patch:
1. Did the changes requested in the CR.
2. Changed the example's in wsgiref.simple_server to use context manager.
3. Added What's New entry.

--
Added file: http://bugs.python.org/file42016/socketserver_context_manager3.patch

___
Python tracker 

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



[issue26423] __len__() returns 32 bit int on windows leading to overflows

2016-02-24 Thread Mark Dickinson

Mark Dickinson added the comment:

If I understand the report correctly, this affects Python 3, too. Adding 3.5 
and 3.6 to the versions.

--
nosy: +mark.dickinson
versions: +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



[issue16823] Python quits on running tkinter code with threads

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I don't know. I'm unable to reproduce the bug on Linux.

--

___
Python tracker 

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



[issue26049] Poor performance when reading large xmlrpc data

2016-02-24 Thread Cédric Krier

Cédric Krier added the comment:

Is there an infrastructure already in place for such microbenchmark?

--

___
Python tracker 

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



[issue26422] printing 1e23 and up is incorrect

2016-02-24 Thread Mark Dickinson

Changes by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue26049] Poor performance when reading large xmlrpc data

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you please provide a microbenchmark that exposes the benefit of this 
optimization?

--

___
Python tracker 

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



[issue26302] cookies module allows commas in keys

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM. Do you want to commit the patch Jason?

--

___
Python tracker 

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



[issue22836] Broken "Exception ignored in:" message on exceptions in __repr__

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Surely changing the behavior of repr() can be made only in the default branch. 
this issue needs the patch for all versions.

I don't know whether this is the best solution, but the patch looks good enough 
to me at this moment. If you have no doubts feel free to commit it Martin.

--
assignee:  -> martin.panter
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



[issue25770] expose name, args, and kwargs from methodcaller

2016-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I don't like the name "keywords". May be I'm not right. Needed opinions of 
other core developers.

--

___
Python tracker 

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