[issue27055] python fails to run zipapp when zip contains comments

2016-05-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is a duplicate of issue5950.

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Make zipimport work with zipfile containing comments

___
Python tracker 

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



[issue26536] Add the SIO_LOOPBACK_FAST_PATH option to socket.ioctl

2016-05-18 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the test script. I left some minor comments about 
loopback_fast_path_v2.patch on Rietveld.

--

___
Python tracker 

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



[issue22040] Add a "force" parameter to shutil.rmtree

2016-05-18 Thread Nirbheek Chauhan

Nirbheek Chauhan added the comment:

> In other words, on unix shutil.rmtree is *already* 'rm -rf'.

This is not true. See:

  $ mkdir testdir && chmod 200 testdir && ls -lhd testdir
  d-w--- 2 nirbheek nirbheek 4.0K May 19 10:21 testdir

`rm -rf` works fine on this. But shutil.rmtree borks:

$ python3 -c 'import shutil; shutil.rmtree("testdir")'
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib64/python3.5/shutil.py", line 470, in rmtree
onerror(os.lstat, path, sys.exc_info())
  File "/usr/lib64/python3.5/shutil.py", line 468, in rmtree
fd = os.open(path, os.O_RDONLY)
PermissionError: [Errno 13] Permission denied: 'testdir'

The -f option to `rm` ensures that it tries its hardest to resolve permissions 
problems and does not error out if it can't resolve them either. The latter is 
available via 'ignore_errors', but the former is a missing feature. A 
shutil.rmtree flag that 'resolves permissions' would be useful on all 
platforms. Not just Windows.

--
nosy: +Nirbheek Chauhan

___
Python tracker 

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



[issue26536] Add the SIO_LOOPBACK_FAST_PATH option to socket.ioctl

2016-05-18 Thread Daniel Stokes

Daniel Stokes added the comment:

I have added a zip containing a simple server and client to test the patch 
with. With loopback fast path enabled, I get 3-5x more throughput on my Windows 
10 computer with an AMD 900 series chipset.

--
Added file: http://bugs.python.org/file42895/loopback_fast_path_test.zip

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2016-05-18 Thread Guido van Rossum

Guido van Rossum added the comment:

And those from http://bugs.python.org/issue22570#msg257632 (these are the 
actual code -- the others were the docs).

--

___
Python tracker 

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



[issue22570] Better stdlib support for Path objects

2016-05-18 Thread Guido van Rossum

Guido van Rossum added the comment:

PEP 519 is accepted now. We need to revert the commits from 
http://bugs.python.org/issue22570#msg257634

--

___
Python tracker 

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



[issue27050] Demote run() below the high level APIs in subprocess docs

2016-05-18 Thread Nick Coghlan

Nick Coghlan added the comment:

As long as I'm refactoring these docs, I may also take a look at adding some 
notes about text vs binary handling, since that's still problematic as 
described in http://bugs.python.org/issue6135

The default behaviour is binary pipes, and setting "universal_newlines=True" 
switches to UTF-8 encoded text pipes, but anything else involves using binary 
pipes with separate encoding and decoding steps.

--

___
Python tracker 

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



[issue27050] Demote run() below the high level APIs in subprocess docs

2016-05-18 Thread Nick Coghlan

Nick Coghlan added the comment:

For reference, http://bugs.python.org/issue13237 covers the original change to 
emphasise the convenience functions over the full flexibility of Popen. The 
intent behind that reorganisation was to make it straightforward to get started 
with the module without needing to first learn what a pipe is (or much of 
anything about command invocation other than the value of breaking things up 
into lists to ensure correct quoting). The direct link to the Popen docs in the 
introductory text was intended to make it easy for advanced users to skip 
directly to the full Popen docs.

In that context, the three convenience operations are "I don't really care if 
this works or not", "complain loudly if this doesn't work" and "capture the 
command output, while complaining loudly if it doesn't work". (Not 
coincidentally, these are roughly comparable to the operations supported by 
Perl's system() command and backtick expressions, only with exceptions taking 
the place of the "$?" magic variable)

Once a user understands what a pipe is well enough to have an opinion on the 
usefulness of operations other than the 3 basic ones, then I agree run() makes 
for a nice improvement over using Popen objects directly (thank you Thomas!), 
but it's still lower level than the convenience APIs (since you need more prior 
knowledge in order to use it effectively).

I do like David's suggestion of an introductory table providing quick links to 
the rest of the documentation. Something in the style of the itertools docs 
would likely be most suitable: https://docs.python.org/3/library/itertools.html

Also +1 on thrashing out the details at the PyCon US sprints, although I'll aim 
to put an initial draft together before then (so Thomas has a chance to comment 
on it)

--

___
Python tracker 

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



[issue25926] problems with "times" keyword in itertools.repeat

2016-05-18 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I'm okay with changing the docs to "roughly equivalent to".  That will help 
prevent the occasional misreading as "precisely equivalent in every respect".

--
priority: normal -> low

___
Python tracker 

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



[issue27055] python fails to run zipapp when zip contains comments

2016-05-18 Thread Dmitry

New submission from Dmitry:

python fails to run zipapp when zip contains comments
when zip archive downloaded from github it contains tip hash in comment. 

Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:38:48) [MSC v.1900 32 bit 
(Intel)] on win32

example:

```
import zipfile


if __name__ == '__main__':
with open('__main__.py', "w") as m:
  m.write("print('hello')")


zipf = zipfile.ZipFile('zipapp_bad.zip', 'w', zipfile.ZIP_DEFLATED)
#add zip comment
zipf.comment=b"123321"
zipf.write("__main__.py")
zipf.close()

zipf = zipfile.ZipFile('zipapp_good.zip', 'w', zipfile.ZIP_DEFLATED)
zipf.write("__main__.py")
zipf.close()
```

D:\pywork\zip>python zipapp_good.zip
hello

D:\pywork\zip>python zipapp_bad.zip
  File "zipapp_bad.zip", line 1
PK♥♦¶
  ^
SyntaxError: invalid syntax

--
files: attach.zip
messages: 265839
nosy: Denisov
priority: normal
severity: normal
status: open
title: python fails to run zipapp when zip contains comments
type: crash
versions: Python 3.5
Added file: http://bugs.python.org/file42894/attach.zip

___
Python tracker 

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



[issue27054] Python installation problem: No module named 'encodings'

2016-05-18 Thread Ned Deily

Changes by Ned Deily :


--
components: +Installation, Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
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



[issue27054] Python installation problem: No module named 'encodings'

2016-05-18 Thread Hugh C. Lauer

New submission from Hugh C. Lauer:

Hello,

I am a university professor who regularly teaches classes in Python 
programming, particular to students who are NOT computer science majors.

In preparing my course materials for next fall, I have been struggling with 
setting up a Python 3.5.1 environment on my Windows computer (similar to what 
most of my students will use).

I continually get the error "Fatal Python error: Py_Initialize: unable to load 
the file system codec
ImportError: No module named 
'encodings'"

This seems to happen with Python 3.5.1 as well as Python 3.5.0.

Nothing related to Python works:- not Python itself, not pip.

My platform is Windows 7 Enterprise, Service Pack 1.

* I used the installation file "python-3.5.1-amd64.exe" downloaded from 
the official Python download site.

* During installation, I selected "Add Python 3.5 to PATH" and 
"Customize installation".

* Under "Advanced Options," I selected "Install for all users"

I have tried various other installation options, and nothing is better.

I also tried it on a Windows 10 platform. In that case, Python and IDLE are 
installed correctly, but I any attempt to use pip to add or install other 
packages fails with a different error.

For pedagogical reasons, I prefer the simply Python-IDLE environment to the 
packages such as Miniconda3, but installing Miniconda3 did not help either.

Am I missing something obvious?

Regards,

Hugh C. Lauer\
Department of Computer Science
Worcester Polytechnic Institute
Worcester, Massachusetts, USA

--
messages: 265838
nosy: la...@wpi.edu
priority: normal
severity: normal
status: open
title: Python installation problem: No module named 'encodings'

___
Python tracker 

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



[issue20041] TypeError when f_trace is None and tracing.

2016-05-18 Thread Camilla Montonen

Changes by Camilla Montonen :


--
nosy: +Winterflower

___
Python tracker 

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



[issue20847] asyncio docs should call out that network logging is a no-no

2016-05-18 Thread Camilla Montonen

Changes by Camilla Montonen :


--
nosy: +Winterflower

___
Python tracker 

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



[issue19695] Clarify how to use various import-related locks

2016-05-18 Thread Camilla Montonen

Changes by Camilla Montonen :


--
nosy: +Winterflower

___
Python tracker 

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



[issue26329] os.path.normpath("//") returns //

2016-05-18 Thread Camilla Montonen

Camilla Montonen added the comment:

Should the comment with the link to specification be added to Lib/posixpath.py? 
or Lib/os.py?

--

___
Python tracker 

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



[issue25941] Add 'How to Review a Patch' section to devguide

2016-05-18 Thread Camilla Montonen

Camilla Montonen added the comment:

Thank you very much for your comments. I have cleaned up the previous patch and 
merged it with the Lifecycle of a Patch article.

--
Added file: http://bugs.python.org/file42893/patchreview18May.patch

___
Python tracker 

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



[issue25548] Show the address in the repr for class objects

2016-05-18 Thread Camilla Montonen

Changes by Camilla Montonen :


--
nosy: +Winterflower

___
Python tracker 

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



[issue25926] problems with "times" keyword in itertools.repeat

2016-05-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue27051] Create PIP gui

2016-05-18 Thread lorenzogotuned

Changes by lorenzogotuned :


--
nosy: +lorenzogotuned

___
Python tracker 

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



[issue25926] problems with "times" keyword in itertools.repeat

2016-05-18 Thread Camilla Montonen

Camilla Montonen added the comment:

Should 'roughly equivalent to' be added as a note to the docs?

--
nosy: +Winterflower

___
Python tracker 

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



[issue27052] Python2.7.11+ as in Debian testing and Ubuntu 16.04 LTS crashes with segfault

2016-05-18 Thread Matthias Klose

Matthias Klose added the comment:

2.7.11+ translates to 20160330 from the 2.7 branch.

--

___
Python tracker 

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



[issue26549] co_stacksize is calculated from unoptimized code

2016-05-18 Thread STINNER Victor

Changes by STINNER Victor :


--
type:  -> performance

___
Python tracker 

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



[issue26329] os.path.normpath("//") returns //

2016-05-18 Thread Camilla Montonen

Changes by Camilla Montonen :


--
nosy: +Winterflower

___
Python tracker 

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



[issue26779] pdb continue followed by an exception in the same frame shows incorrect frame linenumber

2016-05-18 Thread Sriram Rajagopalan

Sriram Rajagopalan added the comment:

ping

--
nosy: +bglsriram

___
Python tracker 

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



[issue23958] compile warnings in libffi

2016-05-18 Thread Berker Peksag

Berker Peksag added the comment:

A slightly different version of the patch is now part of upstream libffi: 
https://github.com/libffi/libffi/commit/4a677a425c18eda4bc5357b2485da57f133f908d

Thanks for the report Steve.

--
nosy: +berker.peksag
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue27014] maximum recursion depth when using typing options

2016-05-18 Thread Guido van Rossum

Guido van Rossum added the comment:

Thanks to Kalle Tuure for the fix!

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



[issue26617] Assertion failed in gc with __del__ and weakref

2016-05-18 Thread Guo, Jiahua

Changes by Guo, Jiahua :


Added file: http://bugs.python.org/file42892/patch

___
Python tracker 

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



[issue27014] maximum recursion depth when using typing options

2016-05-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 79197e60e441 by Guido van Rossum in branch '3.5':
Fix #27014 -- infinite recursion using typing.py.
https://hg.python.org/cpython/rev/79197e60e441

New changeset a6c04626205f by Guido van Rossum in branch 'default':
Fix #27014 -- infinite recursion using typing.py. (Merge 3.5 -> 3.6.)
https://hg.python.org/cpython/rev/a6c04626205f

--
nosy: +python-dev

___
Python tracker 

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



[issue26942] android: test_ctypes crashes on armv7

2016-05-18 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Running the following interactive statements [1]:

>>> import unittest, ctypes.test.test_as_parameter
>>> unittest.main(module=ctypes.test.test_as_parameter, 
>>> defaultTest='BasicWrapTestCase', verbosity=2)

The corresponding attached gdb session:

(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0xb6a181a0 in ?? ()
(gdb) bt 7
#0  0xb6a181a0 in ?? ()
#1  0xb605de7a in _testfunc_callback_i_if (value=-10, func=0xb6a181a0)
at cpython/Modules/_ctypes/_ctypes_test.c:234
#2  0xb6072238 in ffi_call_SYSV ()
at cpython/Modules/_ctypes/libffi/src/arm/sysv.S:188
#3  0xb6072a52 in ffi_call (cif=cif@entry=0xbe91ac04, 
fn=fn@entry=0xb605de6d <_testfunc_callback_i_if>, 
rvalue=rvalue@entry=0xbe91ac88, 
avalue=avalue@entry=0xbe91ac78)
at cpython/Modules/_ctypes/libffi/src/arm/ffi.c:339
#4  0xb606e2a0 in _call_function_pointer (flags=flags@entry=-1240871416, 
pProc=0xb605de6d <_testfunc_callback_i_if>, pProc@entry=0xb606956b 
, 
avalues=avalues@entry=0xbe91ac78, atypes=atypes@entry=0xbe91ac68, 
restype=0xb60db8e0, 
resmem=resmem@entry=0xbe91ac88, argcount=argcount@entry=2)
at cpython/Modules/_ctypes/callproc.c:811
#5  0xb606e894 in _ctypes_callproc (pProc=pProc@entry=0xb605de6d 
<_testfunc_callback_i_if>, 
argtuple=argtuple@entry=(, ), 
flags=, argtypes=argtypes@entry=0x0, restype=, 
restype@entry=<_ctypes.PyCSimpleType at remote 0xb6097228>, 
checker=checker@entry=0x0)
at cpython/Modules/_ctypes/callproc.c:1149
#6  0xb606956a in PyCFuncPtr_call (self=0xb5ef5e90, inargs=, 
kwds=)
at cpython/Modules/_ctypes/_ctypes.c:3856
(More stack frames follow...)
(gdb) up
#1  0xb605de7a in _testfunc_callback_i_if (value=-10, func=0xb6a181a0)
at cpython/Modules/_ctypes/_ctypes_test.c:234
234 sum += func(value);
(gdb) list
229 
230 EXPORT(int) _testfunc_callback_i_if(int value, int (*func)(int))
231 {
232 int sum = 0;
233 while (value != 0) {
234 sum += func(value);
235 value /= 2;
236 }
237 return sum;
238 }
(gdb) p func
$2 = (int (*)(int)) 0xb6a181a0
(gdb) disassemble func
No function contains specified address.
(gdb)


[1] Gdb is attached after the import statement because gdb fails with SIGILL in 
__dl_notify_gdb_of_libraries both with arm and armv7, whenever a library is 
loaded. This is gdb from the Android ndk started by ndk-gdb.py from the r11c 
ndk. A workaround is to add the following lines in the gdbinit script:
break __dl_rtld_db_dlactivity
commands
silent
return
sharedlibrary
continue
end

--

___
Python tracker 

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



[issue27050] Demote run() below the high level APIs in subprocess docs

2016-05-18 Thread R. David Murray

R. David Murray added the comment:

Just as a data point, I always found it confusing when viewing the subprocess 
docs that I had to page past the 'convenience functions' to get to what I 
consider to be the "real" docs, the docs for Popen.  I rarely use the 
convenience functions; I find it harder to remember how they work than just 
using Popen, and in any case I usually end up writing an application-specific 
'cmd' function that uses Popen.  I haven't tried using run yet, so I don't 
really have an opinion on that.

I suppose its like carrying a swiss army knife in your pocket rather than 
carrying a steak knife, a pair of scissors, and a screwdriver.
If you were carrying a toolbox with *all* the tools, it might be different, but 
your choices are three tools or the swiss army knife, and to make matters worse 
those individual tools are really just the swiss army knife in disguise, but it 
looks different enough to be confusing.

Maybe having table of links at the start of the doc would be the most helpful, 
regardless of how the docs are re-organized.

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



[issue26049] Poor performance when reading large xmlrpc data

2016-05-18 Thread Oscar Andres Alvarez Montero

Changes by Oscar Andres Alvarez Montero :


--
nosy: +Oscar Andres Alvarez Montero

___
Python tracker 

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



[issue27052] Python2.7.11+ as in Debian testing and Ubuntu 16.04 LTS crashes with segfault

2016-05-18 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: +doko

___
Python tracker 

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



[issue26750] Mock autospec does not work with subclasses of property()

2016-05-18 Thread Berker Peksag

Changes by Berker Peksag :


--
assignee:  -> berker.peksag

___
Python tracker 

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



[issue26750] Mock autospec does not work with subclasses of property()

2016-05-18 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Updated patch with review comments.

--
Added file: http://bugs.python.org/file42891/mock-descriptor-2.patch

___
Python tracker 

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



[issue27036] Mark up of references in different form

2016-05-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Pushed a part about "bytes-like objects".

Here is a patch that adds explicit labels for referencing without changing the 
style.

--
Added file: http://bugs.python.org/file42890/refs_forms3.patch

___
Python tracker 

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



[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-05-18 Thread Stefan Krah

Stefan Krah added the comment:

Thanks, Georg! The decimal parts look good to me. I understand that
people wonder about the relaxed rules for Decimal -- we have discussed
that here:

https://mail.python.org/pipermail/python-dev/2016-March/143557.html


I don't think that it will be a problem in practice.

--

___
Python tracker 

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



[issue27036] Mark up of references in different form

2016-05-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ef6d3a537cf5 by Serhiy Storchaka in branch '3.5':
Issue #27036: Fixed formatting references to "bytes-like object" in plural.
https://hg.python.org/cpython/rev/ef6d3a537cf5

New changeset d6b9a4c3f8ef by Serhiy Storchaka in branch 'default':
Issue #27036: Fixed formatting references to "bytes-like object" in plural.
https://hg.python.org/cpython/rev/d6b9a4c3f8ef

--
nosy: +python-dev

___
Python tracker 

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



[issue26942] android: test_ctypes crashes on armv7

2016-05-18 Thread Xavier de Gaye

Xavier de Gaye added the comment:

The crash occurs at the same line that the crash reported in issue
#17786. Line 85 in ctypes/test/test_as_parameter.py was line 87 at changeset  
ae5c4a9118b8a3f490f77f2084d46163ca229aef.

--

___
Python tracker 

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



[issue6135] subprocess seems to use local encoding and give no choice

2016-05-18 Thread Martin Panter

Martin Panter added the comment:

Here is a tested illustration of how I would suggest to manually handle 
encoding with check_output():

>>> text_input = "©"
>>> args = ("iconv", "--from-code", "ISO_8859-1", "--to-code", "UTF-8")
>>> bytes_output = check_output(args, input=text_input.encode("iso-8859-1"))
>>> bytes_output
b'\xc2\xa9'
>>> bytes_output.decode("utf-8")
'©'

If you wanted actual universal newline translation (which is more than plain 
text encoding), it would be more complicated, but still possible.

But I am not hugely against adding new “encoding” and “errors” parameters. The 
reasons against are that I don’t see it as necessary, and there are already a 
lot of subprocess-specific options to wade through.

--

___
Python tracker 

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



[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-05-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added comments on Rietveld.

--

___
Python tracker 

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



[issue27050] Demote run() below the high level APIs in subprocess docs

2016-05-18 Thread Thomas Kluyver

Thomas Kluyver added the comment:

I'm obviously biased, but I find the 'high level convenience API' less 
convenient than the run() function: there are three different functions for the 
same basic operation, they're not clearly named (check_output is nothing to do 
with checking output), and there are things that should be simple but they can 
only do awkwardly (i.e. capturing both output and the exit code).

Once I can depend on Python >= 3.5, I hope to never use 
call/check_call/check_output again. Using run() might make code slightly 
longer, but I think it also makes it clearer. I accept that the trio can 
probably never be removed, but this is why I demoted them a long way down the 
docs.

Unfortunately I won't be at PyCon this year to discuss this.

--
nosy: +takluyver

___
Python tracker 

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



[issue27050] Demote run() below the high level APIs in subprocess docs

2016-05-18 Thread Gregory P. Smith

Gregory P. Smith added the comment:

FWIW i consider the whole subprocess module doc to be pretty unapproachable and 
in need of refactoring.  Your suggestions sound like good ones.  We should sit 
down and make it sane at pycon.

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue27053] Python Windows x86-64 embeddable zip file missing module encodings

2016-05-18 Thread Wolfgang Langner

New submission from Wolfgang Langner:

Tried to extract Windows x86-64 embeddable zip file and execute it.
But following error happened (3.6.0a1):

Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'

Current thread 0x17c4 (most recent call first):



Also tried release version 3.5.1, this version works fine.

--
components: Installation
messages: 265818
nosy: steve.dower, tds333
priority: normal
severity: normal
status: open
title: Python Windows x86-64 embeddable zip file missing module encodings
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



[issue23275] Can assign [] = (), but not () = []

2016-05-18 Thread Martin Panter

Martin Panter added the comment:

I just moved the NEWS entry under the alpha 2 heading.

For patches I am going to commit myself, I usually write the NEWS beforehand 
and remember to adjust it when committing. But perhaps I shouldn’t have done 
that in this case :)

--

___
Python tracker 

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



[issue23275] Can assign [] = (), but not () = []

2016-05-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d3a75daf61e1 by Martin Panter in branch 'default':
Issue #23275: Don’t think this made it into alpha 1
https://hg.python.org/cpython/rev/d3a75daf61e1

--

___
Python tracker 

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



[issue12920] inspect.getsource only works for objects loaded from files, not interactive session

2016-05-18 Thread Steven Barker

Steven Barker added the comment:

The problem being discussed here just came up on Stack Overflow today: 
http://stackoverflow.com/questions/37288135/inspect-module-for-python/

The cause of the incorrect error message is pretty clear. The relevant code 
from `inspect.getfile` should do something better when the object has a 
`__module__` attribute, but the module named (when looked up in `sys.modules`) 
does not have a `__file__` attribute. Currently it says the module is a builtin 
class, which is total nonsense.

A very basic fix would be to have an extra error case:

if isclass(object):
if hasattr(object, '__module__'):
object = sys.modules.get(object.__module__)
if hasattr(object, '__file__'):
return object.__file__
raise TypeError()  # need a relevant message here!!!
raise TypeError('{!r} is a built-in class'.format(object))

It might be easier to make a meaningful message if the code after the first 
`if` didn't overwrite `object` with the module.

But, really, it would be nice to figure out a better fix, which would make the 
relevant inspect functions actually work for classes defined interactively in 
the `__main__` module.

--
nosy: +Steven.Barker

___
Python tracker 

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



[issue27052] Python2.7.11+ as in Debian testing and Ubuntu 16.04 LTS crashes with segfault

2016-05-18 Thread Ján Jockusch

New submission from Ján Jockusch:

Python2.7.11+ as distributed by Ubuntu 16.04LTS and Debian testing crashes with 
a segmentation fault when running a simple Zope2 instance.

Python.org's Python2.7.11 does not exhibit the same crash.

It is possible that one of the patches in debian/patches or another factor of 
the Debianization introduces a regression or a new issue.

The issue has been registered with Ubuntu here:

https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1580577

Matthias Klose, Debian maintainer for the package, has asked me to
report this problem upstream, because otherwise we will invariably run
into this regression in 2.7.12.

I have attached the script I use to produce the segmentation fault. I involves 
installing Zope2 from the internet, but other that that, it only requires a 
standard Python2.7 installation (with zlib support).

I have also succeeded in calling and producing this error in gdb, but I don't 
know how to move on from there.

Any hints on how I can locate the problem are very welcome!

--
files: testing_script.sh
messages: 265814
nosy: Ján Jockusch
priority: normal
severity: normal
status: open
title: Python2.7.11+ as in Debian testing and Ubuntu 16.04 LTS crashes with 
segfault
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file42889/testing_script.sh

___
Python tracker 

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



[issue23420] python -m cProfile -s fails with non informative message

2016-05-18 Thread Berker Peksag

Berker Peksag added the comment:

Patch looks good to me, but we need a test case.

--
type: enhancement -> 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



[issue6135] subprocess seems to use local encoding and give no choice

2016-05-18 Thread Nick Coghlan

Nick Coghlan added the comment:

Since this issue was first filed, the "opener" parameter was added to the 
open() builtin: https://docs.python.org/3/library/functions.html#open

I mention that, as the problem there is similar to the problem here: wanting to 
construct a buffered text-mode interface, but with a different stream at the 
lowest layer (whatever "opener" returns for the builtin open(), the implicitly 
created pipes for the subprocess module).

To answer Martin's question about "Why not just wrap things manually?", the 
main issue with that is that it doesn't work for the check_output helper 
function - to get text out of that, currently your only option is to enable 
universal newlines and trust that the output is encoded as UTF-8 (which is 
fortunately often a valid assumption on modern systems).

--

___
Python tracker 

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