[issue23977] Enhancing IDLE's test_delegator.py unit test

2016-05-14 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The patch adds too much.  Some of the comments are too obvious.  See PEP 8.  
Many of the messages repeat the information already provided in the custom 
messages already provided by the assertXyz failure methods.  For instance, when 
assertEqual(a, b) fails, the message already prints out something like "%s != 
$s" % (repr(a), repr(b)).  Perhaps you were not familiar with this.  One of the 
problems of retrofitting tests is that we do not see the default failure 
messages.

In any case, over-commenting and over-messaging are not harmless as they make 
code and failure messages harder, not easier to read.  I will review and add 
what I think is useful.

--
assignee:  -> terry.reedy
nosy: +terry.reedy
stage:  -> patch review
versions: +Python 3.6

___
Python tracker 

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



[issue20640] Idle: test configHelpSourceEdit

2016-05-14 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The glitch with the section name was that the second time the name was pulled 
from the StringVar, it was not stripped.  The possible fixes were to strip 
after the second get, get once in ok(), strip, and pass to name_ok, or get once 
in name_ok, strip, and return to ok().  Both the latter two simplify the code a 
bit.

For help-source, the second gets were alreads stripped as well, so the glitch 
is not present.  I applied the patch as posted.  If I were to make a change to 
get once, I would do it in ok rather than in xyz_ok.  Maybe when I combine the 
files.

--
assignee:  -> terry.reedy
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6 -Python 2.7, Python 3.4

___
Python tracker 

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



[issue20640] Idle: test configHelpSourceEdit

2016-05-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c05689e630d3 by Terry Jan Reedy in branch '3.5':
Issue #20640: Add tests for idlelib.configHelpSourceEdit.
https://hg.python.org/cpython/rev/c05689e630d3

--
nosy: +python-dev

___
Python tracker 

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



[issue27024] IDLE shutdown glitch when started by import

2016-05-14 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Win10, 3.5.1: Run 'python' in interactive mode.
>>> import idlelib.idle  # open idle shell
# or import idlelib.__main__
# only works once in an interactive session as re-import does not rerun
# In IDLE, open editor to some file.  For instance, alt-M, idlelib.run.

# Close editor, close shell.  In python, see something like
>>> bgerror failed to handle background error.
Original error: invalid command name "2361007434952font_timer_event"
Error in bgerror: can't invoke "tk" command: application has been destroyed"

Exit python, restart, import to start idle.
Close shell, close editor.  In python window, see
>>> invalid command name "1220802489864timer_event"
while executing
"1220802489864timer_event"
("after" script)
invalid command name "1220865810504font_timer_event"
while executing
"1220865810504font_timer_event"
("after" script)

Opening IDLE directly with 'python -m idlelib' (or 'idlelib.idle') does not 
show the problem.  So this is not a problem for the vast majority of users who 
run idle in an idle process.

My guess is that shutting down the entire process instead of just the idle part 
of a process shuts down tcl/tk and any pending callbacks.  Perhaps some tkinter 
class is called without passing the explicit IDLE root.  Though I then would 
not understand why the callback fails.

My guess is that the order dependence is associated with the startup and 
shutdown code being part of PyShell instead of being in an independent app 
module.  (I hope to change this.)

Serhiy, do you have any additiional insight into what is going on and what I 
should look for?

--
components: IDLE
messages: 265581
nosy: serhiy.storchaka, terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE shutdown glitch when started by import
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



[issue26039] More flexibility in zipfile write interface

2016-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Agreed that the docstring should be shorten version of the documentation and 
not vice versa. The directory slash information is implementation detail. I'm 
not sure it is needed in the documentation.

--

___
Python tracker 

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



[issue27020] os.writev() does not accept generators (as buffers argument)

2016-05-14 Thread Марк Коренберг

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

Pull request to asyncio:

https://github.com/python/asyncio/pull/339

--

___
Python tracker 

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



[issue27020] os.writev() does not accept generators (as buffers argument)

2016-05-14 Thread Марк Коренберг

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

Well, I'm improving asyncio performance.

Instead of using bytearray as a big buffer and appending to it, I use deque of 
buffers. This eliminates memory copying.

When writing is possible, I call writev()/sendmsg().

Unfortunatelly, OS sets limit on count of buffers passed to writev()/sendmsg(). 
So I should slice deque to cut first N members. This is not possible too, 
deque()[:N] does not work.

So, I decide to use itertools.islice(deque(), 0, N) for that. This work great 
with sendmsg(). But fail with writev().

Also, writev guarantee atimicity with ther writes in kernel, we must not limit 
way of obtainig buffers before passing to kernel.

If Python have emulation of writev() on OS where it is not supported, it should 
be thrown out, because atomicity requirements will not be accomplished. And 
writes to non-seekable fd from another process may be intermixed. Say, for 
example, files opened in append-only mode.

--

___
Python tracker 

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



[issue27018] Incorrect documentation of select module

2016-05-14 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Thanks for the report, Salvo.
And thank you for the patch, SilentGhost. This is fixed in the active versions 
of python.

--
nosy: +orsenthil
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue27018] Incorrect documentation of select module

2016-05-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 37c95a4b979a by Senthil Kumaran in branch '3.5':
issue27018 - Fix the documentation of select.epoll.register method.
https://hg.python.org/cpython/rev/37c95a4b979a

New changeset eca161a355d4 by Senthil Kumaran in branch 'default':
merge from 3.5
https://hg.python.org/cpython/rev/eca161a355d4

--
nosy: +python-dev

___
Python tracker 

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



[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b8b2c5cc7e9d by Martin Panter in branch 'default':
Issue #26870: Temporary debugging for OS X Snow Leopard lockup
https://hg.python.org/cpython/rev/b8b2c5cc7e9d

--

___
Python tracker 

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



[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

Yes 3.5 and 2.7 are open for documentation fixes. As long as there are no major 
differences, it is usually easier to make one patch against 3.5 or 3.6, and 
then I can fix any minor differences when applying it to 2.7.

--
versions: +Python 2.7, Python 3.5

___
Python tracker 

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



[issue25533] Make pkgutil.iter_modules() yield built-in modules

2016-05-14 Thread Nick Coghlan

Nick Coghlan added the comment:

To answer Brett's question about "Why does walk_packages import parent 
modules?", the answer is "Because __init__ can modify __path__, so if you don't 
import the parent module, you may miss things that actually doing the import 
would find".

The classic example of this is pre-3.3 namespace packages: those work by 
calling pkgutil.extend_path() or pkg_resources.declare_namespace() from the 
package's __init__ file, and they can be made to work regardless of whether or 
not the parent module is implemented as "foo.py" or "foo/__init__.py". 

My recollection is that the pkgutil APIs treat that capability as a basic 
operating assumption: they import everything they find and check it for a 
__path__ attribute on the grounds that arbitrary modules *might* set __path__ 
dynamically.


It would potentially be worthwhile introducing side-effect free variants of 
these two APIs: "pkgutil.iter_modules_static()" and 
"pkgutil.walk_packages_static()" (suggested suffix inspired by 
"inspect.getattr_static()".

The idea with those would be to report all packages that can be found whilst 
assuming that no module dynamically adds a __path__ attribute to itself, or 
alters a __path__ attribute calculated by a standard import hook.

Actually doing that in a generic fashion would require either expanding the 
APIs for meta_path importers and path import hooks or else using 
functools.simplegeneric to allow new walkers to be registered for unknown 
importers and hooks, with the latter approach being closer to the way pkgutil 
currently works.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-14 Thread Tyler Crompton

Tyler Crompton added the comment:

I suppose the only thing that could be left is adding remarks in the 
documentations for previous versions. If I understand correctly, this would 
only be added to the documentations for Python 2.7 and 3.5. Is this correct?

Since this is the first issue in which I've submitted a patch, I'm still quite 
new to the CPython development workflow; is there a special way to indicate 
that a patch should be applied to a branch other than default? Or is that done 
simply by informally indicating so in a message?

--

___
Python tracker 

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



[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

My test locked up on an OS X buildbot 
:

Timeout (0:15:00)!
Thread 0x7fff71296cc0 (most recent call first):
  File 
"/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/subprocess.py", 
line 1612 in _try_wait
  File 
"/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/subprocess.py", 
line 1662 in wait
  File 
"/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/subprocess.py", 
line 1003 in __exit__
  File 
"/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_readline.py",
 line 146 in run_pty
  File 
"/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_readline.py",
 line 115 in test_auto_history_disabled

The parent was hanging as it exits the child proc context manager, waiting for 
the child to exit. Perhaps some exception happened in the parent before it 
could write to the child, so the child is still waiting on input. So I added 
code to close the master in case of exception, which may at least help 
understand the situation.

--

___
Python tracker 

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



[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 27a49daf7925 by Martin Panter in branch 'default':
Issue #26870: Close pty master in case of exception
https://hg.python.org/cpython/rev/27a49daf7925

--

___
Python tracker 

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



[issue27023] Documentation of tempfile.gettempdir() does not mention it only supports existing directories

2016-05-14 Thread Steven D'Aprano

Steven D'Aprano added the comment:

I don't understand. The documentation clearly states:

"Python searches a standard list of directories to find one which the calling 
user can create files in." How do you expect to be able to write files to a 
directory that doesn't exist?

--
nosy: +steven.daprano

___
Python tracker 

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



[issue20886] Disabling logging to ~/.python_history is not simple enough

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

Thanks to Issue 26870, in Python 3.6 you should be able to call 
readline.set_auto_history(False) to stop entries being added to the history 
list. Does that change anything here?

--
nosy: +martin.panter

___
Python tracker 

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



[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4195fa81b188 by Martin Panter in branch 'default':
Issue #26870: Add readline.set_auto_history(), originally by Tyler Crompton
https://hg.python.org/cpython/rev/4195fa81b188

--
nosy: +python-dev

___
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-14 Thread Guido van Rossum

Guido van Rossum added the comment:

Simpler repro:

from collections import UserList
from typing import Sequence
class MyList(UserList, Sequence):
pass
isinstance(None, Sequence)

No progress yet in understanding. :-(

--

___
Python tracker 

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



[issue25533] Make pkgutil.iter_modules() yield built-in modules

2016-05-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2f19766d4b20 by Martin Panter in branch '3.5':
Issue #25533: Update documentation regarding the frozen modules table
https://hg.python.org/cpython/rev/2f19766d4b20

New changeset b20b580bc186 by Martin Panter in branch 'default':
Issue #25533: Merge frozen module docs from 3.5
https://hg.python.org/cpython/rev/b20b580bc186

--
nosy: +python-dev

___
Python tracker 

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



[issue2675] Curses terminal resize problems when Python is in interactive mode

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

For the record, this is my interpretation of Pavel’s demo:

If you press a key (other than lowercase “q”) or resize the terminal, it 
displays the terminal dimensions in the top-left corner. Without Readline, the 
dimensions are updated when the terminal resizes.

When Readline is used (interactive mode, or simply “import readline”), the 
reported dimensions are static, which I understand is the bug.

Documentating this quirk may be a good start.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, martin.panter
stage: test needed -> needs patch
versions: +Python 2.7, Python 3.5, Python 3.6 -Python 3.3

___
Python tracker 

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



[issue3948] readline steals sigwinch

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

Is this actually about how SIGWINCH handlers are installed, or is it a 
complaint about readline affecting how curses handles resize events? I am 
assuming this is about handling resize events, so is a duplicate of Issue 2675.

If it is specifically about SIGWINCH, I understand Gnu Readline recently 
changed its SIGWINCH handling so that it only installs the handler when it is 
active. As a result, we recently changed Python to install its own SIGWINCH 
handler on behalf of Readline (Issue 23735). But I understand in both cases, 
the handler for Readline chain calls the original handler, so there should be 
no problem.

--
nosy: +martin.panter
resolution:  -> duplicate
status: open -> closed
superseder:  -> Curses terminal resize problems when Python is in interactive 
mode

___
Python tracker 

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



[issue25533] Make pkgutil.iter_modules() yield built-in modules

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

It looks like Issue 1644818 is the one for built-in _packages_.

I might wind back the frozen module stuff and go back to just builtins and 
sys.path searching. The two problems were the existing frozen packages that 
print stuff out for the test suite, and the lack of search “paths” for frozen 
submodules. I feel that these might be solved without too much effort, so if 
people want this feature or have suggestions, I am happy to revisit this.

For the record, I think walk_packages() would import every _package_ (not 
non-packages), in order to be able to properly find their submodules. Also, 
“pydoc -k” would have to import every module to be able to search its defined 
classes, functions, doc strings, etc.

--

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2016-05-14 Thread Cameron Simpson

Cameron Simpson added the comment:

Amendment: I wrote above: "Just because a lot of things can be 
written/constructed as one liners doesn't mean they should be operators". Of 
course I meant to write "doesn't mean they should _not_ be operators".

--

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2016-05-14 Thread Cameron Simpson

Cameron Simpson added the comment:

I'd like speak my support for bitwise ops on bytes and bytearray (agree, on 
equal lengths only).

I've got 2 arguments here:

- readability: a ^ b, a | b and so forth are clear and direct

- all the various incantation presented must be _understood_, not to mention 
invented anew by anyone wanting to do they same, with the same burden of 
getting it correct; of course one can say the same of any feature not already 
present in a language but that is trite; there are several ways to say this and 
all have varying degrees of speed, obtuseness and verbosity. And they're all 
SLOW.

Regarding some of the counter arguments in the discussion:

- gregory.p.smith in reply to cowlicks: "Security claims?  Nonsense. This has 
nothing to do with security.  It is *fundamentally impossible* to write 
constant time side channel attack resistant algorithms [...]"

Maybe cowlicks should have said "reliable", though to my naive eye a normal 
implementation would be constant time for a given size. I would argue that the 
clarity and directness of just writing "a^b" immediately makes for trivially 
correct code, which itself is a necessary prerequisite for secure code.

- gregory.p.smith again: "Neither of the above "look as nice" as a simple 
operator would. But they are at least both understandable and frankly about the 
same as what you would naively write in C for the task."

This is not an argument against the feature. That one had to perform similar 
activitie in Python as in C merely reflects the present lack of these 
operators, not a preexisting gleaming sufficiency of operator richness.

- Terry J. Reddy: "'XOR of two bytes in one place' strikes me as a thin excuse 
for a new feature that abbreviates a simple, short, one-liner". Christian 
Heimes's code has this single example, but anyone wanting to work on chunks of 
bytes may find themselves here. Just because a lot of things can be 
written/constructed as one liners doesn't mean they should be operators when 
(a) the operator is available (==unused) for this type, (b) the meaning of the 
operator is straight forward and intuitive and (c) any pure Python construction 
is both wordier and much slower.

Anyway, I an for this feature, for the record.

--

___
Python tracker 

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



[issue26039] More flexibility in zipfile write interface

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

The bonus patch looks okay, although I wonder if the directory slash (/) 
information should be in the RST rather than doc string. Usually the RST has 
all the details, and doc strings are just summaries.

Regarding exceptions, I can sympathise with both sides of the argument and 
don’t have a strong opinion (why does the exception type matter for programmer 
errors anyway?). But I think it might be better to be locally consistent within 
the zipfile module, and the module is already heavily documented with 
RuntimeError for similar programmer errors.

--

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2016-05-14 Thread Cameron Simpson

Changes by Cameron Simpson :


--
nosy: +cameron

___
Python tracker 

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



[issue24693] zipfile: change RuntimeError to more appropriate exception type

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

I have hardly used the zipfile module, but here are my thoughts on some of the 
exceptions anyway :)

Some of these exceptions are documented, so the documentation would need 
updating.

BadZipFile for corrupted field seems reasonable.

The purpose of RuntimeError is not clearly documented, but I have the feeling 
it gets used mainly for programmer errors, rather than errors caused by 
external data. So I tend to agree a couple of the changes away from 
RuntimeError, such as the invalid password case.

For programmer errors, I doubt the exception type matters much for 
compatibility. RuntimeError seems fine to me, but I accept that ValueError is 
more consistent with open(..., mode="invalid"), operations on closed files, etc.

--
nosy: +martin.panter

___
Python tracker 

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



[issue26934] android: test_faulthandler fails

2016-05-14 Thread STINNER Victor

STINNER Victor added the comment:

Does faulthandler._read_null() crash Python? If yes, I should patch 
test_faulthandler to replace all _sigsegv() with faulthandler._read_null().

I was too lazy to do that because currently the unit tests checks the exact 
error message, whereas _read_null() gives different error messages depending on 
the platform.

--

___
Python tracker 

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



[issue26934] android: test_faulthandler fails

2016-05-14 Thread STINNER Victor

STINNER Victor added the comment:

> This is due to something mysterious in Android's bionic & kernel. For the 
> following C program:
> (...)

Please try without "sigaction(SIGSEGV, NULL, NULL);". Does the program still 
quit?

--

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-05-14 Thread Colm Buckley

Colm Buckley added the comment:

@haypo - yes, I think you're right. Can you delete those two lines (or I can 
upload another version if you prefer).

I think the pragmatic thing here is to proceed by reading /dev/urandom (as 
we've discussed). It's not safe to raise an exception in py_getrandom from what 
I can see; a thorough effort to signal the lack of randomness to outer 
functions needs more code examination than I have time to carry out at the 
moment.

>From looking at when PyRandom_Init is called and how the hash secret is used; 
>I think it is safe to proceed with /dev/urandom. The general understanding is 
>that urandom has a lower entropy quotient than random, so it's hopefully not 
>going to be used in strong crypto contexts.

--

___
Python tracker 

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



[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2016-05-14 Thread Eugene Toder

Eugene Toder added the comment:

Fairly sure it's 5 years old.

--

___
Python tracker 

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



[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2016-05-14 Thread STINNER Victor

STINNER Victor added the comment:

"issue11549.patch: serhiy.storchaka, 2016-05-11 08:22: Regenerated for review"

diff -r 1e00b161f5f5 PC/os2emx/python33.def
--- a/PC/os2emx/python33.defWed Mar 09 12:53:30 2011 +0100
+++ b/PC/os2emx/python33.defWed May 11 11:21:24 2016 +0300

The revision 1e00b161f5f5 is 4 years old. The patch looks very outdated :-/

--

___
Python tracker 

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



[issue21199] Python on 64-bit Windows uses signed 32-bit type for read length

2016-05-14 Thread STINNER Victor

STINNER Victor added the comment:

I'm lost in this old issue. Can someone please try to summarize it? What is the 
problem? What is the proposed fix? What is the status?

--

___
Python tracker 

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



[issue26970] Replace OpenSSL's CPRNG with system entropy source

2016-05-14 Thread STINNER Victor

STINNER Victor added the comment:

> I have to replace _PyOS_URandom with a variant that doesn't need the GIL

Please don't replace it, but add a new function which report errors 
differently. Which kind of granularity do you expect for the error reporting? 
Just a boolean (success or failure)?

Most implementations of _PyOS_URandom() already has a private "int raise" 
parameter to specify how errors are reported: raise an exception or call 
Py_FatalError().

--

___
Python tracker 

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



[issue26919] android: test_cmd_line fails

2016-05-14 Thread STINNER Victor

STINNER Victor added the comment:

I commented retrofit_osx_2.patch on the review.

--

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-05-14 Thread STINNER Victor

STINNER Victor added the comment:

getrandom-nonblocking-v2.patch:

+   /* Alternative might be to return all-zeroes as a strong
+* signal that these are not random data. */

I don't understand why you propose that in a comment of your change. I don't 
recall that this idea was proposed or discussed here.

IMHO it's a very bad idea to fill the buffer with zeros, the caller simply has 
no idea how to check the quality of the entropy. A buffer filled with zeros is 
"possible" even with high quality RNG, but it's really very very rare :-)

If you consider that a strong signal is required, you must raise an exception. 
But it looks like users don't care of the quality of the RNG, they request that 
Python "just works".

--

___
Python tracker 

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



[issue26920] android: test_sys fails

2016-05-14 Thread STINNER Victor

STINNER Victor added the comment:

test_c_locale_surrogateescape.patch LGTM.

--

___
Python tracker 

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



[issue26993] Copy idlelib *.py files with new names

2016-05-14 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I finished reopening #24225 (renaming), for 3.6 only.  I will open a new issue 
with Larry Hastings nosy, should I proposed (next fall) to backport the 
revamped idlelib to 3.5.

--
resolution:  -> postponed
superseder:  -> Idlelib: changing file names

___
Python tracker 

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



[issue24225] Idlelib: changing file names

2016-05-14 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
superseder: Idlelib: changing file names -> 

___
Python tracker 

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



[issue24225] Idlelib: changing file names

2016-05-14 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution: later -> 
stage:  -> test needed
superseder:  -> Idlelib: changing file names

___
Python tracker 

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



[issue26039] More flexibility in zipfile write interface

2016-05-14 Thread Thomas Kluyver

Thomas Kluyver added the comment:

Patch attached for points 2 and 3

--
Added file: http://bugs.python.org/file42851/zipfile-flex-bonus.patch

___
Python tracker 

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



[issue24225] Idlelib: changing file names

2016-05-14 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The conclusion of issue 26993 is that we should apply this issue to 3.6.  My 
target for inclusion is alpha2, scheduled for June 12.

I am aware that this will require changing file names in existing patches on 
the tracker.  But they nearly all have the much larger problem of needing the 
new tests that I will now start to require.

Nick suggested above that breaking code should be more palatable if introduced 
in a context of overall improvement, including better clarity in supported 
APIs.  Here is a start on the IDLE What's New entry that should be part of this 
issue.

"Idlelib is being revamped to make IDLE look better and work better and to make 
it easier to maintain and improve IDLE.

Part of looking better is the use of ttk widgets.  As a result, IDLE no longer 
runs with tcl/tk 8.4.  It now requires tcl/tk 8.5 or 8.6.  We recommend running 
the latest release of either.

'Revamping' includes renaming, refactoring, and consolidation of idlelib 
modules. As a result, imports of idlelib files that worked in 3.5 will usually 
not work in 3.6.  At least a module name change will be needed, sometimes more. 
 Information will be added to idlelib.  In compensation, the eventual result 
with be that some idlelib classes will be easier to use, with better APIs and 
docstrings explaining them."

--
nosy: +ned.deily
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



[issue26039] More flexibility in zipfile write interface

2016-05-14 Thread Thomas Kluyver

Thomas Kluyver added the comment:

1. For the cases like read/write handles conflicting, ValueError doesn't seem 
quite right to me - I take ValueError to mean that you have passed an invalid 
value to a function. RuntimeError feels like the closest fit for 'the current 
state does not allow this operation'. It is rather broad, though.

If I was writing it anew, I would use ValueError for something like an invalid 
mode parameter: zf.open('foo', mode='q') . That particular case was already in 
the code, though, so I think backwards compatibility should take precedence.

2 & 3. Agreed, I'll prepare a patch

--

___
Python tracker 

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



[issue11980] zipfile.ZipFile.write should accept fp as argument

2016-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

A more general feature is implemented in issue26039. Now you can write to ZIP 
archive the content of opened file object with following two lines:

with zipf.open('file.txt', 'wb') as target:
shutil.copyfileobj(source, target)

--
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue27020] os.writev() does not accept generators (as buffers argument)

2016-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This makes sense. The purpose of writev() is to write all data in single atomic 
operation. In any case a sequence should be built.

This looks rather as intentional behavior than as a bug to me.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26039] More flexibility in zipfile write interface

2016-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are yet few issues.

1. Currently RuntimeError is widely used in zipfile. But in most cases 
ValueError would be more appropriate since it programming error (for example 
ValueError is raised when try to read or write to closed file). See issue24693, 
but this is backward incompatible change. For new exceptions we are free to use 
any exception type without breaking backward compatibility. It looks to me, 
that ValueError is more appropriate is these cases than RuntimeError. What do 
you think about this Thomas? Here is a patch that changes exceptions types.

2. ZipInfo.is_dir() is not documented and lacks a docstring.

3. It would be better to make force_zip64 a keyword-only parameter. This would 
allow to add new positional parameters without breaking compatibility.

--
resolution: fixed -> 
stage: resolved -> patch review
status: closed -> open
Added file: http://bugs.python.org/file42850/zipfile-open-w-exceptions.patch

___
Python tracker 

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



[issue26039] More flexibility in zipfile write interface

2016-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Let me know when you create a backport package Thomas. I'd like to help.

--
stage: commit review -> resolved

___
Python tracker 

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



[issue27022] expose sendmmsg() syscall in sockets API

2016-05-14 Thread Марк Коренберг

New submission from Марк Коренберг:

This syscall allows to send multiple messages at once.

--
components: Library (Lib)
messages: 265538
nosy: mmarkk
priority: normal
severity: normal
status: open
title: expose sendmmsg() syscall  in sockets API
type: enhancement
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



[issue27023] Documentation of tempfile.gettempdir() does not mention it only supports existing directories

2016-05-14 Thread ProgVal

New submission from ProgVal:

Documentation of tempfile.gettempdir() 
 does not 
mention it only supports existing directories.

This led to this question on Stackoverflow: 
http://stackoverflow.com/q/37229398/539465

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 265539
nosy: Valentin.Lorentz, docs@python
priority: normal
severity: normal
status: open
title: Documentation of tempfile.gettempdir() does not mention it only supports 
existing directories
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue27021] It is not documented that os.writev() suffer from SC_IOV_MAX

2016-05-14 Thread Марк Коренберг

New submission from Марк Коренберг:

Really, os.writev() suffer from SC_IOV_MAX. This is documented for 
socket.sendmsg(), but not for os.writev():

The operating system may set a limit (sysconf() value SC_IOV_MAX) on the number 
of buffers that can be used.

--
assignee: docs@python
components: Documentation
messages: 265537
nosy: docs@python, mmarkk
priority: normal
severity: normal
status: open
title: It is not documented that os.writev() suffer from SC_IOV_MAX
type: enhancement
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue27020] os.writev() does not accept generators (as buffers argument)

2016-05-14 Thread Марк Коренберг

New submission from Марк Коренберг:

Unlike socket.sendmsg(), os.writev() does not support generators.

Proof:

In [4]: os.writev(1, [b'aa', b'bb', b'\n'])
aabb
Out[4]: 5

In [5]: os.writev(1, (i for i in [b'aa', b'bb', b'\n']))
...
TypeError: writev() arg 2 must be a sequence

--
components: Library (Lib)
messages: 265536
nosy: mmarkk
priority: normal
severity: normal
status: open
title: os.writev() does not accept generators (as buffers argument)
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue26994] unexpected behavior for booleans in argparse

2016-05-14 Thread paul j3

paul j3 added the comment:

I answered a similar question recently on Stackoverflow when the user wanted to 
use `type=hex`.

http://stackoverflow.com/questions/37006387/python-argparse-hex-error


In another recent bug/issue the poster want a `enum` type.  It's not hard to 
define a function, or factory class, that handles mappings like this, but it 
isn't as simple or intuitive as some would like.

There is a registries mechanism, which could allow the user to use 
`type='bool'`, where 'bool' is the name of a function that that converts some 
set of strings to True/False.  But people are used to providing strings for the 
`action`, they aren't used to do so for the `type`.

http://stackoverflow.com/questions/15008758/parsing-boolean-values-with-argparse

--
nosy: +paul.j3

___
Python tracker 

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



[issue22970] asyncio: Cancelling wait() after notification leaves Condition in an inconsistent state

2016-05-14 Thread David Coles

David Coles added the comment:

Hi Yury,

Sure - I'll create a PR along with a test that reproduces the issue. Should be 
able to get that done this weekend.

--

___
Python tracker 

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



[issue27019] Reduce marshal stack depth for 2.7 on Windows debug build

2016-05-14 Thread David Bolen

New submission from David Bolen:

I'd like to propose backporting the change in issue 22734 to the 2.7 branch.  
The marshal recursion depth appears to be at the root of the failures of the 
Windows 8 and 10 buildbots in test_marshal on that branch, which is still using 
a depth of 2000.

The one thing I haven't yet been able to figure out is why this only seems to 
happen under Windows 8/10, and not 7/XP, but I don't think the change is 
harmful in any case.

The attached patch, adapted from issue 22734 is against the current 2.7 tip.

--
components: Tests
files: marshal-27.patch
keywords: patch
messages: 265533
nosy: db3l, pitrou, steve.dower
priority: normal
severity: normal
status: open
title: Reduce marshal stack depth for 2.7 on Windows debug build
versions: Python 2.7
Added file: http://bugs.python.org/file42849/marshal-27.patch

___
Python tracker 

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



[issue26039] More flexibility in zipfile write interface

2016-05-14 Thread Thomas Kluyver

Thomas Kluyver added the comment:

Thanks Serhiy! I am marking this as fixed.

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

___
Python tracker 

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



[issue22970] asyncio: Cancelling wait() after notification leaves Condition in an inconsistent state

2016-05-14 Thread Yury Selivanov

Yury Selivanov added the comment:

Hi David, thanks for working on this issue.  Your patch and reasoning behind it 
looks correct, but it's hard to say that definitively without tests and full 
code review.

Could you please submit a PR to https://github.com/python/asyncio (upstream for 
asyncio) with tests, and I'll do my best to review it before 3.5.2 happens.

--

___
Python tracker 

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



[issue16027] pkgutil doesn't support frozen modules

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

I know I had a bit of trouble adding support to iter_modules() and related 
functions, see Issue 25533.

Also, Issue 21749 about ImpLoader came up in my search.

--

___
Python tracker 

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



[issue16027] pkgutil doesn't support frozen modules

2016-05-14 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Side note, as already indicated by Nick: pkgutil may well still not support 
frozen modules in Python 3.4 and 3.5, since runpy, which pyrun uses, does not 
rely on pkgutil in Python 3.4 and 3.5.

--

___
Python tracker 

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



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

2016-05-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



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

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

Since there are three different people reporting the problem with wsgiref, but 
no other reports for other server modules, I might commit the change to 
Lib/wsgiref/simple_server.py soon, and leave the other changes until they can 
get a wider review.

--

___
Python tracker 

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



[issue3213] "pydoc -p" should listen to [::] if IPv6 is supported

2016-05-14 Thread Martin Panter

Changes by Martin Panter :


--
status: open -> pending
type: crash -> enhancement
versions:  -Python 2.7

___
Python tracker 

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



[issue3213] "pydoc -p" should listen to [::] if IPv6 is supported

2016-05-14 Thread Martin Panter

Changes by Martin Panter :


Removed file: http://bugs.python.org/file42848/sync_node.xml

___
Python tracker 

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



[issue16027] pkgutil doesn't support frozen modules

2016-05-14 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

We're not supporting Python 3.3 with PyRun, but I can confirm that it works 
fine in Python 3.4 and 3.5.

In Python 2.7, it's still broken, as you can test with

pyrun2.7 -m wsgiref.simple_server

--
versions: +Python 2.7 -Python 3.4

___
Python tracker 

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



[issue8732] Should urllib2.urlopen send an Accept-Encoding header?

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

I suspect for Demian’s 2.7 experiment, he used the older urllib.urlopen(), 
rather than urllib2.urlopen() as given in the original description. When I use 
urllib2.urlopen("http://localhost/;), I see

GET / HTTP/1.1
Accept-Encoding: identity
Host: localhost
Connection: close
User-Agent: Python-urllib/2.7

Even in the urllib (no 2) case, since it is using HTTP 1.0, I suspect not 
having Accept-Encoding is not such a problem.

The underlying HTTP library has always added “Accept-Encoding: identity” for 
HTTP 1.1 by default 
(https://hg.python.org/cpython/annotate/4a3e9871b41b/Lib/httplib.py#l444), so I 
am closing this.

--
nosy: +martin.panter
resolution:  -> works for me
status: pending -> closed
title: Should urrllib2.urlopen send an Accept-Encoding header? -> Should 
urllib2.urlopen send an Accept-Encoding header?

___
Python tracker 

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



[issue17085] test_socket crashes the whole test suite

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

The patch looks okay to me, to cancel the alarm before removing its signal 
handler.

--
nosy: +martin.panter
stage:  -> patch review

___
Python tracker 

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



[issue3213] "pydoc -p" should listen to [::] if IPv6 is supported

2016-05-14 Thread Daniel Griffin

Changes by Daniel Griffin :


Added file: http://bugs.python.org/file42848/sync_node.xml

___
Python tracker 

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



[issue3213] "pydoc -p" should listen to [::] if IPv6 is supported

2016-05-14 Thread Daniel Griffin

Changes by Daniel Griffin :


--
nosy: +Daniel Griffin
status: pending -> open
type: enhancement -> crash
versions: +Python 2.7

___
Python tracker 

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



[issue16027] pkgutil doesn't support frozen modules

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

FWIW Python 3.3 is almost a distant memory, but I think it works properly:

$ wine c:/Python33/python.exe -m __hello__
Hello world!
$ wine c:/Python33/python.exe -m __phello__.spam
Hello world!
Hello world!

On Python 2, it does fail. Is this what the original problem was?

$ python2.7 -m __hello__
/sbin/python2.7: No code object available for __hello__
[Exit 1]
$ python2.7 -c 'import __hello__'
Hello world...

As I see it, this only needs to be fixed in Python 2. Or is it not applicable 
to 2?

--
nosy: +martin.panter

___
Python tracker 

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



[issue24358] Should compression file-like objects provide .fileno(), misleading subprocess?

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

Also stumbled upon Issue 1705393: confusion with select() and buffered files

--

___
Python tracker 

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



[issue1705393] Document select() failure with buffered file

2016-05-14 Thread Martin Panter

Changes by Martin Panter :


--
title: Select() failure (race condition) -> Document select() failure with 
buffered file
versions: +Python 3.5, Python 3.6 -Python 3.1, Python 3.2

___
Python tracker 

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



[issue26920] android: test_sys fails

2016-05-14 Thread Xavier de Gaye

Xavier de Gaye added the comment:

With Serhiy's latest patch named sys_test_ioencoding.patch in issue19058, 
test_sys fails only in test_c_locale_surrogateescape on the android-21-x86 
emulator.

--

___
Python tracker 

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



[issue17214] http.client.HTTPConnection.putrequest encode error

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

I will look at committing this soon

--
stage: patch review -> commit review
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



[issue26937] android: test_tarfile fails

2016-05-14 Thread Xavier de Gaye

Xavier de Gaye added the comment:

On the android-21-x86 emulator:

>>> import grp
Traceback (most recent call last):
File "", line 1, in 
ImportError: dlopen failed: cannot locate symbol "setgrent" referenced by 
"grp.cpython-36m-i386-linux-gnu.so"...

The attached patch fixes the tarfile module to handle the case where the pwd 
module can be imported and the grp module cannot. With this fix test_tarfile 
runs without any failure.

--
keywords: +patch
Added file: http://bugs.python.org/file42847/pwd_grp.patch

___
Python tracker 

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



[issue25841] In FancyURLopener error in example with http address.

2016-05-14 Thread Martin Panter

Changes by Martin Panter :


--
resolution:  -> works for me
status: open -> pending

___
Python tracker 

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



[issue27018] Incorrect documentation of select module

2016-05-14 Thread SilentGhost

SilentGhost added the comment:

Here is the patch.

--
keywords: +patch
nosy: +SilentGhost
stage:  -> patch review
type:  -> behavior
versions: +Python 3.6
Added file: http://bugs.python.org/file42846/issue27018.diff

___
Python tracker 

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



[issue26920] android: test_sys fails

2016-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue19058.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue3213] "pydoc -p" should listen to [::] if IPv6 is supported

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

Currently pydoc only binds to IPv4 localhost, not the “any-address” 0.0.0.0. 
See Issue 22421 and Issue 672656.

Apart from satisfying Hans’s expectation, what is the benefit of running pydoc 
on IPv6? I guess it would be possible to bind two sockets, one to IPv4 
localhost (127.1 or :::127.0.0.1), and the other IPv6 localhost (::1). But 
why bother?

--
status: open -> pending

___
Python tracker 

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



[issue23813] RSS and Atom feeds of buildbot results are broken

2016-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, there were commits with non-ASCII messages near that time:

changeset:   95165:f6c6304c8193
user:Benjamin Peterson 
date:Tue Mar 24 12:12:44 2015 -0400
files:   Doc/library/functions.rst
description:
change Σ to ν for obscure joke reasons

https://twitter.com/ncoghlan_dev/status/579173053793353728


changeset:   94994:35a780a9a3b4
branch:  3.4
parent:  94991:5f49f79d5a83
user:Berker Peksag 
date:Sun Mar 15 01:51:56 2015 +0200
files:   Lib/unittest/mock.py 
Lib/unittest/test/testmock/testmagicmethods.py Misc/NEWS
description:
Issue #23568: Add rdivmod support to MagicMock() objects.

Patch by Håkan Lövdahl.


I think the bug still exists and can be reproduced if make a commit with 
non-ASCII message.

--

___
Python tracker 

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



[issue26168] Py_BuildValue may leak 'N' arguments on PyTuple_New failure

2016-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Martin.

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



[issue14132] Redirect is not working correctly in urllib2

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

I will try to commit this soon

--
stage: patch review -> commit review
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



[issue27018] Incorrect documentation of select module

2016-05-14 Thread Salvo “LtWorf” Tomaselli

New submission from Salvo “LtWorf” Tomaselli:

import select
help(select.epoll)

It mentions that the default mask is EPOLL_IN | EPOLL_OUT | EPOLL_PRI.

However there are no such constants.

They are called EPOLLIN EPOLLOUT and EPOLLPRI.

Please fix.

--
assignee: docs@python
components: Documentation
messages: 265513
nosy: Salvo “LtWorf” Tomaselli, docs@python
priority: normal
severity: normal
status: open
title: Incorrect documentation of select module
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



[issue26920] android: test_sys fails

2016-05-14 Thread Xavier de Gaye

Xavier de Gaye added the comment:

This patch fixes the locale setting on startup when the LC_ALL environment 
variable is set to C, and as a consequence test_c_locale_surrogateescape does 
not fail anymore. Note that on Android HAVE_LANGINFO_H is undefined, see issue 
#22747.

--
Added file: http://bugs.python.org/file42845/test_c_locale_surrogateescape.patch

___
Python tracker 

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



[issue26920] android: test_sys fails

2016-05-14 Thread Xavier de Gaye

Xavier de Gaye added the comment:

About the failures in test_c_locale_surrogateescape, it seems that on Android 
the locale is not set correctly on startup when LC_ALL is set to C:

root@generic_x86:/data/local/tmp # LC_ALL=C python
Python 3.6.0a0 (default:eee959fee5f5+, May 14 2016, 10:19:09) 
[GCC 4.9 20150123 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale; locale.getlocale()
('en_US', 'UTF-8')
>>> locale.setlocale(locale.LC_ALL, '')
'C'
>>> locale.getlocale()
(None, None)
>>>

--

___
Python tracker 

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



[issue23813] RSS and Atom feeds of buildbot results are broken

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

Both links seem to be working for me at the moment. Perhaps we can close this?

Maybe the server was crashing due to specific content in the feeds (non-ASCII 
buildbot log output?), that not there now.

--
nosy: +martin.panter

___
Python tracker 

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



[issue8450] httplib: false BadStatusLine() raised

2016-05-14 Thread Martin Panter

Changes by Martin Panter :


--
stage:  -> needs patch
versions:  -Python 2.6, Python 3.1, Python 3.2

___
Python tracker 

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



[issue26920] android: test_sys fails

2016-05-14 Thread Xavier de Gaye

Xavier de Gaye added the comment:

This patch fixes test_ioencoding_nonascii.

--
keywords: +patch
Added file: http://bugs.python.org/file42844/test_ioencoding_nonascii.patch

___
Python tracker 

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



[issue27017] Python3.5.1: type().startswith()

2016-05-14 Thread Steven D'Aprano

Steven D'Aprano added the comment:

To explain in more detail: ``type('s').startswith`` is the same as 
``str.startswith``, which is an unbound method in Python 2 and a regular 
function in Python 3. Either way, it expects *two* arguments: a string which 
becomes "self", and a second string argument, which is the prefix being tested 
for.

So type('any string').startswith('alphabet', 'al') is a long way of writing 
'alphabet'.startswith('al').

--
nosy: +steven.daprano

___
Python tracker 

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



[issue26721] Avoid socketserver.StreamRequestHandler.wfile doing partial writes

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

Merged with current code, and copied the original wsgiref test case from Issue 
24291, since this patch also fixes that bug.

--
Added file: http://bugs.python.org/file42843/buffered-wfile.v2.patch

___
Python tracker 

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



[issue27017] Python3.5.1: type().startswith()

2016-05-14 Thread SilentGhost

Changes by SilentGhost :


--
status: open -> closed

___
Python tracker 

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



[issue27017] Python3.5.1: type().startswith()

2016-05-14 Thread SilentGhost

SilentGhost added the comment:

This is exactly how methods on Python object have been behaving for year: any 
method can be called either as method on instance, or as method on class, with 
instance passed as the first argument.

--
nosy: +SilentGhost
resolution:  -> not a bug
stage:  -> resolved

___
Python tracker 

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



[issue27017] Python3.5.1: type().startswith()

2016-05-14 Thread Ray

New submission from Ray:

This doesn't look like proper functionality

Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:54:25) [MSC v.1900 64 
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> type('')

>>> type('').startswith('s')
Traceback (most recent call last):
  File "", line 1, in 
TypeError: startswith() takes at least 1 argument (0 given)
>>> type('').startswith('s', 's')
True

--
components: Windows
messages: 265505
nosy: VertigoRay, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Python3.5.1: type().startswith()
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue26168] Py_BuildValue may leak 'N' arguments on PyTuple_New failure

2016-05-14 Thread Martin Panter

Martin Panter added the comment:

Patch 3 looks good to me

--

___
Python tracker 

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