[issue28932] Fail compile Python 3.6.0rc1 on OpenBSD 6.0

2016-12-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2f004cc84153 by Benjamin Peterson in branch '3.5':
add a specific configure check for sys/random.h (closes #28932)
https://hg.python.org/cpython/rev/2f004cc84153

New changeset bfd4140d9c5d by Benjamin Peterson in branch '3.6':
merge 3.5 (#28932)
https://hg.python.org/cpython/rev/bfd4140d9c5d

New changeset 31df7d9863f3 by Benjamin Peterson in branch 'default':
merge 3.6 (#28932)
https://hg.python.org/cpython/rev/31df7d9863f3

New changeset 32cc37a89b58 by Benjamin Peterson in branch '2.7':
add a specific configure check for sys/random.h (closes #28932)
https://hg.python.org/cpython/rev/32cc37a89b58

--
nosy: +python-dev
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



[issue29019] dict.fromkeys overallocates when given a sparse dict

2016-12-19 Thread INADA Naoki

Changes by INADA Naoki :


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



[issue29019] dict.fromkeys overallocates when given a sparse dict

2016-12-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 46e329ef13ae by INADA Naoki in branch '2.7':
Issue #29019: Fix dict.fromkeys(x) overallocates when x is sparce dict.
https://hg.python.org/cpython/rev/46e329ef13ae

--
nosy: +python-dev

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-19 Thread David

David added the comment:

Thanks for the help Steve, however I cannot find the Python Launcher app 
anywhere on my computer. Even after repairing/reinstalling. Where might I find 
this file? What is it called exactly? Much appreciated.

--

___
Python tracker 

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



[issue28968] xml rpc server fails with connection reset by peer error no 104

2016-12-19 Thread Manish Singh

Manish Singh added the comment:

Hi Davud Murray,

Can you reply to above comments.

--

___
Python tracker 

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



[issue15729] PyStructSequence_NewType enhancement

2016-12-19 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue15729] PyStructSequence_NewType enhancement

2016-12-19 Thread elemental

Changes by elemental :


--
nosy: +elemental

___
Python tracker 

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



[issue29019] dict.fromkeys overallocates when given a sparse dict

2016-12-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-19 Thread Steve Dower

Steve Dower added the comment:

The Python launcher is the right app to select. Double-clicking .py files has 
always run them with the interpreter, but you will also get the right-click 
menu once they are associated with the launcher (this is what I meant by it 
being the single integration point).

There has never been a time when double-clicking a .py file has opened in IDLE 
by default after installing any release from python.org. Associating with 
idle.bat is the best way to achieve this as we do not include any other 
launcher (and we don't support using idle.bat either, though it should work and 
we'll try and help you if it doesn't, but it's not a core scenario for the main 
distribution).

--

___
Python tracker 

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



[issue29010] Incorrect description about scope related with inheritance

2016-12-19 Thread woo yoo

woo yoo added the comment:

I agree with you

--

___
Python tracker 

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



[issue29010] Incorrect description about scope related with inheritance

2016-12-19 Thread Brendan Donegan

Brendan Donegan added the comment:

IMO there's no actual bug in Python. Perhaps documentation can be clarified
in a short simple way. I would reiterate the point that restating facts of
the language all over the documentation is not a great idea, but maybe here
the benefits outweigh the drawbacks.

Anyway I think the bug is clear now (it's a docs issue if anything) so I'd
leave it open until someone offers a patch or a strong argument why it
shouldn't be clarified.

On Tue, 20 Dec 2016 at 09:18 woo yoo  wrote:

>
> woo yoo added the comment:
>
> If i was wrong about this issue, please tell me.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--
nosy: +brendand

___
Python tracker 

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



[issue29019] dict.fromkeys overallocates when given a sparse dict

2016-12-19 Thread INADA Naoki

INADA Naoki added the comment:

While the patch is trivial, I need LGTM from another comitter.

--
stage:  -> patch review
Added file: http://bugs.python.org/file45974/fromkeys2.patch

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-19 Thread David

David added the comment:

I'm going to tackle the questions one-by-one: 

I would like these ".py" files to be IDLE files in the sense that they have the 
IDLE icon and they open up directly into an idle file with a shell in the 
background. For context: on my other Windows 10 machine, I've been able to 
amass a semester's worth of ".py" that are all opened by, and have the icon of, 
IDLE. 

I have tried to manually associate the ".py" in the "default programs" app with 
the IDLE application shortcut but to no avail. Instead of opening in IDLE it 
opens in the command line format (that black python icon). So basically it 
opens up for a fraction of a second and then closes. No bueno. 

I have tried repairing, installing and reinstalling Python on my machine all 
with the appropriate settings (and launcher included in all of those tries). No 
dice. Still no right-click context menu. Still no ability to have ".py" files 
open up with IDLE. 

Note: I _have_ been able to associate the ".py" extension with "idle.bat" -- 
this works. But that's not an acceptable workaround. There is something deeper 
wrong here that I cannot pinpoint. Is it in my installer? I have no idea. I've 
tried most everything...

Including deleting the UserChoice key/folder/whatever it is and still nothing 
producing. I even tried "idle.exe" but Windows 10 gives me the error: "This app 
can't run on your PC -- to find a version for your PC, contact the software 
publisher." Just great. 

There are no error messages on any install/reinstall/repair that I've managed 
to try. Everything goes smoothly from start to finish. But the product is 
broken. 

In addition: I've never programmed in 2.7 and have never installed it on my 
computer. All of my Python knowledge is based in 3.5.2: it was for a 
semester-long course. So even the repair that I did run (which didn't work) 
wouldn't be accounting for any potential conflicts with 2.7. 

Furthermore, I was not able to find a python rocket icon in my files even with 
hidden items in view so I was not able to complete the ".py" and 
".pythonrocketapp" association. However, I did notice in my 
program/applications folder that Python Launcher was indeed installed on my 
computer at the very least. 

This is absolutely perplexing and I appreciate all of your help in 
troubleshooting this. Thank you, and Merry Christmas.

--

___
Python tracker 

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



[issue29010] Incorrect description about scope related with inheritance

2016-12-19 Thread woo yoo

woo yoo added the comment:

If i was wrong about this issue, please tell me.

--

___
Python tracker 

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



[issue28158] Implement LOAD_GLOBAL opcode cache

2016-12-19 Thread INADA Naoki

INADA Naoki added the comment:

>  Actually, if you don't mind, I'd like to update the patch myself. I have a 
> few ideas how to restructure it and add support for LOAD_ATTR.

Sounds interesting.
I'll wait to touch this patch.  There are enough time by Python 3.7
and enough other issues I can work.

--

___
Python tracker 

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



[issue29019] dict.fromkeys overallocates when given a sparse dict

2016-12-19 Thread INADA Naoki

INADA Naoki added the comment:

Since `seq` is checked by PyDict_CheckExact(seq) already,
((PyDictObject*)seq)->ma_used may be better.

--

___
Python tracker 

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



[issue29019] dict.fromkeys overallocates when given a sparse dict

2016-12-19 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +inada.naoki

___
Python tracker 

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



[issue28147] Unbounded memory growth resizing split-table dicts

2016-12-19 Thread INADA Naoki

Changes by INADA Naoki :


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

___
Python tracker 

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



[issue28147] Unbounded memory growth resizing split-table dicts

2016-12-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cc40470c10f8 by INADA Naoki in branch '3.5':
Issue #28147: Fix a memory leak in split-table dictionaries
https://hg.python.org/cpython/rev/cc40470c10f8

--

___
Python tracker 

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



[issue29011] No entry Deque in typing.py

2016-12-19 Thread Guido van Rossum

Guido van Rossum added the comment:

I don't recall exactly what happened here, but I think it was left out during 
formulation of PEP 484 because it's not an ABC.  IIRC originally we only wanted 
to include builtins and ABCs.  But we changed that subsequently to include e.g. 
DefaultDict.

I suppose we should change this now, but the cat is out of the bag for 3.6.0 
and I would prefer not to change typing.py in any way between 3.6.0 and 3.5.3, 
so the best we could do would be to add it to 3.6.1 and 3.5.4 (whenever that 
will be).

In the meantime collections.deque is generic, but that's only helpful in type 
comments, not in annotations.

In a sense I wish we hadn't put typing.py in the stdlib, it would have been 
much simpler to fix this kind of issue.  OTOH there are also advantages to 
having it in the stdlib, and anyways, it's too late to change, so we'll just 
have to suck it up (I certainly am).

--

___
Python tracker 

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



[issue29020] collapse_rfc2231_value has inconsistent unquoting

2016-12-19 Thread bpoaugust

New submission from bpoaugust:

collapse_rfc2231_value unquotes the value before returning it except here:

rawbytes = bytes(text, 'raw-unicode-escape')
return str(rawbytes, charset, errors)

Why is the text not unquoted in this case?

Actually I wonder whether the function should do any unquoting at all.
There is at least one case where it is called with an already unquoted value 
(get_boundary, see issue28945).

But if it is intended to do unquoting, it should be consistent.

--
components: email
messages: 283658
nosy: barry, bpoaugust, r.david.murray
priority: normal
severity: normal
status: open
title: collapse_rfc2231_value has inconsistent unquoting
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



[issue29020] collapse_rfc2231_value has inconsistent unquoting

2016-12-19 Thread bpoaugust

Changes by bpoaugust :


--
type:  -> behavior

___
Python tracker 

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



[issue26467] Add async magic method support to unittest.mock.Mock

2016-12-19 Thread Javier Domingo

Javier Domingo added the comment:

I found this while trying to test an async context manager. This is a critical 
feature to enable migrations to async code, as the impossibility to test 
something properly is not acceptable in many environments.

Implementing it in a way that __call__ returns an object capable of being 
coroutine or normal function would avoid having to implement Async specific 
Mocks, wouldn't it? I am not too confident, but would it be doable to have an 
implementation that depends on whether _is_coroutine is accessed or not?

I don't like it, but I really don't like the fact that we need to patch 
different all the methods depending on whether they are coroutine or not.

Obviously, having the __acall__ method would really help solving this issue.

--
nosy: +txomon

___
Python tracker 

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



[issue28945] get_boundary invokes unquote twice

2016-12-19 Thread bpoaugust

bpoaugust added the comment:

I agree that strictly speaking the boundary is invalid.
However:
'Be strict in what you generate, be liberal in what you accept'
The mail package should never create such boundaries.
However it should process them if possible.

If the boundary definition is mangled by stripping out all the invalid 
characters, then it won't match the markers. So it won't solve the issue.

Whereas ensuring that only a single level of quotes is removed does fix the 
issue.

This is what works for me:

def get_boundary(self, failobj=None):
missing = object()
# get_param removes the outer quotes
boundary = self.get_param('boundary', missing)
if boundary is missing:
return failobj
# Don't unquote again in collapse_rfc2231_value
if not isinstance(boundary, tuple) or len(boundary) != 3:
return boundary
# RFC 2046 says that boundaries may begin but not end in w/s
return utils.collapse_rfc2231_value(boundary).rstrip()

I think the bug is actually in collapse_rfc2231_value - that should not do any 
unquoting, as the value will be passed to it already unquoted (at least in this 
case). However there might perhaps be some cases where collapse_rfc2231_value 
is called with a quoted value, so to fix the immediate problem it's safer to 
fix get_boundary. (I could have re-quoted the value instead, and let 
collapse_rfc2231_value do its thing.)

unquote is correct as it stands - it should only remove the outer quotes. There 
may be a need to quote strings that just happen to be enclosed in quote chars.

--

___
Python tracker 

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



[issue29018] Misinformation when showing how slices work in The Tutorial

2016-12-19 Thread Steven D'Aprano

Steven D'Aprano added the comment:

You haven't given any reason to explain why you think the existing docs are 
wrong, nor any reason why you think your version is better. Just stating that 
the docs give "misinformation" is not good enough.

By your matrix, 'Python'[0:-1] should take a slice starting from the left of 
'P' and ending at the *right* of 'n', returning 'Python' unchanged. According 
to the original, documented matrix, 'Python'[0:-1] takes a slice starting at 
the left of 'P' and ending at the *left* of 'n', returning 'Pytho'. without the 
n, which is what actually does happen.

You should also consider the slice 'Python'[-6:-5] according to the documented 
matrix (returns 'P') and your matrix (returns 'y').

--
nosy: +steven.daprano
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue29019] dict.fromkeys overallocates when given a sparse dict

2016-12-19 Thread Rasmus Villemoes

New submission from Rasmus Villemoes:

Somewhat related to #23971, but with the opposite sign: Using Py_SIZE on a 
PyDictObject gives the ma_fill member in 2.7 (and until 3.2 AFAICT), not the 
ma_used member. So calling dict.fromkeys(d) overallocates significantly if a 
lot of elements have been deleted from d.

The fix is trivial, though one could of course avoid the function call and do a 
cast. Not sure this qualifies for 2.7, though.

--
components: Interpreter Core
files: fromkeys.patch
keywords: patch
messages: 283654
nosy: villemoes
priority: normal
severity: normal
status: open
title: dict.fromkeys overallocates when given a sparse dict
type: resource usage
versions: Python 2.7
Added file: http://bugs.python.org/file45973/fromkeys.patch

___
Python tracker 

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



[issue21150] Add quick links table to argparse docs

2016-12-19 Thread Gaurav Tatke

Gaurav Tatke added the comment:

Hello All,

I would like to help with this issue. I am a beginner. I am attaching a 
'SampleOfSummaryTable.PNG' file which I think is one way of organizing summary 
table.

I think if we put quick links of function parameters in summary table then it 
will make existing parameter quick links above detailed summary of each 
parameter as redundant.

Please let me know if this is okay.

--
nosy: +Gaurav Tatke
Added file: http://bugs.python.org/file45972/SampleOfSummaryTable.PNG

___
Python tracker 

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



[issue20486] msilib: can't close opened database

2016-12-19 Thread 12345 67890

Changes by 12345 67890 :


--
keywords: +patch
Added file: 
http://bugs.python.org/file45971/Add_ability_to_close_MSI_database_.patch

___
Python tracker 

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



[issue20486] msilib: can't close opened database

2016-12-19 Thread 12345 67890

Changes by 12345 67890 :


Removed file: http://bugs.python.org/file45970/_msi.c

___
Python tracker 

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



[issue20486] msilib: can't close opened database

2016-12-19 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue29018] Misinformation when showing how slices work in The Tutorial

2016-12-19 Thread R. David Murray

R. David Murray added the comment:

If your version was correct, 'python'[-2:] would produce 'n', which is not what 
it produces.  Perhaps you being confused by the fact that the diagram is 
pointing the indexes *between* the characters?  That's the point of the 
mnemonic and I find it very useful to think of it that way, myself.

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



[issue28945] get_boundary invokes unquote twice

2016-12-19 Thread Eric Lafontaine

Eric Lafontaine added the comment:

Hi all,

I believe this is the right behavior and what ever generated the boundary 
"<<>>" is the problem ; 


RFC  2046 page 22:
_
The only mandatory global parameter for the "multipart" media type is the 
boundary parameter, which consists of 1 to 70 characters from a set of 
characters known to be very robust through mail gateways, and NOT ending with 
white space. (If a boundary delimiter line appears to end with white space, the 
white space must be presumed to have been added by a gateway, and must be 
deleted.)  It is formally specified by the following BNF:

 boundary := 0*69 bcharsnospace

 bchars := bcharsnospace / " "

 bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" /
  "+" / "_" / "," / "-" / "." /
  "/" / ":" / "=" / "?"
_
In other words, the only valid boundaries characters are :
01234567890 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'()+_,-./:=?

Any other character should be removed to get the boundary right.  I believe the 
issue is that it wasn't removed in the first place.  It is a bug in my opinion, 
but the other way around :).

Funny thing is that the unquote function only remove the first character 
it sees... either '<' and the '"'...

def unquote(str):
"""Remove quotes from a string."""
if len(str) > 1:
if str.startswith('"') and str.endswith('"'):
return str[1:-1].replace('', '\\').replace('\\"', '"')
if str.startswith('<') and str.endswith('>'):
return str[1:-1]
return str

Now, if I modify unquote to only keep the list of character above, would I 
break something? Probably. 
I haven't found any other defining RFC about boundaries that tells me what was 
the format supported.  Can someone help me on that?

This is what the function should look like :

import string
def get_boundary(str):
""" return the valid boundary parameter as per RFC 2046 page 22. """
if len(str) > 1:
import re
return re.sub('[^'+
  string.ascii_letters +
  string.digits +
  r""" '()+_,-./:=?]|="""
  ,'',str
  ).rstrip(' ')
return str

import unittest

class boundary_tester(unittest.TestCase):
def test_get_boundary(self):
boundary1 = """ abc def gh< 123 >!@ %!%' """
ref_boundary1 = """ abc def gh 123  '""" # this is the valid Boundary
ret_value = get_boundary(boundary1)
self.assertEqual(ret_value,ref_boundary1)

def test_get_boundary2(self):
boundary1 = ''.join((' ',string.printable))
ref_boundary1 = ' 
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\'()+,-./:?_' # 
this is the valid Boundary
ret_value = get_boundary(boundary1)
self.assertEqual(ret_value,ref_boundary1)


I believe this should be added to the email.message.Message get_boundary 
function.  

Regards,
Eric Lafontaine

--
nosy: +Eric Lafontaine

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Here is another possible reason (and cure) for intentionally installed  python 
to not work.  Just posted to Python list.

"Turns out that another instance of Python *was* installed, not as part of OEM 
software, but by a digital camera (Califone) that is being used in some of our 
classrooms.  The suggestion to look for environmental variables was the key  -  
on the PCs where we were having the problem, there was a variable starting with 
PYTHON ... which pointed to the camera software.  Once the camera was 
uninstalled, Python 3.5.2 worked just fine."

--

___
Python tracker 

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



[issue29018] Misinformation when showing how slices work in The Tutorial

2016-12-19 Thread issuefinder

New submission from issuefinder:

In this page:
https://docs.python.org/3/tutorial/introduction.html#strings

When showing how slices work:
+---+---+---+---+---+---+
 | P | y | t | h | o | n |
 +---+---+---+---+---+---+
 0   1   2   3   4   5   6
-6  -5  -4  -3  -2  -1

The accurate matrix is:

+---+---+---+---+---+---+
 | P | y | t | h | o | n |
 +---+---+---+---+---+---+
 0   1   2   3   4   5   6
 0  -6  -5  -4  -3  -2  -1

--
assignee: docs@python
components: Documentation
messages: 283649
nosy: docs@python, issuefinder
priority: normal
severity: normal
status: open
title: Misinformation when showing how slices work in The Tutorial
versions: Python 3.7

___
Python tracker 

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



[issue25677] Syntax error caret confused by indentation

2016-12-19 Thread Martin Panter

Changes by Martin Panter :


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

___
Python tracker 

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



[issue20486] msilib: can't close opened database

2016-12-19 Thread 12345 67890

12345 67890 added the comment:

I will prefix this by saying that I have not contributed to the Python source 
before and this patch is probably wrong, but here is my attempt at a fix.

--
Added file: http://bugs.python.org/file45970/_msi.c

___
Python tracker 

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



[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-19 Thread R. David Murray

R. David Murray added the comment:

The documentation is all in the Doc subdirectory of the checkout.

So, this should teach me to rely on vague memory instead of reading the code.  
I've probably still missed something because I don't have enough time to read 
it properly.

Yes, you are correct, the Resent headers need to be added by the user.  So 
adding a Resent-Date header is the only question, and we can assume that it 
should go before the first Resent-X header we find.

Here is my reconstruction of why I made that restriction and comment:  There is 
no specified order to the Resent- block headers.  So how do we know where the 
first block ends and the next begins?  It will almost always be at the 
Resent-Date header...but we can't assume that that will *always* be true.

For sendmail/send_message, I'm not going to look at a youtube video, so you'll 
have to make your argument in text :)  But you may not want to bother, it is 
indeed too late: we can't change the signature for backward compatibility 
reasons.  In any case IMO the signature is optimal as it is: the only required 
argument is msg, and that, therefore, has to come first.  Otherwise the 
arguments are already in the same order as they are for sendmail.

I spent a lot of time reading RFCs while working on these libraries, but it has 
been a while since my head was buried in that space :)

--

___
Python tracker 

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



[issue29017] Docs: PySide is provided by 'The Qt Company' and not by 'Nokia'

2016-12-19 Thread Ettore Atalan

New submission from Ettore Atalan:

Regarding
URL: http://docs.python.org/3/library/othergui.html
Section: PySide

PySide is provided by 'The Qt Company' and no longer by 'Nokia' like mentioned 
in the documentation.

--
assignee: docs@python
components: Documentation
messages: 283646
nosy: Ettore Atalan, docs@python
priority: normal
severity: normal
status: open
title: Docs: PySide is provided by 'The Qt Company' and not by 'Nokia'
versions: Python 3.7

___
Python tracker 

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



[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-19 Thread Eric Lafontaine

Eric Lafontaine added the comment:

Hi all,

@David, the "Resent-" block should be added by the user and he needs to know 
what he's doing.  Hell, I work with emails all the time and never knew about 
this.  The Worse part of it is that I have to communicate with the IETF just to 
know how we can do the rules... that doesn't mean another programmer didn't 
interpret it wrong...

@Henning, this is my first contribution :P  I've just been brain-washed by 
Raymond Hettinger and his beautifuls speechs.  I suggest (no shame plug) you 
look at the first 5-6 videos of the following link if you got free time.  
https://www.youtube.com/playlist?list=PLRVdut2KPAguz3xcd22i_o_onnmDKj3MA

I've received his "call to arms" ; 
https://www.youtube.com/watch?v=-TdrFjDJn5E=PLRVdut2KPAguz3xcd22i_o_onnmDKj3MA=16
 

David, I said the API was awkward because of what is mention in this latest 
link.  I really believe we ought to change it ASAP if it's possible at all and 
make it more like sendmail... that's only an opinion though.  
https://youtu.be/-TdrFjDJn5E?list=PLRVdut2KPAguz3xcd22i_o_onnmDKj3MA=4231

Finally, Could I know how to modify the Doc of the Python2 ? 
Regards,
Eric Lafontaine


- Implement a patch for the code to add a missing "Date" field if it doesn't 
exist .   (in review)
- Modify the documentation at the SMTPLib for the send_message to mention that 
it add missing date using the email.utils.formatdate (in review)
- Modify the comment of the send_message code to mention RFC 5322 in there 
(ideally with the section of the RFC).  (in review)
- Modify the example of Python 2 to present a RFC 5322 examples

--
Added file: http://bugs.python.org/file45969/issue_28879_V4.patch

___
Python tracker 

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



[issue28147] Unbounded memory growth resizing split-table dicts

2016-12-19 Thread STINNER Victor

STINNER Victor added the comment:

The 3.5 patch LGTM.

--

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-19 Thread eryk sun

eryk sun added the comment:

It looks like you've accidentally created and selected an auto-generated 
association between .py and python.exe. You should be able to restore the 
original file association to get the "Edit with IDLE" menu back. In Windows 10 
the "open with" menu has an option to "choose another app". In the dialog 
select "always use this app to open .py files". Or go to the control panel's 
"default programs" app, and choose "associate a file type" and double click on 
".py" in the list. Either way, select the "Python" entry with a rocket on the 
icon. Hopefully this selects the "Python.File" ProgId that was configured by 
Python's installer.

What we're trying to do here is modify the contents of the registry key 
"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.py\UserChoice".
 Python's installer doesn't have anything to do with this key. It's based on 
what the user selects in Explorer, and it's intentionally difficult for code to 
directly modify this key. It's protected by an access control entry that denies 
the user (i.e. programs running as the user) the right to modify the key 
directly, plus a hash of the user's selection. But one thing you can still do 
is to delete the key, which will restore the default user and system file 
association.

--
nosy: +eryk sun

___
Python tracker 

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



[issue25617] Installing local installation of Python

2016-12-19 Thread Ned Deily

Ned Deily added the comment:

Perhaps the issue here is that you are installing a local version of Python 
with the same configured prefix as a system installed Python of the same major 
version.  This is a primary use of the --prefix option to the ./configure 
script of Python.  You should ensure that each Python x.y instance is built and 
installed with unique values for --prefix; that should ensure that there is no 
conflict among those instances with regard to their "global" file paths.  That 
said, there can still be conflicts with --user locations where the same 
user-specific paths are used by all instances of a particular Python major 
version.

--
nosy: +ned.deily

___
Python tracker 

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



[issue20486] msilib: can't close opened database

2016-12-19 Thread Steve Dower

Steve Dower added the comment:

Guessing the msiobj_close function in PC/_msi.c ought to be exposed. 

Patches welcome.

--
keywords: +easy
priority: normal -> low
stage:  -> needs patch
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-19 Thread Steve Dower

Steve Dower added the comment:

I'm not familiar with any of the other proposed solutions - could you link to a 
few?

One important factor is that you need to install the Python Launcher to get the 
context menus (this is the default in 3.5 and later). Associating directly to 
the Python installation just causes conflicts when you install another version, 
so we set them up via the launcher instead. In effect, the launcher is the 
integration point between Windows Explorer and Python, and without it you only 
get the shortcuts.

Installing Python 2.7 and leaving the "Register Extensions" option selected 
will overwrite the context menu from Python 3.5 or later. So if you've 
installed 2.7 after 3.5 then I would strongly recommend running a Repair of 3.5.

Otherwise, answers to Terry's questions would also be helpful. It isn't 
entirely clear how you are "choos[ing] the IDLE application", or if the 
installations were successful.

--

___
Python tracker 

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



[issue28927] bytes.fromhex should ignore all whitespace

2016-12-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I think non-ASCII whitespace and digits are YAGNI until we are convinced 
otherwise by evidence from the field that people are routinely mixing other 
decimal digits with 'abcdef' as hex numerals.  Anyone who does try such a thing 
can write a wrapper that first translates to ascii digits.

--

___
Python tracker 

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



[issue20486] msilib: can't close opened database

2016-12-19 Thread 12345 67890

12345 67890 added the comment:

This is still present in Python 3.5. There is no way to unlock the MSI file 
without killing the Python process first.

--
nosy: +12345 67890
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



[issue29016] negative numbers raised to power zero should be 1, not -1

2016-12-19 Thread Robin W Gambill

Robin W Gambill added the comment:

I see my error now. I'm sorry for my ignorance. I will google how to delete the 
bugs item, but I guess is permanent, se la vie.
Thank you.
Robin

On Mon, 12/19/16, Tim Peters  wrote:

 Subject: [issue29016] negative numbers raised to power zero should be 1, not -1
 To: r_w_gamb...@yahoo.com
 Date: Monday, December 19, 2016, 12:51 PM

 New submission from Tim Peters:

 They already are.

 >>> (-2)**0
 1

 You're probably doing this instead:

 >>> -2**0
 -1

 Exponentiation has higher precedence than unary minus, so
 that last example groups as -(2**0), and -1 is correct.

 --
 nosy: +tim.peters
 resolution:  -> not a bug
 stage:  -> resolved
 status: open -> closed

 ___
 Python tracker 
 
 ___

--

___
Python tracker 

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



[issue29016] negative numbers raised to power zero should be 1, not -1

2016-12-19 Thread Tim Peters

New submission from Tim Peters:

They already are.

>>> (-2)**0
1

You're probably doing this instead:

>>> -2**0
-1

Exponentiation has higher precedence than unary minus, so that last example 
groups as -(2**0), and -1 is correct.

--
nosy: +tim.peters
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue28147] Unbounded memory growth resizing split-table dicts

2016-12-19 Thread INADA Naoki

Changes by INADA Naoki :


Added file: http://bugs.python.org/file45968/fix-28147-py35-2.patch

___
Python tracker 

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



[issue29016] negative numbers raised to power zero should be 1, not -1

2016-12-19 Thread Robin W Gambill

Changes by Robin W Gambill :


--
components: Interpreter Core
nosy: rwgambill
priority: normal
severity: normal
status: open
title: negative numbers raised to power zero should be 1, not -1
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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

.py files are not 'IDLE based', even if edited with IDLE.  They are Python 
files and should normally be registered to run with Python directly, and not 
via IDLE.

The right click context menu *should* include "Edit with IDLE".  I have 
re-marked this issue for that problem, though I believe there is another issue 
about this.  I have Win 10 also and I have "Edit with IDLE >" which open 
submenu containing "Edit with IDLE 3.5 (64 bit)" and "Edit with IDLE 3.6 (64 
bit)".  This is a Windows installer issue, not an IDLE issue per se.

I don't understand "And when I try to choose the IDLE application, it just 
defaults to the command line version every time".  If you mean that clicking 
the IDLE entry in the start menu brings up console Python, then something went 
wrong in your installation process.  Have you tried re-installing?  Are there 
any error messages while installing?

--
assignee: terry.reedy -> 
components: +Installation, Windows -IDLE
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



[issue28927] bytes.fromhex should ignore all whitespace

2016-12-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your contribution Robert.

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

___
Python tracker 

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



[issue28927] bytes.fromhex should ignore all whitespace

2016-12-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fcc09d9ee7d4 by Serhiy Storchaka in branch 'default':
Issue #28927: bytes.fromhex() and bytearray.fromhex() now ignore all ASCII
https://hg.python.org/cpython/rev/fcc09d9ee7d4

--
nosy: +python-dev

___
Python tracker 

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



[issue28927] bytes.fromhex should ignore all whitespace

2016-12-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
assignee:  -> serhiy.storchaka
components: +Interpreter Core
stage: patch review -> commit review

___
Python tracker 

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



[issue28927] bytes.fromhex should ignore all whitespace

2016-12-19 Thread Robert Xiao

Robert Xiao added the comment:

New patch with proper line lengths in documentation.

--
Added file: http://bugs.python.org/file45967/fromhex.patch

___
Python tracker 

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



[issue28950] regrtest: -j0 fails the check -j is not allowed together with -T/-l

2016-12-19 Thread Xiang Zhang

Xiang Zhang added the comment:

Thanks Victor. 2.7 is not affected since in 2.7 -j0 does not spawn processes.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue28158] Implement LOAD_GLOBAL opcode cache

2016-12-19 Thread Yury Selivanov

Yury Selivanov added the comment:

> As far as I look quickly, #10401 uses namei as cache key
and this patch uses opcode index as cache key, am I right?

Correct.  Actually, if you don't mind, I'd like to update the patch myself. I 
have a few ideas how to restructure it and add support for LOAD_ATTR.

--

___
Python tracker 

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



[issue29015] re slashes

2016-12-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is a problem with your replacement template. Python string literal '\\' 
is Python string containing a single backslash character. But backslash has 
special meaning in a replacement template, it starts escapes and 
backreferences. For using a literal backslash, it should be escaped: r'\\' or 
''.

>>> re.sub(pat, r'\\', path)
'd:\\temp\\'

--
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue28927] bytes.fromhex should ignore all whitespace

2016-12-19 Thread Robert Xiao

Robert Xiao added the comment:

OK, I've attached a new version of the patch with the requested documentation 
changes (versionchanged and whatsnew).

--
Added file: http://bugs.python.org/file45966/fromhex.patch

___
Python tracker 

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



[issue29015] re slashes

2016-12-19 Thread Сергей Снегирёв

New submission from Сергей Снегирёв:

>>> path
'd:/\\temp'
>>> pat = '[{}]+'.format(re.escape('\\/'))
>>> re.sub(pat, '\\', path)
Traceback (most recent call last):
  File "", line 1, in 
re.sub(pat, '\\', path)
  File "C:\Users\Сергей\AppData\Local\Programs\Python\Python35\lib\re.py", line 
182, in sub
return _compile(pattern, flags).sub(repl, string, count)
  File "C:\Users\Сергей\AppData\Local\Programs\Python\Python35\lib\re.py", line 
325, in _subx
template = _compile_repl(template, pattern)
  File "C:\Users\Сергей\AppData\Local\Programs\Python\Python35\lib\re.py", line 
312, in _compile_repl
p = sre_parse.parse_template(repl, pattern)
  File 
"C:\Users\Сергей\AppData\Local\Programs\Python\Python35\lib\sre_parse.py", line 
849, in parse_template
s = Tokenizer(source)
  File 
"C:\Users\Сергей\AppData\Local\Programs\Python\Python35\lib\sre_parse.py", line 
225, in __init__
self.__next()
  File 
"C:\Users\Сергей\AppData\Local\Programs\Python\Python35\lib\sre_parse.py", line 
239, in __next
self.string, len(self.string) - 1) from None
sre_constants.error: bad escape (end of pattern) at position 0
>>> pat
'[\\/]+'
>>> 

In JS it works:

> 'd:/\\temp'.replace(new RegExp('[\\/]+', 'g'), '\\')
"d:\temp\"

--
components: Regular Expressions
messages: 283626
nosy: ezio.melotti, mrabarnett, Сергей Снегирёв
priority: normal
severity: normal
status: open
title: re slashes
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



[issue28427] WeakValueDictionary next bug (with multithreading)

2016-12-19 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The dict implementation in 3.6 has become very complicated, so I'd like someone 
to review the attached 3.6 patch. Serhiy, Inada?

--
nosy: +inada.naoki
Added file: http://bugs.python.org/file45965/issue28427-3.6.patch

___
Python tracker 

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



[issue28950] regrtest: -j0 fails the check -j is not allowed together with -T/-l

2016-12-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cf564121f9f0 by Xiang Zhang in branch '3.5':
Issue #28950: Disallow -j0 combined with -T/-l/-M in regrtest.
https://hg.python.org/cpython/rev/cf564121f9f0

New changeset 692834062e80 by Xiang Zhang in branch '3.6':
Issue #28950: Disallow -j0 combined with -T/-l in regrtest.
https://hg.python.org/cpython/rev/692834062e80

New changeset 3b4d00e20694 by Xiang Zhang in branch 'default':
Issue #28950: Merge 3.6.
https://hg.python.org/cpython/rev/3b4d00e20694

--
nosy: +python-dev

___
Python tracker 

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



[issue29010] Incorrect description about scope related with inheritance

2016-12-19 Thread woo yoo

woo yoo added the comment:

The previous description about scope classify  it into 3 types explicitly, 
which means the scope containing the current module's global names is not same 
as the scope containing built-in names.

--

___
Python tracker 

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



[issue29010] Incorrect description about scope related with inheritance

2016-12-19 Thread R. David Murray

R. David Murray added the comment:

It is part of the global scope, which contains all other scopes.  (I'm not 100% 
sure I'm comfortable with that language, but it doesn't seem obviously wrong.)

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



[issue29010] Incorrect description about scope related with inheritance

2016-12-19 Thread woo yoo

woo yoo added the comment:

Code:
>class A(object):
pass

'object' is not in the same scope as 'A'

--

___
Python tracker 

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



[issue24165] Free list for single-digits ints

2016-12-19 Thread INADA Naoki

Changes by INADA Naoki :


--
nosy: +inada.naoki
versions: +Python 3.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



[issue27584] New addition of vSockets to the python socket module

2016-12-19 Thread Cathy Avery

Cathy Avery added the comment:

First make sure the driver is in your kernel. It will be with RHEL. Look in 
/lib/modeles/"your kernel name"/kernel/net/vmw_vsock/vmw_vsock_vmci_transport. 
I have never tried it on vmware fusion. I have tested it on ESX. See if there 
is a VMCI option to enable on your VM's settings. Start the vm and do an lsmod 
to see if vmw_vsock_vmci_transport is loaded.

I've attached a little C program thats netcat for vsock. Its a quick 
confirmation that your transport is loaded correctly. It will show you your CID.

run ./nc-vsock

CID = 973033371
CID = 0x39ff4f9b
usage: ./nc-vsock [-l  [-t  ] |  ]

--
Added file: http://bugs.python.org/file45964/nc-vsock

___
Python tracker 

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



[issue28971] nntplib is broken when responses are longer than _MAXLINE

2016-12-19 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Martin in response to your last review, I still hold to my opinion stated in 
msg283294 but this should not prevent this high priority issue to progress. Can 
you propose another patch.

--

___
Python tracker 

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



[issue25617] Installing local installation of Python

2016-12-19 Thread R. David Murray

R. David Murray added the comment:

If you build and install a "local python", you will be installing the library 
locally as well, and python will not look to the lib dir of the system 
installed python.  So yes, please explain your problem with more specifics.

In any case the problem of python trying to run with the wrong version of a 
.pyc file is solved in python3, since each version of python writes 
separately-named pyc files.

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



[issue25617] Installing local installation of Python

2016-12-19 Thread INADA Naoki

INADA Naoki added the comment:

I can't understand what's your problem.

> The inherent behaviour of python installations (local or global) is such that 
> it expects to source system wide modules from the global python installation.

What local installation means?
What global installation means?
What "expects to source system wide module ..." means?

Could you give us concrete example?

--
nosy: +inada.naoki

___
Python tracker 

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



[issue28158] Implement LOAD_GLOBAL opcode cache

2016-12-19 Thread INADA Naoki

INADA Naoki added the comment:

I'll update this patch and #10401 and then run benchmark suite when I have time.

As far as I look quickly, #10401 uses namei as cache key
and this patch uses opcode index as cache key, am I right?

--
nosy: +inada.naoki
priority: critical -> normal

___
Python tracker 

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



[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-12-19 Thread STINNER Victor

STINNER Victor added the comment:

I updated the doc of Python 2.7, 3.5, 3.6 and default (3.7).

Thanks for the suggestion Kevin, thanks for the review Naoki.

--
resolution:  -> fixed
status: open -> closed
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-12-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fac2362f248c by Victor Stinner in branch '2.7':
doc: Suggest to hash(tuple of attr) rather than XOR
https://hg.python.org/cpython/rev/fac2362f248c

--

___
Python tracker 

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



[issue28838] Using consistent naming for arguments of "call" functions (C API)

2016-12-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3ab0a6692e25 by Victor Stinner in branch 'default':
abstract.h: remove long outdated comment
https://hg.python.org/cpython/rev/3ab0a6692e25

--

___
Python tracker 

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



[issue27584] New addition of vSockets to the python socket module

2016-12-19 Thread R. David Murray

R. David Murray added the comment:

'make patchcheck' will do whitespace checking because that's hard to eyeball 
(although many editors/IDEs do support making it visible nowadays).  We don't 
use any other checking tools other than eyeballs, since not all of the existing 
code conforms to PEP7/8 and for various reasons we aren't going to update most 
of the old code to conform.

So, if I'm running an ubuntu virtual machine under VMWare Fusion (which I 
already have set up) I should be able to get the tests to run?  Or does it need 
to be RedHat (or presumably CentOS)?

--

___
Python tracker 

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



[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-12-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cb802a78ceea by Victor Stinner in branch '3.5':
doc: Suggest to hash(tuple of attr) rather than XOR
https://hg.python.org/cpython/rev/cb802a78ceea

--
nosy: +python-dev

___
Python tracker 

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



[issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal

2016-12-19 Thread INADA Naoki

INADA Naoki added the comment:

LGTM

--
nosy: +inada.naoki

___
Python tracker 

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



[issue29012] __bases__ is a tuple (possibly empty or a singleton)

2016-12-19 Thread R. David Murray

R. David Murray added the comment:

Most likely it just slipped through.  In 2.7 the section is just called 
'classes', not 'custom classes', and covered both classic classes and the new 
style classes that are all that python3 has.

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



[issue26110] Speedup method calls 1.2x

2016-12-19 Thread INADA Naoki

Changes by INADA Naoki :


Added file: http://bugs.python.org/file45963/call-method-doc4.patch

___
Python tracker 

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



[issue29007] Virus detected when attempting to download numpy-1.11.3-cp35-none-win32.whl

2016-12-19 Thread R. David Murray

Changes by R. David Murray :


--
components:  -SSL

___
Python tracker 

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



[issue27584] New addition of vSockets to the python socket module

2016-12-19 Thread Cathy Avery

Cathy Avery added the comment:

Sorry about the typo the drivers have been there for about 4 years.

--

___
Python tracker 

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



[issue27584] New addition of vSockets to the python socket module

2016-12-19 Thread Cathy Avery

Cathy Avery added the comment:

Is there a format checker I could use on the patch?

VMCI and the vmw_vsock_vmci_transport kernel modules are located in the 
upstream linux tree at 

git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

They have been there for about years. These drivers are part of various 
downstream kernels such as RHEL. You will need a Vmware virtual machine in 
order to test it. 

Only the virtio-vsock driver is a new vsock application that needs to be custom 
built.

--

___
Python tracker 

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



[issue29014] Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10

2016-12-19 Thread David Karimi

New submission from David Karimi:

"Edit with IDLE" option is also not present in my installation when I 
right-click on a .py file. And when I try to choose the IDLE application, it 
just defaults to the command line version every time. I don't know why this 
happens. I was able to run it fine on my Windows 7 and it recognized all my .py 
student files as IDLE-based which is exactly what I want: to see them in a 
script editing environment. 

Any help would be appreciated. All the proposed solutions online haven't helped.

--
assignee: terry.reedy
components: IDLE
messages: 283606
nosy: frostyelsa, terry.reedy
priority: normal
severity: normal
status: open
title: Python 3.5.2 installer doesn't register IDLE .py extensions on Windows 10
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



[issue29009] Outdated part in the doc of PyUnicode_RichCompare

2016-12-19 Thread Xiang Zhang

Changes by Xiang Zhang :


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

___
Python tracker 

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



[issue29009] Outdated part in the doc of PyUnicode_RichCompare

2016-12-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8f5ed2a38f64 by Xiang Zhang in branch '3.5':
Issue #29009: Remove outdated doc of PyUnicode_RichCompare.
https://hg.python.org/cpython/rev/8f5ed2a38f64

New changeset da958d01755a by Xiang Zhang in branch '3.6':
Issue #29009: Merge 3.5.
https://hg.python.org/cpython/rev/da958d01755a

New changeset 9568343fde42 by Xiang Zhang in branch 'default':
Issue #29009: Merge 3.6.
https://hg.python.org/cpython/rev/9568343fde42

--
nosy: +python-dev

___
Python tracker 

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



[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2016-12-19 Thread R. David Murray

R. David Murray added the comment:

There is at least one open ticket (maybe two, I forget) about providing a way 
to insert headers at arbitrary locations in the header list.  Our trouble has 
been deciding on an API.  There is a mailing list (email-sig) where such things 
can be discussed (it has been idle for a while now...).

I think you are right about the 'heuristic'.  Thinking about it now I believe 
the problem was partly the lack of an API for inserting headers at the top: if 
there is only one resent block we are OK appending the address headers, but if 
there is more than one block then that would be wrong.  The other aspect, to 
which the comment is referring, is that if we are "augmenting" headers, how do 
we decide if we are augmenting an existing block, or creating a new one?  
Looking at it now with fresh eyes I think we could just decide on the rules and 
document them.  And we probably want an option that says "this is a resend, add 
all the Resent headers as a new block".  Or maybe that is enough by itself.  No 
heuristics, refuse to guess :)  Either the user adds all the headers 
themselves, or none of them, and we construct them in send_message.  (I haven't 
reviewed the RFC lately, so I'm not sure that covers all the use cases.)

I don't have a strong opinion on the ehlo_helo issue, but I'm not clear on why 
its presence causes any difficulty for subclassing.

--

___
Python tracker 

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



[issue28950] regrtest: -j0 fails the check -j is not allowed together with -T/-l

2016-12-19 Thread STINNER Victor

STINNER Victor added the comment:

test-command-line-j0-with-test.patch LGTM.

--

___
Python tracker 

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



[issue28996] wcscoll is broken on Android and test_locale fails

2016-12-19 Thread Xavier de Gaye

Changes by Xavier de Gaye :


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



[issue19542] WeakValueDictionary bug in setdefault()()

2016-12-19 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This is finally fixed!

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



[issue19542] WeakValueDictionary bug in setdefault()()

2016-12-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bcb1f0698401 by Antoine Pitrou in branch '2.7':
Issue #19542: Fix bugs in WeakValueDictionary.setdefault() and 
WeakValueDictionary.pop()
https://hg.python.org/cpython/rev/bcb1f0698401

--

___
Python tracker 

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



[issue29009] Outdated part in the doc of PyUnicode_RichCompare

2016-12-19 Thread STINNER Victor

STINNER Victor added the comment:

doc-of-PyUnicode_RichCompare_v2.patch LGTM.

--

___
Python tracker 

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



[issue19542] WeakValueDictionary bug in setdefault()()

2016-12-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5a542a2bca08 by Antoine Pitrou in branch '3.5':
Issue #19542: Fix bugs in WeakValueDictionary.setdefault() and 
WeakValueDictionary.pop()
https://hg.python.org/cpython/rev/5a542a2bca08

New changeset f3706a9430da by Antoine Pitrou in branch '3.6':
Issue #19542: Fix bugs in WeakValueDictionary.setdefault() and 
WeakValueDictionary.pop()
https://hg.python.org/cpython/rev/f3706a9430da

New changeset ac2715d04119 by Antoine Pitrou in branch 'default':
Issue #19542: Fix bugs in WeakValueDictionary.setdefault() and 
WeakValueDictionary.pop()
https://hg.python.org/cpython/rev/ac2715d04119

--
nosy: +python-dev

___
Python tracker 

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



[issue28996] wcscoll is broken on Android and test_locale fails

2016-12-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 781c56168484 by Xavier de Gaye in branch '3.6':
Issue #28996: Skip two tests that fail on Android with the locale strcoll() and
https://hg.python.org/cpython/rev/781c56168484

New changeset 5c5cf7687dc1 by Xavier de Gaye in branch 'default':
Issue #28996: Merge 3.6.
https://hg.python.org/cpython/rev/5c5cf7687dc1

--
nosy: +python-dev

___
Python tracker 

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



[issue29013] zipfile: inconsistent doc for ZIP64 file size

2016-12-19 Thread Monte Davidoff

New submission from Monte Davidoff:

The documentation for the zipfile module, 
https://docs.python.org/3.5/library/zipfile.html, contains inconsistent 
descriptions of the maximum size of a ZIP file when allowZip64 is False.

The second paragraph in the zipfile module documentation states:

"It can handle ZIP files that use the ZIP64 extensions (that is ZIP files that 
are more than 4 GiB in size)."

Later on, in the description of the zipfile.ZipFile class, it says:

"If allowZip64 is True (the default) zipfile will create ZIP files that use the 
ZIP64 extensions when the zipfile is larger than 2 GiB."

The two sizes (4 GiB and 2 GiB) should be the same. According to 
https://en.wikipedia.org/wiki/Zip_(file_format)#ZIP64, 4 GiB is the correct 
value.

There is a similar problem in the 2.7.13 documentation, 
https://docs.python.org/2.7/library/zipfile.html.

--
assignee: docs@python
components: Documentation
messages: 283597
nosy: docs@python, mndavidoff
priority: normal
severity: normal
status: open
title: zipfile: inconsistent doc for ZIP64 file size
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



[issue29010] Incorrect description about scope related with inheritance

2016-12-19 Thread Brendan Donegan

Brendan Donegan added the comment:

Hi. Can you please provide a small code snippet illustrating where this 
diverges from the actual behaviour?

--
nosy: +brendan-donegan

___
Python tracker 

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



[issue29012] __bases__ is a tuple (possibly empty or a singleton)

2016-12-19 Thread Jim Fasarakis-Hilliard

New submission from Jim Fasarakis-Hilliard:

The following statement is in the Language Reference for Custom classes:

>  __bases__ is a tuple (possibly empty or a singleton) containing the base 
> classes

AFAIK, ``object.__bases__`` is the only object for which ``__bases__`` is empty 
and it isn't a *custom* class. Attempts to create a class and assign __bases__ 
to an empty tuple is checked to enforce inheritance from ``object``. This 
*seems* to be something that slipped through when the docs were created for 
Python 3.0?

I'm curious to see if this can actually be empty, if not, attached patch 
removes ''empty'' from the sentence.

--
assignee: docs@python
components: Documentation
files: fixbasesdoc.patch
keywords: patch
messages: 283595
nosy: Jim Fasarakis-Hilliard, docs@python
priority: normal
severity: normal
status: open
title: __bases__ is a tuple (possibly empty or a singleton)
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45962/fixbasesdoc.patch

___
Python tracker 

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



[issue22139] python windows 2.7.8 64-bit did not install

2016-12-19 Thread Henning von Bargen

Henning von Bargen added the comment:

A belated update... What I'm trying is similar to virtualenv:

My application should not depend on any pre-installed Python and not have any 
influence on it (and it should not modify the registry or the system 
environment variables).

It should be noted that my application is using a different executable instead 
of python.exe.

On Linux, I can do "make altinstall", but on Windows, setting up everything for 
compiling Python is out of scope.

Some of my other programs are using Python 3.5. With its "embeddable zip" it is 
very easy to achieve this goal.

Unfortunately, the most important program is using Python 2 on Windows and 
re-writing it for Python 3 would be quite an effort.

I think I finally found a way now with Python 2.7:

1. Define a directory where Python 2.x should be installed.
   SET PYTHONHOME=
2. Create that directory
   MKDIR %PYTHONHOME%
3. Run the installer like this:
   msiexec /a python-2.7.12.amd64 /qb TARGETDIR=%PYTHONHOME%
4. Useful: pushd %PYTHONHOME%; python -m ensurepip; popd
5. Copy python 27.dll next to your executable (see 
http://blog.pyspoken.com/2016/04/27/embedding-python-how-to-confuse-python-and-yourself)
 - this is the important step.
   copy /b %PYTHONHOME%\python27.dll %MY_APPLICATION_HOME%\bin\
6. When running your executable, use a script which sets %PYTHONHOME%
   copy /b %PYTHONHOME%\

--

___
Python tracker 

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