[issue26653] bisect raises a TypeError when hi is None

2016-03-28 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Sorry, I don't think that is a good idea.  The use of None as a placeholder for 
optional arguments is legitimate and well enshrined in Python history.  The 
code is bisect is very old, stable, and battle-tested.  There isn't a real bug 
here, nothing is broken; instead, we have a near pedantic notion that the 
C-version must be forced to replicate a minor and irrelevant implementation 
detail of the Python version that goes beyond what the docs guarantee.  I 
recommend closing this as "not a bug".

--

___
Python tracker 

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



[issue26659] slice() leaks memory when part of a cycle

2016-03-28 Thread Demur Rumed

Demur Rumed added the comment:

Implementing tp_traverse & tp_clear seems to runs into complications due to 
slice_cache

--
nosy: +Demur Rumed

___
Python tracker 

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



[issue26633] multiprocessing behavior combining daemon with non-daemon children inconsistent with threading

2016-03-28 Thread Davin Potts

Changes by Davin Potts :


--
nosy: +davin

___
Python tracker 

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



[issue26654] asyncio is not inspecting keyword arguments of functools.partial

2016-03-28 Thread Guido van Rossum

Guido van Rossum added the comment:

Oh, wow. I didn't even know we special-case partial() there. In general we tend 
to focus more on positional arguments (since asyncio intentionally doesn't take 
keyword args for callbacks) but I see no reason why we couldn't add this here. 
Maybe you're interested in writing a patch yourself? You could do it as a PR 
for the "upstream" git repo https://github.com/python/asyncio

--

___
Python tracker 

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



[issue23551] IDLE to provide menu link to PIP gui.

2016-03-28 Thread Eric Khoo Jiun Hooi

Eric Khoo Jiun Hooi added the comment:

Is there any other uses of the ensurepip script?

--

___
Python tracker 

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



[issue23551] IDLE to provide menu link to PIP gui.

2016-03-28 Thread Eric Khoo Jiun Hooi

Eric Khoo Jiun Hooi added the comment:

>From what I know after reading the ensurepip script, the ensurepip script is 
>checking whether the pip and it requirement tools are installed right like 
>get_pip.py that was mention https://pip.pypa.io/en/stable/installing/ ? So, we 
>have to put it inside the gui script to ensure that the pip is installed. 
>Otherwise, pass the "python -m ensurepip" to subprocess to install the package 
>before start the gui of pip. Am I understand it correctly?

--

___
Python tracker 

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



[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2016-03-28 Thread Martin Panter

Martin Panter added the comment:

Thomas: can you point to the “warning that those modules are not secure in the 
module docs”? All I can see is a warning in the pydoc output for 
http.server.__doc__, but that is specifically about the CGI server.

The specific bug with allowing c:c:c:.. looks like it would have been triggered 
by fixing Issue 19456. If so, 2.7 would also be affected.

The whole translate_path() algorithm looks over-complicated to me. One quick 
idea that comes to mind is to skip (or diagnose) each whole URL path component 
if there is any drive, directory etc syntax present, rather than making an 
attempt to strip it off. Perhaps check with os.path.dirname() or pathlib’s 
is_reserved().

One other thing I have wondered about, but I don’t know Windows well enough to 
be sure. Shouldn’t there be some protection against accessing special files 
like ?

Ideally, I would like to see a common function somewhere to do this kind of 
path validation and conversion. There are other places even in the standard 
library where this is needed, which I mentioned at 
.

--

___
Python tracker 

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



[issue26660] tempfile.TemporaryDirectory() cleanup exception on Windows if readonly files created

2016-03-28 Thread Laurent Mazuel

New submission from Laurent Mazuel:

Using tempfile.TemporaryDirectory() in Windows, creating read-only files in 
this temp directory leads to PermissionError during the cleanup().
This is a direct cause of this one:
https://bugs.python.org/issue19643

And the workaround which was proposed in the issue 19643 and added to the doc 
here:
https://docs.python.org/3/library/shutil.html?highlight=shutil#rmtree-example

is not used in the TemporaryDirectory implementation.

I don't know if the right solution is to modify the implementation to 
systematically delete read-only files using the cited workaround, or to add a 
'remove_readonly' flag or to update the documentation to clearly says that 
cleanup will raise a PermissionError if the user creates a read-only file. At 
least documentation please :)

In my specific usecase I "git clone" in the temp directory, and the .git folder 
contains read-only files.

Full stacktrace:
Traceback (most recent call last):
  File "C:\mycode.py", line 149, in build_libraries
update(generated_path, dest_folder)
  File "C:\Program Files\Python35\lib\tempfile.py", line 807, in __exit__
self.cleanup()
  File "C:\Program Files\Python35\lib\tempfile.py", line 811, in cleanup
_shutil.rmtree(self.name)
  File "C:\Program Files\Python35\lib\shutil.py", line 488, in rmtree
return _rmtree_unsafe(path, onerror)
  File "C:\Program Files\Python35\lib\shutil.py", line 378, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
  File "C:\Program Files\Python35\lib\shutil.py", line 378, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
  File "C:\Program Files\Python35\lib\shutil.py", line 378, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
  File "C:\Program Files\Python35\lib\shutil.py", line 378, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
  File "C:\Program Files\Python35\lib\shutil.py", line 383, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
  File "C:\Program Files\Python35\lib\shutil.py", line 381, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 
'C:\\Users\\me\\AppData\\Local\\Temp\\tmpk62cp34t\\readonly.file'

--
components: Library (Lib)
messages: 262584
nosy: Laurent.Mazuel
priority: normal
severity: normal
status: open
title: tempfile.TemporaryDirectory() cleanup exception on Windows if readonly 
files created
type: enhancement
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



[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2016-03-28 Thread Philipp Hagemeister

Philipp Hagemeister added the comment:

Update testcase, and call split before splitdrive

--
Added file: http://bugs.python.org/file42319/fix-path-traversal-26657.patch

___
Python tracker 

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



[issue26659] slice() leaks memory when part of a cycle

2016-03-28 Thread Kevin Modzelewski

New submission from Kevin Modzelewski:

The slice type doesn't participate in GC, which means that if you happen to 
create a cycle involving a slice, that cycle will never get freed.  Here's an 
example:

def f():
l = []
l.append(slice(l))
# Will consume memory without bound:
while True:
f()

This seems pretty hard to trigger accidentally, so it might not be a huge deal 
-- especially since it seems to have been around for a while.  (I only checked 
2.7 and trunk though.)

I think this could be solved by either having the slice class participate in GC 
(ie add tp_traverse and tp_clear methods), or maybe doing some type-filtering 
during slice_new().

--
components: Interpreter Core
messages: 262582
nosy: Kevin Modzelewski
priority: normal
severity: normal
status: open
title: slice() leaks memory when part of a cycle
type: resource usage
versions: Python 2.7, Python 3.6

___
Python tracker 

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



[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2016-03-28 Thread Philipp Hagemeister

Philipp Hagemeister added the comment:

Please find attached a patch which adds a testcase for Windows (on all 
platforms) as well as code to fix the problem. Since os.path.split returns 
everything after the final slash/backslash, it only needs to be called once.

Note that the usage of posixpath is correct and only relates to the URL parsing 
- it powers foo/bar/../../ .

The path elements may indeed contain backslashes - that's why we call 
os.path.split on them.

--
keywords: +patch
nosy: +phihag
Added file: http://bugs.python.org/file42318/fix-path-traversal-26657.patch

___
Python tracker 

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



[issue25431] implement address in network in ipaddress module

2016-03-28 Thread Aleksandr Balezin

Aleksandr Balezin added the comment:

Any news?

--

___
Python tracker 

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



[issue23551] IDLE to provide menu link to PIP gui.

2016-03-28 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Sunday morning I posted "Adding a Pip GUI to IDLE and idlelib (GSOC project)" 
to the pydev list requesting that any objections to the current plan be raised 
and resolved soon, before final acceptance of a  student proposal and official 
initiation of work on it.

About ensurepip (point 1a on Raymond's list): ensurepip is a package in the 
stdlib.  Regardless of how we later run pip, its presence can be tested on 
startup by trying to import it. If not present, we should ask whether to 
install it or nor.  It can be installed either by running 'python -m ensurepip' 
in a subprocess or by doing what ensurepip.__main__ does:
  import ensurepip; ensurepip._main

--

___
Python tracker 

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



[issue26658] test_os fails when run on Windows ramdisk

2016-03-28 Thread STINNER Victor

STINNER Victor added the comment:

Maybe the junction must not include Lib/ but only temporary directories? I
didn't read the tedt yet.

--

___
Python tracker 

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



[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2016-03-28 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +xiang.zhang

___
Python tracker 

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



[issue26658] test_os fails when run on Windows ramdisk

2016-03-28 Thread Jeremy Kloth

New submission from Jeremy Kloth:

The Win32JunctionTests class fails when the test suite is run on an ImDisk[1]_ 
virtual disk.  The junctions are created successfully, however os.stat() fails 
on them (winerror 123).  os.lstat() does succeed.

I'm inclined to believe that this is a bug in the ImDisk device driver, but 
when testDown() is run, it fails to remove the newly created junction to the 
test directory.  By leaving the junction in place, when the test runner 
completes it removes the entire temporary test directory containing the 
junction thus removing the Lib test directory!

I suggest that at least changing the tearDown() method to use os.path.lexists() 
to ensure that the junction is removed regardless of its target existing or not.


.. [1] http://www.ltr-data.se/opencode.html/#ImDisk

--
components: Tests, Windows
files: test_os.patch
keywords: patch
messages: 262577
nosy: haypo, jkloth, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: test_os fails when run on Windows ramdisk
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file42317/test_os.patch

___
Python tracker 

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



[issue26653] bisect raises a TypeError when hi is None

2016-03-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

May be change the placeholder? For example to sys.maxsize, float('inf') or 
['len(a)'].

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26632] __all__ decorator

2016-03-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is a helper in test.support that helps to add a test for __all__, and we 
slowly add these test for all modules. So this is not large issue for the 
stdlib.

New module level names are added not very often. Keeping __all__ in sync is not 
the largest problem in the maintaining.

--

___
Python tracker 

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



[issue26655] pathlib glob case sensitivity issue on Windows

2016-03-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The problem is that there is no way to just read a file name exactly as it is 
spelled in the file system. Iterating all names in the directory and finding 
the one that match specified name ignoring case is not such effective as 
checking that specified file name exists.

--
nosy: +pitrou, serhiy.storchaka

___
Python tracker 

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



[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-03-28 Thread Berker Peksag

Berker Peksag added the comment:

Here is a patch. It contains the following commits:

* 
https://github.com/ghaering/pysqlite/commit/f254c534948c41c0ceb8cbabf0d4a2f547754739
* 
https://github.com/ghaering/pysqlite/commit/796b3afe38cfdac5d7d5ec260826b0a596554631
* 
https://github.com/ghaering/pysqlite/commit/cae87ee68613697a5f4947b4a0941f59a28da1b6
* 
https://github.com/ghaering/pysqlite/commit/3567b31bb5e5b226ba006213a9c69dde3f155faf

Changes:

* Fixed a refcount error
* Fixed a compiler warning
* Added a whatsnew entry

Note: sqlite3_stmt_readonly() has been added in SQLite 3.7.4 (released on 
2010-12-07) so this patch will make older SQLite versions unusable with the 
sqlite3 module.

--
nosy: +berker.peksag
stage: needs patch -> patch review
Added file: http://bugs.python.org/file42316/issue10740_upstream.diff

___
Python tracker 

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



[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2016-03-28 Thread Thomas

New submission from Thomas:

SimpleHTTPServer and http.server allow directory traversal on Windows.
To exploit this vulnerability, replace all ".." in URLs with "c:c:c:..".


Example:
Run
python -m http.server
and visit
127.0.0.1:8000/c:c:c:../secret_file_that_should_be_secret_but_is_not.txt


There is a warning that those modules are not secure in the module docs,
but for some reason they do not appear in the online docs:
https://docs.python.org/3/library/http.server.html
https://docs.python.org/2/library/simplehttpserver.html


It would be nice if that warning was as apparent as for example here:
https://docs.python.org/2/library/xml.etree.elementtree.html


There are a lot of other URLs that are insecure as well, which can all
be traced back to here:
https://hg.python.org/cpython/file/tip/Lib/http/server.py#l766


The splitdrive and split functions, which should make sure that the
final output is free of ".." are only called once which leads to this
control flow:
---
path = "c:/secret/public"
word = "c:c:c:.."

_, word = os.path.splitdrive(word) # word = "c:c:.."
_, word = os.path.split(word) # word = "c:.."
path = os.path.join(path, word) # path = "c:/secret/public\\.."
---


Iterating splitdrive and split seems safer:
---
for word in words:
# Call split and splitdrive multiple times until
# word does not change anymore.
has_changed = True
while has_changed:
previous_word = word
_, word = os.path.split(word)
_, word = os.path.splitdrive(word)
has_changed = word != previous_word
---






There is another weird thing which I am not quite sure about here:
https://hg.python.org/cpython/file/tip/Lib/http/server.py#l761

---
path = posixpath.normpath(path)
words = path.split('/')
---

posixpath.normpath does not do anything with backslashes and then the
path is split by forward slashes, so it may still contain backslashes.
Maybe replacing posixpath.normpath with os.path.normpath and then
splitting by os.sep would work, but I don't have enough different
operating systems to test this, so someone else should have a look.





I have attached some simple fuzzing test that tries a few weird URLs and
sees if they lead where they shouldn't.
Disclaimer: Might still contain other bugs.

--
components: Library (Lib)
files: fuzz.py
messages: 262572
nosy: Thomas
priority: normal
severity: normal
status: open
title: Directory traversal with http.server and SimpleHTTPServer on windows
type: security
versions: Python 3.6
Added file: http://bugs.python.org/file42315/fuzz.py

___
Python tracker 

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



[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2016-03-28 Thread SilentGhost

Changes by SilentGhost :


--
components: +Windows
nosy: +martin.panter, paul.moore, steve.dower, tim.golden, zach.ware
versions: +Python 3.5

___
Python tracker 

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



[issue26656] Documentation for re.compile is a bit outdated

2016-03-28 Thread Sworddragon

New submission from Sworddragon:

The documentation for re.compile says "Compile a regular expression pattern 
into a regular expression object, which can be used for matching using its 
match() and search() methods, described below." which implies that match() and 
search() are the only methods for it while there are a few more. Maybe this 
sentence should be worded more generic or at least complete the list.

--
assignee: docs@python
components: Documentation
messages: 262571
nosy: Sworddragon, docs@python
priority: normal
severity: normal
status: open
title: Documentation for re.compile is a bit outdated
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



[issue26655] pathlib glob case sensitivity issue on Windows

2016-03-28 Thread Udo Eberhardt

New submission from Udo Eberhardt:

On Windows Path.glob does not always return the file name with correct case. 

If the current directory contains a file named MixedCase.txt then the following 
script:

import pathlib
p = pathlib.Path('.')
print(list(p.glob('*.txt')))
print(list(p.glob('Mixedcase.txt')))

yields:
[WindowsPath('MixedCase.txt')]
[WindowsPath('mixedcase.txt')]

Problem: The result of the second call to glob should be 'MixedCase.txt' as 
well. I would expect that glob returns a file name exactly as it is spelled in 
the file system.

--
components: Library (Lib), Windows
messages: 262570
nosy: paul.moore, steve.dower, tim.golden, udo.eberhardt, zach.ware
priority: normal
severity: normal
status: open
title: pathlib glob case sensitivity issue on Windows
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



[issue19959] argparse.FileType does not expand tilde "~"

2016-03-28 Thread Julian Berman

Julian Berman added the comment:

My support (or really, asking for a more generic callable) was to enable other 
use cases, not this one specifically -- e.g., allowing for constructing a 
pathlib Path or a twisted.python.filepath.FilePath without needing to write 
one's own argparse action.

For ~ specifically -- it's true if you're going to go via a shell it'd be 
expanded first, but I'm not sure that'd count as "conflicting" with the shell's 
expansion, it just won't be needed. Consider that 
twisted.python.filepath.FilePath for example, expands ~ in its constructor -- 
people often construct paths in other places and occasionally expansion is 
convenient. Like in test cases.

I certainly don't feel strongly about the patch though, especially as-is.

--
status: pending -> open

___
Python tracker 

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



[issue26632] __all__ decorator

2016-03-28 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Mar 28, 2016, at 06:34 AM, Raymond Hettinger wrote:

>I have to agree with that part ;-) Sorry, but this feels "yucky" and is
>likely to cause more problems than it solves.

I've been experimenting with something like this in a Mailman branch and I've
come to like it much more than I did originally.  I'm using the "simple"
implementation, so that means that I have a very few explicit appends to
__all__.

But the use of @public is actually pretty great.  I don't have to worry about
__all__ getting out of sync (and there turned out to be lots of places where
that was happening), it's quite visually appealing (easy to pick out in a
crowded file), and it avoids nasty pep8 conflicts.

The major downside is actually having to import it from a module very early in
the startup sequence.  I stick it in mailman/__init__.py but that kind of
sucks because I want to move to making that a namespace package so I want to
*remove* mailman/__init__.py but there's no other obvious place to put an
early `public` definition.

Thus after experimenting with it, I'm much more in favor of it.  Could you
please describe what you don't like about it and what problems you think it
will cause?

(Plus, I encourage you to try it on a medium to large size project!)

--

___
Python tracker 

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



[issue15859] PyUnicode_EncodeFSDefault win32 inconsistancy.

2016-03-28 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy:  -paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue15859] PyUnicode_EncodeFSDefault win32 inconsistancy.

2016-03-28 Thread Berker Peksag

Berker Peksag added the comment:

shanzhengcheng: Please don't update closed issues.

gns3-1.4.5 is not part of the Python standard library. You'll get better 
support by using the gns3 support channels.

If you still think that this is a bug in Python, please file a new issue by 
using the form at http://bugs.python.org/issue?@template=item (it would be 
great if you provide a reproducer without using gns3)

Thanks!

--
components: +Windows
nosy: +berker.peksag, christian.heimes, ideasman42, paul.moore, pitrou, 
python-dev, steve.dower, tim.golden, zach.ware
stage: patch review -> resolved
title: Fail update installation: 'utf-8' codec can't decode byte 0x90 in 
position 0: invalid start byte -> PyUnicode_EncodeFSDefault win32 inconsistancy.

___
Python tracker 

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



[issue26652] Cannot install Python 2.7.11 on Windows Server 2008 R2

2016-03-28 Thread SilentGhost

Changes by SilentGhost :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue26654] asyncio is not inspecting keyword arguments of functools.partial

2016-03-28 Thread iceboy

New submission from iceboy:

import asyncio
import functools

def foo(x): raise Exception()

loop = asyncio.get_event_loop()
loop.call_soon(functools.partial(foo, x=1))
loop.run_forever()

Current error message:
Exception in callback foo()() at ...:4

Expected error message:
Exception in callback foo(x=1)() at ...:4

--
components: asyncio
messages: 262566
nosy: gvanrossum, haypo, iceboy, yselivanov
priority: normal
severity: normal
status: open
title: asyncio is not inspecting keyword arguments of functools.partial
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



[issue26488] hashlib command line interface

2016-03-28 Thread SilentGhost

Changes by SilentGhost :


--
dependencies: +argparse.FileType for '-' doesn't work for a mode of 'rb'
nosy: +SilentGhost

___
Python tracker 

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



[issue26488] hashlib command line interface

2016-03-28 Thread Aviv Palivoda

Aviv Palivoda added the comment:

I actually have noticed issue 13824 while working on this issue. The patch I 
uploaded to Issue 14156 actually fixes the problem in issue 13824 in addition 
to the problem with the stdin/stdout.
I think we should add a dependency in issue 14156 for this issue.

--

___
Python tracker 

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



[issue26632] __all__ decorator

2016-03-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Agree with Raymond.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue23804] SSLSocket.recv(0) receives up to 1024 bytes

2016-03-28 Thread Martin Panter

Changes by Martin Panter :


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

___
Python tracker 

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



[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-03-28 Thread Martin Panter

Martin Panter added the comment:

For the record, porting the change was rather easy (hg graft + tweak + hg 
commit --amend). With that applied, I think it eliminates the need for the 
store_true/false half of Julien’s patch.

Is the store_const half of Julien’s patch ready to commit?

--
stage:  -> patch review

___
Python tracker 

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



[issue26632] __all__ decorator

2016-03-28 Thread Raymond Hettinger

Raymond Hettinger added the comment:

[Barry]
> This is probably terrible ...

I have to agree with that part ;-)   Sorry, but this feels "yucky" and is 
likely to cause more problems than it solves.

--
nosy: +rhettinger

___
Python tracker 

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



[issue26651] Deprecate register_adapter() and register_converter() in sqlite3

2016-03-28 Thread Raymond Hettinger

Raymond Hettinger added the comment:

A few thoughts: 1) Deprecation messages should say "do X instead" rather than 
leaving users stranded.  2)  As long as most of our users are still with Python 
2.7 we need to avoid deprecations that present obstacles to Python 3 adoption 
or that increase transition costs.  3)  The adapters have been around for many 
years; the older the API, the more people people will have come to rely on it.  
4) The standard library is expected to be less changeable than third-party 
modules (we say that the standard library is where code goes to die and it 
should already be dead on arrival so that the word "standard" has more meaning.

--
nosy: +rhettinger

___
Python tracker 

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



[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-03-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 566fe3564684 by Raymond Hettinger in branch '3.5':
Issue #25314: store_true and store_false also create appropriate defaults.
https://hg.python.org/cpython/rev/566fe3564684

New changeset 9fdeca5fdbf0 by Martin Panter in branch 'default':
Issue #25314: Merge argparse doc from 3.5
https://hg.python.org/cpython/rev/9fdeca5fdbf0

--
nosy: +python-dev

___
Python tracker 

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



[issue26653] bisect raises a TypeError when hi is None

2016-03-28 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The pure python code used None as a placeholder for an optional argument.  It 
is not an intended input value.  The documented signature
is:  bisect.bisect_left(a, x, lo=0, hi=len(a)).

--
priority: normal -> low

___
Python tracker 

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



[issue26653] bisect raises a TypeError when hi is None

2016-03-28 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

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