[issue25931] os.fork() command distributed in windows Python27 (in SocketServer module)

2016-06-02 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
resolution:  -> fixed
stage: needs patch -> commit review
status: open -> closed

___
Python tracker 

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



[issue25747] test_idle failure in leaks searching mode

2016-06-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

idlever.py is now gone in 3.6.

--

___
Python tracker 

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



[issue25931] os.fork() command distributed in windows Python27 (in SocketServer module)

2016-06-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a4c0208b10df by Gregory P. Smith in branch '2.7':
issue25931: document that socketserver.Forking* are unavailable on platforms
https://hg.python.org/cpython/rev/a4c0208b10df

--

___
Python tracker 

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



[issue25931] os.fork() command distributed in windows Python27 (in SocketServer module)

2016-06-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 015b86646d8e by Gregory P. Smith in branch 'default':
issue25931: document that socketserver.Forking* are unavailable on platforms
https://hg.python.org/cpython/rev/015b86646d8e

--

___
Python tracker 

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



[issue27184] Support path objects in the ntpath module

2016-06-02 Thread Eryk Sun

Eryk Sun added the comment:

Sorry, I must have missed or misunderstood something. PEP 519 discusses 
modifying os.path. For the os module it only discusses adding fspath and 
updating fsencode and fsdecode. It also discusses a new PyOS_FSPath C API, but 
without any discussion regarding its use in the implementation of the posix / 
nt module, or regarding what built-in os functions should support __fspath__.

--

___
Python tracker 

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



[issue27193] Tkinter Unresponsive With Special Keys

2016-06-02 Thread Ned Deily

Ned Deily added the comment:

Tkinter is essentially just a think wrapper around the Tk graphical toolkit. 
Keyboard modifier mappings are handled by Tk (or OS X), and not Tkinter.  
Unfortunately, for various reasons, how Tk handles keyboard modifiers varies 
somewhat among OS platforms (Windows-native, X11-based, and OS X-native) and 
even between versions of Tk on the same platform.  One source for more detailed 
information about modifier key differences is the following Tk wiki page:

http://wiki.tcl.tk/28331

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



[issue25931] os.fork() command distributed in windows Python27 (in SocketServer module)

2016-06-02 Thread Gregory P. Smith

Gregory P. Smith added the comment:

It may be worth rolling back the above two commits.  I'm not sure.  I'd like to 
see if anything else falls out of this during the beta phases.

There is a chance that some library has code similar to that found in 
test_socketserver.py that defines classes that inherit from the Forking type(s) 
but which are conditionally never used on Windows.  The above commit would 
break that.  I'm not sure how common that'll be.

--

___
Python tracker 

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



[issue27192] Keyboard Shortcuts Consistently Cause Crashes

2016-06-02 Thread Ned Deily

Ned Deily added the comment:

You are almost certainly seeing a crash due to a critical bug in the 
Apple-supplied version of Tk 8.5 on OS X systems up through at least OS X 
10.11.  See here for more information: 
https://www.python.org/download/mac/tcltk/#apple-8-5-9.

The solution is to use a Python that links with a more, up-to-date third-party 
version of Tcl and Tk, such as Pythons from python.org OS X installers and 
current versions of ActiveTcl from ActiveState:
https://www.python.org/download/mac/tcltk/

--
resolution: duplicate -> third party
superseder: Tkinter Unresponsive With Special Keys -> 

___
Python tracker 

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



[issue27185] Clarify Test Coverage for the String Module (test_pep292 is not easily discoverable)

2016-06-02 Thread Benjamin Peterson

Benjamin Peterson added the comment:

On Thu, Jun 2, 2016, at 18:28, Martin Panter wrote:
> 
> Martin Panter added the comment:
> 
> FWIW I doubt Git is any better at this than Mercurial:
> 
> 
> Git can automatically pick up file renames and copies when analysing the
> history, but has no special metadata for this. I understand Mercurial is
> the opposite (has metadata, but at least by default does not pick up
> copies and renames from the history). Perhaps that is what Benjamin was
> thinking of. I understand Git will only pick up movements of the majority
> of a file, not parts of files (unless something has changed recently).

git blame -C works quite well in my experience for detecting moved lines
of code.

In general, I think we shouldn't be afraid to reorganize code for fear
of breaking "VCS" history. The tools will catch up. (I think they
largely have already.) At worst, one must manually "follow" the move of
some code through history.

--

___
Python tracker 

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



[issue25931] os.fork() command distributed in windows Python27 (in SocketServer module)

2016-06-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3145242bc81f by Gregory P. Smith in branch 'default':
Issue25931: fix tests broken by the conditional define of socketserver.Forking*
https://hg.python.org/cpython/rev/3145242bc81f

--

___
Python tracker 

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



[issue20408] memoryview() constructor documentation error

2016-06-02 Thread Berker Peksag

Berker Peksag added the comment:

I think the safest solution is to change 'obj' to 'object' in memoryview 
documentation.

--
assignee:  -> docs@python
components: +Documentation -Interpreter Core
keywords: +easy
nosy: +berker.peksag, docs@python
stage: patch review -> needs patch
versions: +Python 3.6

___
Python tracker 

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



[issue19611] inspect.getcallargs doesn't properly interpret set comprehension code objects.

2016-06-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have no idea what relations Argument Clinic have with this issue.

--

___
Python tracker 

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



[issue27194] Tarfile superfluous truncate calls slows extraction.

2016-06-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +lars.gustaebel

___
Python tracker 

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



[issue27195] Crash when RawIOBase.write(b) evaluates b.format

2016-06-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +benjamin.peterson, pitrou, serhiy.storchaka, skrah, stutzbach

___
Python tracker 

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



[issue27184] Support path objects in the ntpath module

2016-06-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Please don't change os.path until all other module will be changed. It may be 
that os.path would not need any change at all.

--

___
Python tracker 

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



[issue27195] Crash when RawIOBase.write(b) evaluates b.format

2016-06-02 Thread Martin Panter

New submission from Martin Panter:

$ gdb --args ./python -c '
import io
class R(io.RawIOBase):
def writable(self): return True
def write(self, b):
print("About to evaluate {!r}.format".format(b))
b.format
print("Never reached")
   
b = io.BufferedWriter(R())
b.write(b"x")
b.flush()
'
[. . .]
(gdb) run
[. . .]
About to evaluate .format
python: Objects/stringobject.c:120: PyString_FromString: Assertion `str != 
NULL' failed.

Program received signal SIGABRT, Aborted.
0x771422a8 in raise () from /usr/lib/libc.so.6
(gdb) bt full
#0  0x771422a8 in raise () from /usr/lib/libc.so.6
No symbol table info available.
#1  0x7714372a in abort () from /usr/lib/libc.so.6
No symbol table info available.
#2  0x7713b1b7 in __assert_fail_base () from /usr/lib/libc.so.6
No symbol table info available.
#3  0x7713b262 in __assert_fail () from /usr/lib/libc.so.6
No symbol table info available.
#4  0x0046f7b8 in PyString_FromString (str=0x0)
at Objects/stringobject.c:120
size = 0
op = 0x77f9d160
__PRETTY_FUNCTION__ = "PyString_FromString"
#5  0x00562fec in memory_format_get (self=0x76ee4380)
at Objects/memoryobject.c:330
No locals.
#6  0x005587d5 in getset_get (descr=0x77fb93a8, 
obj=0x76ee4380, type=0x81da40 )
at Objects/descrobject.c:146
res = 0x77fb5580
#7  0x004611e6 in _PyObject_GenericGetAttrWithDict (
obj=0x76ee4380, name=0x77f9d160, dict=0x0) at Objects/object.c:1399
tp = 0x81da40 
descr = 0x77fb93a8
res = 0x0
f = 0x55876a 
dictoffset = 8675760
dictptr = 0xf74ab600
__PRETTY_FUNCTION__ = "_PyObject_GenericGetAttrWithDict"
#8  0x0046164a in PyObject_GenericGetAttr (obj=0x76ee4380, 
name=0x77f9d160) at Objects/object.c:1461
No locals.
#9  0x00460ab0 in PyObject_GetAttr (v=0x76ee4380, 
name=0x77f9d160) at Objects/object.c:1196
tp = 0x81da40 
#10 0x004d0dae in PyEval_EvalFrameEx (f=0x77e31c00, throwflag=0)
at Python/ceval.c:2541
[. . .]
#16 0x00421b0e in PyObject_CallMethodObjArgs (callable=0x77e601e0, 
name=0x77fc3820) at Objects/abstract.c:2751
args = 0x76cb94c0
tmp = 0x76ee4350
vargs = {{gp_offset = 24, fp_offset = 48, 
overflow_arg_area = 0x7fffddb0, 
reg_save_area = 0x7fffdcf0}}
#17 0x76a83283 in _bufferedwriter_raw_write (self=0x76ee1318, 
start=0x8ff710 "x", '\313' , ..., len=1) at 
/media/disk/home/proj/python/cpython/Modules/_io/bufferedio.c:1726
buf = {buf = 0x8ff710, obj = 0x0, len = 1, itemsize = 1, readonly = 1, 
  ndim = 1, format = 0x0, shape = 0x7fffdde0, strides = 0x0, 
  suboffsets = 0x0, smalltable = {9432288, 140737488346688}, 
  internal = 0x0}
memobj = 0x76ee4380
res = 0x7fffde60
n = 5605226
errnum = 0
#18 0x76a8360d in _bufferedwriter_flush_unlocked (self=0x76ee1318)
at /media/disk/home/proj/python/cpython/Modules/_io/bufferedio.c:1773
written = 0
n = 1
rewind = 0
#19 0x76a7faf6 in buffered_flush_and_rewind_unlocked (
self=0x76ee1318)
at /media/disk/home/proj/python/cpython/Modules/_io/bufferedio.c:756
res = 0x77fc8700
#20 0x76a7fd52 in buffered_flush (self=0x76ee1318, args=0x0)
at /media/disk/home/proj/python/cpython/Modules/_io/bufferedio.c:783
res = 0x76ee1318
#21 0x004d824c in call_function (pp_stack=0x7fffe078, oparg=0)
at Python/ceval.c:4334
meth = 0x76a7fc4f 
self = 0x76ee1318
flags = 4
tstate = 0x8461b0
na = 0
nk = 0
n = 0
pfunc = 0x77f151e8
func = 0x76cb86f0
x = 0x76ee1318
w = 0x77f151e8
[. . .]

--
components: IO
messages: 267038
nosy: martin.panter
priority: normal
severity: normal
status: open
title: Crash when RawIOBase.write(b) evaluates b.format
type: crash
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



[issue27194] Tarfile superfluous truncate calls slows extraction.

2016-06-02 Thread Jason Fried

Jason Fried added the comment:

I ran this on Linux ext4.  I didn't see much improvement on OSX with SSD.

--
Added file: http://bugs.python.org/file43139/test.py

___
Python tracker 

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



[issue27185] Clarify Test Coverage for the String Module (test_pep292 is not easily discoverable)

2016-06-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is even more complex, since you can't merge a revision with its parent.

A. Start at revision A.
B. Rename test_string to test_string_merged, giving revision B.
A. Update back to revision A.
C. Rename test_pep292 to test_string_merged, giving revision C.
D. Merge revisions B and C, and manually merge the contents of the two 
test_string_merged versions, giving revision D.
E. Rename test_string_merged to test_string, giving the final revision.

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

___
Python tracker 

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



[issue27194] Tarfile superfluous truncate calls slows extraction.

2016-06-02 Thread Jason Fried

New submission from Jason Fried:

With large tar file extracts I noticed that tarfile was slower than it should 
be.  Seems in linux that for large files (10MB) truncate is not always a free 
operation even when it should be a no-op. ex: File is already 10mb seek to end 
and truncate. 

I created a script to test the validity of this patch.  It generates two random 
tar archives containing 1024 files of 10mb each. The files are randomized so 
disk caching should not interfere. 

So to extract those 1g tar files the following was observed
Time Delta for TarFile: 148.23699307441711
Time Delta for FastTarFile: 107.71058106422424
Time Diff: 40.52641201019287 0.27338932859929255

--
components: Library (Lib)
files: truncate.patch
keywords: patch
messages: 267035
nosy: asvetlov, fried, lukasz.langa
priority: normal
severity: normal
status: open
title: Tarfile superfluous truncate calls slows extraction.
type: performance
versions: Python 3.5
Added file: http://bugs.python.org/file43138/truncate.patch

___
Python tracker 

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



[issue11501] distutils.archive_util should handle absence of zlib module

2016-06-02 Thread Berker Peksag

Berker Peksag added the comment:

Tests are already skipped if zlib is not available in 2.7. To backport 
test_make_zipfile_no_zlib we also need the 'patch' helper so I'm not sure it's 
worth it at this point.

--
nosy: +berker.peksag
status: open -> pending

___
Python tracker 

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



[issue26876] Extend MSVCCompiler class to respect environment variables

2016-06-02 Thread Steve Dower

Steve Dower added the comment:

I still want the behavior I described, since there's no value in overriding 
just the executable name but not the rest of the path.

For 2.7 I think this'll help with long term maintainability enough to be the 
Right Thing. For 3.5 I'm not as sure, but it's probably worth keeping the 
implementations consistent as long as we can justify it.

--

___
Python tracker 

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



[issue15243] Misleading documentation for __prepare__

2016-06-02 Thread Berker Peksag

Changes by Berker Peksag :


--
keywords: +easy
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[issue17352] Be clear that __prepare__ must be declared as a class method

2016-06-02 Thread Berker Peksag

Berker Peksag added the comment:

This is a duplicate of issue 15243.

--
nosy: +berker.peksag
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Misleading documentation for __prepare__

___
Python tracker 

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



Re: Python on Windows with linux environment

2016-06-02 Thread Muhammad Ali
On Friday, June 3, 2016 at 6:27:50 AM UTC+8, Eric S. Johansson wrote:
> On 6/2/2016 2:03 PM, Joel Goldstick wrote:
> > Although the OP is using Windows 7, according to recent articles,
> > Ubuntu is teaming with MS for Windows 10 to include a bash shell,
> > presumably with the package management of Ubuntu (debian), with pip
> > goodness and virtualenv and virtualenvwrapper.  That route should make
> > W10 and linux (ubuntu) nearly identical environments to deal with
> 
> had forgotten about that.  it should be released end of july and I am
> looking forward to the update! in the meantime, I'm suffering with
> cygwin :-)


Please send me the link through which I can get regular updates about this new 
release.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue19489] move quick search box above TOC

2016-06-02 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue17500] move PC/icons/source.xar to http://www.python.org/community/logos/

2016-06-02 Thread Matthias Klose

Changes by Matthias Klose :


--
nosy: +ned.deily, steve.dower

___
Python tracker 

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



[issue17500] move PC/icons/source.xar to http://www.python.org/community/logos/

2016-06-02 Thread Matthias Klose

Matthias Klose added the comment:

even for the window builds, I don't see any use of these icons for any build. I 
filed https://github.com/python/pythondotorg/issues/945 to make these files 
available as downloadable resources. However even if these are not accepted 
there, I think we should remove the PC/icons directory for all active branches.

--

___
Python tracker 

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



[issue23670] Modifications to support iOS as a cross-compilation target

2016-06-02 Thread Luke Taylor

Luke Taylor added the comment:

Are you aware of Pythonista? I have no affiliation, but I'm a fan of the app 
and the community surrounding it. See http://omz-software.com/pythonista/ for 
details. I'm sure communication with the developer of the app could yield some 
useful insights.

--
nosy: +Luke Taylor

___
Python tracker 

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



[issue25931] os.fork() command distributed in windows Python27 (in SocketServer module)

2016-06-02 Thread Martin Panter

Martin Panter added the comment:

This broke test_socketserver:

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/7709/steps/test/logs/stdio
0:08:57 [193/400/1] test_socketserver failed
test test_socketserver crashed -- Traceback (most recent call last):
  File 
"C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_socketserver.py", 
line 371, in 
class ForkingErrorTestServer(socketserver.ForkingMixIn, 
BaseErrorTestServer):
AttributeError: module 'socketserver' has no attribute 'ForkingMixIn'

I am with David that it may not be worthwhile churning the API like this. Just 
document the existing (in 3.5) status that even though the classes exist, they 
need a working os.fork(). Otherwise, everyone that references ForkingMixIn but 
doesn’t use it (like test_socketserver) will have to update their code for 3.6.

--
nosy: +martin.panter
versions: +Python 3.6

___
Python tracker 

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



[issue27193] Tkinter Unresponsive With Special Keys

2016-06-02 Thread Emanuel Barry

Changes by Emanuel Barry :


--
components: +Extension Modules
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue27192] Keyboard Shortcuts Consistently Cause Crashes

2016-06-02 Thread Emanuel Barry

Changes by Emanuel Barry :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Tkinter Unresponsive With Special Keys

___
Python tracker 

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



Re: for / while else doesn't make sense

2016-06-02 Thread Lawrence D’Oliveiro
On Friday, June 3, 2016 at 8:52:52 AM UTC+12, BartC wrote:
> Simple iterative for-loops are more of a DIY effort...

There is one case that Python handles more nicely than C. And that is iterating 
over a fixed set of values. E.g. in Python

for rendering in (False, True) :
...
#end for

versus the (slightly) more long-winded C:

for (bool rendering = false;;)
  {
...
if (rendering)
break;
rendering = true;
  } /*for*/
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue15476] Index "code object" and link to code object definition

2016-06-02 Thread Tommy Beadle

Tommy Beadle added the comment:

This restores the original code -> object items.

--
Added file: 
http://bugs.python.org/file43137/0001-Issue-15476-Make-code-object-its-own-entry-in-the-do.patch

___
Python tracker 

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



[issue27193] Tkinter Unresponsive With Special Keys

2016-06-02 Thread Harrison Chudleigh

New submission from Harrison Chudleigh:

When working on my program (the same one where I found Issue 27192), I tried 
adding keyboard shortcuts. I discovered that Tkinter doe not register the keys 
Alt, Command, Control, Fn, Shift and Caps Lock on a Mac.

--
components: Macintosh
messages: 267027
nosy: Harrison Chudleigh, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Tkinter Unresponsive With Special Keys
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



[issue27192] Keyboard Shortcuts Consistently Cause Crashes

2016-06-02 Thread Harrison Chudleigh

New submission from Harrison Chudleigh:

When trying to add keys to my program, I noticed that using the shortcuts 
Alt-e, Alt-i, Alt-n and Alt-u caused IDLE to consistently crash. No odd 
behavior was observed with the corresponding capital letters.

--
components: Macintosh
messages: 267026
nosy: Harrison Chudleigh, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Keyboard Shortcuts Consistently Cause Crashes
type: crash
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



[issue27179] subprocess uses wrong encoding on Windows

2016-06-02 Thread Dāvis

Dāvis added the comment:

if there's no console then os.device_encoding won't fail, it will just return 
None which means that ANSI codepage will be used like it currently is and so 
here it doesn't change anything, current behavior stays.
Also like I showed TextIOWrapper already calls device_encoding even if there's 
no console. And device_encoding doesn't actually use that fd it just checks if 
it's valid fd and then calls GetConsoleCP/GetConsoleOutputCP to get encoding.

--

___
Python tracker 

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



[issue27179] subprocess uses wrong encoding on Windows

2016-06-02 Thread Steve Dower

Steve Dower added the comment:

> There is right encoding, it's encoding that's actually used.

This is true, but it puts the decision entirely in the hands of the 
developer(s) of the two processes involved.

All IPC on Windows uses bytes, and encodings _always_ need to be negotiated by 
the processes involved. You can't reliably assume or infer anything. The 
closest you get is to assume that both processes are using the same MSVCRT 
version and have not changed the defaults (except Python changes the defaults, 
from text to binary, so that assumption is easily broken).

Using "cmd /u" is one way to negotiate with that process for the shell=True 
case, but all others basically just require an explicit encoding parameter so 
that it can be specified. IMHO, if we make Python default to UTF-8 and 
subprocess use utf_8:errors (mojibake is not acceptable by default) and "cmd 
/u", we cover enough common cases to minimise the need to explicitly specify. 
(A close second best is to default to the console CP if available and default 
locale otherwise.)

--

___
Python tracker 

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



[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-02 Thread Xiang Zhang

Xiang Zhang added the comment:

I'd like to help but it'll need some time. And I'd like to start after 
issue27164 is solved. zdict now also checks for 4GB limit.

--

___
Python tracker 

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



[issue27190] Check sqlite3_version before allowing check_same_thread = False

2016-06-02 Thread Berker Peksag

Changes by Berker Peksag :


--
components: +Extension Modules

___
Python tracker 

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



[issue27190] Check sqlite3_version before allowing check_same_thread = False

2016-06-02 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch. I'm not sure we can apply the patch to bugfix branches. 
You can use SQLITE_VERSION_NUMBER to check sqlite3 version.

--
nosy: +berker.peksag
stage:  -> patch review
versions: +Python 3.6

___
Python tracker 

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



[issue27191] Add formatting around methods in PEP 8

2016-06-02 Thread Berker Peksag

Berker Peksag added the comment:

Thanks!

--
nosy: +berker.peksag
resolution:  -> fixed
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



[issue27191] Add formatting around methods in PEP 8

2016-06-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bf7f369fb49a by Berker Peksag in branch 'default':
Issue #27191: Improve markup of PEP 8, patch by Ian Lee
https://hg.python.org/peps/rev/bf7f369fb49a

--
nosy: +python-dev

___
Python tracker 

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



xlrd 1.0.0 released!

2016-06-02 Thread Chris Withers

Ugh, and once again, this time with a corrected title...


On 02/06/2016 18:56, Chris Withers wrote:

Hi All,

Well, I've finally called it and tagged current master of xlrd as 1.0.0:

http://pypi.python.org/pypi/xlrd/1.0.0

This release includes the following changes since the last release:

- Official support, such as it is, is now for 2.6, 2.7, 3.3+

- Fixes a bug in looking up non-lowercase sheet filenames by ensuring 
that the sheet targets are transformed the same way as the 
component_names dict keys.


- Fixes a bug for ragged_rows=False when merged cells increases the 
number of columns in the sheet. This requires all rows to be extended 
to ensure equal row lengths that match the number of columns in the 
sheet.


- Fixes to enable reading of SAP-generated .xls files.

- support BIFF4 files with missing FORMAT records.

- support files with missing WINDOW2 record.

- Empty cells are now always unicode strings, they were a bytestring 
on Python2 and a unicode string on Python3.


- Fix for  inlineStr attribute without  child.

- Fix for a zoom of None causes problems on Python 3.

- Fix parsing of bad dimensions.

- Fix xlsx sheet->comments relationship.

Thanks to the following for their contributions to this release:

- Lars-Erik Hannelius
- Deshi Xiao
- Stratos Moro
- Volker Diels-Grabsch
- John McNamara
- Ville Skyttä
- Patrick Fuller
- Dragon Dave McKee
- Gunnlaugur Þór Briem

If you find any problems, please ask about them on the 
python-ex...@googlegroups.com list, or submit an issue on GitHub:


https://github.com/python-excel/xlrd/issues

Full details of all things Python and Excel related can be found here:

http://www.python-excel.org/

NB: If you would like to become the maintainer of xlwt, please get in 
touch! Neither myself nor John Machin have much time to drive things 
forward nowadays, hence the year or so between each release...


cheers,

Chris



--
https://mail.python.org/mailman/listinfo/python-list


xlrd 0.9.4 released!

2016-06-02 Thread Chris Withers

Hi All,

Well, I've finally called it and tagged current master of xlrd as 1.0.0:

http://pypi.python.org/pypi/xlrd/1.0.0

This release includes the following changes since the last release:

- Official support, such as it is, is now for 2.6, 2.7, 3.3+

- Fixes a bug in looking up non-lowercase sheet filenames by ensuring 
that the sheet targets are transformed the same way as the 
component_names dict keys.


- Fixes a bug for ragged_rows=False when merged cells increases the 
number of columns in the sheet. This requires all rows to be extended to 
ensure equal row lengths that match the number of columns in the sheet.


- Fixes to enable reading of SAP-generated .xls files.

- support BIFF4 files with missing FORMAT records.

- support files with missing WINDOW2 record.

- Empty cells are now always unicode strings, they were a bytestring on 
Python2 and a unicode string on Python3.


- Fix for  inlineStr attribute without  child.

- Fix for a zoom of None causes problems on Python 3.

- Fix parsing of bad dimensions.

- Fix xlsx sheet->comments relationship.

Thanks to the following for their contributions to this release:

- Lars-Erik Hannelius
- Deshi Xiao
- Stratos Moro
- Volker Diels-Grabsch
- John McNamara
- Ville Skyttä
- Patrick Fuller
- Dragon Dave McKee
- Gunnlaugur Þór Briem

If you find any problems, please ask about them on the 
python-ex...@googlegroups.com list, or submit an issue on GitHub:


https://github.com/python-excel/xlrd/issues

Full details of all things Python and Excel related can be found here:

http://www.python-excel.org/

NB: If you would like to become the maintainer of xlwt, please get in 
touch! Neither myself nor John Machin have much time to drive things 
forward nowadays, hence the year or so between each release...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
 - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


[issue27184] Support path objects in the ntpath module

2016-06-02 Thread Eryk Sun

New submission from Eryk Sun:

nt is the module name for posixmodule.c on Windows, so I'm changing the title 
to reference ntpath instead. 

Regarding nt, two of its built-in functions are exposed directly in ntpath. 
_isdir is imported as isdir, so it needs a wrapper to support __fspath__. Only 
pathlib uses _getfinalpathname, so for now I think it can be handled there. 
There's also nt._getdiskusage, which is only used by shutil.disk_usage. For 
some reason the PEP doesn't mention updating shutil to support __fspath__.

--
components: +Library (Lib), Windows
nosy: +eryksun, paul.moore, steve.dower, tim.golden, zach.ware
title: Support path objects in the nt module -> Support path objects in the 
ntpath module

___
Python tracker 

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



[issue27185] Clarify Test Coverage for the String Module (test_pep292 is not easily discoverable)

2016-06-02 Thread Martin Panter

Martin Panter added the comment:

FWIW I doubt Git is any better at this than Mercurial: 


Git can automatically pick up file renames and copies when analysing the 
history, but has no special metadata for this. I understand Mercurial is the 
opposite (has metadata, but at least by default does not pick up copies and 
renames from the history). Perhaps that is what Benjamin was thinking of. I 
understand Git will only pick up movements of the majority of a file, not parts 
of files (unless something has changed recently).

Perhaps Serhiy can clarify, but I imagine he was proposing something like this 
(which I have not tested):

A. Start at revision A
B. Remove test_string and rename test_pep292 in its place, giving revision B
C. Merge revisions A and B, and manually merge the contents of the two 
test_string versions, giving the final revision

--
nosy: +martin.panter

___
Python tracker 

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



[issue22890] StringIO.StringIO pickled in 2.7 is not unpickleable on 3.x

2016-06-02 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue27187] Relax __all__ location requirement in PEP 8

2016-06-02 Thread John Mark Vandenberg

Changes by John Mark Vandenberg :


--
nosy: +jayvdb

___
Python tracker 

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



Re: Recommendation for Object-Oriented systems to study

2016-06-02 Thread Lawrence D’Oliveiro
On Friday, June 3, 2016 at 12:16:02 AM UTC+12, Alan Evangelista wrote:

> The point was which programming language was better to teach object oriented
> concepts...

Object-orientation is not an end in itself. The point is what programming 
languages you should be exposed to, to get an idea of how to do PROGRAMMING.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Don't put your software in the public domain

2016-06-02 Thread Lawrence D’Oliveiro
On Friday, June 3, 2016 at 12:26:33 AM UTC+12, Marko Rauhamaa wrote:

> If the author has one right to their work, it is relinquishing all rights to
> that work.

In Europe, you don’t have that right.

> All works will eventually fall into the public domain anyway...

Not if certain large corporations have anything to say about it.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue22890] StringIO.StringIO pickled in 2.7 is not unpickleable on 3.x

2016-06-02 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

Unless I'm missing something, StringIO doesn't exist as a module in Python 3, 
as mentioned in 
https://docs.python.org/3.0/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit.

If you're trying to unpickle in 3.x an object pickled by 2.7.x, I'm not sure 
there is a guarantee that unpickling works for objects in modules that were 
renamed between 2.x and 3.x. This also doesn't work if you pickle a 
ConfigParser in 2.7 and unpickle it in 3.x.

--
nosy: +Jelle Zijlstra

___
Python tracker 

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



[issue25812] locale.nl_langinfo() can't decode value

2016-06-02 Thread Nina Zakharenko

Nina Zakharenko added the comment:

Adding the test below to test__locale.py will reproduce the issue under the 
following conditions:
- The locale `uk_UA` is installed on your system.
- 'uk_UA': (',', '\xa0') is added to the `known_numerics` dictionary in this 
test file

@unittest.skipUnless(nl_langinfo, "nl_langinfo is not available")
def test_lc_numeric_not_char_nl_langinfo(self):
# Test nl_langinfo against known values/
# It should still work if there's a mismatch between
# String & Numeric Locales
tested = False
for loc in candidate_locales:
try:
setlocale(LC_NUMERIC, loc)
except Error:
continue
for li, lc in ((RADIXCHAR, "decimal_point"),
(THOUSEP, "thousands_sep")):
if self.numeric_tester('nl_langinfo', nl_langinfo(li), lc, loc):
tested = True
if not tested:
self.skipTest('no suitable locales')

--
nosy: +nnja

___
Python tracker 

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



Re: for / while else doesn't make sense

2016-06-02 Thread Lawrence D’Oliveiro
On Friday, June 3, 2016 at 8:52:52 AM UTC+12, BartC wrote:
> One major objection was that C's 'for' isn't really a for-statement at 
> all (as it is understood in most other languages that haven't just 
> copied C's version), but is closer to a 'while' statement.

Apart from having local loop variables that get initialized just once. Not 
something you can fake with a “while” statement.

That’s what makes C’s for-statement so versatile.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: for / while else doesn't make sense

2016-06-02 Thread Lawrence D’Oliveiro
On Friday, June 3, 2016 at 8:09:21 AM UTC+12, Rob Gaddi wrote:
> Although your loop is really the _canonical_ use case for
> 
> for loopvar in range(initial_value, limit+1):
> processing
> if found_what_im_looking_for:
> break
> else:
> do_whatever_it_is_you_do_when_its_not_found

The reason why I don’t like this is that there are two ways out of the Python 
for-statement, and they are written quite differently. Why the asymmetry? 
Logically, all ways out of a loop are of equal significance.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue15476] Index "code object" and link to code object definition

2016-06-02 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue18751] A manager's server never joins its threads

2016-06-02 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue27191] Add formatting around methods in PEP 8

2016-06-02 Thread Ian Lee

New submission from Ian Lee:

Noticed a couple methods in the text that aren't backtick quoted.

--
assignee: docs@python
components: Documentation
files: rst-formatting.txt
messages: 267015
nosy: IanLee1521, barry, docs@python
priority: normal
severity: normal
status: open
title: Add formatting around methods in PEP 8
Added file: http://bugs.python.org/file43136/rst-formatting.txt

___
Python tracker 

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



[issue27187] Relax __all__ location requirement in PEP 8

2016-06-02 Thread Ian Lee

Ian Lee added the comment:

I added a comment on a pull request related to this that shows some of the 
cases that we probably don't want to allow: 
https://github.com/PyCQA/pycodestyle/pull/523#issuecomment-223464775

--

___
Python tracker 

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



[issue27190] Check sqlite3_version before allowing check_same_thread = False

2016-06-02 Thread Dave Sawyer

New submission from Dave Sawyer:

Starting in sqlite version 3.3.1 (Jan 2006) multiple threads can share the same 
connection. Python allows you do use this with the check_same_thread parameter 
of sqlite3.connect() method. It's almost certain users have a late enough 
version of sqlite that they can use this option. While we could document "check 
your version before using this feature" (see http://bugs.python.org/issue27113) 
it would be nicer to check the actual database for support. Code can be written 
and tested on one machine and deployed to another machine. Using this feature 
on an very old version of sqlite can crash or possibly corrupt the database.

--
files: sqlite_oldver_issue.txt
messages: 267013
nosy: Dave Sawyer
priority: normal
severity: normal
status: open
title: Check sqlite3_version before allowing check_same_thread = False
type: enhancement
Added file: http://bugs.python.org/file43135/sqlite_oldver_issue.txt

___
Python tracker 

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



[issue23061] Update pep8 to specify explicitly 'module level' imports at top of file

2016-06-02 Thread Ian Lee

Ian Lee added the comment:

Are there any other concerns with the patch that I would be able to clean up?

--
nosy: +barry

___
Python tracker 

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



[issue27187] Relax __all__ location requirement in PEP 8

2016-06-02 Thread Ian Lee

Changes by Ian Lee :


Added file: http://bugs.python.org/file43134/issue-27187-patch2.txt

___
Python tracker 

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



[issue15476] Index "code object" and link to code object definition

2016-06-02 Thread R. David Murray

R. David Murray added the comment:

Since the main object of the issue is to have a canonical reference to use for 
linking 'code object' from elsewhere in the text, I think that can be satisfied 
by existing _bltin-code-objects 'ref' link as Terry suggests, even though it is 
a bit awkward to use.  The changes to the index position are good, I think, as 
is having a direct index entry for 'code object'.  However, following the model 
laid down by 'class object', the existing index entries under object should not 
be lost, but instead the new 'code object' index links should be added.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue27113] sqlite3 connect parameter "check_same_thread" not documented

2016-06-02 Thread Dave Sawyer

Dave Sawyer added the comment:

Hi Thomas and Senthil, for the serialized setting I mentioned earlier "The 
serialized mode is default on both Mac and Windows so we can probably skip 
validating that. I did like mentioning the user needs to serialize the writes. 
They could use one thread for writing only or use locking. So, I just said to 
serialize."

to go into more detail, when serialize is set you don't need to worry that 
using multiple threads will WRECK your database. But, you still need to make 
sure your own writes get serialized or you will mix transactions together. Each 
connection only has one transaction in progress so if you share that connection 
between threads... watch out for your writes. Now if only one thread in your 
application writes and the other threads read you have no serialization issues 
to worry about. If two threads make updates without a threading.Lock than you 
can get 1.5 changes committed (and perhaps 0.5 later or if that had an error 
you might rollback that 0.5 of a transaction). You could also get the first 
thread to commit both changes and when the later thread calls commit get an 
error that is "no transaction in progress."

I thought "serialize" neatly encapsulated the two most common strategies here 
for shared connections - either a dedicated writer thread or using a python 
lock around your transactions. As Thomas points out you can also opt to give 
each thread its own connection... but then you don't need the check_same_thread 
parameter set to False as you are not sharing the connection.

--

___
Python tracker 

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



[issue27167] subprocess reports signal as negative exit status, not documented

2016-06-02 Thread Gregory P. Smith

Gregory P. Smith added the comment:

docs updated (7b12180481da and 19d77132f38d).

working on the error message update.

--

___
Python tracker 

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



Re: [Q] ImportError by __import__() on Python >= 3.4

2016-06-02 Thread MRAB

On 2016-06-02 15:04, Makoto Kuwata wrote:

Hi,

I have a trouble around __import__().
The following sample code works well on Python <= 3.3,
but it raises ImportError on Python >= 3.4.


## importtest.py
import sys, os, shutil

def test(name):
try:
## create 'foo/__init__.py' file
os.mkdir(name)
with open(name + "/__init__.py", 'w') as f:
f.write("X=1")
f.flush()
## ipmort 'foo' module
mod = __import__(name)
finally:
if os.path.isdir(name):
shutil.rmtree(name)

test("foo")# no errors
test("bar")# may raise error on Python >= 3.4. Why?


Output Example:

### No errors  (Python <= 3.3)
ubuntu$ export PYTHONPATH=.
ubuntu$ for x in 1 2 3 ; do /usr/bin/python3.3 importtest.py; done

### ImportError (Python >= 3.4)
ubuntu$ export PYTHONPATH=.
ubuntu$ for x in 1 2 3 ; do /usr/bin/python3.4 importtest.py; done
Traceback (most recent call last):
  File "tmp/importtest.py", line 19, in 
test("bar")# may raise error on Python >= 3.4. Why?
  File "tmp/importtest.py", line 13, in test
mod = __import__(name)
ImportError: No module named 'bar'


Please give me any advices or hints.
Thanks.


Things to try:

Does the order matter? If you try "bar" then "foo" does "foo" fail?

Does the directory matter?

Is there something called "bar" in the directory already?

What does the created "bar" directory contain? Does it really contain 
only "__init__.py"?


You're testing the script 3 times; on which iteration does it fail?

--
https://mail.python.org/mailman/listinfo/python-list


[issue27187] Relax __all__ location requirement in PEP 8

2016-06-02 Thread Ian Lee

Ian Lee added the comment:

I might also suggest that the entire "Version bookkeeping" section could be 
removed in this case, as it would be covered by my newly added dunder section.

--

___
Python tracker 

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



[issue25702] Link Time Optimizations support for GCC and CLANG

2016-06-02 Thread Gregory P. Smith

Gregory P. Smith added the comment:

the main part of this issue is done but it can't be closed until the 
dependencies listed are also dealt with.  un-assigning myself.

--
assignee: gregory.p.smith -> 
resolution:  -> fixed

___
Python tracker 

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



[issue27186] add os.fspath()

2016-06-02 Thread Dusty Phillips

Changes by Dusty Phillips :


Removed file: http://bugs.python.org/file43123/issue27186.buchuki.patch

___
Python tracker 

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



[issue25931] os.fork() command distributed in windows Python27 (in SocketServer module)

2016-06-02 Thread R. David Murray

R. David Murray added the comment:

Well, defined for 3.6, and "functional" for 2.7 and 3.5 docs.

--

___
Python tracker 

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



[issue25931] os.fork() command distributed in windows Python27 (in SocketServer module)

2016-06-02 Thread R. David Murray

R. David Murray added the comment:

Your news entry says "don't defining".  The doc note can say that the classes 
are only defined if the platform supports fork.

--

___
Python tracker 

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



[issue27186] add os.fspath()

2016-06-02 Thread Dusty Phillips

Dusty Phillips added the comment:

This patch adds fspath protocol and constructor initialization to pathlib.Path.

--
Added file: http://bugs.python.org/file43133/issue27186-pathlib.buchuki.patch

___
Python tracker 

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



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

2016-06-02 Thread Nick Coghlan

Nick Coghlan added the comment:

As Raymond notes, the main downside here is in terms of code complexity. 
However, the concrete gain is that APIs that rely on callable pickling, such as 
concurrent.futures with a ProcessPoolExecutor, would be consistently compatible 
with functools.partial:

>>> from concurrent.futures import ProcessPoolExecutor
>>> from functools import partial
>>> with ProcessPoolExecutor() as pool:
... pool.submit(print, "hello")
... pool.submit(partial(print, "hello"))
... 


hello
hello

At the moment, such code will fail if _functools is unavailable, since closures 
don't support pickling (unpickling functions involves looking them up by name, 
which isn't possible with closures)

The other main benefit is retaining the custom __repr__ when falling back to 
the Python implementation:

>>> partial(print, "hello")
functools.partial(, 'hello')

At the moment, the closure-based version instead gives:

>>> partial(print, "hello")
.newfunc at 0x7f4fd6e0aea0>

Preserving those two capabilities seems sufficiently worthwhile to me to 
justify the extra code complexity and the greater speed penalty when the 
accelerator module isn't available (I'm assuming that in runtimes using a JIT 
compiler the speed difference should be negligible in practice)

--

___
Python tracker 

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



[issue27187] Relax __all__ location requirement in PEP 8

2016-06-02 Thread Ian Lee

Ian Lee added the comment:

I think that it should be updated to specify that all dunders ('__all__', 
'__version__', '__author__', etc) should be placed after the module docstring 
and before any imports. See issue-27187-patch1.txt for a possible update.

--
Added file: http://bugs.python.org/file43132/issue-27187-patch1.txt

___
Python tracker 

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



[issue25931] os.fork() command distributed in windows Python27 (in SocketServer module)

2016-06-02 Thread Gregory P. Smith

Gregory P. Smith added the comment:

I made the change to not export the Forking names on Windows or other 
non-os.fork() supporting platforms in 3.6 only as it is arguably an API change, 
even though the names it removes would effectively be unusable on those 
platforms anyways.

the docs still need updating.

--
nosy: +gregory.p.smith
versions:  -Python 3.6

___
Python tracker 

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



[issue22797] urllib.request.urlopen documentation falsely guarantees that a URLError will be raised on errors

2016-06-02 Thread Alexander Liu

Alexander Liu added the comment:

Fixed the docs to specifically note that only protocol related errors raise the 
UrlError exception.

--
nosy: +alex_thebear
versions: +Python 3.6 -Python 3.4
Added file: http://bugs.python.org/file43131/urlopen_doc.patch

___
Python tracker 

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



[issue25931] os.fork() command distributed in windows Python27 (in SocketServer module)

2016-06-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d772400a1211 by Gregory P. Smith in branch 'default':
Issue #25931: Don't defining socketserver.Forking* names on platforms such
https://hg.python.org/cpython/rev/d772400a1211

--
nosy: +python-dev

___
Python tracker 

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



[issue27038] Make os.DirEntry exist

2016-06-02 Thread Jelle Zijlstra

Changes by Jelle Zijlstra :


--
keywords: +patch
Added file: http://bugs.python.org/file43130/issue27038.patch

___
Python tracker 

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



[issue26829] update docs: when creating classes a new dict is created for the final class object

2016-06-02 Thread R. David Murray

R. David Murray added the comment:

Thanks, Emily.

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



[issue26829] update docs: when creating classes a new dict is created for the final class object

2016-06-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 754118f8b3ce by R David Murray in branch '3.5':
#26829: Clarify that namespace is copied to a new __dict__ in instance creation.
https://hg.python.org/cpython/rev/754118f8b3ce

New changeset 5a4ace14b350 by R David Murray in branch 'default':
Merge: #26829: Clarify that namespace is copied to a new __dict__ in instance 
creation.
https://hg.python.org/cpython/rev/5a4ace14b350

--
nosy: +python-dev

___
Python tracker 

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



[issue25738] http.server doesn't handle RESET CONTENT status correctly

2016-06-02 Thread Susumu Koshiba

Susumu Koshiba added the comment:

Patched the behaviors when NO_CONTENT and RESET_CONTENT are sent via 
send_error(). According to RFCs, they aren't actually errors so sending them 
through send_response() seems to make the most sense, however.

send_error()'s behavior changes in this patch are:
 - Removed content-length field in the header for NO_CONTENT as per the RFC
 - Removed content-length field in the header for RESET_CONTENT also to comply 
with option c) mentioned in RFC7321 6.3.6

--
keywords: +patch
nosy: +Susumu Koshiba
versions: +Python 3.6
Added file: http://bugs.python.org/file43129/issue25738_http_reset_content.patch

___
Python tracker 

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



[issue27186] add os.fspath()

2016-06-02 Thread Jelle Zijlstra

Changes by Jelle Zijlstra :


Added file: http://bugs.python.org/file43128/issue27186-DirEntry-fspath.patch

___
Python tracker 

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



Re: [Q] ImportError by __import__() on Python >= 3.4

2016-06-02 Thread Makoto Kuwata
On Thu, Jun 2, 2016 at 11:15 PM, Michael Selik 
wrote:

>
>
> On Thu, Jun 2, 2016 at 10:06 AM Makoto Kuwata  wrote:
>
>> os.mkdir(name)
>> with open(name + "/__init__.py", 'w') as f:
>> f.write("X=1")
>> f.flush()
>>
>> Please give me any advices or hints.
>>
>
> This wasn't your question, but you don't need to flush the file. The
> ``with`` statement will automatically flush and close your file for you
> after you exit the block.
>

Thanks. I'm sure that with-statement close file, but not sure whether it
flushes or not.


Any hints or advices for ogiginal question?

--
regards,
makoto
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue26589] Add HTTP Response code 451

2016-06-02 Thread Martin Panter

Martin Panter added the comment:

Don’t forget to fix the RFC number (see review) :)

--

___
Python tracker 

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



[issue27185] Clarify Test Coverage for the String Module (test_pep292 is not easily discoverable)

2016-06-02 Thread Erin Braswell

Erin Braswell added the comment:

Hooray thank you everyone!

--

___
Python tracker 

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



[issue25702] Link Time Optimizations support for GCC and CLANG

2016-06-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f710dac07312 by Gregory P. Smith in branch '2.7':
Issue #25702: A --with-lto configure option has been added that will
https://hg.python.org/cpython/rev/f710dac07312

--

___
Python tracker 

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



xlwt 1.1.1 released!

2016-06-02 Thread Chris Withers

Hi All,

I'm pleased to announce the release of xlwt 1.1.1.

This release contains the following:

- Fix SST BIFF record in Python 3.

- Fix for writing ExternSheetRecord in Python 3.

- Add the ability to insert bitmap images from buffers as well as files.

- Official support for Python 3.5.

Thanks to "thektulu" and Lele Gaifax for the Python 3 fixes.
Thanks to Ross Golder for the support for inserting images from buffers.

If you find any problems, please ask about them on the 
python-ex...@googlegroups.com list, or submit an issue on GitHub:


https://github.com/python-excel/xlwt/issues

There's also details of all things Python and Excel related here:

http://www.python-excel.org/

NB: If you would like to become the maintainer of xlwt, please get in 
touch! Neither myself nor John Machin have much time to drive things 
forward nowadays, hence the year or so between each release...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
 - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


[issue26829] update docs: when creating classes a new dict is created for the final class object

2016-06-02 Thread Emily Morehouse

Emily Morehouse added the comment:

Trimmed down by keeping the more explicit explanation and taking into account 
suggestions.

--
Added file: http://bugs.python.org/file43127/26829-v3.patch

___
Python tracker 

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



[issue27185] Clarify Test Coverage for the String Module (test_pep292 is not easily discoverable)

2016-06-02 Thread R. David Murray

R. David Murray added the comment:

Thanks, Erin.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
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



[issue27185] Clarify Test Coverage for the String Module (test_pep292 is not easily discoverable)

2016-06-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 89abefdebf4d by R David Murray in branch '3.5':
#27185: move test_pep292 into test_string.
https://hg.python.org/cpython/rev/89abefdebf4d

New changeset c2d3d8c3e0bf by R David Murray in branch 'default':
Merge: #27185: move test_pep292 into test_string.
https://hg.python.org/cpython/rev/c2d3d8c3e0bf

--
nosy: +python-dev

___
Python tracker 

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



[issue15476] Index "code object" and link to code object definition

2016-06-02 Thread Tommy Beadle

Tommy Beadle added the comment:

The attached patch makes it so that 'code object' is its own 'top-level' entry 
in the index instead of being 'code' with an 'object' sub-item.  It also makes 
the links from the index go to the location in the documents just before the 
header instead of having the header be off-screen when the user navigates to it.

One thing about the ordering of the generated links, though, is that sphinx 
appears to generate them based on the alphabetical ordering of the path to the 
files that they're in:

c-api/code.rst
library/marshal.rst
library/stdtypes.rst
reference/datamodel.rst

If the order is that important, I believe it would require us to create 
sub-items that could look like this:

code object
C API
built-in type
type reference
marshaling

It didn't seem like other indexed entries follow this breakout pattern, but if 
that's what's desired for this case, just let me know and I'll submit a 
different patch.

--
keywords: +patch
nosy: +tbeadle
Added file: 
http://bugs.python.org/file43126/0001-Issue-15476-Make-code-object-its-own-entry-in-the-do.patch

___
Python tracker 

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



[issue19611] inspect.getcallargs doesn't properly interpret set comprehension code objects.

2016-06-02 Thread Nick Coghlan

Nick Coghlan added the comment:

Oh, I see what you mean, now - we can special case the compiler-generated ".N" 
names when extracting the signature.

I like it - make the claimed parameter something like "implicit0" instead of 
".0", mention that in the note on the docs, and folks may have some chance of 
working out what's going on if they manage to stumble across this behaviour.

--

___
Python tracker 

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



[issue26829] update docs: when creating classes a new dict is created for the final class object

2016-06-02 Thread R. David Murray

R. David Murray added the comment:

I can't get the rietveld review tool to work from this network, so I'll do this 
in a comment.  This looks pretty good to me, but in the following:

  +It is important to note that during the creation of the class, a copy of the
  +namespace object is used in the final class object and the original namespace
  +object is discarded. More explicitly, this means that when ``type.__new__`` 
is
  +called, the object provided as the namespace parameter has its contents 
copied
  +to a standard Python dictionary.

I think it is more in keeping with the style of the rest of the doc to boil 
this down as much as possible.  We can drop the "It is important to note that", 
and just state the issue once, using the "more explicit" version.  I think 
borrowing your revised language from the type docs would work well here, by 
adding "which becomes the __dict__ of the class object" to the end of that 
sentence.

--

___
Python tracker 

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



[issue24291] Many servers (wsgiref, http.server, etc) can truncate large output blobs

2016-06-02 Thread Martin Panter

Martin Panter added the comment:

I prefer your first solution because it seems to fit in better with how things 
were intended.

I can add in handling of partial writes with a deprecation warning when I get a 
chance. I guess the documentation would be something like “Since 3.5.2, partial 
writes are also handled, but this is deprecated.”

--

___
Python tracker 

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



[issue26266] add classattribute to enum to handle non-Enum attributes

2016-06-02 Thread Ethan Furman

Ethan Furman added the comment:

One possible downside to the `classattribute` route is that we have a 
descriptor whose only purpose is to shield the item from becoming a member; the 
up-side is that it's simple to implement.

Another possibility is `skip`:

class skip:
"""
Protects item from becaming an Enum member during class creation.
"""
def __init__(self, value):
self.value = value

def __get__(self, instance, ownerclass=None):
return self.value

The advantage is that it is replaced by the metaclass with the stored value, so 
we have no extraneous descriptor after the Enum is created; the downside is 
that it requires change in the metaclass to do the right thing.

Thoughts?

--
stage:  -> needs patch
type: behavior -> enhancement

___
Python tracker 

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



[issue27186] add os.fspath()

2016-06-02 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

This patch adds the C implementation (copied from the PEP).

Some notes:
- I added a new .h file in Include/ because there didn't seem to be an obvious 
existing place to put it.
- There was some uncertainty about whether we should Py_INCREF the string or 
bytes returned when a string/bytes is passed in. Running test -l and -L works 
with the Py_INCREF in and we're adding a new reference to the module, so I 
think this is correct.

--
nosy: +Jelle Zijlstra
Added file: http://bugs.python.org/file43125/issue27186.patch

___
Python tracker 

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



Re: Recommendation for GUI lib?

2016-06-02 Thread Dietmar Schwertberger

On 02.06.2016 12:35, John Pote wrote:
I've used wxPython (www.wxpython.org) for a few GUI projects and found 
it ok. It's a wrapper for the wxWidgets C++ library. There's even a 
reasonable free GUI builder, wxGlade, which I use as I prefer 
constructing GUI's that way rather than writing raw wxPython code. 
Never tried any of the paid for GUI builders.
Disadvantage is the download page only provides builds for Python 2.6 
or 2.7.


Does anyone know how Project Phoenix is coming on? 
http://wxpython.org/Phoenix/ItsAlive/ shows wxPython working with 
Python 3.2.

Comments on how stable it is and how easy to install would be helpful.
I have been using Phoenix now for half a year and are very happy with 
it. A release is on its way. For most platforms there are snapshot 
builds which are easy to install.


See e.g. 
https://groups.google.com/d/msg/wxpython-users/soHFLOrerVs/MSijBTQ6KAAJ



The snapshot installation does not include the demo and the .chm help 
file (yet?). These and the book I found to be the most helpful resources 
(much more usable than online reference documentation as e.g. with Qt).



I think that wxGlade is the most promising Python GUI builder and I'm 
confident that it will see improvements to increase usability. I have 
tried some others from time to time, including also QtCreator, but none 
was really convincing.


Regards,

Dietmar


--
https://mail.python.org/mailman/listinfo/python-list


[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-02 Thread Martin Panter

Martin Panter added the comment:

Klamann, thanks for crash report. I think your decompress crash is explained by 
the bug expanding past UINT_MAX I identified above. The key is that length = 0 
in zlib_Decompress_decompress_impl(), as if wrapped around, and the return 
value will have been resized to zero. My suggested fix step 7 would address 
this.

The workaround here would either be to pass compressed data in smaller chunks 
(4 MB or less), so that no chunk can expand to 4 GiB, or to make use of the 
max_length parameter. Either way, it will make any code more complicated though.

If anyone wants to write a patch (or do testing) to solve any or all of the 
problems, I am happy to help. But it is not a high priority for me to do all 
the work, because I am not set up to test it easily.

--

___
Python tracker 

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



[issue27186] add os.fspath()

2016-06-02 Thread Dusty Phillips

Dusty Phillips added the comment:

Test __fspath__ returning bytes as well.

--
Added file: http://bugs.python.org/file43124/issue27186.buchuki.patch

___
Python tracker 

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



[issue24254] Make class definition namespace ordered by default

2016-06-02 Thread Eric Snow

Eric Snow added the comment:

Thanks.  Yeah, I wanted to keep the patches separate for the sake of code 
review.  I'll fold the changes into a single commit once everything's ready.

--

___
Python tracker 

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



[issue19611] inspect.getcallargs doesn't properly interpret set comprehension code objects.

2016-06-02 Thread Yury Selivanov

Yury Selivanov added the comment:

> We definitely can't use a valid identifier in the code generator, since any 
> valid identifier we used might shadow a nonlocal, global or builtin name (and 
> the latter two cases aren't visible to the compiler at compile time).

I wasn't proposing to fix code generator, but rather to transform the name to 
something that users will understand in inspect.signature code.  ".0" will be 
extremely hard to google.

> They're also genuinely not positional only:
> >>> print(setcomp_func(**{".0": iter(range(5))}))
> {0, 1, 4, 9, 16}

My opinion on this: this is a very low-level implementation detail of CPython.  
If users start abusing Signature.bind for binding ".0" they will write code 
that will be hard to port to other implementations, and that will also create a 
requirement for us (CPython devs) to maintain backwards compatibility here.

What I propose, is to rename ".0" args and to classify them as 
"positional-only". This would still make it possible to use Signature.bind on 
such callables, but in a safe way.

--

___
Python tracker 

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



  1   2   3   >