[issue27546] Integrate tkinter and asyncio (and async)

2016-07-26 Thread Guido van Rossum

Guido van Rossum added the comment:

OK, in the context of IDLE it probably doesn't matter (though I recall
that IDLE was given a hard time many years ago by people complaining
about that same busy-waiting -- I guess batteries have improved
somewhat since then).

--

___
Python tracker 

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



[issue17599] mingw: detect REPARSE_DATA_BUFFER

2016-07-26 Thread Martin Panter

Martin Panter added the comment:

Here is a patch implementing my suggestion to unconditionally define 
everything, prefixed with Py_ instead. Not tested on a normal Windows build.

--
versions: +Python 3.6 -Python 3.4
Added file: http://bugs.python.org/file43907/Py_REPARSE.patch

___
Python tracker 

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



[issue27626] Spelling fixes

2016-07-26 Thread Xiang Zhang

Xiang Zhang added the comment:

LGTM.

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue27626] Spelling fixes

2016-07-26 Thread Martin Panter

Martin Panter added the comment:

Here is a patch that fixes some more related misspellings. This includes some 
test method names, and one internal C function variable.

FWIW nonexistant vs nonexistent may be a bit controversial (and neither look 
particularly wrong to me), so I didn’t change any other occurrences, but the 
existing change looks okay to be consistent with the “self._nonexistent_dir” 
spelling.

--
Added file: http://bugs.python.org/file43906/spelling.v2.patch

___
Python tracker 

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



[issue19613] test_nntplib: sporadic failures, test_article_head_body()

2016-07-26 Thread Martin Panter

Changes by Martin Panter :


Added file: http://bugs.python.org/file43905/ending-dot.v2.patch

___
Python tracker 

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



[issue19613] test_nntplib: sporadic failures, test_article_head_body()

2016-07-26 Thread Martin Panter

Changes by Martin Panter :


Removed file: http://bugs.python.org/file43904/ending-dot.v2.patch

___
Python tracker 

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



[issue19613] test_nntplib: sporadic failures, test_article_head_body()

2016-07-26 Thread Martin Panter

Martin Panter added the comment:

This version actually works :P

--
Added file: http://bugs.python.org/file43904/ending-dot.v2.patch

___
Python tracker 

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



[issue19613] test_nntplib: sporadic failures, test_article_head_body()

2016-07-26 Thread Martin Panter

Martin Panter added the comment:

I played with the server and group that is apparently used in the test:

>>> server = NNTP_SSL("nntp.aioe.org")
>>> [_, _, first, last, _] = server.group("fr.comp.lang.python")
>>> first
2900
>>> last
2915
>>> server.body(last)[1].lines[-1]
b''
>>> server.body(first)[1].lines[-1]
b'Merci'
>>> server.body(last - 1)[1].lines[-1]
b'Kevin'

I tried all articles from 2900–2915, and none of them end with a dot on its own 
line, so I don’t actually know what caused the failure.

However looking again at the _getlongresp() implementation, I cannot imagine 
how the test failure can occur except for a genuine body that ends with a dot 
on its own line (encoded as b".." and then converted to b"."). Here is a quick 
patch to alter the test cases.

--
keywords: +patch
stage: needs patch -> patch review
versions:  -Python 3.4
Added file: http://bugs.python.org/file43903/ending-dot.patch

___
Python tracker 

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



[issue27576] An unexpected difference between dict and OrderedDict

2016-07-26 Thread Xiang Zhang

Xiang Zhang added the comment:

I write a new version restoring the fast path for dict. It now uses PyDict_Next 
and seems to be much faster than the path using keys.

[cpython]$ ./python -m timeit -s 'from collections import OrderedDict; d = 
{"a":1,"c":2,"b":3,"d":4}' 'OrderedDict(d)'
100 loops, best of 3: 0.639 usec per loop
[cpython]$ ./python -m timeit -s 'from collections import OrderedDict; d = 
{"a":1,"c":2,"b":3,"d":4}' 'OrderedDict(d)'
100 loops, best of 3: 0.372 usec per loop

--
Added file: http://bugs.python.org/file43902/odict_update_v3.patch

___
Python tracker 

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



[issue19613] test_nntplib: sporadic failures, test_article_head_body()

2016-07-26 Thread Martin Panter

Martin Panter added the comment:

A few other buildbots shared this failure. It would be nice to see what the 
article is that is causing the failure, but I’m fairly confident we should just 
remove this part of the test.

--
stage:  -> needs patch

___
Python tracker 

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



[issue11048] "import ctypes" causes segfault on read-only filesystem

2016-07-26 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
versions: +Python 3.5, Python 3.6 -Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue23085] update internal libffi copy to 3.2.1

2016-07-26 Thread koobs

koobs added the comment:

Forgive me for asking a question that may have already been asked, or beaten to 
death, but what is preventing Python from requiring libffi as an 
external/required dependency, rather than keeping it and taking on the burden 
of fixes/backporting in lieu of updates or pending releases from upstream?

Historically (at least the last ~2-3 years), libffi in Python has been plagued 
with, at least:

* Inconsistent / incorrect merging of libffi fixes (including regressions)
* Unsolved issues in vendored copy that have been fixed/released upstream
* Complex, manual and error-prone updates to vendored copy
* Lack of regular maintenance, from what largely appears to be a lack of 
knowledge about, or confidence in updating the vendored copy (fear of breakage)

I know at least FreeBSD currently requires --sytem-libffi for i386 systems in 
certain versions due to issue 22521 (issue 23042) and there are currently 50 
open issues matching libffi (granted not all of them will be root-caused by 
libffi internal). I note that number to highlight the maintenance requirement.

--

___
Python tracker 

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



[issue27630] Generator._encoded_EMTPY misspelling in email package

2016-07-26 Thread Martin Panter

New submission from Martin Panter:

In the Generator.flatten() (Lib/email/generator.py), the code sets, among 
others, the instance attributes _EMPTY (correct spelling) and _encoded_EMTPY 
(misspelling). Further down in that class, _encoded_EMPTY (correct spelling) is 
set as a class attribute, and this correctly-spelt version appears to be used 
in the _handle_message_delivery_status() method. The BytesGenerator class 
inherits Generator and overrides the correctly-spelt _encoded_EMPTY class 
attribute.

It seems that both _EMPTY and the misspelt _encoded_EMTPY instance attributes 
are not used. Perhaps they should be removed. Or perhaps they are not doing the 
job they were intended for and there is a real bug.

--
components: email
messages: 271424
nosy: barry, martin.panter, r.david.murray
priority: normal
severity: normal
status: open
title: Generator._encoded_EMTPY misspelling in email package
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



[issue19613] test_nntplib: sporadic failures, test_article_head_body()

2016-07-26 Thread koobs

Changes by koobs :


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



[issue19613] test_nntplib: sporadic failures, test_article_head_body()

2016-07-26 Thread koobs

koobs added the comment:

This just failed on 3.x (default) on koobs-freebsd{9,10} bots:

==
FAIL: test_article_head_body (test.test_nntplib.NetworkedNNTP_SSLTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_nntplib.py", 
line 240, in wrapped
meth(self)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_nntplib.py", 
line 185, in test_article_head_body
self.check_article_resp(resp, body, art_num)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_nntplib.py", 
line 165, in check_article_resp
self.assertNotIn(article.lines[-1], (b".", b".\n", b".\r\n"))
AssertionError: b'.' unexpectedly found in (b'.', b'.\n', b'.\r\n')

--

Full log attached

--
keywords: +buildbot
nosy: +koobs
Added file: 
http://bugs.python.org/file43901/koobs-freebsd-10-python-3x-build-4682.txt

___
Python tracker 

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



[issue27546] Integrate tkinter and asyncio (and async)

2016-07-26 Thread Yury Selivanov

Yury Selivanov added the comment:

> A proper solution IMO should somehow merge the selectors so that a
> single select() or whatever wakes up when either network I/O happens
> or a UI event comes in (which could be something that Tk transparently
> handles but it still needs to be given the chance, through
> root.update()).

I think we can do something similar to self-pipe trick: have a pipe
and a reader for it registered with 'loop.add_reader'. Whenever
a UI thread have an event to process, it should write a byte to the
pipe.

I'm not sure if there's a way to do that with Tk.

--

___
Python tracker 

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



[issue27546] Integrate tkinter and asyncio (and async)

2016-07-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

> wasting battery power ?!  We live in slightly different computing universes 
> ;-).  But I get the point.  The last two files I uploaded use call_later and 
> I should stick with that.  I should also add a note that the innermost 
> asyncio loop function sleeps when there is nothing to do and that the tk 
> updater wakes it up, if necessary, to check for gui events even when there 
> are none.  Updater is polling rather than interrupt based.  Or in other 
> words, it interrupts asyncio to poll tk.

I should also say that the update interval is passed in to the class so one can 
make an instance-specific tradeoff between overhead and responsiveness and 
display update frequency.  A read-only display might be updated just once a 
minute.

If loop.call_later(0.1, tk_update) is actually a problem on a system, then IDLE 
would likely be twice as bad, as it also has a busy loop in the user process, 
polling both the socket connection and calling tk update 20 times a second.  
There are also loops in the IDLE process.


I agree on the ideal solution and on the key component, which is to sleep until 
there is a ready Task or file event.  _run_once does this in the select call by 
adjusting the timeout to the minimum time to the next ready task (possibly 0).

Tcl has such a component, with the addition of simultaneously waiting for 
window events -- but it only only includes file events on unix.  (It took a 
brave and talented group to try to reconcile the Unix and Windows models.)

Here is a simplified Python version of Tcl_DoOneEvent. 
http://www.tcl.tk/man/tcl8.6/TclLib/DoOneEvent.htm  

Tcl has window, file, timer, and idle events.  Window events include user key 
and mouse events and other from the graphics system.  The first three types all 
go in one ready queue. Idle events are those that affect what the user sees on 
the screen and go in a separate, lower-priority queue.

def do_one_event(sleep_ok):
if ready:
process(ready.pop())
return True
load_ready()
if ready:
process(ready.pop())
return True
if idle:
for event in idle:
process(event)
return True
if sleep_ok:
sleep_until_event()  # the hard part
load_ready()
process(ready.pop())
return True
else:
return False

def load_ready():
# In some unspecified order
ready.extend(get_window_events)  # graphics system
ready.extend(get_file_events)  # select
ready.extend(get_timer_events)  # priority queue pops

Update processes all events available without sleeping. 
http://www.tcl.tk/man/tcl8.6/TclCmd/update.htm
Mainloop continues (with sleeps) while there are toplevels and not stopped.

def update():
while(do_one_event(sleep_ok=False)): pass

def mainloop():
while toplevels and not stop:
do_one_event()

Sleep_ok is actually a dont_sleep bit flag. DoOneEvent has other flags to 
select which types of event to process.  Hence

def update_idletasks()  # all currently ready
do_one_event(dont_sleep | idletasks)

It is possible for the idle queue to get starved for attention.  Hence the 
existence of update_idletasks and recommendations to call it in certain 
situations.


It would also be possible to call (from Python, via tcl) 
do_one_event(dont_sleep | gui_events) IF it were known that a gui event was 
ready to be retrieved.  It is knowing that, without polling in a 'busy loop' 
that is hard to impossible.  If it were possible, an extra call to do idletasks 
would also be needed..

In summary, I see this as a situation where practicality beats a possibly 
unattainable purity.

--

___
Python tracker 

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



[issue27629] Cannot create ssl.SSLSocket without existing socket

2016-07-26 Thread Emanuel Barry

Emanuel Barry added the comment:

Thank you for the report and the patch! :) This will need a test in 
Lib/test/test_ssl.py to check for this particular case.

I've removed 3.3 and 3.4 from the Versions field, since these versions no 
longer get regular bugfixes (only security bugfixes may go in these). As a 
result, only 3.5 and 3.6 will get the fix.

--
nosy: +alex, christian.heimes, dstufft, ebarry, giampaolo.rodola, janssen, 
pitrou
stage:  -> patch review
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue27629] Cannot create ssl.SSLSocket without existing socket

2016-07-26 Thread nemunaire

Changes by nemunaire :


--
title: Cannot create raw ssl.SSLSocket -> Cannot create ssl.SSLSocket without 
existing socket

___
Python tracker 

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



[issue27629] Cannot create raw ssl.SSLSocket

2016-07-26 Thread nemunaire

New submission from nemunaire:

I got this stacktrace:
  File "test_ssl.py", line 3, in 
sock = ssl.SSLSocket(server_hostname="docs.python.org")
  File "/usr/lib/python3.4/ssl.py", line 536, in __init__
if sock.getsockopt(SOL_SOCKET, SO_TYPE) != SOCK_STREAM:
AttributeError: 'NoneType' object has no attribute 'getsockopt'

with this minimal code:
import ssl

sock = ssl.SSLSocket(server_hostname="docs.python.org")
sock.connect(("docs.python.org", 443))
sock.sendall(b"GET /3/library/ssl.html HTTP/1.0\r\nHost: 
docs.python.org\r\n\r\n")
print(sock.recv(4096).decode())

Whereas the None socket is correctly handled a few lines later: 
https://hg.python.org/cpython/file/tip/Lib/ssl.py#l715

All Python >= 3.3 are affected (since 
https://hg.python.org/cpython/rev/a00842b783cf) and can be patched with the 
same file, attached to this issue.

--
components: Library (Lib)
files: fix_sslsocket_init_without_socket_3.3-3_6.patch
keywords: patch
messages: 271419
nosy: nemunaire
priority: normal
severity: normal
status: open
title: Cannot create raw ssl.SSLSocket
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: 
http://bugs.python.org/file43900/fix_sslsocket_init_without_socket_3.3-3_6.patch

___
Python tracker 

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



[issue16353] add function to os module for getting path to default shell

2016-07-26 Thread Michael Felt

Michael Felt added the comment:

An interesting read, but I am lost in what the goal is.

e.g., on AIX, which I know well, the system default is /bin/ksh (aka 
/usr/bin/ksh). However, /bin/sh (/usr/bin/sh) is available as well.

My expectation is that on Linux the default shell is /bin/bash, and like AIX 
/bin/sh is also available.

/bin/sh, /bin/ksh, /bin/bash are all (potentially) default shells. However, 
something every posix system is "sh" aka borne shell.

Aside: windows is different, and I expect has a different syntax. 

So, if the goal is to GET the pathname of the so-called "default" shell -again, 
interesting - BUT - what does that buy me?

For Popen or now subprocess I would want a consistent shell syntax, i.e., borne 
shell on posix, cmd.exe on windows, and whatever is correct on platforms that 
do not fit in these two.

Hence, on posix platforms where /bin/sh does not exist (hard)code the correct 
path for that platform.

FYI: CS_PATH does not exist on AIX

IMHO: (as others have stated) having . in PATH is bad for security, being 
dependent on PATH opens other security concerns as well.

IMHO2: KISS principle. After several years there is still no consenus, so make 
it simple - the popen and subprocess shell is one of /bin/sh, cmd.exe, or some 
other "hard-coded" shell.

(Although I thought that subprocess called "program" directly. Python is still 
new, so if not applicable for subprocess - please ignore

rereading, direct call would be when shell=False I expect.

Anyway, my two cents.

--
nosy: +Michael.Felt

___
Python tracker 

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



[issue25825] AIX shared library extension modules installation broken

2016-07-26 Thread Michael Felt

Michael Felt added the comment:

hmm. needs patch. For what?

One comment says a change will be undone.

If a patch is expected for src/builddir issue:

a) I sinned - that is a new issue, and should be posted seperately.
b) i do not know autotools well enough to solve the srcdir and builddir problem.

rather than a patch i can on that is see if the same issue occurs with linux 
and post a new issue.

So, my question would be - was a rollback done - if yes, perhaps a comment to 
verify and then close this issue.

--

___
Python tracker 

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



[issue27624] unclear documentation on Queue.qsize()

2016-07-26 Thread Doug Hoskisson

Doug Hoskisson added the comment:

My suggestion for this documentation:

"""
Return the number of items in the queue. Note, in multi-threading this mostly 
just serves as an approximation, and information from this doesn’t guarantee 
that a subsequent get() or put() will not block.
"""

--

___
Python tracker 

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



[issue27624] unclear documentation on Queue.qsize()

2016-07-26 Thread Doug Hoskisson

Doug Hoskisson added the comment:

One thing that is important to recognize in considering this, is which 
information is specific to what is being documented, and which information is 
more general.

Some people may think that documentation should only give information specific 
to what is being documented. Others may think it is useful to also include 
general information that can help people learn.

I don't know whether the writers of Python documentation lean to one of these 
or the other, but this contains a significant amount of information that has 
nothing to do with Python specifically, nothing to do with this class 
specifically, and nothing to do with this function specifically. (Again, I'm 
not saying this is bad. I just think it's important for people to recognize it.)

It's just general multi-threading knowledge. Anyone who knows about 
multi-threading (in any language) knows that the queue could change between two 
function calls.

But despite that extra general information, there is some specific information 
missing. Does it return the size of the queue (at the time the memory is 
accessed by the function call)? or does it use a more complex strategy for 
approximating the size of the queue? The reason this information is important 
is that if it is the former, that would be useful in single-threaded situations.

I am guessing that it is the former, but I don't know because not enough 
information is given.

Assuming that guess, I think following the model I see in the documentation of 
the next 2 functions on the page (Queue.empty() and Queue.full()) would be a 
good idea. That is, that the first sentence should only contain information 
specific to what is being documented, and more general information (about 
multi-threading) can be given afterward.

The fact that the size returned is approximate would have nothing to do with 
this function specifically, and it is just general information about how 
multi-threading works.

My suggestion for this documentation (again, assuming that my guess of the 
missing information is correct) I will put in a separate comment because this 
comment will be TLDR for many.

If my guess is incorrect, then something should be clarified to lessen people 
guessing thus. (Maybe this is just projecting, but I think most people would 
make the same guess that I am making.)

--

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-26 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

It looks like th Morocco issue has been reported to CentOS recently but they 
kicked it upstream. 

https://sourceware.org/ml/libc-help/2016-04/msg0.html

--

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-26 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Also reported for Ubuntu:

https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1587128

--

___
Python tracker 

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



[issue24214] Exception with utf-8, surrogatepass and incremental decoding

2016-07-26 Thread RalfM

RalfM added the comment:

I just tested Python 3.6.0a3, and that (mis)behaves exactly like 3.4.3.

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



[issue27617] Compiled bdist_wininst missing from embedded distribution

2016-07-26 Thread Steve Dower

Steve Dower added the comment:

It's core Python, but it's specifically intended for producing redistributable 
installers containing Python packages. This is not something that the embedded 
distro is meant for, and it neatens things up to omit them.

There is very little information because it's considered an internal 
implementation detail (otherwise it would be thoroughly documented). That said, 
because of the narrower use case for the embedded distro, omitting even 
thoroughly documented modules would be okay if it didn't make sense in this 
context (e.g. the turtledemo module is documented, but also not in the embedded 
distro).

--

___
Python tracker 

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



[issue27346] Implement os.readv() / os.writev() in Windows port

2016-07-26 Thread Марк Коренберг

Changes by Марк Коренберг :


--
title: Implement os.readv() / os.writev() -> Implement os.readv() / os.writev() 
in Windows port

___
Python tracker 

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



[issue27617] Compiled bdist_wininst missing from embedded distribution

2016-07-26 Thread Michael Smith

Michael Smith added the comment:

Thanks so much Steve I got it working right away!

I peeked into the bdist_wininst.py and saw that it also depended on some local 
exe files.  Copied both of those to the embedded and everything worked like a 
charm.  I did read the documentation previously so I thought the only real 
dependency was the C Runtime.  Working on a network without any net access I 
have to bring in libraries we version, so basically what you describe 
"vendoring".

If you have time to answer I would like to understand why this particular item 
is not part of the embedded.  Or why is it in the regular install by default?  
When I look at the distutils documentation there is very little information 
about this file.  Is this particular item a 3rd party not core python or?  In 
any case thanks for the help again.

--

___
Python tracker 

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



[issue27624] unclear documentation on Queue.qsize()

2016-07-26 Thread Doug Hoskisson

Doug Hoskisson added the comment:

The way that this whole page of documentation is written does not suggest that 
this class is ONLY for use in a multi-threaded setting.

This class can be used without multi-threading, right?

Wouldn't it be useful to know whether this function does give the exact size of 
the queue in a single-threaded setting?

Right now, it doesn't contain that information.

--

___
Python tracker 

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



[issue27628] ipaddress incompatibility with ipaddr: __contains__ between networks

2016-07-26 Thread Berker Peksag

Berker Peksag added the comment:

See also issue 25431.

--

___
Python tracker 

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



[issue25431] implement address in network in ipaddress module

2016-07-26 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report and for the patch, Aleksandr. This is a duplicate of 
issue 20825. See also issue 27628 for a similar report.

--
dependencies:  -speed up ipaddress __contain__ method
nosy: +berker.peksag
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> containment test for "ip_network in ip_network"

___
Python tracker 

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



[issue27624] unclear documentation on Queue.qsize()

2016-07-26 Thread R. David Murray

R. David Murray added the comment:

What if we just replaced the period with a colon?  That is, the definition of 
"approximate" is the two rules in the second sentence.

--
nosy: +rhettinger

___
Python tracker 

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



[issue27624] unclear documentation on Queue.qsize()

2016-07-26 Thread Doug Hoskisson

Doug Hoskisson added the comment:

Some strategies for approximating might report a size the the queue has never 
been and never will be. For example, a strategy could gather data and find the 
size is increasing at some rate, and approximate based on that rate, but then 
the rate of increase changes before it reaches the approximated size. That's 
the kind of thing that "approximate" would suggest to some people.

--

___
Python tracker 

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



[issue27619] getopt should strip whitespace from long arguments

2016-07-26 Thread R. David Murray

R. David Murray added the comment:

I realized some time after I posted that my comment about it emulating C getopt 
needed a gloss.  What I meant was that C getopt is the model, so there should 
be a sufficient argument that adding a feature is worthwhile.  You are making 
that argument, but Serhiy and I disagree that it is worthwhile, or consistent 
with the fact that Python is a programming language and not a shell.

We may be in the minority, though, for all we know.

--

___
Python tracker 

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



[issue27622] int.to_bytes(): docstring is not precise

2016-07-26 Thread Марк Коренберг

Марк Коренберг added the comment:

Ok. This is minor fix, I will not fight for my point of view :)

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue27628] ipaddress incompatibility with ipaddr: __contains__ between networks

2016-07-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This issue looks as a duplicate of issue20825.

I think that if consider a network as a set of addresses, the operation 
"address in network" has the same meaning as for sets, but the operation 
"network in network" doesn't make a sense. Instead you should use the same 
operation as for testing a subset of a set: "network <= network". But this 
operation is ambiguous, because "<=" usually is ordering operation.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue27619] getopt should strip whitespace from long arguments

2016-07-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

C getopt doesn't strip trailing spaces. What you mistook for stripping trailing 
spaces is actually a feature of GNU getopt that allows you to use shortened 
variant of long option.

$ ./getopdemo "--  sp" 1 --eg 2 "--  ch" 3
option   spam   with arg 1
option eggs   with arg 2
option   cheese with arg 3

--

___
Python tracker 

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



[issue27628] ipaddress incompatibility with ipaddr: __contains__ between networks

2016-07-26 Thread pmoody

Changes by pmoody :


--
assignee: pmoody -> 

___
Python tracker 

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



[issue27628] ipaddress incompatibility with ipaddr: __contains__ between networks

2016-07-26 Thread Łukasz Langa

New submission from Łukasz Langa:

ipaddr historically let users compare if one network is within another network:
https://github.com/google/ipaddr-py/blob/master/ipaddr.py#L643

ipaddress specifically prohibits this comparison:
https://hg.python.org/cpython/file/tip/Lib/ipaddress.py#l675

What is the reason behind this change? I propose we restore this functionality 
for 3.6. It's a behavior change but arguably backwards compatible in the sense 
that between 3.3 and 3.5 this __contains__ comparison always returns False. 
It's also more on par with what ipaddr did in the past. Thoughts?

--
assignee: pmoody
components: Library (Lib)
messages: 271399
nosy: berker.peksag, lukasz.langa, ncoghlan, pmoody
priority: normal
severity: normal
stage: needs patch
status: open
title: ipaddress incompatibility with ipaddr: __contains__ between networks
type: behavior
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



[issue27546] Integrate tkinter and asyncio (and async)

2016-07-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This afternoon, I realized that I would replace the async for loops with while 
loops with await sleep and eliminate the Timer class.  I presume the tutorial 
will have other examples of how to write an async iterator.  (If not, I would 
put is back in.)  I also notices that the updater could also be turned into a 
coroutine, but decided to leave it as it is.

--
Added file: http://bugs.python.org/file43899/loop_tk3.py

___
Python tracker 

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



[issue26226] Test failures with non-ascii character in hostname on Windows

2016-07-26 Thread STINNER Victor

STINNER Victor added the comment:

Please keep it ok. I don't say that we are going to fix all issues, but it's 
good to have an issue which collects as much as possible information about the 
bug and how we can fix it.

--

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-26 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

It looks like PPC64 Fedora 3.x builder [1] also has a problem with a transition 
in 2037.

[1]: http://buildbot.python.org/all/builders/PPC64%20Fedora%203.x

--

___
Python tracker 

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



[issue27619] getopt should strip whitespace from long arguments

2016-07-26 Thread Steven D'Aprano

Steven D'Aprano added the comment:

On Tue, Jul 26, 2016 at 03:27:29PM +, R. David Murray wrote:
[...]
> getopt is explicitly emulating the C getopt

There are lots of differences between the C getopt and the Python 
version, and the Python version is described as offering an API 
"designed to be familiar" to uses of the C version, not to emulate all 
the idiosyncrasies of the C version. For instance, the Python version 
raises an exception on errors, rather than returning -1; the C version 
requires argc ("argument count"), but the Python version doesn't.

But most critically, the C version DOES strip whitespace from long 
arguments. On my Centos box, it only strips *trailing* spaces, not 
leading spaces, but it does strip them. So if your argument is that we 
must do what the C getopt does, then we must likewise at least strip 
trailing spaces.

Attached is a demo, adapted from the code given by `man 3 getopt`.

[steve@ando ~]$ gcc getopdemo.c
[steve@ando ~]$ ./a.out "--  spam" 1 --eggs 2 "--  cheese" 3
option   spam   with arg 1
option eggs   with arg 2
option   cheese with arg 3

If Serhiy is going to insist that getopt.py must follow the C getopt 
precisely, then the failure to strip trailing spaces is certainly a bug.

--
Added file: http://bugs.python.org/file43898/getopdemo.c

___
Python tracker 

___   #include  /* for printf */
   #include /* for exit */
   #include 

   int
   main (int argc, char **argv) {
   int c;
   int digit_optind = 0;

   while (1) {
   int this_option_optind = optind ? optind : 1;
   int option_index = 0;
   static struct option long_options[] = {
   {"  spam  ", 1, 0, 0},
   {"eggs  ", 1, 0, 0},
   {"  cheese", 1, 0, 0},
   {0, 0, 0, 0}
   };

   c = getopt_long (argc, argv, "",
long_options, _index);
   if (c == -1)
   break;

   switch (c) {
   case 0:
   printf ("option %s", long_options[option_index].name);
   if (optarg)
   printf (" with arg %s", optarg);
   printf ("\n");
   break;

   case '?':
   break;

   default:
   printf ("?? getopt returned character code 0%o ??\n", c);
   }
   }
   exit (0);
   }
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27626] Spelling fixes

2016-07-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +martin.panter, r.david.murray

___
Python tracker 

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



[issue3119] pickle.py is limited by python's call stack

2016-07-26 Thread Tomas Gavenciak

Tomas Gavenciak added the comment:

The issue is still present in Python 2.7.12 and Python 3.5.2, and the 
implementation has not been changed in the master branch either.
You can test it with the attached program constructing a graph (simplified, but 
a realistic application), or with the following obviously deep construction:

import pickle, _pickle
a=()
for i in range(1000): a = (a,)
pickle.dumps(a) # or _pickle.dumps(a)

Any further comments or thoughts on the solution?

--
versions: +Python 3.6 -Python 3.1
Added file: http://bugs.python.org/file43897/graphtest.py

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 95df96aa2f5a by Alexander Belopolsky in branch 'default':
Issue #24773: Fixed tests failures on systems with 32-bit time_t.
https://hg.python.org/cpython/rev/95df96aa2f5a

--

___
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-07-26 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Nice, the patch fixes the problem when python is built with gcc :)
Running test_ctypes on the Android emulator when python is built for the arm 
architecture or the armv7 architecture gives in both cases the same successfull 
result:

Ran 456 tests in 30.424s

OK (skipped=92)
test.test_ctypes passed in 41 sec
1 test OK.
Total duration: 0:00:43

I did not try with clang, stopped by the problem in issue 27627 for armv7 and 
in issue 27606 for arm.

--

___
Python tracker 

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



[issue26226] Test failures with non-ascii character in hostname on Windows

2016-07-26 Thread Emanuel Barry

Emanuel Barry added the comment:

Since non-ASCII characters are not really supported in hostnames, I changed 
mine to a saner alternative. This issue can be closed then, since any test 
failure I encounter can no longer be because of this.

One last thing: is it safe to say "Don't use non-ASCII in hostnames" and not 
bother supporting such edge cases? Whichever way we end up going, I think this 
should be documented somewhere (although I don't really have an idea of where). 
I can submit a doc patch for this.

--

___
Python tracker 

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



[issue23085] update internal libffi copy to 3.2.1

2016-07-26 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> Cross-compile CPython for ARM with clang fails in _ctypes due to 
> https://llvm.org/bugs/show_bug.cgi?id=20595. This bug is already fixed in 
> libffi.

I have entered issue 27627 for this problem.

--
nosy: +xdegaye

___
Python tracker 

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



[issue27627] clang fails to build ctypes on Android armv7

2016-07-26 Thread Xavier de Gaye

Xavier de Gaye added the comment:

See also msg 269907 and msg269908.

--

___
Python tracker 

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



[issue27627] clang fails to build ctypes on Android armv7

2016-07-26 Thread Xavier de Gaye

New submission from Xavier de Gaye:

The build is done with:
clang --sysroot=/opt/android-ndk/platforms/android-21/arch-arm -target 
armv7-none-linux-androideabi -gcc-toolchain 
/opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64


The error message:
clang --sysroot=/opt/android-ndk/platforms/android-21/arch-arm -target 
armv7-none-linux-androideabi -gcc-toolchain 
/opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 
-march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -Wno-unused-result 
-Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -Wno-unused-value -Wno-empty-body -Qunused-arguments 
-Wno-parentheses-equality -Werror=declaration-after-statement 
-Ibuild/temp.linux-arm-3.6/libffi/include -Ibuild/temp.linux-arm-3.6/libffi 
-I./Modules/_ctypes/libffi/src -IInclude -I/sdcard/org.bitbucket.pyona/include 
-I. 
-I/home/xavier/src/android/pyona/build/python3.6-install-android-21-armv7/org.bitbucket.pyona/include
 -I/opt/android-ndk/platforms/android-21/arch-arm/usr/include -I./Include 
-I/home/xavier/src/android/pyona/build/python3.6-android-21-armv7 -c 
./Modules/_ctypes/libffi/src/arm/sysv.S -o 
build/temp.linux-arm-3.6./Modules/_ctypes/libffi/src/arm/sysv.o -Wall 
-fexceptions

./Modules/_ctypes/libffi/src/arm/sysv.S:399:2: error: invalid instruction
 stmeqia r2, {r0, r1}
 ^

--
components: Cross-Build
messages: 271385
nosy: Alex.Willmer, Chi Hsuan Yen, xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: clang fails to build ctypes on Android armv7
type: compile error
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



[issue27612] socket.gethostbyname resolving octal IP addresses incorrectly

2016-07-26 Thread R. David Murray

R. David Murray added the comment:

koobs' results are also interesting, since they indicate that *something* 
changed on the python side that affected this for freebsd.

--

___
Python tracker 

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



[issue26865] Meta-issue: support of the android platform

2016-07-26 Thread Xavier de Gaye

Xavier de Gaye added the comment:

issue #27627: clang fails to build ctypes on Android armv7

--
dependencies: +clang fails to build ctypes on Android armv7

___
Python tracker 

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



[issue27624] unclear documentation on Queue.qsize()

2016-07-26 Thread R. David Murray

R. David Murray added the comment:

Since we're talking about multi-threaded operations, the concept of "exact size 
at an arbitrary time" isn't operationally different from "a strategy used for 
approximating".  The subsequent text clarifies what "approximately" means 
operationally.  Specifying it further would be, I think, overspecification.

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



[issue27612] socket.gethostbyname resolving octal IP addresses incorrectly

2016-07-26 Thread R. David Murray

R. David Murray added the comment:

There's also the fact that Eryk pointed out that there are different ways to 
implement this on Windows, so there might be something we want to "fix" there.  
It seems like we're not consistent in how we handle addresses in the various 
socket module functions.

--

___
Python tracker 

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



[issue27626] Spelling fixes

2016-07-26 Thread Emanuel Barry

New submission from Emanuel Barry:

LGTM.

--
nosy: +ebarry
stage: patch review -> commit review

___
Python tracker 

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



[issue27622] int.to_bytes(): docstring is not precise

2016-07-26 Thread R. David Murray

Changes by R. David Murray :


--
Removed message: http://bugs.python.org/msg271381

___
Python tracker 

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



[issue27622] int.to_bytes(): docstring is not precise

2016-07-26 Thread R. David Murray

R. David Murray added the comment:

Looks correct to me as well.  If you can think of a wording that would be 
clearer, Марк, that would be great, but it shouldn't make the docstring much 
wordier (we strive for conciseness in docstrings).  That last phrase can't be 
just removed without omitting an important piece of information (an 
*additional* time OverflowError can be raised).

--

___
Python tracker 

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



[issue27622] int.to_bytes(): docstring is not precise

2016-07-26 Thread R. David Murray

R. David Murray added the comment:

Looks correct to me as well.  If you can think of a wording that would be 
clearer, Марк, that would be great, but it shouldn't make the docstring much 
wordier (we strive for conciseness in docstrings).  That the last phrase can't 
be just removed without omitting an important piece of information (an 
*additional* time OverflowError can be raised).

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



[issue27546] Integrate tkinter and asyncio (and async)

2016-07-26 Thread Guido van Rossum

Guido van Rossum added the comment:

Isn't this going to busy-wait, esp. with the loop.call_soon() version?

Even with loop.call_later(0.1, tk_update) you're wasting battery power
even if no network activity and no UI activity is happening. I'm not
eager to document this as the right way to do things, even if it
unblocks some apps in the short term.

A proper solution IMO should somehow merge the selectors so that a
single select() or whatever wakes up when either network I/O happens
or a UI event comes in (which could be something that Tk transparently
handles but it still needs to be given the chance, through
root.update()).

--

___
Python tracker 

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



[issue27604] More details about `-O` flag

2016-07-26 Thread R. David Murray

R. David Murray added the comment:

It might be better to reduce redundancy (ie: minimize the places that would 
need changing) by creating a cross link from the option description to the 
technical details in veryhigh.rst.  You could make the existing words 'basic 
optimizations' the link text.

Doc changes will be made to 3.5 and 3.6.  I've adjusted the versions 
accordingly.  A single patch against 3.5 will be merged into 3.6 by the 
committer.

--
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue27619] getopt should strip whitespace from long arguments

2016-07-26 Thread R. David Murray

R. David Murray added the comment:

I agree with Serhiy.  Python is a programming language, not a shell.  It seems 
to me that it should not be second guessing a constant specified by the 
programmer.  If the programmer puts spaces in the specification string, Python 
should respect that.  I have no idea why one would do that, but such an option 
*can* be specified in the command line invocation, even using the shell.  And 
yes, misspecifying a constant is a common source of program bugs, but I think, 
as Serhiy pointed out, it would be worse to have some "obvious nonsense" fixed 
but not others.

Now, would we want to enhance getopt to validate the longopts in a more general 
way and raise an error?  I'm not sure it is worth the effort, especially since 
getopt is explicitly emulating the C getopt, and it does not do so.

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



[issue27461] Optimize PNGs

2016-07-26 Thread Ville Skyttä

Changes by Ville Skyttä :


Removed file: http://bugs.python.org/file43653/pngs.patch

___
Python tracker 

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



[issue27461] Optimize PNGs

2016-07-26 Thread Ville Skyttä

Ville Skyttä added the comment:

Updated patch against tip.

Before: 289426  total
After:  194638  total

--
Added file: http://bugs.python.org/file43896/pngs.patch

___
Python tracker 

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



[issue27626] Spelling fixes

2016-07-26 Thread SilentGhost

Changes by SilentGhost :


--
assignee:  -> docs@python
components: +Documentation
nosy: +SilentGhost, docs@python
stage:  -> patch review
type: enhancement -> behavior
versions: +Python 3.5

___
Python tracker 

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



[issue27626] Spelling fixes

2016-07-26 Thread Ville Skyttä

Changes by Ville Skyttä :


--
files: spelling.patch
keywords: patch
nosy: scop
priority: normal
severity: normal
status: open
title: Spelling fixes
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file43895/spelling.patch

___
Python tracker 

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



[issue27614] Race in test_docxmlrpc.py

2016-07-26 Thread R. David Murray

R. David Murray added the comment:

OK, that's a good point.  So I don't know the answer to your question.  In some 
cases it may be mostly that the tests are old and written when the tooling was 
not as good.

--

___
Python tracker 

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



[issue27625] "make install" fails when no zlib support available

2016-07-26 Thread Ned Deily

Ned Deily added the comment:

Building python without zlib is support is pretty unusual today and certainly 
not recommended. I agree that it is not worth adding more complexity to the 
Python configure script or Makefile to cover this edge case dependency in pip.  
There are other potential ensurepip failures, for instance if ssl support is 
missing.

--
nosy: +ned.deily
resolution: not a bug -> wont fix

___
Python tracker 

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



[issue27625] "make install" fails when no zlib support available

2016-07-26 Thread SilentGhost

SilentGhost added the comment:

Well, there isn't anything to build in case of pip. I presume that was the 
decision made during the PEP implementation, so I'm adding the two core 
developers responsible.

--
nosy: +dstufft, ncoghlan

___
Python tracker 

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



[issue27625] "make install" fails when no zlib support available

2016-07-26 Thread Palm Kevin

Palm Kevin added the comment:

Ok, but shouldn't it fail earlier?
During "configure" or "make", not on "make install"...
Perhaps with a message like "Unable to compile with pip because dependency zlib 
is missing"

--

___
Python tracker 

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



[issue27625] "make install" fails when no zlib support available

2016-07-26 Thread SilentGhost

SilentGhost added the comment:

I wouldn't consider that an issue to be honest, the zlib is a dependency of pip 
and this failure is not unexpected.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue27625] "make install" fails when no zlib support available

2016-07-26 Thread Palm Kevin

Palm Kevin added the comment:

Yes. You are right. This solves the problem for me since I don't need pip.
Do you think I should close the issue or rename it into '"make install" fails 
with pip when missing zlib dependency' ?

--

___
Python tracker 

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



[issue27625] "make install" fails when no zlib support available

2016-07-26 Thread Denny Weinberg

Changes by Denny Weinberg :


--
nosy: +Denny Weinberg

___
Python tracker 

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



[issue27516] Wrong initialization of python path with embeddable distribution

2016-07-26 Thread Denny Weinberg

Changes by Denny Weinberg :


--
nosy: +Denny Weinberg

___
Python tracker 

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



[issue27625] "make install" fails when no zlib support available

2016-07-26 Thread SilentGhost

SilentGhost added the comment:

Seems like the issue is caused by pip installation, so you should be able to 
fix it using --without-ensurepip switch for configure.

--
nosy: +SilentGhost

___
Python tracker 

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



[issue27612] socket.gethostbyname resolving octal IP addresses incorrectly

2016-07-26 Thread STINNER Victor

STINNER Victor added the comment:

> I didn't, but an attacker leveraged this to bypass security.

Ah, that's a real use case. Can you please rephrase the issue title to make it 
more explicit?

Because in this issue, it's not obvious to me if octal addressses must be 
accepted on all platforms, or rejected on all platforms.

--

___
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-07-26 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Test results against patched libffi in Modules/_ctypes:

shell@ASUS_Z00E_2:/data/local/tmp $ python3.6 -m test.test_ctypes  
...s..s..sss...s...sssOpenGL
 libraries:
 ('GL', None)
 ('GLU', None)
 ('gle', None)
sss...s.ss.libc_name is None
ss.s...s...s...ss..s.s..ss..sssFsss
==
FAIL: test_struct_by_value (ctypes.test.test_win32.Structures)
--
Traceback (most recent call last):
  File "/data/local/tmp/python3/lib/python3.6/ctypes/test/test_win32.py", line 
133, in test_struct_by_value
self.assertEqual(ret.left, left.value)
AssertionError: -200 != 10

--
Ran 456 tests in 1.970s

FAILED (failures=1, skipped=92)

A failure occurs with libffi 3.1 while all tests passes with libffi git-master. 
Issue23085 may be the solution.

--

___
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-07-26 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

By msg264746, only ARM fails, so I patch libffi for arm and aarch64 triplets 
only

--
keywords: +patch
Added file: http://bugs.python.org/file43894/libffi-pr240.patch

___
Python tracker 

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



[issue27625] "make install" fails when no zlib support available

2016-07-26 Thread Palm Kevin

New submission from Palm Kevin:

It seems that on linux (red hat), the "make install" fails when no zlib support 
is available. (I have no zlib installed and I don't want to do so)

I reproduced the problem with both python 3.5.1 and python 3.5.2

The command 'configure' and 'make' produced no errors, but the 'make install' 
failed with this error message:
if test "xupgrade" != "xno"  ; then \
case upgrade in \
upgrade) ensurepip="--upgrade" ;; \
install|*) ensurepip="" ;; \
esac; \

LD_LIBRARY_PATH=/usr/ls/tmp/py/Python-3.5.2:/usr/ls/app/python35/lib:./ls/lib:./ls/lib:/usr/molis/uniface9606/common/lib:/usr/molis/dlm/Linux/amd64:/usr/oracle/product/11.2.0/lib:/usr/oracle/product/11.2.0/lib:
 ./python -E -m ensurepip \
$ensurepip --root=/ ; \
fi
Traceback (most recent call last):
  File "/usr/ls/tmp/py/Python-3.5.2/Lib/runpy.py", line 184, in 
_run_module_as_main
"__main__", mod_spec)
  File "/usr/ls/tmp/py/Python-3.5.2/Lib/runpy.py", line 85, in _run_code
exec(code, run_globals)
  File "/usr/ls/tmp/py/Python-3.5.2/Lib/ensurepip/__main__.py", line 4, in 

ensurepip._main()
  File "/usr/ls/tmp/py/Python-3.5.2/Lib/ensurepip/__init__.py", line 209, in 
_main
default_pip=args.default_pip,
  File "/usr/ls/tmp/py/Python-3.5.2/Lib/ensurepip/__init__.py", line 116, in 
bootstrap
_run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/usr/ls/tmp/py/Python-3.5.2/Lib/ensurepip/__init__.py", line 40, in 
_run_pip
import pip
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [install] Error 1


zlib is not required to run Python 3.5, it should thus not be required neither 
for setting up python.

--
components: Build
messages: 271366
nosy: palm.kevin
priority: normal
severity: normal
status: open
title: "make install" fails when no zlib support available
type: compile error
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



[issue27612] socket.gethostbyname resolving octal IP addresses incorrectly

2016-07-26 Thread Matt Robenolt

Matt Robenolt added the comment:

> Why do you need octal addresses? What is your use case? :-p

I didn't, but an attacker leveraged this to bypass security. We had checks 
against `127.0.0.1`, but this resolved to `177.0.0.1` incorrectly, bypassing 
the check. We were using `socket.gethostbyname` which yielded this.

See https://github.com/getsentry/sentry/pull/3787 for a little bit more context.

--

___
Python tracker 

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



[issue27612] socket.gethostbyname resolving octal IP addresses incorrectly

2016-07-26 Thread STINNER Victor

STINNER Victor added the comment:

> However, if someone wants to investigate further and finds a fix, we will 
> evaluate it.

IMHO the best fix is to document that the exact behaviour depends on the 
platform, and that only IPv4 decimal and IPv6 hexadecimal are portable. Corner 
cases like IPv4 octal addresses are not portable, you should write your own 
parser.

Note: I checked ipaddress, it doesn't seem to support the funny octal addresses 
format.

Why do you need octal addresses? What is your use case? :-p

--

___
Python tracker 

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



[issue27612] socket.gethostbyname resolving octal IP addresses incorrectly

2016-07-26 Thread STINNER Victor

STINNER Victor added the comment:

I don't understand the point of the issue. Is it a documentation issue?

Python doesn't parse anything: it's a thin wrapper on top of the standard C 
library. If you want to complain, report the issue to the maintainers of your C 
library ;-)

--
nosy: +haypo

___
Python tracker 

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



[issue27624] unclear documentation on Queue.qsize()

2016-07-26 Thread Doug Hoskisson

New submission from Doug Hoskisson:

The documentation for Queue.qsize():

"Return the approximate size of the queue."

"approximate" is unclear. It might suggest some strategy used for 
approximating, or it might be the exact size at an arbitrary time.
It should be made more clear.

--
assignee: docs@python
components: Documentation
messages: 271362
nosy: Doug Hoskisson, docs@python
priority: normal
severity: normal
status: open
title: unclear documentation on Queue.qsize()
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



[issue27619] getopt should strip whitespace from long arguments

2016-07-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Who would want options --f o o, --f�oo, or --fоо?

--

___
Python tracker 

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



[issue27621] incorrectly works in IDLE Query dialogs

2016-07-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is against the convention.

--

___
Python tracker 

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



[issue27619] getopt should strip whitespace from long arguments

2016-07-26 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Serhiy Storchaka added the comment:
> It makes Python getopt behave less like the C getopt.

Exactly! If C getopt allows whitespace in long options, it's a GOOD 
thing to avoid such a poor design. Who would want a option --foo  (note 
the trailing space)?

--

___
Python tracker 

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



[issue27621] incorrectly works in IDLE Query dialogs

2016-07-26 Thread Steven D'Aprano

Steven D'Aprano added the comment:

I expect that ESC should always cancel, and RETURN/ENTER should always accepts 
(OK or Save or whatever the "main" button is) regardless of where the focus is. 
If you want a keyboard shortcut to push the button with focus, use SPACE, not 
ENTER.

--
nosy: +steven.daprano

___
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-07-26 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Thanks for looking into that problem.
Can you provide a patch ?

--

___
Python tracker 

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



[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-07-26 Thread koobs

Changes by koobs :


--
nosy: +koobs

___
Python tracker 

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



[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-07-26 Thread Xavier de Gaye

Changes by Xavier de Gaye :


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

___
Python tracker 

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



[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-07-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5aff28f33b2a by Xavier de Gaye in branch '3.5':
Issue #26662: Set PYTHON_FOR_GEN in configure
https://hg.python.org/cpython/rev/5aff28f33b2a

New changeset a290f992e69a by Xavier de Gaye in branch 'default':
(merge from 3.5) Issue #26662: Set PYTHON_FOR_GEN in configure
https://hg.python.org/cpython/rev/a290f992e69a

--
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-07-26 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Found libffi PR240 that fixes closures on Android:

shell@ASUS_Z00E_2:/data/local/tmp $ python3.6 -m test.test_ctypes
...s..s..sss...s...sssOpenGL
 libraries:
 ('GL', None)
 ('GLU', None)
 ('gle', None)
sss...s.ss.libc_name is None
ss.s...s...s...ss..s.s..ss..sss.sss
--
Ran 456 tests in 2.090s

OK (skipped=92)

See 
https://github.com/yan12125/python3-android/commit/1daebca128e9ca1a9a39ef143ded7090cfa71cc9
 for details.

By http://comments.gmane.org/gmane.comp.lib.ffi.general/1235, SELinux affects 
the result, too. PR240 of libffi assumes SELinux is disabled. I have disabled 
SELinux on my phone for some root applications. I'm not sure whether PR240 
works for phones with SELinux or not.

--

___
Python tracker 

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



[issue20948] -Wformat=2 -Wformat-security findings

2016-07-26 Thread Martin Panter

Martin Panter added the comment:

GCC’s -Wformat options are documented at 
. We 
already enable -Wall by default, which implicitly enables -Wformat, but not 
-Wformat=2. Apparently, -Wformat=2 enables -Wformat-security, so you shouldn’t 
have to manually enable it.

The -Wformat-security option enables warnings for stuff like printf(variable), 
without any extra arguments. Such a call could easily be changed, even if it is 
not a genuine problem. So I wouldn’t have a problem enabling this warning by 
default. (See also Issue 23545 proposing a few other warnings.)

However I am not convinced it is worth working around the -Wformat-nonliteral 
warnings, given that all the warnings given above were false positives, and the 
general workaround would need six or seven preprocessor lines.

--

___
Python tracker 

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



[issue26851] android compilation and link flags

2016-07-26 Thread Xavier de Gaye

Xavier de Gaye added the comment:

New patch. The sed commands used to evaluate ANDROID_API_LEVEL and _arm_arch do 
not need to discard comment lines and empty lines in the output of the 
preprocessor.

--
Added file: http://bugs.python.org/file43893/build-flags_4.patch

___
Python tracker 

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



[issue20948] -Wformat=2 -Wformat-security findings

2016-07-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Seems warnings are gone after adding the const qualifier to static constant 
arrays (issue25923).

--

___
Python tracker 

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



[issue26462] Patch to enhance literal block language declaration

2016-07-26 Thread Julien

Julien added the comment:

@martin I reviewed my changes on `decimal.rst` and I now just fixing the 
indentation problem, so I don't change anything unrealated to fixing warnings, 
and don't break doctests.

--

___
Python tracker 

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



[issue26462] Patch to enhance literal block language declaration

2016-07-26 Thread Julien

Julien added the comment:

Here a new patch after reviewing comments on rietveld.

--
Added file: http://bugs.python.org/file43892/issue26462.v5.diff

___
Python tracker 

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



[issue20948] -Wformat=2 -Wformat-security findings

2016-07-26 Thread Jeffrey Walton

Jeffrey Walton added the comment:

On Tue, Jul 26, 2016 at 4:31 AM, Martin Panter  wrote:
>
> Martin Panter added the comment:
>
> The Modules/main.c cases are not errors. They are just long strings defined 
> as static constants, rather than literals passed in directly.
>
> I think we can close this now. Unless people think this warning is worth 
> using, in which case we should find a way to work around the false positives.
>

Would it be possible to add some instrumentation to silence the
finding? There's no sense in having multiple developers and qa
research the issue. I'm guessing a percentage of developers and qa
will file bug reports, so it will burn some of the python team's
cycles, too.

Maybe something like:

#if (GCC_VERSION >= 40600) || (LLVM_CLANG_VERSION >= 10700) ||
(APPLE_CLANG_VERSION >= 2)
#  define GCC_DIAGNOSTIC_AVAILABLE 1
#endif

#if GCC_DIAGNOSTIC_AVAILABLE
#  pragma GCC diagnostic ignored "-Wformat-security"
#endif

If its safe to ignore the warning, then the technique above should be
safe for a C/CC/CXX/CPP files. It will not cross-pollinate because its
a source file, and not a header file.

Jeff

--

___
Python tracker 

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



  1   2   >