[issue24325] Speedup types.coroutine()

2015-05-30 Thread Stefan Behnel

Stefan Behnel added the comment:

I would still like to see a patch in Py3.5 that only flips the bit in C when 
"_types" is available and otherwise falls back to the existing Python code that 
creates a new code object. This part is much cleaner and faster to do in C than 
in the current Python implementation.

--

___
Python tracker 

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



[issue24330] "Configure Idle" not in "Options"

2015-05-30 Thread Ned Deily

Ned Deily added the comment:

Thanks for the report.  As much as possible, IDLE and the underlying Tk GUI 
toolkit it is built with try go conform to the interface guidelines of the 
platform (e.g. Windows, OS X, Unix X11) it is running on.  On OS X, application 
configuration options are expected to be found in a "Preferences" menu option 
under the application menu (the second menu item in the single menu bar at the 
top of the screen) and that is what happens with IDLE on OS X, rather than 
having "Options" -> "Configure IDLE" in the window menu bars as on other 
platforms.  It also has the standard OS X keyboard shortcut of CMD-Comma.  The 
IDLE documentation in the Standard Library doc set and the IDLE help file 
should be updated to note this and other platform differences.

--
components: +IDLE -Macintosh
nosy:  -ronaldoussoren
stage:  -> needs patch
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



[issue24004] avoid explicit generator type check in asyncio

2015-05-30 Thread Stefan Behnel

Stefan Behnel added the comment:

I found one more place in asyncio.coroutines, around line 190 in the 
coroutine() decorator:

if inspect.isgeneratorfunction(func):
coro = func
else:
@functools.wraps(func)
def coro(*args, **kw):
res = func(*args, **kw)
if isinstance(res, futures.Future) or inspect.isgenerator(res):
res = yield from res
return res

The wrapped isgenerator() check should be replaced by an Awaitable ABC check, 
e.g. this works for me:

"""
 res = func(*args, **kw)
 if isinstance(res, futures.Future) or inspect.isgenerator(res):
 res = yield from res
+else:
+await_res =  getattr(res, '__await__', None)
+if await_res is not None:
+res = yield from await_res()
 return res
"""

--

___
Python tracker 

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



[issue24320] Remove a now-unnecessary workaround from importlib._bootstrap.

2015-05-30 Thread Nick Coghlan

Nick Coghlan added the comment:

Donald updated 3.5 to pip 7 for the 1st beta, so the relevant fix may have 
already been included.

--

___
Python tracker 

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



[issue24259] tar.extractall() does not recognize unexpected EOF

2015-05-30 Thread Thomas Guettler

Thomas Guettler added the comment:

With Python 3.4.0 you get an OSError if you try to extractall() the uploaded 
tar_which_is_cut.tar. That's nice.

Seems like only 2.7 seems to be buggy.

===> python3
Python 3.4.0 (default, Apr 11 2014, 13:05:11) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tarfile
>>> tarfile.TarFile('tar_which_is_cut.tar').extractall()
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.4/tarfile.py", line 1979, in extractall
self.extract(tarinfo, path, set_attrs=not tarinfo.isdir())
  File "/usr/lib/python3.4/tarfile.py", line 2018, in extract
set_attrs=set_attrs)
  File "/usr/lib/python3.4/tarfile.py", line 2087, in _extract_member
self.makefile(tarinfo, targetpath)
  File "/usr/lib/python3.4/tarfile.py", line 2133, in makefile
copyfileobj(source, target, tarinfo.size)
  File "/usr/lib/python3.4/tarfile.py", line 247, in copyfileobj
raise OSError("end of file reached")
OSError: end of file reached

--

___
Python tracker 

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



[issue19543] Add -3 warnings for codec convenience method changes

2015-05-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Nick, Benjamin, could you please look at the patch?

--

___
Python tracker 

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



[issue24331] *** Error in `/usr/bin/python': double free or corruption (!prev): 0x0000000000f5c760 *** when cloning hg repository into directory on cifs

2015-05-30 Thread Karl Richter

New submission from Karl Richter:

I experience the error in the title exclusive when invoking `hg clone` (e.g. 
`hg clone https://bitbucket.org/Coin3D/coin` or `hg clone 
http://hg.netbeans.org/main-golden/ netbeans-main-golden`) when the target 
directory is on a cifs mount.

`gdb` backtrace:

#0  0x7761c267 in __GI_raise (sig=sig@entry=6)
at ../sysdeps/unix/sysv/linux/raise.c:55
#1  0x7761deca in __GI_abort () at abort.c:89
#2  0x7765fc53 in __libc_message (do_abort=do_abort@entry=1, 
fmt=fmt@entry=0x777781a8 "*** Error in `%s': %s: 0x%s ***\n")
at ../sysdeps/posix/libc_fatal.c:175
#3  0x77667c69 in malloc_printerr (ptr=, 
str=0x777782d8 "double free or corruption (!prev)", action=1)
at malloc.c:4965
#4  _int_free (av=, p=, have_lock=0)
at malloc.c:3834
#5  0x7766b89c in __GI___libc_free (mem=)
at malloc.c:2950
#6  0x7130ce11 in lfree (a=a@entry=0xecde10) at 
mercurial/mpatch.c:67
#7  0x7130d2e7 in decode (len=196, bin=0x1037ee8 "")
at mercurial/mpatch.c:228
#8  fold (bins=[], start=start@entry=0, 
end=end@entry=1) at mercurial/mpatch.c:296
#9  0x7130d3d3 in patches (self=, args=)
at mercurial/mpatch.c:327
#10 0x004ccd05 in call_function (oparg=, 
pp_stack=) at ../Python/ceval.c:4035
#11 PyEval_EvalFrameEx () at ../Python/ceval.c:2681
---Type  to continue, or q  to quit---
#12 0x004cd4e2 in fast_function (nk=, 
na=, n=, pp_stack=, 
func=) at ../Python/ceval.c:4121
#13 call_function (oparg=, pp_stack=)
at ../Python/ceval.c:4056
#14 PyEval_EvalFrameEx () at ../Python/ceval.c:2681
#15 0x004cb6b1 in PyEval_EvalCodeEx () at ../Python/ceval.c:3267
#16 0x004ce7d3 in fast_function (nk=, 
na=, n=, pp_stack=, 
func=) at ../Python/ceval.c:4131
#17 call_function (oparg=, pp_stack=)
at ../Python/ceval.c:4056
#18 PyEval_EvalFrameEx () at ../Python/ceval.c:2681
#19 0x004cb6b1 in PyEval_EvalCodeEx () at ../Python/ceval.c:3267
#20 0x004ce7d3 in fast_function (nk=, 
na=, n=, pp_stack=, 
func=) at ../Python/ceval.c:4131
#21 call_function (oparg=, pp_stack=)
at ../Python/ceval.c:4056
#22 PyEval_EvalFrameEx () at ../Python/ceval.c:2681
#23 0x004cb6b1 in PyEval_EvalCodeEx () at ../Python/ceval.c:3267
#24 0x004ce7d3 in fast_function (nk=, 
na=, n=, pp_stack=, 
---Type  to continue, or q  to quit---
func=) at ../Python/ceval.c:4131
#25 call_function (oparg=, pp_stack=)
at ../Python/ceval.c:4056
#26 PyEval_EvalFrameEx () at ../Python/ceval.c:2681
#27 0x004cb6b1 in PyEval_EvalCodeEx () at ../Python/ceval.c:3267
#28 0x004cd217 in fast_function (nk=, 
na=, n=, pp_stack=, 
func=) at ../Python/ceval.c:4131
#29 call_function (oparg=, pp_stack=)
at ../Python/ceval.c:4056
#30 PyEval_EvalFrameEx () at ../Python/ceval.c:2681
#31 0x004cd4e2 in fast_function (nk=, 
na=, n=, pp_stack=, 
func=) at ../Python/ceval.c:4121
#32 call_function (oparg=, pp_stack=)
at ../Python/ceval.c:4056
#33 PyEval_EvalFrameEx () at ../Python/ceval.c:2681
#34 0x004cb6b1 in PyEval_EvalCodeEx () at ../Python/ceval.c:3267
#35 0x004cd217 in fast_function (nk=, 
na=, n=, pp_stack=, 
func=) at ../Python/ceval.c:4131
#36 call_function (oparg=, pp_stack=)
at ../Python/ceval.c:4056
---Type  to continue, or q  to quit---
#37 PyEval_EvalFrameEx () at ../Python/ceval.c:2681
#38 0x004cb6b1 in PyEval_EvalCodeEx () at ../Python/ceval.c:3267
#39 0x004cd217 in fast_function (nk=, 
na=, n=, pp_stack=, 
func=) at ../Python/ceval.c:4131
#40 call_function (oparg=, pp_stack=)
at ../Python/ceval.c:4056
#41 PyEval_EvalFrameEx () at ../Python/ceval.c:2681
#42 0x004cb6b1 in PyEval_EvalCodeEx () at ../Python/ceval.c:3267
#43 0x004cd217 in fast_function (nk=, 
na=, n=, pp_stack=, 
func=) at ../Python/ceval.c:4131
#44 call_function (oparg=, pp_stack=)
at ../Python/ceval.c:4056
#45 PyEval_EvalFrameEx () at ../Python/ceval.c:2681
#46 0x004e7cc8 in PyEval_EvalCodeEx (closure=, 
defcount=, defs=, kwcount=, 
kws=, argcount=, args=, 
locals=, globals=, co=)
at ../Python/ceval.c:3267
#47 function_call.lto_priv () at ../Objects/funcobject.c:526
#48 0x004cf239 in PyObject_Call (kw=, 
arg=, func=) at ../Objects/abstract.c:2529
---Type  to continue, or q  to quit---
#49 ext_do_call (nk=, na=, 
flags=, pp_stack=, func=)
at ../Python/ceval.c:4348
#50 PyEval_EvalFrameEx () at ../Python/ceval.c:2720
#51 0x000

[issue19543] Add -3 warnings for codec convenience method changes

2015-05-30 Thread Nick Coghlan

Nick Coghlan added the comment:

Serhiy's patch looks to me like it would pragmatically cover all the cases most 
likely to affect porting efforts: using the standard library bytes<->bytes 
codecs through the convenience methods.

For a Python 2 backport, I'm slightly more concerned with exposing the argument 
in the constructor signature, but see value in being consistent with Python 3 
if anyone decides to use this to check a custom codec.

The main advantage this approach has over the typecheck based approach is that 
it can correctly warn about "data".encode("hex"), while a typecheck based 
approach can't distinguish that from "text".encode("ascii")

--

___
Python tracker 

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



[issue24004] avoid explicit generator type check in asyncio

2015-05-30 Thread Yury Selivanov

Yury Selivanov added the comment:

What inspect.isgeneratorfunction(func) returns for Cython generators?

--

___
Python tracker 

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



[issue24115] Unhandled error results of C API functions

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 82490d05f3b0 by Serhiy Storchaka in branch '2.7':
Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),
https://hg.python.org/cpython/rev/82490d05f3b0

New changeset 8167df7d4cd0 by Serhiy Storchaka in branch '3.4':
Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),
https://hg.python.org/cpython/rev/8167df7d4cd0

New changeset 7d1b81224c3b by Serhiy Storchaka in branch '3.5':
Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),
https://hg.python.org/cpython/rev/7d1b81224c3b

New changeset f5d1bb0c4192 by Serhiy Storchaka in branch 'default':
Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),
https://hg.python.org/cpython/rev/f5d1bb0c4192

--
nosy: +python-dev

___
Python tracker 

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



[issue24115] Unhandled error results of C API functions

2015-05-30 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6

___
Python tracker 

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



[issue24327] yield unpacking

2015-05-30 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Should someone be closing this with "yield from already exists"?

--
nosy: +josh.r

___
Python tracker 

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



[issue24327] yield unpacking

2015-05-30 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> out of date
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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I agree with all Stephan's comments on Rietveld. See also issue24115 that fixed 
bugs similar to found in C implementation of OrderedDict.

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0a7380984e37 by Eric Snow in branch '3.5':
Issue #16991: Use PyObject_TypeCheck instead of PyObject_IsInstance.
https://hg.python.org/cpython/rev/0a7380984e37

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Mark Lawrence

Mark Lawrence added the comment:

I'm getting the following linker errors on Windows 8.1 for 32 and 64 bit debug 
and release builds.  unresolved external symbol _PyODict_Type in 
C:\cpython\PCbuild\_collectionsmodule.obj, and _PyODictIter_Type,
_PyODictValues_Type, _PyODictKeys_Type,_PyODictItems_Type in 
C:\cpython\PCbuild\object.obj

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Eric Snow

Eric Snow added the comment:

> PyObject_TypeCheck() should be used instead of PyObject_IsInstance() (see
> issue24257).

Thanks for pointing this out.  I've fixed both dictobject.h and odictobject.h.

>
> Perhaps Py_ODict_GetItemId() should be private API as relevant dict function.

This isn't needed for 3.5, right?  I'm not opposed to adding more
functions to the C API for OrderedDict, but I wanted to start out as
small as possible.  My main motivation for the C implementation was
for use in the interpreter and I hadn't given much thought to the
direct use of C OrderedDict by extension modules.  That can be
addressed in 3.6 if it's important.  I supposed you could double-check
with Larry if you want to add more odict support to the C-API for 3.5.

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Eric Snow

Eric Snow added the comment:

> New changeset 0a7380984e37 by Eric Snow in branch '3.5':
> Issue #16991: Use PyObject_TypeCheck instead of PyObject_IsInstance.
> https://hg.python.org/cpython/rev/0a7380984e37

I've also merged this into default:

changeset:   96384:10eabadba316b6f2034db4c076a60c63d25d8fc6

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Eric Snow

Eric Snow added the comment:

> I'm getting the following linker errors on Windows 8.1 for 32 and 64 bit 
> debug and release builds.  unresolved external symbol _PyODict_Type in 
> C:\cpython\PCbuild\_collectionsmodule.obj, and _PyODictIter_Type,
> _PyODictValues_Type, _PyODictKeys_Type,_PyODictItems_Type in 
> C:\cpython\PCbuild\object.obj

Hmm.  I'm not too familiar with how things work for Windows.  I'm also
not clear on where the leading underscore is coming from.

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> This isn't needed for 3.5, right?  I'm not opposed to adding more
> functions to the C API for OrderedDict, but I wanted to start out as
> small as possible.

You already added public name Py_ODict_GetItemId. It uses private 
_Py_Identifier API and shouldn't be public.

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

As for Windows issue, perhaps these names should be enumerated in 
PC/python3.def? See also issue23903.

--

___
Python tracker 

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



[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-05-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping.

--

___
Python tracker 

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



[issue5633] fix for timeit when the statement is a string and the setup is not (and tests)

2015-05-30 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
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



[issue5633] fix for timeit when the statement is a string and the setup is not (and tests)

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 14d1018940cb by Serhiy Storchaka in branch '2.7':
Issue #5633: Fixed timeit when the statement is a string and the setup is not.
https://hg.python.org/cpython/rev/14d1018940cb

New changeset 89de73c0d848 by Serhiy Storchaka in branch '3.4':
Issue #5633: Fixed timeit when the statement is a string and the setup is not.
https://hg.python.org/cpython/rev/89de73c0d848

New changeset faea7c8bcb13 by Serhiy Storchaka in branch '3.5':
Issue #5633: Fixed timeit when the statement is a string and the setup is not.
https://hg.python.org/cpython/rev/faea7c8bcb13

New changeset fd01cbe4336e by Serhiy Storchaka in branch 'default':
Issue #5633: Fixed timeit when the statement is a string and the setup is not.
https://hg.python.org/cpython/rev/fd01cbe4336e

--
nosy: +python-dev

___
Python tracker 

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



[issue24327] yield unpacking

2015-05-30 Thread Ethan Furman

Ethan Furman added the comment:

I was waiting a couple days to give Mital a chance to clarify if some other 
behavior was intended.

--

___
Python tracker 

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



[issue5633] fix for timeit when the statement is a string and the setup is not (and tests)

2015-05-30 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue22357] inspect module documentation makes no reference to __qualname__ attribute

2015-05-30 Thread Yury Selivanov

Changes by Yury Selivanov :


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

___
Python tracker 

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



[issue22357] inspect module documentation makes no reference to __qualname__ attribute

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 943fa0e8b6a4 by Yury Selivanov in branch '3.4':
Issue 22357: Document __qualname__ in inspect.rst
https://hg.python.org/cpython/rev/943fa0e8b6a4

New changeset 1d9131bc0ea4 by Yury Selivanov in branch '3.5':
Issue 22357: Merge from 3.4
https://hg.python.org/cpython/rev/1d9131bc0ea4

New changeset 5621e9a21cc3 by Yury Selivanov in branch 'default':
Issue 22357: Merge from 3.5
https://hg.python.org/cpython/rev/5621e9a21cc3

--
nosy: +python-dev

___
Python tracker 

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



[issue24004] avoid explicit generator type check in asyncio

2015-05-30 Thread Stefan Behnel

Stefan Behnel added the comment:

Cython functions that return a generator aren't special in any way, so it's 
actually correct that isgeneratorfunction() always returns False. I mean, I 
could set the CO_COROUTINE flag on the code object that we fake, but that 
wouldn't help much as Cython's functions are not Python functions, so 
isfunction() will also return False for them and no-one would look at the flag 
in the first place. And finally, a Cython generator is not a Python generator 
(with byte code position etc.), so isgenerator() also correctly returns False.

At least iscoroutine() and iswaitable() will return True for Cython Coroutines 
now.

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Eric Snow

Eric Snow added the comment:

> You already added public name Py_ODict_GetItemId. It uses private 
> _Py_Identifier API and shouldn't be public.

Ah.  I'll remove it.

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c9404fba02ba by Eric Snow in branch '3.5':
Issue #16991: Properly handle return values in several places.
https://hg.python.org/cpython/rev/c9404fba02ba

New changeset 951a3ef82180 by Eric Snow in branch '3.5':
Issue #16991: Do not return None from OrderedDict.__reversed__.
https://hg.python.org/cpython/rev/951a3ef82180

--

___
Python tracker 

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



[issue24332] urllib.parse should not discard delimiters when associated component is empty

2015-05-30 Thread gdata gmail

New submission from gdata gmail:

The documenatation for urllib.parse 
(https://docs.python.org/3.0/library/urllib.parse.html) states several times:

"This may result in a slightly different, but equivalent URL, if the URL that 
was parsed originally had unnecessary delimiters (for example, a ? with an 
empty query; the RFC states that these are equivalent)."

This is false -- RFC 3986 explicitly states that ? with an empty query is _not_ 
equivalent to a URL without it.  For example, the following two URL's should be 
considered different:

http://example.com/?
http://example.com/

https://tools.ietf.org/html/rfc3986#section-6.2.3

--
messages: 244477
nosy: gdata gmail
priority: normal
severity: normal
status: open
title: urllib.parse should not discard delimiters when associated component is 
empty

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7117e9b0f595 by Eric Snow in branch '3.5':
Issue #16991: Drop Py_ODict_GetItemId.
https://hg.python.org/cpython/rev/7117e9b0f595

--

___
Python tracker 

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



[issue24004] avoid explicit generator type check in asyncio

2015-05-30 Thread Stefan Behnel

Stefan Behnel added the comment:

Hmm, I just noticed that this only started failing when I disabled the asyncio 
module patching for 3.5beta1+, assuming that it now all works. A side effect of 
that was that also the inspect module is no longer patched into returning True 
from isgenerator() for Cython generators. While there might be code that fails 
when it tries to inspect Cython generators as Python generators (as the first 
don't have byte code), I think it's still the easiest fix to simply keep the 
inspect patching. That would then trigger the right code path here without 
changes in asyncio.

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Eric Snow

Eric Snow added the comment:

If it's just a matter of adding the definitions then here's a patch.  Does that 
look correct?

--
Added file: http://bugs.python.org/file39567/odict-windows.diff

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Eric Snow

Eric Snow added the comment:

That last message is about building on Windows.

--
nosy: +steve.dower

___
Python tracker 

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



[issue24004] avoid explicit generator type check in asyncio

2015-05-30 Thread Stefan Behnel

Stefan Behnel added the comment:

... except that the returned object may not actually be a Cython generator but 
a GeneratorWrapper, now that the patch from issue 24316 is in place. :)

Then I guess we're back to the point where duck-typing and calling __await__() 
is a good idea.

--

___
Python tracker 

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



[issue24333] urllib2 HTTPS connection over a digest auth enabled proxy gives 407

2015-05-30 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

This is originally my question at stackoverflow.com. 
(http://stackoverflow.com/q/30511341/3786245) I think it's a bug, so I posted 
it here.

I'm trying to fetch HTTPS pages through a proxy with digest authentication. 
Here are my codes:

import urllib.request


class SimplePasswordManager(object):
def __init__(self, username, password):
self.username = username
self.password = password

def add_password(self, realm, uri, user, passwd):
pass

def find_user_password(self, realm, authuri):
return self.username, self.password


proxy_handler = urllib.request.ProxyHandler({
'http': '',
'https': '',
})
password_mgr = SimplePasswordManager('', '')
proxy_auth_handler = urllib.request.ProxyDigestAuthHandler(passwd=password_mgr)
opener = urllib.request.build_opener(proxy_auth_handler, proxy_handler)
req = opener.open('http://httpbin.org/ip')
print(req.read().decode('ascii'))
req = opener.open('https://httpbin.org/ip')
print(req.read().decode('ascii'))

And the results:

{
  "origin": ""
}

Traceback (most recent call last):
  File "/usr/lib/python3.4/urllib/request.py", line 1182, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/lib/python3.4/http/client.py", line 1088, in request
self._send_request(method, url, body, headers)
  File "/usr/lib/python3.4/http/client.py", line 1126, in _send_request
self.endheaders(body)
  File "/usr/lib/python3.4/http/client.py", line 1084, in endheaders
self._send_output(message_body)
  File "/usr/lib/python3.4/http/client.py", line 922, in _send_output
self.send(msg)
  File "/usr/lib/python3.4/http/client.py", line 857, in send
self.connect()
  File "/usr/lib/python3.4/http/client.py", line 1223, in connect
super().connect()
  File "/usr/lib/python3.4/http/client.py", line 837, in connect
self._tunnel()
  File "/usr/lib/python3.4/http/client.py", line 820, in _tunnel
message.strip()))
OSError: Tunnel connection failed: 407 Proxy Authentication Required

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "proxy_test.py", line 25, in 
req = opener.open('https://httpbin.org/ip')
  File "/usr/lib/python3.4/urllib/request.py", line 463, in open
response = self._open(req, data)
  File "/usr/lib/python3.4/urllib/request.py", line 481, in _open
'_open', req)
  File "/usr/lib/python3.4/urllib/request.py", line 441, in _call_chain
result = func(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 1225, in https_open
context=self._context, check_hostname=self._check_hostname)
  File "/usr/lib/python3.4/urllib/request.py", line 1184, in do_open
raise URLError(err)
urllib.error.URLError: 

Seems HTTP connection works while HTTPS not. I think it's a bug in urllib. For 
HTTPS connections, HTTPConnection.connect() calls HTTPConnection._tunnel(), and 
the latter function throws an OSError for 407 when sending a CONNECT request. 
There's no chance for OpenerDirector.open() to call 
HTTPErrorProcessor.http_response(). As a result, 407 errors are not handled 
correctly in ProxyDigestAuthHandler.http_error_407().

Finally, is there a workaround before this is fixed?

--
components: Library (Lib)
messages: 244483
nosy: Chi Hsuan Yen
priority: normal
severity: normal
status: open
title: urllib2 HTTPS connection over a digest auth enabled proxy gives 407
type: behavior
versions: Python 2.7, Python 3.2, Python 3.4, Python 3.6

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 030205f1e716 by Eric Snow in branch '3.5':
Issue #16991: Fix a few leaks and other memory-related concerns in OrderedDict.
https://hg.python.org/cpython/rev/030205f1e716

--

___
Python tracker 

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



[issue15138] base64.urlsafe_b64**code are too slow

2015-05-30 Thread Devin Jeanpierre

Devin Jeanpierre added the comment:

Here's a backport of the patch to 2.7. It's pretty rad, and basically identical 
to how YouTube monkeypatches base64.

Not sure what will happen to this patch. According to recent discussion on the 
list (e.g. https://mail.python.org/pipermail/python-dev/2015-May/140380.html ), 
performance improvements are open for inclusion in 2.7 if anyone wants to 
bother with merging this in and taking on the review / maintenance burden.

I'm OK with just publishing it for others to merge in with their own private 
versions of Python. It is only relevant if you use base64 a lot. :)

--
nosy: +Devin Jeanpierre
Added file: http://bugs.python.org/file39568/base64_27.diff

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fbe74badb0c6 by Eric Snow in branch 'default':
Issue #16991: Ensure that the proper OrderedDict is used in tests.
https://hg.python.org/cpython/rev/fbe74badb0c6

--

___
Python tracker 

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



[issue24333] urllib2 HTTPS connection over a digest auth enabled proxy gives 407

2015-05-30 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

For those who are working on this problem, my squid.conf may be helpful:

--- squid.conf.default  2015-05-31 03:33:34.006361795 +0800
+++ squid.conf  2015-05-31 03:36:28.533034294 +0800
@@ -49,9 +49,15 @@
 # Example rule allowing access from your local networks.
 # Adapt localnet in the ACL section to list your (internal) IP networks
 # from where browsing should be allowed
-http_access allow localnet
-http_access allow localhost
+# http_access allow localnet
+# http_access allow localhost
 
+auth_param digest realm Proxy digest auth test
+auth_param digest program /usr/lib/squid/digest_file_auth -c 
/etc/squid/squid-passwd
+auth_param digest children 2
+
+acl squid-passwd proxy_auth REQUIRED
+http_access allow squid-passwd
 # And finally deny all other access to this proxy
 http_access deny all

And the content of /etc/squid/squid-passwd:

test_username:Proxy digest auth test:ab1e6b5de6ea6c8b072c5e513eea9c61

I'm testing for squid 3.5.5 on Arch Linux. I can test its correctness with curl:

$ curl -v --proxy-user test_username:test_password --proxy localhost:3128 
--proxy-digest https://httpbin.org/ip

--

___
Python tracker 

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



[issue24004] avoid explicit generator type check in asyncio

2015-05-30 Thread Yury Selivanov

Changes by Yury Selivanov :


--
resolution: fixed -> 
status: closed -> pending

___
Python tracker 

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



[issue24004] avoid explicit generator type check in asyncio

2015-05-30 Thread Yury Selivanov

Yury Selivanov added the comment:

Stefan,

> Then I guess we're back to the point where duck-typing and calling 
> __await__() is a good idea.

Please test the attached patch.  I agree this is a good idea.

--
keywords: +patch
Added file: http://bugs.python.org/file39569/coroutine.patch

___
Python tracker 

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



[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2015-05-30 Thread Marc Jofre

Marc Jofre added the comment:

When executing, wsgiref produces the following error dump:
D:\SixSensoCytometerWebBased\include\bin>D:\SixSensoCytometerWebBased\include\bi
n\manage.exe runserver 8765
Validating models...

0 errors found
May 26, 2015 - 16:20:56
Django version 1.5.8, using settings 'settings'
Development server is running at http://127.0.0.1:8765/
Quit the server with CTRL-BREAK.
[26/May/2015 16:20:56] "GET / HTTP/1.1" 200 29661
100
[26/May/2015 16:20:59] "POST /login HTTP/1.1" 200 25980
[26/May/2015 16:20:59] "GET /static/js/ready.js HTTP/1.1" 500 79563
Traceback (most recent call last):
  File "D:\WinPython-64bit-2.7.6.3\python-2.7.6.amd64\Lib\wsgiref\handlers.py",
line 86, in run
self.finish_response()
  File "D:\WinPython-64bit-2.7.6.3\python-2.7.6.amd64\Lib\wsgiref\handlers.py",
line 128, in finish_response
self.write(data)
  File "D:\WinPython-64bit-2.7.6.3\python-2.7.6.amd64\Lib\wsgiref\handlers.py",
line 217, in write
self._write(data)
  File "D:\WinPython-64bit-2.7.6.3\python-2.7.6.amd64\lib\socket.py", line 324,
in write
[26/May/2015 16:20:59] "GET /static/js/ClasePrincipalAutobahn.js HTTP/1.1" 500 7
9818
[26/May/2015 16:20:59] "GET /static/img/initialGUIimage.png HTTP/1.1" 500 79777
self.flush()
  File "D:\WinPython-64bit-2.7.6.3\python-2.7.6.amd64\lib\socket.py", line 303,
in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in yo
ur host machine

--
nosy: +marcjofre

___
Python tracker 

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



[issue24325] Speedup types.coroutine()

2015-05-30 Thread Yury Selivanov

Yury Selivanov added the comment:

Larry, can you accept the first version of the patch (only function that 
patches code object's co_flags) after beta2?

I'm OK if you think it should only be committed in 3.6, but I also agree with 
Stefan, that using C is better in this particular case.

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1d851112922f by Eric Snow in branch '3.5':
Issue #16991: Add PyODict* to Windows builds.
https://hg.python.org/cpython/rev/1d851112922f

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Eric Snow

Eric Snow added the comment:

I'm checking a fix for Windows against a buildbot 
(http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x).

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3ba1fa925f17 by Eric Snow in branch 'default':
Issue #16991: Use the correct version for master.
https://hg.python.org/cpython/rev/3ba1fa925f17

--

___
Python tracker 

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



[issue24334] SSLSocket extra level of indirection

2015-05-30 Thread Christian Heimes

New submission from Christian Heimes:

I just noticed that #21965 has added an extra level of indirection to the 
SSLSocket object. In Python 3.4 and earlier the ssl.SSLSocket object has one 
level of indirection:

>>> import ssl
>>> ctx = ssl.create_default_context()
>>> sock = ssl.create_connection(('www.python.org', 443))
>>> ssock = ctx.wrap_socket(sock, server_hostname='www.python.org')
>>> ssock

>>> ssock._sslobj
<_ssl._SSLSocket object at 0x7efcb9fd8c00>


In 3.5 an additional level comes into play:

>>> import ssl
>>> ctx = ssl.create_default_context()
>>> sock = ssl.create_connection(('www.python.org', 443))
>>> ssock = ctx.wrap_socket(sock, server_hostname='www.python.org')
>>> ssock

>>> ssock._sslobj

>>> ssock._sslobj._sslobj
<_ssl._SSLSocket object at 0x7fa5506918a0>


Method calls like SSLSocket.read() now call SSLObject.read(), which call 
_SSLSocket.read(). That seems a bit excessive. Isn't there a better way with 
less indirections?

I have created a proof-of-concept patch that removes the extra layer with some 
code duplication. Maybe the common code can be moved into a commmon base class 
for SSLObject and SSLSocket? After all both classes provide a similar interface.

--
components: Library (Lib)
files: no_sslobject.patch
keywords: patch
messages: 244494
nosy: alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: SSLSocket extra level of indirection
type: behavior
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file39570/no_sslobject.patch

___
Python tracker 

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



[issue24334] SSLSocket extra level of indirection

2015-05-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I'm nosying Geert, who is the original author of the SSLObject code.

--
nosy: +geertj

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset aea27164d207 by Eric Snow in branch '3.5':
Issue #16991: Add odictobject.h on Windows.
https://hg.python.org/cpython/rev/aea27164d207

--

___
Python tracker 

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



[issue24004] avoid explicit generator type check in asyncio

2015-05-30 Thread Stefan Behnel

Stefan Behnel added the comment:

Works for me.

Why is the AwaitableABC type check needed, in addition to looking up the 
relevant method? IIUC, the type check will just do a lookup of the same method 
if the type hasn't been registered as Awaitable explicitly.

--
status: pending -> open

___
Python tracker 

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



[issue24004] avoid explicit generator type check in asyncio

2015-05-30 Thread Yury Selivanov

Yury Selivanov added the comment:

> Why is the AwaitableABC type check needed, in addition to looking up the 
> relevant method? IIUC, the type check will just do a lookup of the same 
> method if the type hasn't been registered as Awaitable explicitly.

Because __await__ should be defined on the class, not on the method (as for all 
other magic methods in Python).

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Eric Snow

Changes by Eric Snow :


--
status: open -> pending

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-30 Thread Eric Snow

Eric Snow added the comment:

Well, that last one has everything compiling again.  I expect it should be okay 
now.  I'll watch the results.

--

___
Python tracker 

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



[issue23934] inspect.signature reporting "()" for all builtin & extension types

2015-05-30 Thread Yury Selivanov

Changes by Yury Selivanov :


--
resolution:  -> fixed
stage: test needed -> 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



[issue23934] inspect.signature reporting "()" for all builtin & extension types

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e59966bb6de5 by Yury Selivanov in branch '3.5':
Issue #23934: Fix inspect.signature to fail correctly for builtin types.
https://hg.python.org/cpython/rev/e59966bb6de5

New changeset 19e0ffdd1daa by Yury Selivanov in branch 'default':
Issue #23934: Fix inspect.signature to fail correctly for builtin types.
https://hg.python.org/cpython/rev/19e0ffdd1daa

--
nosy: +python-dev

___
Python tracker 

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



[issue19235] Add a dedicated subclass for recursion errors

2015-05-30 Thread Elazar Gershuni

Elazar Gershuni added the comment:

Ok

--

___
Python tracker 

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



[issue24331] *** Error in `/usr/bin/python': double free or corruption (!prev): 0x0000000000f5c760 *** when cloning hg repository into directory on cifs

2015-05-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks for the report. I would say it looks very much like a Mercurial issue. 
You can find the Mercurial bug tracker at http://bz.selenic.com/

--
nosy: +pitrou

___
Python tracker 

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



[issue24332] urllib.parse should not discard delimiters when associated component is empty

2015-05-30 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +orsenthil

___
Python tracker 

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



[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-05-30 Thread Martin Panter

Martin Panter added the comment:

Left a couple pedantic comments.

--
nosy: +vadmium

___
Python tracker 

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



[issue24325] Speedup types.coroutine()

2015-05-30 Thread Guido van Rossum

Guido van Rossum added the comment:

Since it's a speedup it could also go into 3.5.1.
On May 30, 2015 1:22 PM, "Yury Selivanov"  wrote:

>
> Yury Selivanov added the comment:
>
> Larry, can you accept the first version of the patch (only function that
> patches code object's co_flags) after beta2?
>
> I'm OK if you think it should only be committed in 3.6, but I also agree
> with Stefan, that using C is better in this particular case.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2015-05-30 Thread Martin Panter

Martin Panter added the comment:

Marc, if you think your connection aborted error is related, can you say what 
kind of object the “stdout” parameter is in the handler class? In other words, 
what class’s method is being called in the write() function at line 217?

--

___
Python tracker 

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



[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

2015-05-30 Thread Martin Panter

Martin Panter added the comment:

Actually, looking closer at Marc’s traceback, it appears to be the ordinary 
socket._fileobject class. So I suspect it is unrelated to this bug because the 
Python 2 socket code appears to call sendall() in a loop.

--

___
Python tracker 

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



[issue24004] avoid explicit generator type check in asyncio

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b7b73029c825 by Yury Selivanov in branch '3.4':
Issue 24004: Support Awaitables (pep 492) in @asyncio.coroutine decorator
https://hg.python.org/cpython/rev/b7b73029c825

New changeset d1959cafc68c by Yury Selivanov in branch '3.5':
Issue 24004: Support Awaitables (pep 492) in @asyncio.coroutine decorator
https://hg.python.org/cpython/rev/d1959cafc68c

New changeset 6c53591d589b by Yury Selivanov in branch 'default':
Issue 24004: Support Awaitables (pep 492) in @asyncio.coroutine decorator
https://hg.python.org/cpython/rev/6c53591d589b

--
nosy: +python-dev

___
Python tracker 

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



[issue24004] avoid explicit generator type check in asyncio

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5f1e24f083c7 by Yury Selivanov in branch '3.5':
Issue 24004: Add a unittest for @asyncio.coroutine supporting Awaitables
https://hg.python.org/cpython/rev/5f1e24f083c7

New changeset 9d261141eb0c by Yury Selivanov in branch 'default':
Issue 24004: Add a unittest for @asyncio.coroutine supporting Awaitables
https://hg.python.org/cpython/rev/9d261141eb0c

--

___
Python tracker 

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



[issue24004] avoid explicit generator type check in asyncio

2015-05-30 Thread Yury Selivanov

Changes by Yury Selivanov :


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



[issue23377] HTTPResponse may drop buffer holding next response

2015-05-30 Thread Martin Panter

Martin Panter added the comment:

Just realized that the makefile() call in _tunnel() still lets this bug occur 
when a HTTPSConnection is being used with a proxy using the CONNECT method. So 
while my patch shouldn’t make things any worse than they already are, it needs 
more work to fix this instance. Maybe we would have to use the new SSL memory 
BIO support.

--

___
Python tracker 

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



[issue5497] openssl compileerror with original source

2015-05-30 Thread Zachary Ware

Zachary Ware added the comment:

If this wasn't outdated two and a half years ago, it is now :)

--
resolution:  -> out of date
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




[issue22203] inspect.getargspec() returns wrong spec for builtins

2015-05-30 Thread Yury Selivanov

Yury Selivanov added the comment:

This was fixed in issue #23934

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> sphinx - building muppy docs fails on Linux

___
Python tracker 

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



[issue21853] Fix inspect in unicodeless build

2015-05-30 Thread Yury Selivanov

Yury Selivanov added the comment:

Serhiy, could you please commit it in 2.7?

--

___
Python tracker 

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



[issue15928] Open url with proxy causes TypeError

2015-05-30 Thread Martin Panter

Changes by Martin Panter :


--
resolution: not a bug -> duplicate
superseder:  -> Missing size argument in readline() method for httplib's class 
LineAndFileWrapper

___
Python tracker 

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



[issue7291] urllib2 cannot handle https with proxy requiring auth

2015-05-30 Thread Martin Panter

Martin Panter added the comment:

I believe this also affects Python 3; see Issue 24333.

I think making the CONNECT response object available to the caller is the right 
general approach. But I really dislike raising an exception that holds a socket 
connection to be closed. (I know this is already done with 
urllib.error.HTTPError; let’s not repeat this in the “http.client” module!)

Ideally, at the “http.client” level I would prefer to avoid all the special 
set_tunnel() calls, and use the usual request() and getresponse() API to make 
the CONNECT request. This way the response status and header fields would be 
available just like any other response. For this approach to work, we would 
probably need to add a new HTTPConnection.detach() method that released the 
original socket reader and writer, and add a way to create a new HTTPConnection 
instance using these socket objects. This enhancement probably wouldn’t be 
appropriate for Python 2 or a bug fix release. But it seems the cleanest 
approach to me, and may also allow using HTTPConnection with the Upgrade header 
(e.g. for opportunistic encryption, HTTP 2, Web etc), and proxying non-HTTP 
connections, as bonuses.

A less revolutionary approach might be to add a HTTPSConnection.tunnel() 
method, that always returns the proxy’s response, but only does the SSL 
wrapping for a successful response.

--
nosy: +vadmium
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



[issue24333] urllib2 HTTPS connection over a digest auth enabled proxy gives 407

2015-05-30 Thread Martin Panter

Martin Panter added the comment:

There is already work done on this at Issue 7291. There is a patch there, but 
IMO it needs more work or a different approach.

--
nosy: +vadmium
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> urllib2 cannot handle https with proxy requiring auth

___
Python tracker 

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



[issue5843] Normalization error in urlunparse

2015-05-30 Thread Martin Panter

Changes by Martin Panter :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> urllib.parse wrongly strips empty #fragment

___
Python tracker 

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



[issue15009] urlsplit can't round-trip relative-host urls.

2015-05-30 Thread Martin Panter

Changes by Martin Panter :


--
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> urllib.parse wrongly strips empty #fragment

___
Python tracker 

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



[issue24332] urllib.parse should not discard delimiters when associated component is empty

2015-05-30 Thread Martin Panter

Martin Panter added the comment:

This is essentially the same as Issue 22852. The title just refers to stripping 
an empty #fragment, but the netloc and query components are also affected. I 
have a patch there which needs reviewing, if you are interested. Or if you have 
any alternative ideas on how to solve this they would be welcome too.

--
nosy: +vadmium
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> urllib.parse wrongly strips empty #fragment

___
Python tracker 

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



[issue22852] urllib.parse wrongly strips empty #fragment, ?query, //netloc

2015-05-30 Thread Martin Panter

Martin Panter added the comment:

Anyone want to review my new patch? This is a perennial issue; see all the 
duplicates I just linked.

--
keywords: +needs review
title: urllib.parse wrongly strips empty #fragment -> urllib.parse wrongly 
strips empty #fragment, ?query, //netloc

___
Python tracker 

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



[issue21853] Fix inspect in unicodeless build

2015-05-30 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue21853] Fix inspect in unicodeless build

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 44590c1b264e by Serhiy Storchaka in branch '2.7':
Issue #21853: Fixed the inspect module in unicode disabled build.
https://hg.python.org/cpython/rev/44590c1b264e

--
nosy: +python-dev

___
Python tracker 

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



[issue21853] Fix inspect in unicodeless build

2015-05-30 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies:  -Fix unicodeless build of Python
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



[issue24334] SSLSocket extra level of indirection

2015-05-30 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +vadmium

___
Python tracker 

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



[issue24264] imageop Unsafe Arithmetic

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset de0ccaaf2e64 by Serhiy Storchaka in branch '2.7':
Issue #24264: Fixed buffer overflow in the imageop module.
https://hg.python.org/cpython/rev/de0ccaaf2e64

--
nosy: +python-dev

___
Python tracker 

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



[issue24264] imageop Unsafe Arithmetic

2015-05-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your report John.

--
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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




[issue24284] Inconsistency in startswith/endswith

2015-05-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Martin.

--
assignee:  -> serhiy.storchaka
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



[issue24284] Inconsistency in startswith/endswith

2015-05-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a82498f424fe by Serhiy Storchaka in branch '3.5':
Issue #24284: The startswith and endswith methods of the str class no longer
https://hg.python.org/cpython/rev/a82498f424fe

New changeset 04162e06323f by Serhiy Storchaka in branch 'default':
Issue #24284: The startswith and endswith methods of the str class no longer
https://hg.python.org/cpython/rev/04162e06323f

--
nosy: +python-dev

___
Python tracker 

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



[issue24284] Inconsistency in startswith/endswith

2015-05-30 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue24335] Provide __list__(self) along the lines of __str__(self)

2015-05-30 Thread Rohith PR

New submission from Rohith PR:

It would be cleaner to do list(obj) than obj.to_list() (Eg: in numpy).

PS: this is the first time that I'm contributing to python. If this feature 
request is accepted can I work on it myself?

--
messages: 244522
nosy: Rohith.PR
priority: normal
severity: normal
status: open
title: Provide __list__(self) along the lines of __str__(self)
type: enhancement
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