[issue27389] When a TypeError is raised due to invalid arguments to a method, it should use __qualname__ to identify the class the method is in

2016-08-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
superseder:  -> Names in function call exception should have class names, if 
they're methods

___
Python tracker 

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



[issue27690] os.path.normcase broken.

2016-08-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> works for me
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



[issue27683] ipaddress subnet slicing iterator malfunction

2016-08-04 Thread Nick Coghlan

Nick Coghlan added the comment:

As Stephen notes, the underlying problem appears to be a behavioural difference 
between two theoretically equivalent ways of defining a network:

>>> list(ipaddress.IPv4Network(('127.0.0.4', 31)).hosts())
[]
>>> list(ipaddress.IPv4Network(('127.0.0.4/31')).hosts())
[IPv4Address('127.0.0.4'), IPv4Address('127.0.0.5')]

Now, the first case is the documented behaviour: hosts() is *supposed to* 
exclude the network and broadcast address, and those are the only addresses in 
a /31.

If you want to iterate over all the *addresses* in a network (including the 
network and broadcast addresses) then you need to iterate over the network 
object directly:

>>> list(ipaddress.IPv4Network(('127.0.0.4', 31)))
[IPv4Address('127.0.0.4'), IPv4Address('127.0.0.5')]
>>> list(ipaddress.IPv4Network(('127.0.0.4/31')))
[IPv4Address('127.0.0.4'), IPv4Address('127.0.0.5')]

However, as Emanuel found when writing his patch, there's currently an 
undocumented special case for /31 networks: the definition of "hosts" is 
*implicitly changed* for such instances to include the nominal network and 
broadcast address (by setting "self.hosts = self.__iter__"), presumably on the 
assumption that such networks represent a point-to-point link between two 
hosts, so the concepts of "network address" and "broadcast address" don't 
really apply.

That special case seems pragmatically useful, so I think the right fix would be 
to:

- document the special case that for /31 networks, hosts() includes the network 
and broadcast addresses (on the assumption the "network" is actually a 
point-to-point link between two hosts)
- refactor IPv4Network.__init__ to first map the supplied input to a 
"candidate_address" and "candidate_netmask" and then use *common* validation 
logic to determine the actual network address and netmask (this will also 
address the "# fixme" comment for the int/bytes case)
- check whether or not IPv6Network is affected by the same behavioural 
discrepancy

--

___
Python tracker 

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



[issue27690] os.path.normcase broken.

2016-08-04 Thread Lilin Lao

Lilin Lao added the comment:

I Fixed it by uninstall and then reinstall python, thanks

--

___
Python tracker 

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



[issue2786] Names in function call exception should have class names, if they're methods

2016-08-04 Thread Steven Barker

Steven Barker added the comment:

A few weeks ago I reported issue 27389 which looks to be a duplicate of this 
issue. Has any progress been made on this issue?

--
nosy: +Steven.Barker

___
Python tracker 

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



[issue27690] os.path.normcase broken.

2016-08-04 Thread Lilin Lao

Lilin Lao added the comment:

This issue happened after I update the system to "Windows 10 Anniversary 
Update".

--

___
Python tracker 

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



[issue27389] When a TypeError is raised due to invalid arguments to a method, it should use __qualname__ to identify the class the method is in

2016-08-04 Thread Steven Barker

Steven Barker added the comment:

Yes, this looks to be a duplicate of that issue. I'm closing this issue as a 
duplicate, but I don't seem to be able to set the Superseder field. If you can, 
please set that to Issue 2786.

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[issue27690] os.path.normcase broken.

2016-08-04 Thread Lilin Lao

New submission from Lilin Lao:

orz> python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Failed calling sys.__interactivehook__
Traceback (most recent call last):
  File "C:\Users\lao\AppData\Local\Programs\Python\Python35\lib\site.py", line 
388, in register_readline
import readline
  File 
"C:\Users\lao\AppData\Local\Programs\Python\Python35\lib\site-packages\readline.py",
 line 6, in 
from pyreadline.rlmain import Readline
  File 
"C:\Users\lao\AppData\Local\Programs\Python\Python35\lib\site-packages\pyreadline\__init__.py",
 line 12, in 
from . import logger, clipboard, lineeditor, modes, console
  File 
"C:\Users\lao\AppData\Local\Programs\Python\Python35\lib\site-packages\pyreadline\logger.py",
 line 10, in 
import socket, logging, logging.handlers
  File 
"C:\Users\lao\AppData\Local\Programs\Python\Python35\lib\logging\__init__.py", 
line 170, in 
_srcfile = os.path.normcase(addLevelName.__code__.co_filename)
AttributeError: module 'ntpath' has no attribute 'normcase'
>>> exit()

--
components: Windows
messages: 272013
nosy: lll9p, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: os.path.normcase broken.
type: crash
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



[issue27685] altinstall with --enable-shared showing incorrect behaviour

2016-08-04 Thread umank.behera

umank.behera added the comment:

I need to have --enable-shared present while compiling to make PyInstaller work.

--

___
Python tracker 

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



[issue27685] altinstall with --enable-shared showing incorrect behaviour

2016-08-04 Thread umank.behera

umank.behera added the comment:

As Ned Deily mentioned, this fixes the issue:
./configure --enable-shared --prefix=/opt/python 
LDFLAGS=-Wl,-rpath=/opt/python/lib

Closing as not a bug, thanks!

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

___
Python tracker 

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



[issue27689] Add documentation for typing.Generator

2016-08-04 Thread Michael Lee

New submission from Michael Lee:

This patch adds (previously missing) documentation for `typing.Generator`.

--
assignee: docs@python
components: Documentation
files: document-generators.patch
keywords: patch
messages: 272010
nosy: docs@python, gvanrossum, michael0x2a
priority: normal
severity: normal
status: open
title: Add documentation for typing.Generator
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file44013/document-generators.patch

___
Python tracker 

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



[issue27688] Expand documentation about Any in the typing module

2016-08-04 Thread Michael Lee

New submission from Michael Lee:

This patch updates the section about `Any` in the typing module. Previously, 
that section was relatively sparse and didn't seem to do a very good job of 
helping the reader understand what the distinction between `Any` and `object` 
is.

This patch expands that section and adds several examples borrowed from the 
mypy docs and PEP 484.

--
assignee: docs@python
components: Documentation
files: object-vs-any.patch
keywords: patch
messages: 272009
nosy: docs@python, gvanrossum, michael0x2a
priority: normal
severity: normal
status: open
title: Expand documentation about Any in the typing module
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file44012/object-vs-any.patch

___
Python tracker 

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



[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2016-08-04 Thread Steve Dower

Steve Dower added the comment:

I'd also suggest that this is potentially exploitable (if the Python code 
calling into ctypes is already vulnerable - I don't think you could reasonably 
manufacture an exploit simply from this bug) and it should probably go into all 
active security branches. I think that's what the current selection represents, 
but I don't remember where 3.3 is at right now.

--

___
Python tracker 

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



[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2016-08-04 Thread Steve Dower

Steve Dower added the comment:

Looks good to me.

Sorry for not getting back to this after I said I would. Every time I 
remembered I didn't have the time available...

--

___
Python tracker 

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



[issue1230540] sys.excepthook doesn't work in threads

2016-08-04 Thread Decorater

Decorater added the comment:

Ok, so I just found out you can bypass thread exceptions by wraping the line 
that actually runs the threads in a try/except block and then using the logging 
module to log it to a file instead of the console.

--

___
Python tracker 

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



[issue21578] Misleading error message when ImportError called with invalid keyword args

2016-08-04 Thread Xiang Zhang

Xiang Zhang added the comment:

I am a little uncomfortable with the empty tuple. It's only used as a 
placeholder for PyArg_ParseTupleAndKeywords. But this way we can achieve 
consistent error message. Don't know how to choose.

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue26462] Patch to enhance literal block language declaration

2016-08-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6e9a040a993f by Martin Panter in branch '2.7':
Issue #26462: Doc: avoid literal_block warnings, fix syntax highlighting.
https://hg.python.org/cpython/rev/6e9a040a993f

--

___
Python tracker 

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



[issue1230540] sys.excepthook doesn't work in threads

2016-08-04 Thread Decorater

Decorater added the comment:

personally these exceptions in console can be annoying to me as I hate seeing 
them.

Exception in thread Thread-11:
Traceback (most recent call last):
  File "threading.py", line 914, in _bootstrap_inner
  File 
"E:\Users\Elsword\Desktop\DecoraterBot\Async\test\resources\Dependencies\discord\voice_client.py",
 line 150, in run
super().run()
  File 
"E:\Users\Elsword\Desktop\DecoraterBot\Async\test\resources\Dependencies\discord\voice_client.py",
 line 108, in run
self.player(data)
  File 
"E:\Users\Elsword\Desktop\DecoraterBot\Async\test\resources\Dependencies\discord\voice_client.py",
 line 669, in play_audio
sent = self.socket.sendto(packet, (self.endpoint_ip, self.voice_port))
OSError: [WinError 10055] An operation on a socket could not be performed 
because the system lacked sufficient buffer space or because a queue was full

Exception in thread Thread-21:
Traceback (most recent call last):
  File "threading.py", line 914, in _bootstrap_inner
  File 
"E:\Users\Elsword\Desktop\DecoraterBot\Async\test\resources\Dependencies\discord\voice_client.py",
 line 150, in run
super().run()
  File 
"E:\Users\Elsword\Desktop\DecoraterBot\Async\test\resources\Dependencies\discord\voice_client.py",
 line 108, in run
self.player(data)
  File 
"E:\Users\Elsword\Desktop\DecoraterBot\Async\test\resources\Dependencies\discord\voice_client.py",
 line 669, in play_audio
sent = self.socket.sendto(packet, (self.endpoint_ip, self.voice_port))
OSError: [WinError 10038] An operation was attempted on something that is not a 
socket

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



[issue1230540] sys.excepthook doesn't work in threads

2016-08-04 Thread Decorater

Decorater added the comment:

I too agree that I hate the thread exceptions being printed in the console I 
would suggest python was to error log it all to a file instead (so it does not 
spam up the console). I get it a lot with websocket / opus errors and it is 
annoying because it does not cleanup ffmpeg for me.

--
nosy: +Decorater

___
Python tracker 

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



[issue24658] open().write() fails on 2 GB+ data (OS X)

2016-08-04 Thread Zachary Ware

Changes by Zachary Ware :


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



[issue27687] Linux shutil.move between mountpoints as root does not retain ownership

2016-08-04 Thread jort bloem

New submission from jort bloem:

When using shutil.move() between mounts (i.e. when it does a copy/delete), 
running as root, ownership should be maintained.

To test: log in as root, create a file owned by a regular user. In python, use 
shutil.move() to move it to another mountpoint. Check that the ownership of the 
moved file is the same as the ownership of the original file.

--
components: Library (Lib)
messages: 272001
nosy: jort.bloem
priority: normal
severity: normal
status: open
title: Linux shutil.move between mountpoints as root does not retain ownership
type: behavior
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



[issue27686] Spam

2016-08-04 Thread Zachary Ware

Changes by Zachary Ware :


--
components:  -asyncio
nosy:  -bhartirana2323, gvanrossum, haypo, yselivanov
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
title: A 1 800 919 0992 ⅀⅀⫸⅀⅀ Quickbooks Enterprise support phone number, 
Quickbooks Enterprise support phone number -> Spam
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



[issue27686] Spam

2016-08-04 Thread Zachary Ware

Changes by Zachary Ware :


Removed file: http://bugs.python.org/file44011/(1-800-919-0992)Call, Quickbooks 
 tech support phone number, Intuit Quickbooks  Tech Support Phone Number, 
Quickbooks  Help Desk Phone Number.pdf

___
Python tracker 

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



[issue27686] AAAAA 1 800 919 0992 ⅀⅀⫸⅀⅀ Quickbooks Enterprise support phone number, Quickbooks Enterprise support phone number

2016-08-04 Thread Zachary Ware

Changes by Zachary Ware :


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

___
Python tracker 

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



[issue27686] AAAAA 1 800 919 0992 ⅀⅀⫸⅀⅀ Quickbooks Enterprise support phone number, Quickbooks Enterprise support phone number

2016-08-04 Thread Bharti Rana

New submission from Bharti Rana:

A 1 800 919 0992 ⅀⅀⫸⅀⅀ Quickbooks Enterprise support phone number, 
Quickbooks Enterprise support phone number Quickbooks Enterprise phone number 
USA
QPML +¦$÷ 1800 -919-0992 Quickbooks Enterprise tech support phone number, 
Quickbooks Enterprise tech support contact number, Quickbooks Enterprise 
technical support contact number, Quickbooks Enterprise contact number, 
Quickbooks Enterprise contact phone number, Quickbooks Enterprise contact 
telephone number, Quickbooks Enterprise 24 hour contact number, Quickbooks 
Enterprise contact number, Quickbooks Enterprise customer service contact 
number, Quickbooks Enterprise official number, Quickbooks Enterprise official 
contact number, Quickbooks Enterprise 800 contact number, Quickbooks Enterprise 
toll free number, 800 number for Quickbooks Enterprise support, Quickbooks 
Enterprise 24/7 support phone number Quickbooks Enterprise support phone 
number,Quickbooks Enterprise support phone number,Quickbooks Enterprise help 
phone number, Quickbooks Enterprise technical support number.Quickbooks 
Enterprise support number, Quickbooks Enterprise phone number, Quickbooks 
Enterprise HELP DESK number, Quickbooks Enterprise number, Quickbooks 
Enterprise phone number, Quickbooks Enterprise customer service phone number, 
Quickbooks Enterprise customer service phone number, Quickbooks Enterprise 
support phone number. HelpCall 1-800 -919-0992/.Quickbooks Enterprise 24/7 
support phone number,Quickbooks Enterprise telephone number for support? call 
1800 -919-0992./Quickbooks Enterprise contact number, Quickbooks Enterprise 
contact phone number, Quickbooks Enterprise contact telephone number,,telephone 
number for Quickbooks Enterprise online support,Quickbooks Enterprise official 
support number,Quickbooks Enterprise official number,Quickbooks Enterprise 
official phone number,,,phone number for Quickbooks Enterprise 
support,,Quickbooks Enterprise 24/7 support phone number,,Quickbooks Enterprise 
support number,Quickbooks Enterprise telephone number for support QB SUPPORT ON 
((1-800 -919-0992)) Quickbooks Enterprise PHONE NUMBER AND Quickbooks 
Enterprise SUPPORT PHONE NUMBER Online Support For (((1+800 +919+0992)!!! 
Quickbooks Enterprise ((Technical)) Support phone number,, Quickbooks 
Enterprise HELP DESK phone number Online Support For (((1+800 +919+0992)!!! 
Quickbooks Enterprise ((Technical)) Support phone number,, Quickbooks 
Enterprise HELP DESK phone number Helpline TECH ))1-800 -919-0992((Quickbooks 
Enterprise technical support phone number Quickbooks Enterprise phone number QB 
SUPPORT ON ((1-800 -919-0992)) Quickbooks Enterprise PHONE NUMBER AND 
Quickbooks Enterprise SUPPORT PHONE NUMBER Quickbooks Enterprise Toll Free, 
Intuit(1-800 -919-0992) Quickbooks Enterprise HELP DESK Phone Number vides 
online solution for all USA/CANADA clients. For any help of query call 1 800 
919 0992 to get all Quickbooks Enterprise account solution. Call, 1-800 
-919-0992 for all type help by Quickbooks Enterprise HELP DESK phone number, 
Intuit Quickbooks Enterprise HELP DESK Phone Number, Quickbooks Enterprise Help 
Desk Phone Number, Quickbooks Enterprise HELP DESK number, Quickbooks 
Enterprise technical support phone number, Quickbooks Enterprise phone 
number, Quickbooks Enterprise technical support number, Quickbooks Enterprise 
support phone number, Quickbooks Enterprise technical support, Quickbooks 
Enterprise Customer Service Phone Number, Quickbooks Enterprise Customer 
Service Number, Quickbooks Enterprise Phone Number, Quickbooks Enterprise 
Number, Quickbooks Enterprise Customer Service Helpline Number, Quickbooks 
Enterprise Customer Care Number, Quickbooks Enterprise support team phone 
number,  Quickbooks Enterprise help number-Quickbooks Enterprise Helpline 
Number; Quickbooks Enterprise help phone number-Quickbooks Enterprise Helpline 
Number, Quickbooks Enterprise HELP DESK Toll free Number, Quickbooks Enterprise 
Support Telephone Number, Quickbooks Enterprise HELP DESK Telephone number, 
Quickbooks Enterprise HELP DESK contact number, Quickbooks Enterprise support 
contact number, Quickbooks Enterprise technical support contact number. 
Helpline TECH ))1-800 +919+0992(( Quickbooks Enterprise Enterprise technical 
support phone number 1-800 +919+0992 Quickbooks Enterprise Enterprise POS phone 
number 1800 +919+0992 QB SUPPORT ON ((1-800 +919+0992)) Quickbooks Enterprise 
Enterprise PHONE NUMBER AND Quickbooks Enterprise Enterprise SUPPORT PHONE 
NUMBER Quickbooks Enterprise Enterprise Toll Free, Intuit(1-800 +919+0992) 
Quickbooks Enterprise Enterprise Tech Support Phone Number POSvides online 
solution for all USA/CANADA clients. For any help of query call 1 800 +919+0992 
to get all Quickbooks Enterprise Enterprise account solution. Call, 1-800 
+919+0992 for all type help by Quickbooks Enterprise Enterprise tech support 
phone number, Intuit Quickbooks Enterprise Enterprise Tech Su

[issue27585] asyncio.Lock deadlock after cancellation

2016-08-04 Thread sss

sss added the comment:

Thank you. This 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



[issue27685] altinstall with --enable-shared showing incorrect behaviour

2016-08-04 Thread Ned Deily

Ned Deily added the comment:

No doubt you are running into same problem that is described here: 
http://stackoverflow.com/questions/12553057/compile-python-2-7-3-from-source-on-a-system-with-python-2-7-already

The problem is, that on most Unix systems (with the notable exception of Mac OS 
X), the path to shared libraries is not an absolute path.  So, if you install 
Python in a non-standard location, which is the right thing to do so as not to 
interfere with a system Python of the same version, you will need to configure 
in the path to the shared library or supply it via an environment variable at 
run time, like LD_LIBRARY_PATH.  You may be better off avoiding 
--enable-shared; it's easy to run into problems like this with it.

--
nosy: +ned.deily

___
Python tracker 

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



[issue27685] altinstall with --enable-shared showing incorrect behaviour

2016-08-04 Thread umank.behera

New submission from umank.behera:

When I altinstall python 2.7.12 with
./configure --prefix=/opt/python --enable-shared
it comes up as python 2.7.5 (system default python)

But altinstall with
./configure --prefix=/opt/python
it comes up as 2.7.12, what am I missing?

This is on RHEL 7.2

This is not a pathing issue:

Without --enable-shared:
[root@myrig ~]# /opt/python/bin/python2.7 -V
Python 2.7.12

With --enable-shared:
[root@myrig ~]# /opt/python/bin/python2.7 -V
Python 2.7.5

--
components: Build, Installation
messages: 271997
nosy: ubehera
priority: normal
severity: normal
status: open
title: altinstall with --enable-shared showing incorrect behaviour
type: behavior
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



[issue21578] Misleading error message when ImportError called with invalid keyword args

2016-08-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Why not use PyArg_ParseTupleAndKeywords()?

--
Added file: http://bugs.python.org/file44010/import_error_parse_args.patch

___
Python tracker 

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



[issue21578] Misleading error message when ImportError called with invalid keyword args

2016-08-04 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



[issue21578] Misleading error message when ImportError called with invalid keyword args

2016-08-04 Thread Brett Cannon

Brett Cannon added the comment:

Assigning to Berker to apply his own patch since Eric has not gotten around to 
this.

--
assignee: eric.snow -> berker.peksag

___
Python tracker 

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



[issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

2016-08-04 Thread Sushant

Sushant added the comment:

The CSV is around 75 MB, not that big I guess. And I've tried Chrome, Edge and 
Firefox

--

___
Python tracker 

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



[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2016-08-04 Thread Lawrence Velázquez

Changes by Lawrence Velázquez :


--
nosy: +larryv

___
Python tracker 

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



[issue27684] Incorrect exception message of ImportError constructor

2016-08-04 Thread Berker Peksag

Berker Peksag added the comment:

This is a duplicate of issue 21578.

--
nosy: +berker.peksag
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Misleading error message when ImportError called with invalid 
keyword args
type:  -> behavior

___
Python tracker 

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



[issue27566] Tools/freeze/winmakemakefile.py clean target should use 'del' instead of 'rm'

2016-08-04 Thread Zachary Ware

Zachary Ware added the comment:

It is run by nmake.

This isn't Cygwin-related, it's for 'freezing' a program a la py2exe or 
cx_Freeze; see Tools/freeze/README.  I have yet to try it without py2exe or 
cx_Freeze, but it's theoretically possible :)

--

___
Python tracker 

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



[issue27684] Incorrect exception message of ImportError constructor

2016-08-04 Thread Xiang Zhang

New submission from Xiang Zhang:

ImportError accepts name and path as keyword-only parameters, but when invalid 
keyword argument passed, it emits wrong exception message saying that 
ImportError does not take keyword arguments.

>>> ImportError(name='name', path='path')
ImportError()
>>> ImportError(foo=1)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: ImportError does not take keyword arguments

Propose a patch to fix this. Hope it helps.

--
components: Interpreter Core
files: ImportError_constructor_exception.patch
keywords: patch
messages: 271991
nosy: brett.cannon, xiang.zhang
priority: normal
severity: normal
status: open
title: Incorrect exception message of ImportError constructor
versions: Python 3.6
Added file: 
http://bugs.python.org/file44009/ImportError_constructor_exception.patch

___
Python tracker 

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



[issue27585] asyncio.Lock deadlock after cancellation

2016-08-04 Thread Guido van Rossum

Guido van Rossum added the comment:

Tentative fix is in https://github.com/python/asyncio/pull/393

--

___
Python tracker 

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



[issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

2016-08-04 Thread Berker Peksag

Berker Peksag added the comment:

Which browser do you use? How big is the CSV file? Modern browsers tend to do 
aggressive prefetching so this might be the cause here.

--
nosy: +berker.peksag

___
Python tracker 

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



[issue27566] Tools/freeze/winmakemakefile.py clean target should use 'del' instead of 'rm'

2016-08-04 Thread Steve Dower

Steve Dower added the comment:

I suspect it will also need the /Q option, at least on the one with the 
wildcard, otherwise there will be a prompt. Though I'm not entirely clear on 
where this is run (nmake?) so maybe it's already suppressed.

The fact that I'm not familiar with this makefile suggests it isn't needed for 
normal Windows builds though, and if this is only meant for Cygwin/MinGW builds 
then I think assuming rf availability is fine.

--

___
Python tracker 

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



[issue27585] asyncio.Lock deadlock after cancellation

2016-08-04 Thread sss

sss added the comment:

Yes I'm running python-3.5.2.

--

___
Python tracker 

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



[issue27585] asyncio.Lock deadlock after cancellation

2016-08-04 Thread Guido van Rossum

Guido van Rossum added the comment:

Does this repro with the latest Python 3.5.2? IIRC the lock code was
overhauled after 3.5.0 or 3.5.1.

(PS. These are tasks, not threads.)

--Guido (mobile)

On Aug 4, 2016 2:33 AM, "sss"  wrote:

sss added the comment:

Yes, await asyncio.sleep(0) does fix it, but it would be weird if I'm
supposed to put those all over my code. I made a new reproducer now that
uses 2 threads in case it's not allowed to take the same lock twice from
the same thread.

--
Added file: http://bugs.python.org/file44007/lock2.py

___
Python tracker 

___

--

___
Python tracker 

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



[issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

2016-08-04 Thread Sushant

Sushant added the comment:

Also, since I re-installed everything, I got python 3.5 too

--

___
Python tracker 

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



[issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

2016-08-04 Thread Sushant

Sushant added the comment:

There have been a few times when this code ran perfectly fine, without any 
errors whatsoever. 

So the structure is like this-

This code reads a csv, processes it and save it in a model-

class Endday(models.Model):
  company = models.TextField(null=True)
  eop = models.TextField(max_length=10) 

Now the database is postgresql, as soon as save is called, data is posted 
there. This code runs fine on my colleague's computer(same code) but he has 
windows 7. Thinking this might be a windows error, I re-installed windows 10 
from the scratch. But to no help. At last, I had to knock python's door.

--

___
Python tracker 

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



[issue27683] ipaddress subnet slicing iterator malfunction

2016-08-04 Thread Stephen Shirley

Stephen Shirley added the comment:

The bug appears to be in the new form of the constructor. Here's a more minimal 
reproduction:

In python3.5:
>>> list(ipaddress.IPv4Network(("127.0.0.4", 31)).hosts())
[]

In python3.4
>>> list(ipaddress.IPv4Network("127.0.0.4/31").hosts())
[IPv4Address('127.0.0.4'), IPv4Address('127.0.0.5')]

--

___
Python tracker 

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



[issue27683] ipaddress subnet slicing iterator malfunction

2016-08-04 Thread Emanuel Barry

Changes by Emanuel Barry :


--
stage:  -> patch review

___
Python tracker 

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



[issue27683] ipaddress subnet slicing iterator malfunction

2016-08-04 Thread Emanuel Barry

Emanuel Barry added the comment:

Here's a patch that fixes this bug, test included. I made this against the 3.5 
branch, but should apply cleanly on default.

--
keywords: +patch
nosy: +ebarry
Added file: http://bugs.python.org/file44008/ipaddress_iter_fix.patch

___
Python tracker 

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



[issue27683] ipaddress subnet slicing iterator malfunction

2016-08-04 Thread R. David Murray

R. David Murray added the comment:

Since this is a regression, I'm going to claim this has higher than normal 
priority, for whatever good that will do :)

--
keywords: +3.5regression
priority: normal -> high
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



[issue27680] Reduce Github pull request rate

2016-08-04 Thread Berker Peksag

Berker Peksag added the comment:

Sorry, I forgot to share a screenshot in my earlier message: 
https://dl.dropboxusercontent.com/u/166024/pr-template.png

--

___
Python tracker 

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



[issue27680] Reduce Github pull request rate

2016-08-04 Thread Steve Holden

Steve Holden added the comment:

Hmm. Tried making a PR to a forked copy and didn't see it. Probably just 
incompetence on my part.

--

___
Python tracker 

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



[issue27683] ipaddress subnet slicing iterator malfunction

2016-08-04 Thread tklausmann

tklausmann added the comment:

I just bisected it and the specific commit is this one:

https://hg.python.org/cpython/rev/2711677cf874

--

___
Python tracker 

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



[issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

2016-08-04 Thread R. David Murray

R. David Murray added the comment:

If the save is happening twice, that must mean that that method is getting 
called twice, and I'm guessing that the second time it is called wsgiref is 
closed and thus you get the error.  But that's just a guess, your code snippet 
by itself isn't enough to see how everything fits together.

--

___
Python tracker 

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



[issue27683] ipaddress subnet slicing iterator malfunction

2016-08-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The change was introduced in issue21487.

--
nosy: +ncoghlan, pitrou, serhiy.storchaka

___
Python tracker 

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



[issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

2016-08-04 Thread Sushant

Sushant added the comment:

The code is actually quite simple, I'll post it over here-

def import_eop(request):
  with 
open('C:/Users/sg/Desktop/projects/drfapi/venv/drf/prices_companies_indices_transpose.csv')
 as f:
contents = f.readlines()
dates = contents[0]
dates = dates.split(",")
dates = dates[1:]
d = []
for i in range(len(dates)):
  d.append(Dates(date=dates[i]))
Dates.objects.bulk_create(d)
companies = []
entry = []
for i in range(1, len(contents)):
  csline = contents[i].split(",")
  prices = csline[1:len(csline)]
  company = csline[0]
  prices =[float(x) for x in prices]
  entry = (Endday(company=company, eop=prices))
  entry.save()
  f.close()
  print('Saved to database')
  return HttpResponse('Ok')


Now as you see, I'm not even handling wsgiref.close() at all. This isn't a 
django issue since django community themselves pointed me to this direction. 
Let me know if I can be of any help.

--
nosy: +SG

___
Python tracker 

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



[issue27683] ipaddress subnet slicing iterator malfunction

2016-08-04 Thread R. David Murray

R. David Murray added the comment:

If someone wants to bisect to find out which changeset introduced the behavior 
change that would be helpful.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

2016-08-04 Thread R. David Murray

R. David Murray added the comment:

The traceback looks like wsgiref.close() was called before handle_error() was 
called (perhaps for a second time?)

We'll probably need a reproducer (as simple as possible please) to debug this 
further, which might be difficult since it may be tricky to simulate the 
windows error.  But you might also want to, say, post to python-list and see if 
anyone can spot a problem with your code.  Could it be that it is calling 
wsgiref.close at the wrong time?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue27683] ipaddress subnet slicing iterator malfunction

2016-08-04 Thread tklausmann

Changes by tklausmann :


--
nosy: +kormat

___
Python tracker 

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



[issue27683] ipaddress subnet slicing iterator malfunction

2016-08-04 Thread tklausmann

New submission from tklausmann:

Between Python 3.4 (3.4.5 I've tested with) and Python 3.5 (3.5.2), the 
behavior of ipaddress's subnet() method changed.

This code:

$ cat iat.py
import ipaddress

p = ipaddress.IPv4Network("172.0.0.4/30")
subnets = p.subnets(new_prefix=31)
n = next(subnets)

print(list(n.hosts()))

has two different outcomes on 3.4 vs. 3.5:

$ python3.4 iat.py 
[IPv4Address('172.0.0.4'), IPv4Address('172.0.0.5')]
$ python3.5 iat.py 
[]

AIUI, the 3.4 behavior is the correct one (or the docs need to be fixed).

--
components: Library (Lib)
messages: 271972
nosy: tklausmann
priority: normal
severity: normal
status: open
title: ipaddress subnet slicing iterator malfunction
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



[issue27680] Reduce Github pull request rate

2016-08-04 Thread R. David Murray

R. David Murray added the comment:

Just FYI Steve, the pull request template is relatively recent addition (within 
the last two months).

--
nosy: +r.david.murray

___
Python tracker 

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



[issue27678] itertools.permutations/.combinations should have len

2016-08-04 Thread R. David Murray

R. David Murray added the comment:

It may be time to create a faq entry about len and itertools; it seems to be a 
very popular idea. For various reasons (documented in several issues in this 
tracker now), we are not going to add len to the iterators in itertools.  See 
issue 24849, and in particular msg248496.

--
nosy: +r.david.murray
resolution:  -> rejected
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



[issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

2016-08-04 Thread Sushant

Changes by Sushant :


--
nosy: +asvetlov, kristjan.jonsson, pje, steve.dower, tim.golden -SG

___
Python tracker 

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



[issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

2016-08-04 Thread Sushant

New submission from Sushant:

While saving, this error shows up and is whatever is saving gets saved twice-

Traceback (most recent call last):
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
138, in run
self.finish_response()
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
180, in finish_response
self.write(data)
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
274, in write
self.send_headers()
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
332, in send_headers
self.send_preamble()
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
255, in send_preamble
('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
453, in _write
result = self.stdout.write(data)
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\socket.py", line 593, in 
write
return self._sock.send(b)
ConnectionAbortedError: [WinError 10053] An established connection was aborted 
by the software in your host machine
[04/Aug/2016 17:25:59] "GET /api/importeop/ HTTP/1.1" 500 59

Exception happened during processing of request from ('127.0.0.1', 51082)
Traceback (most recent call last):
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
138, in run
self.finish_response()
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
180, in finish_response
self.write(data)
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
274, in write
self.send_headers()
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
332, in send_headers
self.send_preamble()
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
255, in send_preamble
('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
453, in _write
result = self.stdout.write(data)
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\socket.py", line 593, in 
write
return self._sock.send(b)
ConnectionAbortedError: [WinError 10053] An established connection was aborted 
by the software in your host machine

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
141, in run
self.handle_error()
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\servers\basehttp.py",
 line 92, in handle_error
super(ServerHandler, self).handle_error()
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
368, in handle_error
self.finish_response()
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
180, in finish_response
self.write(data)
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
274, in write
self.send_headers()
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
331, in send_headers
if not self.origin_server or self.client_is_modern():
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 
344, in client_is_modern
return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py", line 
625, in process_request_thread
self.finish_request(request, client_address)
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py", line 
354, in finish_request
self.RequestHandlerClass(request, client_address, self)
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\servers\basehttp.py",
 line 99, in __init__
super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py", line 
681, in __init__
self.handle()
  File "C:\Users\Sushant 
Gahlot\AppData\Local\Programs\

[issue27680] Reduce Github pull request rate

2016-08-04 Thread Steve Holden

Steve Holden added the comment:

I don't seem to be able to activate the PR template, but if you are happy it 
works then I guess this would be a belt-and-braces change. If nobody merges it 
and it gets closed that's fine, but if it obviates just a few pull requests it 
will save both the core devs and the contributors some time.

--

___
Python tracker 

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



[issue27681] readline: consecutive rl_kill_word do not append

2016-08-04 Thread Quentin Santos

Quentin Santos added the comment:

I had not thought of checking gdb. Thanks for the information, I will look into 
that!

--

___
Python tracker 

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



[issue27681] readline: consecutive rl_kill_word do not append

2016-08-04 Thread Martin Panter

Martin Panter added the comment:

GDB also seems affected. The significance of this is it makes me suspect a bug 
in Readline’s callback-based “alternative interface”, as opposed to the simpler 
blocking interface. I know Python and GDB both use the callback API, and that 
Bash doesn’t.

You might have more luck taking this directly to Gnu Readline:
https://cnswww.cns.cwru.edu/php/chet/readline/rltop.html#Bugs

--
nosy: +martin.panter
resolution:  -> third party

___
Python tracker 

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



[issue27680] Reduce Github pull request rate

2016-08-04 Thread Berker Peksag

Berker Peksag added the comment:

I find pull requests templates more useful: 
https://github.com/blog/2111-issue-and-pull-request-templates and we already 
have a template to warn users: 
https://github.com/python/cpython/blob/master/.github/PULL_REQUEST_TEMPLATE.md

--
nosy: +berker.peksag

___
Python tracker 

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



[issue27681] readline: consecutive rl_kill_word do not append

2016-08-04 Thread Quentin Santos

New submission from Quentin Santos:

In readline, "kill" basically means "cut" and "yank", "paste. When killing 
twice in a row, it tries to group the kills. This can be shown to work with 
rl_unix_word_rubout; with the default emacs keymap, type:

>>> hello world

Then hit ^W (Control+W, rl_unix_word_rubout) twice, then ^Y (Control+Y, 
rl_yank). You should get back the two words.

Now, using rl_backward_kill_word (Meta ^H), twice, yanking only puts back the 
last killed word (here, "hello "). With rl_kill_word (^A for start of line, 
then ^D), twice, yanking also puts back only the last killed word (here, " 
world"). The expected behavior is to get back both words (there, "hello world").

The behavior appears in both CPython's REPL (2.7 and 3.5 at least) and in the 
readline module. Other programs (bash, pypy, irb) that use readline show the 
expected behavior, as well as zsh (with its own implementation of readline).

Granted, I can not really imagine and issue with a lowest priority.

--
components: IO, Library (Lib)
messages: 271964
nosy: qsantos
priority: normal
severity: normal
status: open
title: readline: consecutive rl_kill_word do not append
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



[issue27598] Add SizedIterable to collections.abc and typing

2016-08-04 Thread Sven R. Kunze

Sven R. Kunze added the comment:

I am way too late to the discussion but I also support the term "collections". 
I think it also helps developers coming from a C# background:

https://msdn.microsoft.com/library/92t2ye13(v=vs.110).aspx

--
nosy: +srkunze

___
Python tracker 

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



[issue27585] asyncio.Lock deadlock after cancellation

2016-08-04 Thread sss

sss added the comment:

Yes, await asyncio.sleep(0) does fix it, but it would be weird if I'm supposed 
to put those all over my code. I made a new reproducer now that uses 2 threads 
in case it's not allowed to take the same lock twice from the same thread.

--
Added file: http://bugs.python.org/file44007/lock2.py

___
Python tracker 

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



[issue27680] Reduce Github pull request rate

2016-08-04 Thread Steve Holden

Steve Holden added the comment:

Hmm, not sure I quite understand how to interact with this tracker. So here's 
an updated patch that I thought I had already submitted ...

--
Added file: http://bugs.python.org/file44006/README2.patch

___
Python tracker 

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



[issue27643] test_ctypes fails on AIX with xlc

2016-08-04 Thread Martin Panter

Martin Panter added the comment:

Okay, so to be clear, I am assuming XLC supports all of the following fields, 
and uses unsigned bit fields by default:

struct UNSIGNED_BITS {
unsigned int AU: 1;
int A: 1; /* Equivalent to unsigned int */
signed int AS: 1;
unsigned short MU: 1;
short M: 1; /* Equivalent to unsigned short; triggers warning */
};

and that it cannot compile the following:

struct SIGNED_BITS {
signed short MS: 1; /* Not supported */
};

Attached is what I think a patch to resolve this would look like. However it 
needs a line in Modules/_ctypes/_ctypes_test.c completed to detect the compiler:

#ifndef /* Something to identify XLC */

Can you figure out a way to test for XLC (but not GCC, which the AIX buildbot 
uses), and then try my patch out? Hopefully you see no more compiler warnings, 
test_ints() should now pass, and test_shorts() should be skipped.

--
keywords: +patch
Added file: http://bugs.python.org/file44005/disable-signed-short.patch

___
Python tracker 

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



[issue27614] Race in test_docxmlrpc.py

2016-08-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have a doubt. Added a question on Rietveld.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue27680] Reduce Github pull request rate

2016-08-04 Thread Steve Holden

New submission from Steve Holden:

I have seen a relatively large number of pull requests via the Github mirror 
repository, because would-be contributors presumably just look on Github and, 
having found Python there, assume this is the place for contributions.

The standard README file gives no clue that the Github repository should not be 
used as the basis for contributory pull requests, and neither should it.

Fortunately Github will display a README.md file in preference to REAMDE when 
one is found. This patch adds a message, highly visible to Github users, that 
they are in the wrong place.

For an indication of how the Github page will then look, visit 
https://github.com/holdenweb/python/tree/README where the patch is already 
installed.

--
assignee: docs@python
components: Documentation
files: README.patch
keywords: needs review, patch
messages: 271958
nosy: docs@python, holdenweb
priority: normal
severity: normal
stage: patch review
status: open
title: Reduce Github pull request rate
type: enhancement
Added file: http://bugs.python.org/file44004/README.patch

___
Python tracker 

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



[issue17599] mingw: detect REPARSE_DATA_BUFFER

2016-08-04 Thread Martin Panter

Martin Panter added the comment:

Thanks for your feedback. I add a reference to km\ntifs.h in the comment. The 
buildbots seem generally happy with the change. (One timed out in the tests, 
but that seems to be an existing intermittent problem.)

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



[issue27679] set_bitfields() unused in _ctypes_test

2016-08-04 Thread Martin Panter

New submission from Martin Panter:

Modules/_ctypes/_ctypes_test.c defines a structure called BITS and exports two 
C functions set_bitfields() and unpack_bitfields() that operate on it. However 
only unpack_bitfields() seems to have been used, in 
Lib/ctypes/test/test_bitfields.py. Either there is scope for enhancing the 
tests, or maybe there is no point and the function can be removed.

--
components: Extension Modules, Tests, ctypes
messages: 271956
nosy: martin.panter
priority: normal
severity: normal
status: open
title: set_bitfields() unused in _ctypes_test
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



[issue27678] itertools.permutations/.combinations should have len

2016-08-04 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

__length_hint__ returns an estimated length for the object.

As you said, if the object passed-in has a length, we could use it. If not, 
then raise TypeError. But we will have two different behaviors in function of 
the parameter.

--
nosy: +matrixise

___
Python tracker 

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



[issue27678] itertools.permutations/.combinations should have len

2016-08-04 Thread Claudiu Saftoiu

Claudiu Saftoiu added the comment:

Ahh, I see. In that case, if the object passed-in has a length, use that. If 
not, then raise TypeError. e.g. proposed behavior:

>>> len(itertool.combinations(range(10), 2))
45
>>> len(itertool.combinations(iter(range(10)), 2))
...
TypeError: itertools.combinations underlying object has no len()

--

___
Python tracker 

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



[issue27678] itertools.permutations/.combinations should have len

2016-08-04 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +rhettinger

___
Python tracker 

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



[issue27678] itertools.permutations/.combinations should have len

2016-08-04 Thread Xiang Zhang

Xiang Zhang added the comment:

You have to exhausts the iterator to get the actual length. Some iterators have 
__length_hint__ but it's not required to give the truth.

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue27678] itertools.permutations/.combinations should have len

2016-08-04 Thread Claudiu Saftoiu

New submission from Claudiu Saftoiu:

Right now, itertools.permutations and itertools.combinations and 
itertools.product objects don't have a `len`. 

>>> len(itertools.combinations(range(10), 5))
Traceback (most recent call last):
  File "", line 1, in 
TypeError: object of type 'itertools.combinations' has no len()

I propose that a `len` be added to them, which computes (& caches) & returns 
the length. If the underlying iterator doesn't have a length, then they can 
raise a TypeError as they do now.

--
messages: 271952
nosy: Claudiu Saftoiu
priority: normal
severity: normal
status: open
title: itertools.permutations/.combinations should have len
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