[issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell

2014-07-21 Thread Charles-François Natali

Charles-François Natali added the comment:

>> rdmurray@pydev:~/python/p34>python -c 'import resource; 
>> print(resource.getrlimit(resource.RLIMIT_NOFILE))'
>> (1024L, 1048576L)
>
> Oh, 1 million files is much bigger than 4 thousand files (4096).
>
> The test should only test FD_SETSIZE + 10 files, the problem is to get 
> FD_SETSITE:

We could cap it to let's say 2**16, it's larger than any possible
FD_SETSIZE (which are usually low since fd_set are often allocated on
the stack and select() doesn't scale well behind that anyway).

But I don't see anything wrong with the test, it's really the buildbot
setting which is to blame: I expect other tests to fail with such a
low max virtual memory.

--

___
Python tracker 

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



[issue16778] Logger.findCaller needs to be smarter

2014-07-21 Thread Vinay Sajip

Vinay Sajip added the comment:

> Maybe simply having a class list

Thanks, I'm aware of this approach and have considered it. The current patch's 
skipCallers API seems better than exposing an internal list, but I have held 
off implementing this in the hope that an approach based on frame annotations 
can be used.

--

___
Python tracker 

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



[issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX

2014-07-21 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I just confirmed that clang only uses the LSB for _Bool values by looking at 
the assembly generated for the following code:


#include 
#include 

int main(void)
{
_Bool x;
*(unsigned char*)&x = 42;
printf("%d\n", (int)x);
return 0;
}


The attached patch fixes the issue for me. The new testcase fails without the 
changes to _struct.c and passes with those changes.

--
Added file: http://bugs.python.org/file36010/issue-22012.txt

___
Python tracker 

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



[issue22012] struct.unpack('?', '\x02') returns (False,) on Mac OSX

2014-07-21 Thread Ronald Oussoren

Ronald Oussoren added the comment:

The last draf of ISO C '11: 
.

This says that _Bool is large enough to store 0 and 1, and that conversion of 
any integer data to _Bool results in 0 or 1.  If I interpret the document 
correctly there is no conforming way to create a value of _Bool that has a 
value other than 0 or 1, and that should mean clang's behavior is not a bug.

BTW. I haven't tested my patch on a PPC system yet (where sizeof(bool) != 1), 
and won't be able to do so until I'm back home (I'm currently at EuroPython)

--
keywords: +needs review, patch
stage:  -> patch review

___
Python tracker 

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



[issue17695] _sysconfigdata broken with universal builds on OSX

2014-07-21 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Sure... The issue is still present. To demonstrate the problem:

arch -i386 ./python.exe
Python 3.5.0a0 (default:9b450b19aa11+, Jul 21 2014, 10:03:38) 
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.maxsize
2147483647
>>> import sysconfig
>>> sysconfig.get_config_var('SIZEOF_LONG')
8
>>> 

This is on a machine that can run 64-bit code and uses a fat binary with i386 
and x86_64 support. The script generating _sysconfigdata.py used the x86_64 
code and hence created data that's only valid for the x86_64 binary.

It's easy enough to to create a patch that reproduces the preprocessor code in 
pymacconfig.h in sysconfig.py, but I'm not sure if that is the right fix in 
particular due to the vagueness of the sysconfig API.  

A short rant:

IMHO the current API of sysconfig is underspecified and tied way to much the 
arbitrary details of the CPython build system (not the actual function keys, 
but the set of information that can be retrieved). There is no documentation at 
all on which keys are present and what there meaning is. As an example, there 
have been a number of issues in the past where users tried to use the value for 
key that's only meant to be used at CPython build time and users complained 
that the value didn't work for them with an installed CPython.

--
stage:  -> needs patch

___
Python tracker 

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



[issue22021] shutil.make_archive() root_dir do not work

2014-07-21 Thread Weinan Li

New submission from Weinan Li:

set root_dir do not work

output:
=
Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit 
(AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import shutil
>>> shutil.make_archive("tmp.tar.gz", "gztar", "c:/xjtu", "c:/tmp")
'C:\\Python34\\tmp.tar.gz.tar.gz'
=

source code of make_archive()
=
756save_cwd = os.getcwd()
757if root_dir is not None:
758if logger is not None:
759logger.debug("changing into '%s'", root_dir)
760base_name = os.path.abspath(base_name)
761if not dry_run:
762os.chdir(root_dir)
...
...
782try:
783filename = func(base_name, base_dir, **kwargs)
784finally:
=

base_name is set before chdir, so the archive always be created in cwd, whether 
set root_dir or not.
so, line 760 should be move below line 762

--
components: Library (Lib)
messages: 223568
nosy: DemoHT
priority: normal
severity: normal
status: open
title: shutil.make_archive()  root_dir do not work
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



[issue22021] shutil.make_archive() root_dir do not work

2014-07-21 Thread Ezio Melotti

Ezio Melotti added the comment:

Thanks for the report, do you want to provide a patch?
(You can check the devguide if you need more information.)

--
keywords: +easy
nosy: +ezio.melotti, hynek, tarek
stage:  -> needs patch

___
Python tracker 

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



[issue8706] accept keyword arguments on most base type methods and builtins

2014-07-21 Thread Julien Palard

Julien Palard added the comment:

I think for some builtins it may be usefull to have keyword arguments, in the 
case they take more than one parameter.

Typically, it's impossible to write:

self.drop_elements(partial(isinstance, type(lxml.etree.Comment)))

Because isinstance take its argument in the "other" order, we may bypass this 
using keywords arguments:


self.drop_elements(partial(isinstance, type=type(lxml.etree.Comment)))

But isinstance refuses keyword arguments, so there is no way to write this 
without a lambda:

self.drop_elements(lambda x: isinstance(x,
   type(lxml.etree.Comment)))

With is cool and work, I agree, it's just an example to explicitly show why 
keywords argument may be cool: functools.partial.

--
nosy: +Julien.Palard

___
Python tracker 

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



[issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell

2014-07-21 Thread R. David Murray

R. David Murray added the comment:

That is the only test that fails for lack of memory.  And it's not the 
buildbot, it's my development virtual machine.  Having the test suite be killed 
when I do a full test run is...rather annoying.

--

___
Python tracker 

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



[issue22021] shutil.make_archive() root_dir do not work

2014-07-21 Thread R. David Murray

R. David Murray added the comment:

I believe this is working as designed, although the documentation does not make 
that clear.  root dir is the root directory of the *created archive*, it has 
nothing to do with where the archive file itself is placed.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, r.david.murray

___
Python tracker 

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



[issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell

2014-07-21 Thread Charles-François Natali

Charles-François Natali added the comment:

Alright, I'll cap the value then (no need to expose FD_SETSIZE).

--

___
Python tracker 

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



[issue22018] signal: accept socket for signal.set_wakeup_fd()

2014-07-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6b536f0516ea by Victor Stinner in branch 'default':
Issue #22018: Add _testcapi.raise_signal()
http://hg.python.org/cpython/rev/6b536f0516ea

--
nosy: +python-dev

___
Python tracker 

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



[issue22018] signal: accept socket for signal.set_wakeup_fd()

2014-07-21 Thread STINNER Victor

STINNER Victor added the comment:

> My worry is that somehow a program has a fd that refers to both a file and a 
> socket. But I agree that changing the API is not a great option either.

Well, when I read again my patch and played with it, I saw that it has 
different issues:

- a Windows socket handle is not an int, but a pointer: Python SOCKET_T type 
should be used instead

- when send() fails, we should reuse the code from socketmodule.c to raise an 
exception: we may need to check GetLastError() on Windows

I rewrote my patch to add a new function signal.set_wakeup_socket() instead of 
trying to guess if the file descriptor is a socket or a file. I adopted a 
similar approach in the PEP 446 with os.set_inheritable() and 
os.set_handle_inheritable() for the same reason: support sockets on Windows, 
socket.socket.set_inheritable() uses os.set_inheritable() on UNIX and 
os.set_handle_inheritable() on Windows.

signal.set_wakeup_socket() now takes a socket.socket object and returns the 
previous socket object (or None).

In the new patch, signal.set_wakeup_fd() and Py_SetWakeupFd() function are 
unchanged, which is more safer regarding to backward compatibility!

The first call to signal.set_wakeup_socket() imports the _socket module.

The Visual Studio still needs to be modified to add the dependency to the 
WinSock library ("ws2_32.lib"), just for the send() function.

--
Added file: http://bugs.python.org/file36011/signal_socket-2.patch

___
Python tracker 

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



[issue16748] Make CPython test package discoverable

2014-07-21 Thread Zachary Ware

Changes by Zachary Ware :


--
dependencies: +Make full use of test discovery in test subpackages
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue22002] Make full use of test discovery in test subpackages

2014-07-21 Thread Zachary Ware

Zachary Ware added the comment:

Thank you, Brett and David.

@Mark: This issue is a continuation of the #16748 effort (#16748 is a 
meta-issue for this kind of thing) and unrelated to #10572 (though this will 
add a feature to test.support that can be useful for the scattered test 
packages).

--

___
Python tracker 

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



[issue22002] Make full use of test discovery in test subpackages

2014-07-21 Thread Zachary Ware

Zachary Ware added the comment:

Victor, could you give me a yay or nay on the test_asyncio change?

--
nosy: +haypo

___
Python tracker 

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



[issue22018] signal: accept socket for signal.set_wakeup_fd()

2014-07-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 42cf963e3ab1 by Victor Stinner in branch 'default':
Issue #22018: signal.set_wakeup_fd() now raises an OSError instead of a
http://hg.python.org/cpython/rev/42cf963e3ab1

--

___
Python tracker 

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



[issue22005] datetime.__setstate__ fails decoding python2 pickle

2014-07-21 Thread Edward O

Edward O added the comment:

The code works when using encoding='bytes'. Thanks Tim for the suggestion.

So this is not a bug, but is there any sense in having encoding='ASCII' by 
default in pickle ?

--

___
Python tracker 

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



[issue22018] Add a new signal.set_wakeup_socket() function

2014-07-21 Thread STINNER Victor

Changes by STINNER Victor :


--
title: signal: accept socket for signal.set_wakeup_fd() -> Add a new 
signal.set_wakeup_socket() function

___
Python tracker 

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



[issue22018] Add a new signal.set_wakeup_socket() function

2014-07-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7a1737033a23 by Victor Stinner in branch 'default':
Issue #22018: Hum, set_wakeup_fd() still raises ValueError on Windows
http://hg.python.org/cpython/rev/7a1737033a23

--

___
Python tracker 

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



[issue22003] BytesIO copy-on-write

2014-07-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Pretty sure this approach is broken. What about the alternative approach of 
> specializing for Bytes?

That would certainly sound good enough, to optimize the common case.

Also, it would be nice if you could add some tests to the patch (e.g. to stress 
the bytearray case). Thank you!

--

___
Python tracker 

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



[issue22003] BytesIO copy-on-write

2014-07-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

As for whether the "checking for a readonly view" approach is broken, I don't 
know: that part of the buffer API is still mysterious to me. Stefan, would you 
have some insight?

--
nosy: +skrah

___
Python tracker 

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



[issue22013] Add at least minimal support for thread groups

2014-07-21 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue22003] BytesIO copy-on-write

2014-07-21 Thread Stefan Krah

Stefan Krah added the comment:

I think checking for a readonly view is fine.  The protocol is this:

  1) Use the PyBUF_WRITABLE flag in the request. Then the provider must
 either have a writable buffer or else deny the request entirely.

  2) Omit the PyBUF_WRITABLE flag in the request.  Then the provider can
 return a writable or a readonly buffer, but must set the readonly flag
 correctly AND export the same type of buffer to ALL consumers.

It is not possible to ask for a readonly buffer explicitly, but the
readonly flag in the Py_Buffer struct should always be set correctly.

It is hard to guess the original intention of the PEP-3118 authors, but
in practice "readonly" means "immutable" here.  IMO a buffer provider would
be seriously broken if a readonly buffer is mutated in any way.

--

___
Python tracker 

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



[issue22022] test_pathlib: shutil.rmtree() sporadic failures on Windows

2014-07-21 Thread STINNER Victor

New submission from STINNER Victor:

Sometimes, test_pathlib fails because shutil.rmtree() cannot remove a test 
directory. Example:

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/4833/steps/test/logs/stdio

==
ERROR: test_touch_common (test.test_pathlib.WindowsPathTest)
--
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 477, 
in rmtree
return _rmtree_unsafe(path, onerror)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 367, 
in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 376, 
in _rmtree_unsafe
onerror(os.rmdir, path, sys.exc_info())
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\shutil.py", line 374, 
in _rmtree_unsafe
os.rmdir(path)
OSError: [WinError 145] The directory is not empty: 
'C:\\buildbot.python.org\\3.x.kloth-win64\\build\\build\\test_python_3444\\@test_3444_tmp\\dirB'

The error comes from this cleanup function:

self.addCleanup(shutil.rmtree, BASE)

I don't understand how rmtree() can fail with "The directory is not empty".

Note: this buildbot runs 4 tests in parallel using the "-j4" command line 
option of regrtest.

--
components: Tests, Windows
keywords: buildbot
messages: 223584
nosy: haypo
priority: normal
severity: normal
status: open
title: test_pathlib: shutil.rmtree() sporadic failures on Windows
versions: 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



[issue22022] test_pathlib: shutil.rmtree() sporadic failures on Windows

2014-07-21 Thread Ned Batchelder

Ned Batchelder added the comment:

FWIW, every use of rmtree I have on Windows occasionally fails this way, 
parallelism seems not to be a factor.

--
nosy: +nedbat

___
Python tracker 

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



[issue22003] BytesIO copy-on-write

2014-07-21 Thread Stefan Krah

Stefan Krah added the comment:

The original wording in the PEP is this:

readonly

an integer variable to hold whether or not the memory is readonly. 1
means the memory is readonly, zero means the memory is writable.


To me this means that a hypothetical compiler that could figure
out at compile time that the readonly flag is set would be allowed
to put the buffer contents into the read-only data section.

--

___
Python tracker 

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



[issue22005] datetime.__setstate__ fails decoding python2 pickle

2014-07-21 Thread Tim Peters

Tim Peters added the comment:

@eddygeek, I'd still call something so unintuitive "a bug" - it's hard to 
believe this is the _intended_ way to get it to work.  So I'd keep this open 
until someone with better knowledge of intent chimes in.

--

___
Python tracker 

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



[issue21822] KeyboardInterrupt during Thread.join hangs that Thread

2014-07-21 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue22003] BytesIO copy-on-write

2014-07-21 Thread David Wilson

David Wilson added the comment:

Stefan,

Thanks for digging here. As much as I'd love to follow this interpretation, it 
simply doesn't match existing buffer implementations, including within the 
standard library.

For example, mmap.mmap(..., flags=mmap.MAP_SHARED, prot=mmap.PROT_READ) will 
produce a read-only buffer, yet mutability is entirely at the whim of the 
operating system. In this case, "immutability" may be apparent for years, until 
some machine has memory pressure, causing the shared mapping to be be flushed, 
and refreshed from (say, incoherent NFS storage) on next access.

I thought it would be worth auditing some of the most popular types of buffer 
just to check your interpretation, and this was the first, most obvious 
candidate.

Any thoughts? I'm leaning heavily toward the Bytes specialization approach

--

___
Python tracker 

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



[issue22022] test_pathlib: shutil.rmtree() sporadic failures on Windows

2014-07-21 Thread Zachary Ware

Zachary Ware added the comment:

This looks like a duplicate of #19811, which was closed as a duplicate of 
#19629.

--
nosy: +zach.ware
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> support.rmtree fails on symlinks under Windows

___
Python tracker 

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



[issue19811] test_pathlib: "The directory is not empty" error on os.rmdir()

2014-07-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1db5cde4958f by Victor Stinner in branch '3.4':
Issue #19811, #22022: test_pathlib uses support.rmtree() instead of
http://hg.python.org/cpython/rev/1db5cde4958f

New changeset e405bcbf761c by Victor Stinner in branch 'default':
Merge Python 3.4
http://hg.python.org/cpython/rev/e405bcbf761c

--
nosy: +python-dev

___
Python tracker 

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



[issue19629] support.rmtree fails on symlinks under Windows

2014-07-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 28bb1aa9ca3d by Victor Stinner in branch '3.4':
Issue #19629: Fix support.rmtree(), use os.lstat() to check if the file is a
http://hg.python.org/cpython/rev/28bb1aa9ca3d

New changeset e405bcbf761c by Victor Stinner in branch 'default':
Merge Python 3.4
http://hg.python.org/cpython/rev/e405bcbf761c

--
nosy: +python-dev

___
Python tracker 

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



[issue22022] test_pathlib: shutil.rmtree() sporadic failures on Windows

2014-07-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1db5cde4958f by Victor Stinner in branch '3.4':
Issue #19811, #22022: test_pathlib uses support.rmtree() instead of
http://hg.python.org/cpython/rev/1db5cde4958f

New changeset e405bcbf761c by Victor Stinner in branch 'default':
Merge Python 3.4
http://hg.python.org/cpython/rev/e405bcbf761c

--
nosy: +python-dev

___
Python tracker 

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



[issue20064] PyObject_Malloc is not documented

2014-07-21 Thread Zachary Ware

Zachary Ware added the comment:

It appears that PyObject_Realloc and PyObject_Free are also not documented; 
they should be along with PyObject_Malloc.

I also left a couple of comments on Rietveld.

--
nosy: +zach.ware
stage: needs patch -> patch review
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue22023] PyUnicode_FromFormat is broken on python 2

2014-07-21 Thread Alex Gaynor

New submission from Alex Gaynor:

http://hg.python.org/cpython/file/2.7/Objects/unicodeobject.c#l840

Specifically it calls "PyObject_Str", which will return a PyStringObject * 
(cast to a PyObject *), and then calls "PyUnicode_GET_SIZE", which is of course 
totally incorrect.

This code was originally back-ported from 3.0 -> 2.6, so I imagine no one 
caught the bug then.

--
components: Interpreter Core, Unicode
messages: 223594
nosy: alex, ezio.melotti, haypo
priority: normal
severity: normal
status: open
title: PyUnicode_FromFormat is broken on python 2
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



[issue1745108] 2.5.1 curses panel segfault in new_panel on aix 5.3

2014-07-21 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy: +David.Edelsohn
type:  -> crash
versions: +Python 2.7, 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



[issue21597] Allow turtledemo code pane to get wider.

2014-07-21 Thread Lita Cho

Lita Cho added the comment:

Ping! Just wanted to see what the status was on getting this patch reviewed. I 
hope your eye is feeling better, Terry!

--

___
Python tracker 

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



[issue22023] PyUnicode_FromFormat is broken on python 2

2014-07-21 Thread Alex Gaynor

Alex Gaynor added the comment:

It's worth noting that this function is replete with incorrect assumptions 
about unicode vs. strings that came from the backport, the one I initially 
pointed out was merely the first.

The motivation for this issue is the SSL module backport (issue21308) for the 
record :-)

--

___
Python tracker 

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



[issue21965] Add support for Memory BIO to _ssl

2014-07-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The C part of the patch looks roughly ok to me (modulo a couple of comments). 
However, we must now find a way to expose this as a Python-level API.

--

___
Python tracker 

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



[issue6699] IDLE: Warn user about overwriting a file that has a newer version on filesystem

2014-07-21 Thread Mark Lawrence

Mark Lawrence added the comment:

The latest patch reflects msg112886 and msg149117 so I believe it should be 
committed.

--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue22003] BytesIO copy-on-write

2014-07-21 Thread David Wilson

David Wilson added the comment:

I'm not sure how much work it would be, or even if it could be made sufficient 
to solve our problem, but what about extending the buffers interface to include 
a "int stable" flag, defaulting to 0?

It seems though, that it would just be making the already arcane buffers 
interface even more arcane simply for the benefit of our specific use case

--

___
Python tracker 

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



[issue22003] BytesIO copy-on-write

2014-07-21 Thread Stefan Krah

Stefan Krah added the comment:

I'm sure many exporters aren't setting the right flags; on the other hand
we already hash memoryviews based on readonly buffers, assuming they are
immutable.

--

___
Python tracker 

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



[issue22023] PyUnicode_FromFormat is broken on python 2

2014-07-21 Thread STINNER Victor

STINNER Victor added the comment:

Python 3 has many unit tests for PyUnicode_FromFormat(): see 
test_unicode.test_from_format().

--

___
Python tracker 

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



[issue19629] support.rmtree fails on symlinks under Windows

2014-07-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c026ed24a211 by Victor Stinner in branch '3.4':
Issue #19629: Add missing "import stat"
http://hg.python.org/cpython/rev/c026ed24a211

New changeset 168cd3d19fef by Victor Stinner in branch 'default':
(Merge 3.4) Issue #19629: Add missing "import stat"
http://hg.python.org/cpython/rev/168cd3d19fef

--

___
Python tracker 

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



[issue21793] httplib client/server status refactor

2014-07-21 Thread Demian Brecht

Demian Brecht added the comment:

Removed draft status code, removed S from VARIANTS_

--
Added file: http://bugs.python.org/file36012/issue21793_2.patch

___
Python tracker 

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



[issue22024] Add to shutil the ability to wait until files are definitely deleted

2014-07-21 Thread Zachary Ware

New submission from Zachary Ware:

As suggested by Martin in msg170717, shutil should grow some way to block until 
a given file/directory is actually deleted, due to Windows' scheme of not 
actually deleting a file until all handles to it are closed.

This could take the form of a 'wait=False' parameter to rmtree that causes 
rmtree to block until the file/dir is gone (which could mean blocking 
indefinitely), or a new function "wait_until_deleted(name, timeout=None)".

Related issues: #15946, #7443, #19629

--
components: Library (Lib)
keywords: easy
messages: 223604
nosy: zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Add to shutil the ability to wait until files are definitely deleted
type: enhancement
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



[issue21964] inconsistency in list-generator comprehension with yield(-from)

2014-07-21 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue12855] linebreak sequences should be better documented

2014-07-21 Thread Zachary Ware

Changes by Zachary Ware :


--
stage:  -> patch review
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3

___
Python tracker 

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



[issue21964] inconsistency in list-generator comprehension with yield(-from)

2014-07-21 Thread STINNER Victor

STINNER Victor added the comment:

> For `g1`: it returns a generator because the listcomp contains a `yield from`.

IMO it's a bug: [... for ... in ...] must create a list.

--

___
Python tracker 

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



[issue22025] webbrowser.get(command_line) does not support Windows-style path separators

2014-07-21 Thread Dan O'Reilly

New submission from Dan O'Reilly:

Currently, when webbrowser.get() is passed a "using" argument that consists of 
a command line string like 
"C:\Users\dan\AppData\Local\Google\Chrome\Application\chrome.exe %s", it will 
use shlex.split(command_line) to tokenize the string. However, when given 
Windows-style path separators (as is likely to be the case on Windows), 
shlex.split returns the path with all the separators removed:

>>> cmd = 
>>> "C:\\Users\\oreild1\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe
>>>  %s"
>>> shlex.split(cmd)
['C:Usersoreild1AppDataLocalGoogleChromeApplicationchrome.exe', '%s']

Of course, this means the browser object returned is useless. I'm not sure what 
the preferred way to fix this is: either document that POSIX-style path 
separators are required (even on Windows), or pass posix=False to shlex.split 
if we're running Windows.

--
components: Library (Lib)
messages: 223606
nosy: dan.oreilly
priority: normal
severity: normal
status: open
title: webbrowser.get(command_line) does not support Windows-style path 
separators
type: behavior
versions: Python 2.7, Python 3.1, 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



[issue21822] KeyboardInterrupt during Thread.join hangs that Thread

2014-07-21 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +neologix, pitrou, tim.peters
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



[issue22026] 2.7.8 ttk Button text display problem

2014-07-21 Thread Les Bothwell

New submission from Les Bothwell:

My system: Windows 7 64 bit.  Python 2.7.8 (32 bit)
There's a problem with ttk button label text truncation when using large fonts 
on 2.7.8.  2.7.6 works Ok.  With 2.7.6, increasing the font size in a ttk style 
makes the button large enough to display the text properly.  With 2.7.8 the 
button seems to be large enough but the text is truncated on the right.  See 
attached file for pics.
Since issue 21665 is not closed yet, is this a side effect of ttk build 
problems?

This displays the problem..
from Tkinter import *
import ttk

from oxogame import *

class MainWindow(Frame):
def __init__(self, master=None):
" Initialise main window with controls "
Frame.__init__(self, master)
master.title('Font problem')
ttk.Style().configure('Square.TButton', font='Arial 24 bold', width=1, 
height=1, padding=(6,0))

ttk.Button(self, state=NORMAL, text='X', 
style='Square.TButton').pack(side=LEFT)
ttk.Button(self, state=NORMAL, text='O', 
style='Square.TButton').pack(side=LEFT)
self.pack(side=LEFT, fill=None, expand=0)

if __name__ == "__main__":
root = Tk()
root.resizable(0, 0)
root.attributes("-toolwindow", 1)
MainWindow(root).mainloop()

--
components: Tkinter
files: ttk_font.pdf
messages: 223607
nosy: les.bothwell
priority: normal
severity: normal
status: open
title: 2.7.8 ttk Button text display problem
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file36013/ttk_font.pdf

___
Python tracker 

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



[issue21822] KeyboardInterrupt during Thread.join hangs that Thread

2014-07-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This works for me under Linux.

--

___
Python tracker 

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



[issue22024] Add to shutil the ability to wait until files are definitely deleted

2014-07-21 Thread Jeremy Kloth

Changes by Jeremy Kloth :


--
nosy: +jkloth

___
Python tracker 

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



[issue22025] webbrowser.get(command_line) does not support Windows-style path separators

2014-07-21 Thread Dan O'Reilly

Dan O'Reilly added the comment:

Attached is a patch for the latter approach.

--
keywords: +patch
Added file: http://bugs.python.org/file36014/web.patch

___
Python tracker 

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



[issue1702036] Make Turtle thread-safe so it does not crash

2014-07-21 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy: +Lita.Cho

___
Python tracker 

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



[issue22027] RFC 6531 (SMTPUTF8) support in smtplib

2014-07-21 Thread Milan Oberkirch

New submission from Milan Oberkirch:

This patch is related to and depends on issue 21725. I put it here for review, 
it can be applied (maybe with small changes) as soon as issue 21725 is fixed.

--
components: email
files: smtplib_smtputf8_issue21725-dependent.patch
keywords: patch
messages: 223610
nosy: barry, jesstess, pitrou, r.david.murray, zvyn
priority: normal
severity: normal
status: open
title: RFC 6531 (SMTPUTF8) support in smtplib
type: enhancement
versions: Python 3.5
Added file: 
http://bugs.python.org/file36015/smtplib_smtputf8_issue21725-dependent.patch

___
Python tracker 

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



[issue22003] BytesIO copy-on-write

2014-07-21 Thread David Wilson

Changes by David Wilson :


Added file: http://bugs.python.org/file36016/cow4.patch

___
Python tracker 

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



[issue22003] BytesIO copy-on-write

2014-07-21 Thread David Wilson

David Wilson added the comment:

Hi Stefan,

How does this approach in reinit() look? We first ask for a writable buffer, 
and if the object obliges, immediately copy it. Otherwise if it refused, ask 
for a read-only buffer, and this time expect that it will never change.

This still does not catch the case of mmap.mmap. I am not sure how do deal with 
mmap.mmap. There is no way for it to export PROT_READ as a read-only buffer 
without permitted mutation, so the only options seem to either be a) remove 
buffer support from mmap, or b) blacklist it in bytesio(!).


Antoine, I have padded out the unit tests a little. test_memoryio.py seems the 
best place for them. Also modified test_sizeof(), although to the way this test 
is designed seems inherently brittle to begin with. Now it is also sensitive to 
changes in Py_buffer struct.


Various other changes:

* __new__ once again returns a valid, open, empty BytesIO, since the 
alternative breaks pickling.

* reinit() preserves existing BytesIO state until it knows it can succeed, 
which fixes another of the pickle tests.

* setstate() had CHECK_CLOSED() re-added, again for the pickle tests.


Probably the patch guts could be rearranged again, since the definition of the 
functions is no longer as clear as it was in cow3.patch.

--

___
Python tracker 

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



[issue22023] PyUnicode_FromFormat is broken on python 2

2014-07-21 Thread STINNER Victor

STINNER Victor added the comment:

Here is a patch fixing %S and %R formats and supporting %li and %zi. It fixes 
also %S, %R and %V for non-ASCII characters.

PyUnicode_FromFormat() of Python 2 doesn't support width, precision and 
padding. For example, "%100i" does crash. For %S, %R and %V, the function 
decodes byte strings from ISO-8859-1 in Python 2, whereas it decodes from UTF-8 
in Python 3.

--
keywords: +patch
Added file: http://bugs.python.org/file36017/unicode_fromformat.patch

___
Python tracker 

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



[issue22023] PyUnicode_FromFormat is broken on python 2

2014-07-21 Thread Alex Gaynor

Alex Gaynor added the comment:

Hi Victor, thanks for working on this. I don't know the Unicode codebase that 
well, but this looks like an obvious improvement to me (much less broken :-)).

--

___
Python tracker 

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



[issue21976] Fix test_ssl.py to handle LibreSSL versioning appropriately

2014-07-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4dac45f88d45 by Antoine Pitrou in branch '3.4':
Issue #21976: Fix test_ssl to accept LibreSSL version strings.
http://hg.python.org/cpython/rev/4dac45f88d45

New changeset 98aec1d9e2a0 by Antoine Pitrou in branch 'default':
Issue #21976: Fix test_ssl to accept LibreSSL version strings.
http://hg.python.org/cpython/rev/98aec1d9e2a0

--
nosy: +python-dev

___
Python tracker 

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



[issue21976] Fix test_ssl.py to handle LibreSSL versioning appropriately

2014-07-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 33fc081285b2 by Antoine Pitrou in branch '2.7':
Issue #21976: Fix test_ssl to accept LibreSSL version strings.
http://hg.python.org/cpython/rev/33fc081285b2

--

___
Python tracker 

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



[issue21976] Fix test_ssl.py to handle LibreSSL versioning appropriately

2014-07-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This should be fixed now. Thank you very much!

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



[issue20898] Missing 507 response description

2014-07-21 Thread Demian Brecht

Demian Brecht added the comment:

Being this is tagged for 3.5, I've refactored status codes as part of #21793. 
Should that be accepted and merged, that will also clear up this issue.

--

___
Python tracker 

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



[issue13128] httplib debuglevel on CONNECT doesn't print response headers

2014-07-21 Thread Demian Brecht

Demian Brecht added the comment:

Attached a simple fix to the problem as written, matching logging method of 
HTTPResponse.begin().

--
nosy: +demian.brecht
Added file: http://bugs.python.org/file36018/issue13128.patch

___
Python tracker 

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



[issue14301] xmlrpc client transport and threading problem

2014-07-21 Thread Demian Brecht

Changes by Demian Brecht :


--
nosy: +demian.brecht

___
Python tracker 

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



[issue21536] extension built with a shared python cannot be loaded with a static python

2014-07-21 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +barry

___
Python tracker 

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



[issue21933] Allow the user to change font sizes with the text pane of turtledemo

2014-07-21 Thread Lita Cho

Lita Cho added the comment:

I have  a version of this working with Ctrl-plus and Ctrl-minus. However, there 
is a bug with Tk 8.5.9 where binding to MouseWheel  crashes Tkinter for Macs 
(issue10731), which I am running into. I need to update Tkinter to see if this 
works.

--

___
Python tracker 

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



[issue21933] Allow the user to change font sizes with the text pane of turtledemo

2014-07-21 Thread Lita Cho

Lita Cho added the comment:

Here is a patch for changing the font size using the scroll wheel. I also added 
the shortcuts "Ctrl-plus" to increase the font size and "Ctrl-minus" to 
decrease the font size.

However, since the MouseWheel is now bound to changing the font
size, the canvas won't scroll. I can try to fix this so that the mousewheel 
only changes the font size if the text pane is highlighted. But that might not 
be intuitive. Thoughts?

Note, this patch also includes the window sash (issue21597). They are sort of 
dependent since I am also redefining the onResize method, so I clumped all the 
bindings to one method. But if you want that to be separate, I can try to make 
it into two separate patches.

--
keywords: +patch
Added file: http://bugs.python.org/file36019/window_pane_font_size.patch

___
Python tracker 

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



[issue1702036] Make Turtle thread-safe so it does not crash

2014-07-21 Thread Lita Cho

Changes by Lita Cho :


--
nosy: +jesstess

___
Python tracker 

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



[issue22028] Python 3.4.1 Installer ended prematurely (Windows msi)

2014-07-21 Thread Jim Conyngham

New submission from Jim Conyngham:

Python will not install on my Windows 7 (64-bit) OS.

I have repeatedly tried the install with variations (specifying an install 
directly vs. taking the default; running as admininstrator vs. not; with and 
without logging) and with multiple downloads python-3.4.1.msi, 
python-3.4.1.amd64.msi, and python-3.4.0.amd64.msi.  No matter what, it always 
fails with the same symptoms.

msiexec log file is attached.  There are a number of errors indicated on the 
log, but the one that's fatal seems to be this one:

MSI (s) (24:8C) [14:46:34:848]: Executing op: 
CustomActionSchedule(Action=UpdatePip,ActionType=3090,Source=F:\Shared.W7\Python34\python.exe,Target=-m
 ensurepip -U --default-pip,)
CustomAction UpdatePip returned actual error code 3 (note this may not be 100% 
accurate if translation happened inside sandbox)
MSI (s) (24:8C) [14:46:34:957]: Note: 1: 1722 2: UpdatePip 3: 
F:\Shared.W7\Python34\python.exe 4: -m ensurepip -U --default-pip 
MSI (s) (24:8C) [14:46:34:957]: Note: 1: 2262 2: Error 3: -2147287038 
Error 1722. There is a problem with this Windows Installer package. A program 
run as part of the setup did not finish as expected. Contact your support 
personnel or package vendor.  Action UpdatePip, location: 
F:\Shared.W7\Python34\python.exe, command: -m ensurepip -U --default-pip 
MSI (s) (24:8C) [14:46:41:292]: Note: 1: 2262 2: Error 3: -2147287038 
MSI (s) (24:8C) [14:46:41:292]: Product: Python 3.4.1 -- Error 1722. There is a 
problem with this Windows Installer package. A program run as part of the setup 
did not finish as expected. Contact your support personnel or package vendor.  
Action UpdatePip, location: F:\Shared.W7\Python34\python.exe, command: -m 
ensurepip -U --default-pip 

Action ended 14:46:41: InstallFinalize. Return value 3.

The same text, "There is a problem with this Windows Installer package. A 
program run as part of the setup did not finish as expected. Contact your 
support personnel or package vendor." appears in a message box at the point of 
failure.

--
components: Installation
files: python.log
messages: 223621
nosy: DieInSente
priority: normal
severity: normal
status: open
title: Python 3.4.1 Installer ended prematurely (Windows msi)
type: crash
versions: Python 3.4
Added file: http://bugs.python.org/file36020/python.log

___
Python tracker 

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



[issue22021] shutil.make_archive() root_dir do not work

2014-07-21 Thread Weinan Li

Weinan Li added the comment:

I don't think so.

In source code, it just change work dir to root_dir, do nothing, and then the 
change word dir back.

If it works as design, the "root_dir" will be meaningless. should be remove.

--

___
Python tracker 

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2014-07-21 Thread Zach Byrne

Zach Byrne added the comment:

I did something similar to BINARY_SUBSCR after looking at the 2.7 source as 
Raymond suggested. Hopefully I got my binaries straight this time :) The new 
patch includes Victor's inlining and my new subscript changes.

Platform of campaign orig:
Python version: 3.5.0a0 (default:c8ce5bca0fcd+, Jul 15 2014, 18:11:28) [GCC 
4.6.3]
Timer precision: 6 ns
Date: 2014-07-21 20:28:30

Platform of campaign patch:
Python version: 3.5.0a0 (default:c8ce5bca0fcd+, Jul 21 2014, 20:21:20) [GCC 
4.6.3]
Timer precision: 20 ns
Date: 2014-07-21 20:28:39

-+-+---
Tests    |    orig |  patch
-+-+---
1+2  |  118 ns (*) |  103 ns (-13%)
"1+2" ran 100 times  | 7.28 us (*) | 5.93 us (-19%)
x[1] |  120 ns (*) |   98 ns (-19%)
"x[1]" ran 100 times | 7.35 us (*) | 5.31 us (-28%)
-+-+---
Total    | 14.9 us (*) | 11.4 us (-23%)
-+-+---

--
Added file: http://bugs.python.org/file36021/21955_2.patch

___
Python tracker 

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



[issue1702036] Make Turtle thread-safe so it does not crash

2014-07-21 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
priority: normal -> low
versions: +Python 3.5 -Python 3.2

___
Python tracker 

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



[issue21793] httplib client/server status refactor

2014-07-21 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue22021] shutil.make_archive() root_dir do not work

2014-07-21 Thread Weinan Li

Weinan Li added the comment:

Here's the path

--
keywords: +patch
Added file: http://bugs.python.org/file36022/Issue22021.patch

___
Python tracker 

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



[issue19629] support.rmtree fails on symlinks under Windows

2014-07-21 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue22021] shutil.make_archive() root_dir do not work

2014-07-21 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +vadmium

___
Python tracker 

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



[issue22029] argparse - CSS white-space: like control for individual text blocks

2014-07-21 Thread paul j3

New submission from paul j3:

A number of the issues seek to customize the wrapping behavior in HelpFormatter 
- beyond what the current Formatter subclasses offer.

http://bugs.python.org/issue13923 and http://bugs.python.org/issue12806 - want 
a wrapping method that preserves existing \n, while still wrapping long lines.

http://bugs.python.org/issue12806#msg144353 - suggests that this formatter is 
similar to CSS property white-space: pre-wrap.

http://bugs.python.org/issue9399 - wants to write a pre-formatted 'license' 
text using a 'version'-like Action.
 -
http://bugs.python.org/issue13023  - wants to use 2 HelpFormatter subclasses at 
the same time (Raw and Defaults).

http://bugs.python.org/issue13023#msg144475: "Yeah, adding a formatter instance 
seems overkill for the usual case of wanting to preserve formatting of the 
epilog."

http://bugs.python.org/issue12284 - wants to put formatted examples in the 
epilog.

It might be easier to handle these issues if the user could designate how an 
individual text block (description, epilog, help) is to be formatted.  

HTML has a '' tag, CSS has 'white-space:' attribute (with 5 styles of 
wrapping and white-space handling).

The usage example might be something like:

parser = ArgumentParser(prog='PROG',
description = NoWrap('This is a description...'),
epilog = PreWrap('Multipoint epilog with examples...'),
)
parser.add_argument('-f', help='help with normal wrapping')

--
components: Library (Lib)
messages: 223625
nosy: BreamoreBoy, GraylinKim, bethard, denilsonsa, eric.araujo, jonash, paul.j3
priority: normal
severity: normal
status: open
title: argparse - CSS white-space: like control for individual text blocks
type: enhancement
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



[issue22029] argparse - CSS white-space: like control for individual text blocks

2014-07-21 Thread paul j3

paul j3 added the comment:

One way of marking a string for special wrap handing is to make it an instance 
of a subclass of 'str'.

This patch adds class _WhitespaceStyle(str), and 5 subclasses corresponding to 
the possible values of the CSS whitespace:.

 Normal
 Pre
 NoWrap
 PreLine
 PreWrap 

Together they define methods:

_str_format() - apply % style formatting
format() - apply the py3 {} style formatting
_split_lines() - style specific split_lines (may or may not pass through 
text_wrap)
_fill_text() - style specific fill_text (again without without test_wrap)

All return a text object of the same class (as self).  This make it possible to 
apply the % formatting to a string, and then apply the wrapping, without 
loosing class information:

Pre('sample text 
%(default)s')._str_format(dict(default='Boo'))._fill_text(30, '   ')

This subclass information is lost when the string pass through other 'str' 
operations, for example '\n'.join().  I needed to add _str_format because % 
formatting is applied to them before text_wrap.

The HelpFormatter has:

_str_format() - all the previous % formatting instances
_split_lines()
_fill_text()

These delegate the action to the respective white_space classes, or use the 
(default) Normal subclass if the text is a plain 'str'.

test_argparse.py has 2 test cases that use the 'Pre' class to replicate the 
behaviour of the Raw...HelpFormatter class tests.  Undoubtedly it needs further 
tests to handle all of these new classes.

I haven't made any doc changes yet.

I wrote these classes based on the descriptions of what the CSS options do, but 
I have not tried to compare the handling of sample text.  I can also imagine 
users wanting to refine the wrap handling further (e.g. 
http://bugs.python.org/issue12806).

I intend to write test files to show how these new classes could be used in the 
various issues that I listed in the previous post.



Since I had to collect the % formatting cases into one _str_format() method (to 
preserve class information), I am also exploring the use of Py3 {} formatting.  

Py3FormatHelpFormatter - a new Formatter class that redefines _str_format() to 
handle {} style formatting (if present).  I put this in a separate class 
because there is a slight possibility that existing code has text that might be 
confused for Py3 style formatting, e.g.

help='help text {default: %(default)s}'  

I think the issue of using Py3 formatting was raised and rejected.  So I'm not 
committed to including this feature.

--
keywords: +patch
Added file: http://bugs.python.org/file36023/issue22029_1.patch

___
Python tracker 

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



[issue21597] Allow turtledemo code pane to get wider.

2014-07-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

For me, FLAT is about as mushy as the default, while SOLID actually looks like 
a divider. I find the sash easier to 'grab' and move. I plan to go with that. 
If it looks substantially worse on some other system, we could make the 
argument conditional on sys.platform or whatever.

I plan to do a 'final' review in the next day and either commit or post a 
revision for testing on non-Windows systems.

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



[issue21933] Allow the user to change font sizes with the text pane of turtledemo

2014-07-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I plan to commit the sash patch before reviewing this. I would wait until then 
to do a separate patch.

--

___
Python tracker 

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



[issue21933] Allow the user to change font sizes with the text pane of turtledemo

2014-07-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

MOUSEWHEEL should continue to scroll.
CONTROL+MOUSEWHEEL should change font size, as you said at the beginning.
At least on Windows, this seems pretty standard: Internet Explorer, Firefox, 
Notepad++, LibreOffice (and, I imagin, OpenOffice, and Word), Thunderbird.  The 
only exception I can find that has a font size setting but ignores ^wheel is 
Command Prompt, which breaks multiple UI rules.  Notepad does not allow font 
resizing.

Get ^wheel to work right and I would like to add it to Idle, where ^wheel 
scrolls along with wheel.

^+ and ^- are pretty standard also, though LibreOffice does not recognize them. 
Perhaps this is because it is explicit cross platform.

We can conditionally not bind wheel events on Mac setups where it fails. Does 
#10731 have enough info to do that? In not... I have not yet looked into 
generating key/mouse events from code, but perhaps it would be possible to 
generate a wheel event inside try: except and unbind if there is an exception.

--

___
Python tracker 

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



[issue21933] Allow the user to change font sizes with the text pane of turtledemo

2014-07-21 Thread Lita Cho

Lita Cho added the comment:

Sounds good. I can wait till the sash code gets incorporated in order to
add in the font code.

I would have to generate a MOUSEWHEEL event and see if it fails. I have
generated mouse clicks before. I'll try to see if I can generate a
MOUSEWHEEL event and if it errors, not bind to it. Although it might be
hard for me to test, as I just updated my tcl/tk.

I will also try to figure out how to bind to Ctrl+MOUSEWHEEL and not just
MOUSEWHEEL.

Lita

On Mon, Jul 21, 2014 at 11:35 PM, Terry J. Reedy 
wrote:

>
> Terry J. Reedy added the comment:
>
> MOUSEWHEEL should continue to scroll.
> CONTROL+MOUSEWHEEL should change font size, as you said at the beginning.
> At least on Windows, this seems pretty standard: Internet Explorer,
> Firefox, Notepad++, LibreOffice (and, I imagin, OpenOffice, and Word),
> Thunderbird.  The only exception I can find that has a font size setting
> but ignores ^wheel is Command Prompt, which breaks multiple UI rules.
>  Notepad does not allow font resizing.
>
> Get ^wheel to work right and I would like to add it to Idle, where ^wheel
> scrolls along with wheel.
>
> ^+ and ^- are pretty standard also, though LibreOffice does not recognize
> them. Perhaps this is because it is explicit cross platform.
>
> We can conditionally not bind wheel events on Mac setups where it fails.
> Does #10731 have enough info to do that? In not... I have not yet looked
> into generating key/mouse events from code, but perhaps it would be
> possible to generate a wheel event inside try: except and unbind if there
> is an exception.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue21933] Allow the user to change font sizes with the text pane of turtledemo

2014-07-21 Thread Ned Deily

Ned Deily added the comment:

Lita, I tried the patch.  From the perspective of an OS X user, while I might 
expect that using the zoom gesture on a mousepad or using a mousewheel (the 
equivalent) to increase or decrease the font size, I would even more expect 
scrolling to work especially if scrollbars are present.  Clearly, scrolling is 
more important so, if it is not possible to bind Tk mousewheel events without 
affecting scrolling, I would abandon the mousewheel.  On OS X, the standard way 
to provide size adjustment (of fonts or images) is to provide "Bigger" or 
"Smaller" menu items with the standard keyboard shortcuts of 
Command-Shift-Equal (and Command-Equal) which is displayed as "Command +" (so 
the user on a US keyboard just presses the Command key and the =/+ key) and 
Command-Hyphen ("Command -").  The Apple OS X Human Interface Guidelines go 
into more detail and you can see these shortcuts in action in many standard OS 
X applications (TextEdit, Mail, Safari, etc).  As it stands today, turtledemo 
does not 
 use the standard OS X menu bar where these commands would normally be placed.  
And that's a bit of a separate problem because since turtledemo doesn't change 
the root menu it defaults to a Tk-provided one which includes things "Run 
Widget Demo" under the file menu.  To be a proper OS X app, turtledemo should 
customize the menu, at least removing the widget demo item and then it could 
add the Bigger and Smaller menu items to a Format menu.  Actually, the 
turtledemo Examples and Help pulldown options would ideally also be available 
in the standard menu hierarchy.  I'm not suggesting that is a requirement but 
that's what I think an OS X user would expect and what the Apple HIG would 
require.

https://developer.apple.com/library/mac/documentation/userexperience/conceptual/applehiguidelines/KeyboardShortcuts/KeyboardShortcuts.html
https://developer.apple.com/library/mac/documentation/userexperience/conceptual/applehiguidelines/Menus/Menus.html

--

___
Python tracker 

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