[issue27097] ceval: Wordcode follow up, explicit unsigned short read

2016-05-25 Thread STINNER Victor

STINNER Victor added the comment:

Demur: "This patch [ ushort.patch ] seeks to be a minimal change to achieve the 
desired aligned/batched memory read behavior of NEXTOP/NEXTARG."

We are concerned by undefined behaviours in CPython for portability reasons. 
Using a "unsigned short*" pointer avoids the undefined behaviour.

I'm talking about unsigned char* => unsigned short* conversion followed by a 
dereference:

+#define NEXTOPARG() (oparg = *(unsigned short*)next_instr, opcode = 
OPOF(oparg), oparg = ARGOF(oparg), next_instr += 2)

With ushort2.patch, the risk is reduced at once place which is now "protected" 
by an assertion:

+assert(_Py_IS_ALIGNED(PyBytes_AS_STRING(co->co_code), unsigned short));
+first_instr = (unsigned short*) PyBytes_AS_STRING(co->co_code);

--

___
Python tracker 

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



[issue27051] Create PIP gui

2016-05-25 Thread lorenzogotuned

lorenzogotuned added the comment:

@Terry: Fine, we can do it.

@Upendra: All the checks you mentioned have to be performed at start-up, so 
create a script that returns a configuration object for the UI. I think you can 
try to build a first easy view in which a package is selected (an input form 
when you can type a package name, with two buttons: 'search', 'install'); when 
a button is pushed, an the event is generated as Terry suggested.

--

___
Python tracker 

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



[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-25 Thread Eryk Sun

Eryk Sun added the comment:

In Py2Reg, `(*retDataBuf==NULL)` needs spaces around the == operator.

Should the changes to the winreg docs be noted as new in 3.6? 

Bikeshedding: in "What's New" you mention the change to QueryValueEx, but 
Reg2Py and Py2Reg affect EnumValue, QueryValueEx, and SetValueEx. Maybe change 
it to a more general description, like this:

winreg
--

Added the 64-bit integer type :data:`REG_QWORD `.
(Contributed by Clement Rouault in :issue:`23026`.)

--
nosy: +eryksun

___
Python tracker 

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



[issue16182] readline: Wrong tab completion scope indices in Unicode terminals

2016-05-25 Thread Martin Panter

Martin Panter added the comment:

I’m a bit worried about flex_complete() covering up errors. If I add calls to 
PyErr_WriteUnraisable(), I can see both the s1 and s2 decodes failing. Input 
the following line:

>>> "©"; import x;

and then move the cursor back one place, so it is directly after the “x”, but 
not after the semicolon (;). Then press Tab. Both errors are:

ValueError: embedded null byte

It looks like the reason is that PyUnicode_DecodeLocaleAndSize() requires that 
str[len] is a null character (the error message is misleading). It seems the 
len parameter is mainly there to verify that there are no embedded null 
characters, i.e. you cannot use it to give a truncated string.

It looks like Py_DecodeLocale() is used underneath; maybe it is simpler to call 
that directly. But it does not solve the string truncating problem.

A test case (perhaps using a pseudo-terminal) might also help pick this kind of 
thing up, if we can’t report errors any other way.

--

___
Python tracker 

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



[issue26632] __all__ decorator

2016-05-25 Thread Franklin? Lee

Franklin? Lee added the comment:

>>If @public were only to be used as a decorator, it would not be possible to
>>have `public` called on a function outside of its definition. But someone
>>might call `public(some_decorator(some_function))`.
>
>Do you mean, they'd call this is some module other than the one some_function
>was defined in?  I don't know that this is a use case we even want to support.

I mean they'd define their own function as a wrapped version of another 
function.


>That's true in a sense.  It doesn't change the decorated thing at all.  I
>think it's important to keep in mind that @public isn't the only way to add to
>__all__.

I mean more in that it acts in the scope of its caller, rather than its 
definition.


>You should get something like:
>
>AttributeError: 'tuple' object has no attribute 'append'
>
>which seems pretty obvious.

I don't think the C version shows a traceback, so it won't be clear that you're 
trying to assign to `__all__`.

When I rewrote `public` from memory, I wrote it something like this:
try:
dunder_all.append(name)
except TypeError:
module.__all__ = [*dunder_all, name]


>Well, consenting adults and all.  I'm not sure we need to protect ourselves so
>strictly against people who don't read the docs and don't understand Python
>(i.e. random cargo-culters).

Python is a popular learning language, and many will be students who haven't 
yet trained to reflexively look up docs. I saw the lack of such habits in 
Python's IRC channel.

"Consenting adults", I feel, is a reason to grant power: don't stop people from 
doing something they might need to do. But @public on a class method is just an 
error.

--

___
Python tracker 

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



[issue25419] Readline completion of module names in import statements

2016-05-25 Thread Martin Panter

Martin Panter added the comment:

I moved all the calls targetting the readline module into a ReadlineCompleter 
subclass. However the logic for parsing “import” statements still exists in the 
base Completer class in private methods. An overview of the two classes:

class Completer:
def complete(self, text, state):
self._get_matches(text)
def _get_matches(text):
# Only completes global and object.attr names, like before
def _code_matches(self, code, ...):
# Completes import statements, otherwise returns (None, ...)

class ReadlineCompleter(Completer):  # New public class
def complete(self, text, state):
# Moved Yury’s Tab insertion logic here
return super().complete(...)
def _get_matches(text):
code = readline.get_line_buffer()[:readline.get_endidx()]
self._code_matches(code)
super()._get_matches(text)  # Fallback to existing behaviour

Perhaps the _code_matches() and related methods could be turned into more 
general public APIs, e.g. complete_code(code) -> list of modules, attributes, 
globals, etc. But that would affect global_matches() and attr_matches(), which 
I have not touched so far.

Other changes:
* Limit underscore-prefixed completions, consistent with Issue 25011; see new 
_filter_identifiers() method
* Changed the demo in the documentation; attributes like __doc__ are omitted by 
default
* Removed workaround for non-ASCII input in favour of fixing Issue 16182

--
dependencies: +readline: Wrong tab completion scope indices in Unicode terminals
Added file: http://bugs.python.org/file42986/complete-import.v2.patch

___
Python tracker 

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



[issue27119] `compile` doesn't compile into an AST object as specified

2016-05-25 Thread Eryk Sun

Eryk Sun added the comment:

What you're looking for is in the 2nd paragraph of the ast docs:

An abstract syntax tree can be generated by passing
ast.PyCF_ONLY_AST as a flag to the compile() built-in
function, or using the parse() helper provided in this
module. The result will be a tree of objects whose
classes all inherit from ast.AST. An abstract syntax
tree can be compiled into a Python code object using
the built-in compile() function.

For example:

>>> mod = compile('42', '', 'exec', ast.PyCF_ONLY_AST)
>>> mod
<_ast.Module object at 0x7f0e45b15be0
>>> ast.dump(mod)
'Module(body=[Expr(value=Num(n=42))])'

In the discussion of `flags`, I think the compile docs should explicitly list 
ast.PyCF_ONLY_AST and the CO_FUTURE_* flags in a table.

--
nosy: +eryksun

___
Python tracker 

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



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

2016-05-25 Thread Martin Panter

Changes by Martin Panter :


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



[issue27120] xmllib unable to parse in UTF8 format

2016-05-25 Thread Enrico

New submission from Enrico:

The xmllib.XMLParser seems to be unable to parse 
an XML file that contains cyrillic characters.


   File "xmllib.pyc", line 172, in feed
   File "xmllib.pyc", line 268, in goahead
   File "xmllib.pyc", line 798, in syntax_error
 Error: Syntax error at line 8: illegal character in content

--
components: XML
messages: 266322
nosy: enrico.terra...@scamesistemi.it
priority: normal
severity: normal
status: open
title: xmllib unable to parse in UTF8 format
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



[issue27108] mimetypes.__all__ list is incomplete

2016-05-25 Thread Martin Panter

Martin Panter added the comment:

I left a comment about the empty blacklist. Other than removing the blacklist 
parameter, I think this is good to go.

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

___
Python tracker 

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



[issue27119] `compile` doesn't compile into an AST object as specified

2016-05-25 Thread Franklin? Lee

Franklin? Lee added the comment:

> What you're looking for is in the 2nd paragraph of the ast docs:

Oh. I considered that, but then compile's docs say:

The optional arguments flags and dont_inherit
control which future statements (see PEP 236)
affect the compilation of source.

--

___
Python tracker 

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



[issue27107] mailbox.__all__ list is incomplete

2016-05-25 Thread Martin Panter

Martin Panter added the comment:

This patch looks good to me. I agree the reap_children() thing is a separate 
problem.

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

___
Python tracker 

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



[issue27032] Remove deprecated html.parser.HTMLParser.unescape()

2016-05-25 Thread Martin Panter

Martin Panter added the comment:

I wonder if removing HTMLParser().unescape() would hurt Python 2 → 3 
compatibility. This was mentioned in Ezio’s draft deprecation policy PEP 
: 
“nothing that is available and not deprecated in 2.7 should be removed from 
Python 3 as long as 2.7 is officially supported”.

Is there any pressing need to get rid of the method? Maybe just fix the 
reference to Python 3.5 for the time being.

--
nosy: +martin.panter

___
Python tracker 

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



[issue27121] imghdr does not support jpg files with Lavc bytes

2016-05-25 Thread René Løwe Jacobsen

New submission from René Løwe Jacobsen:

Some jpegs might have Lavc instead of JFIF or Exif. I have added a picture for 
you to test with.

--
files: 5ZK0umWbRmsQwGkUb4LhIV6L9YnInn6t_thumb.jpg
messages: 266327
nosy: René Løwe Jacobsen
priority: normal
severity: normal
status: open
title: imghdr does not support jpg files with Lavc bytes
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: 
http://bugs.python.org/file42987/5ZK0umWbRmsQwGkUb4LhIV6L9YnInn6t_thumb.jpg

___
Python tracker 

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



[issue27110] smtpd.__all__ list is incomplete

2016-05-25 Thread Martin Panter

Martin Panter added the comment:

MailmanProxy is already included in __all__. Is there any advantage of removing 
it? Normally things are left in __all__ even when they actually get deprecated, 
as far as I understand.

The patch looks sensible to me (though I am not very familiar with the module).

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

___
Python tracker 

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



[issue27108] mimetypes.__all__ list is incomplete

2016-05-25 Thread Jacek Kołodziej

Jacek Kołodziej added the comment:

Thank you, Martin. I'm uploading amended patch.

--
Added file: http://bugs.python.org/file42988/mimetypes_all.v2.patch

___
Python tracker 

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



[issue27109] plistlib.__all__ list is incomplete

2016-05-25 Thread Martin Panter

Changes by Martin Panter :


--
stage:  -> patch review

___
Python tracker 

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



[issue27106] configparser.__all__ is incomplete

2016-05-25 Thread Martin Panter

Martin Panter added the comment:

Looks good to me

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

___
Python tracker 

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



[issue27105] cgi.__all__ is incomplete

2016-05-25 Thread Martin Panter

Martin Panter added the comment:

I don’t see why test() should be a special case. A few of the other functions 
seem to be just for debugging and testing too, e.g. print_environ().

Is there any advantage to having the test case in a separate MiscTestCase 
class, as opposed to the existing CgiTests class?

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

___
Python tracker 

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



[issue27105] cgi.__all__ is incomplete

2016-05-25 Thread Jacek Kołodziej

Jacek Kołodziej added the comment:

Martin:

> Is there any advantage to having the test case in a separate MiscTestCase 
> class, as opposed to the existing CgiTests class?

Other than "the first test [well, that I know of] for __all__ list was in 
separate class called MiscTestCase so each next one follows the same fashion" 
and "sometimes such test would fit into some existing TestCase class and 
sometimes not, so let's always put it into separate class for cohesion" - no, I 
don't see any.

--

___
Python tracker 

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



[issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression)

2016-05-25 Thread Valentin David

New submission from Valentin David:

The attached script hangs while using 100% on Python 3.5.1 but not on Python 
3.4.3. Tested both on Gentoo Linux and Ubuntu Linux.

The loop seems to be in PyErr_SetObject in a loop that recursively go through 
PyException_GetContext.

subprocess.Popen seems to cause the issue while calling io.open. strace reveals 
a error on call to lseek on a pipe.

The issue does not happen when using nested "with" instead of ExitStack.

--
files: hang_bug.py
messages: 266333
nosy: Valentin David
priority: normal
severity: normal
status: open
title: Hang with contextlib.ExitStack and subprocess.Popen (regression)
versions: Python 3.5
Added file: http://bugs.python.org/file42989/hang_bug.py

___
Python tracker 

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



[issue27054] Python installation problem: No module named 'encodings'

2016-05-25 Thread Hugh C. Lauer

Hugh C. Lauer added the comment:

I am back from my travels.

Thanks very much, Stefan. Running as administrator did the trick for Windows 10 
installations. I now have a reliable, repeatable protocol that I can give to 
students with little computing experience that will enable them to install 
Python on their Windows 10 laptops.

Hugh Lauer
Worcester Polytechnic Institute

--

___
Python tracker 

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



[issue15625] Support u and w codes in memoryview

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

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

Trigger the same bug

I want to effectively slice big unicode string. So I decide to use memoryview 
for that in order to eliminate memory copying.

In [33]: a = array.array('u', 'превед')
In [34]: m = memoryview(a)
In [35]: m[2:]
Out[35]: 
In [36]: m[0]
...
NotImplementedError: memoryview: format w not supported


1. Why format 'w' error if I asked 'u' ?
2. Format 'w' is not listed in https://docs.python.org/3.5/library/array.html
3. What is alternative for fast slicing, like memoryview(bytearray(b'test')), 
but for unicode ?

--
nosy: +mmarkk

___
Python tracker 

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



[issue27054] Python installation problem: No module named 'encodings'

2016-05-25 Thread Hugh C. Lauer

Hugh C. Lauer added the comment:

I am back from my travels.

Thanks Zachary for this. On Windows 10, no PYTHON or PYTHONHOME environment 
variable is set. On Windows 7, they are set. Moreover, even though I am 
installing Python 3.5.1, the refer to C:\Program files\Python34 !

I will continue to experiment with this.

Regards,

Hugh Lauer
Worcester Polytechnic Institute

--

___
Python tracker 

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



[issue27105] cgi.__all__ is incomplete

2016-05-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

OK. This is unusual name for public function and looks rather as internal 
function for manual module testing, but since it is documented, we perhaps 
should add its name to __all__. The patch LGTM.

--

___
Python tracker 

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



[issue27032] Remove deprecated html.parser.HTMLParser.unescape()

2016-05-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good point. Maybe the deprecation period of HTMLParser.unescape() should be 
prolonged.

On other side, this method is not documented, nor in 2.7, nor in 3.x. It is not 
a part of official API.

--

___
Python tracker 

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



[issue27120] xmllib unable to parse in UTF8 format

2016-05-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you please provide minimal reproducer? Minimal script and minimal data 
that expose the issue.

--
nosy: +serhiy.storchaka
stage:  -> test needed

___
Python tracker 

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



[issue27118] Several Py_XDE/INCREFs in typeobject.c are not necessary

2016-05-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue27112] tokenize.__all__ list is incomplete

2016-05-25 Thread Martin Panter

Martin Panter added the comment:

I think it might be better to add a separate “import tokenize as 
tokenize_module”. Or just “import tokenize” inside the test function. IMO 
changing all the names adds too much churn with minimal benefit.

Maybe also should restore the “from unittest import . . .” line. But keep an 
“import unittest” line somewhere so the __main__ bit at the bottom works.

Perhaps it would be good to merge MiscTestCase into the existing TestMisc class.

--
nosy: +martin.panter

___
Python tracker 

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



[issue27054] Python installation problem: No module named 'encodings'

2016-05-25 Thread Hugh C. Lauer

Hugh C. Lauer added the comment:

All, it seems that installation of Python 3.5.1 on Windows 7 must also be done 
as administrator. Once I did that, the installation of Python 3.5.1, numpy 
1.11.0, and matplotlib 1.5.1 all went seamlessly.

The only environment variable that was changed was to add the Python 
installation directory to the PATH environment variable.

Regards,

Hugh C. Lauer
Worcester Polytechnic Institute

--

___
Python tracker 

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



[issue27118] Several Py_XDE/INCREFs in typeobject.c are not necessary

2016-05-25 Thread STINNER Victor

STINNER Victor added the comment:

LGTM too.

Serhiy, do you want to push the patch?

--
nosy: +haypo

___
Python tracker 

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



[issue27097] ceval: Wordcode follow up, explicit unsigned short read

2016-05-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated patch addresses Victor's comments.

--
Added file: http://bugs.python.org/file42990/ushort3.patch

___
Python tracker 

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



[issue23883] __all__ lists are incomplete

2016-05-25 Thread Martin Panter

Martin Panter added the comment:

I think pydoc could be left alone. The RST documentation doesn’t say anything 
about importing any functions from the module that I can see. I was surprised 
that it even defines __all__ = ["help"]. Perhaps pydoc.doc() was another false 
indication in Serhiy’s list.

--
dependencies: +cgi.__all__ is incomplete, configparser.__all__ is incomplete, 
mailbox.__all__ list is incomplete, mimetypes.__all__ list is incomplete, 
plistlib.__all__ list is incomplete, smtpd.__all__ list is incomplete, 
tokenize.__all__ list is incomplete

___
Python tracker 

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



[issue27118] Several Py_XDE/INCREFs in typeobject.c are not necessary

2016-05-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3b4c3dda679a by Serhiy Storchaka in branch 'default':
Issue #27118: Clean up Py_XINCREF/Py_XDECREF in typeobject.c.
https://hg.python.org/cpython/rev/3b4c3dda679a

--
nosy: +python-dev

___
Python tracker 

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



[issue27120] xmllib unable to parse in UTF8 format

2016-05-25 Thread Enrico

Enrico added the comment:

I have attached xmllib.py. This file is in python23\lib folder.

The strings in XML file are in cyrillic language.

My code:
import xmllib

class Parser(xmllib.XMLParser):
# a simple styling engine

def __init__(self):
xmllib.XMLParser.__init__(self)
self.cursupervisore = None
self.curdata= ''

self.elements = {'Superv':(self.starttag_superv, self.endtag_superv)

}
def load(self, file):
while 1:
s = file.readline()

if not s:
break
self.feed(s)
self.close()

def read_plant_tree(filexml):
  c = Parser()
  c.load(filexml)

--
Added file: http://bugs.python.org/file42991/xmllib.py

___
Python tracker 

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



[issue27118] Several Py_XDE/INCREFs in typeobject.c are not necessary

2016-05-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Done. Thank you for your contribution 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



[issue26306] Can't create abstract tuple

2016-05-25 Thread R. David Murray

Changes by R. David Murray :


--
resolution:  -> duplicate
stage: test needed -> resolved
status: open -> closed
superseder:  -> abstract class instantiable when subclassing dict

___
Python tracker 

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



[issue27010] email library could "recover" from bad mime boundary like (some?) email clients do

2016-05-25 Thread Andrea De Pasquale

Changes by Andrea De Pasquale :


--
nosy: +adepasquale

___
Python tracker 

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



[issue5996] abstract class instantiable when subclassing dict

2016-05-25 Thread Maciej Szulik

Changes by Maciej Szulik :


--
nosy: +maciej.szulik

___
Python tracker 

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



[issue27108] mimetypes.__all__ list is incomplete

2016-05-25 Thread R. David Murray

R. David Murray added the comment:

I thought having the empty blacklist was a good reminder, in case names are 
added later that need blacklisting (though granted that should be unlikely at 
this point, since we are more consistent about using _ names for internals 
now).  I have no objection to removing it, though.

--

___
Python tracker 

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



[issue27110] smtpd.__all__ list is incomplete

2016-05-25 Thread R. David Murray

R. David Murray added the comment:

Yeah, good point.  Leave it alone.

--

___
Python tracker 

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



[issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression)

2016-05-25 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +gps

___
Python tracker 

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



[issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression)

2016-05-25 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue27032] Remove deprecated html.parser.HTMLParser.unescape()

2016-05-25 Thread R. David Murray

R. David Murray added the comment:

Nevertheless, our current standing policy is to not remove anything until after 
2.7 goes out of maintenance entirely.

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



[issue27032] Remove deprecated html.parser.HTMLParser.unescape()

2016-05-25 Thread Berker Peksag

Berker Peksag added the comment:

It was removed before and added back with a deprecation warning (because 
someone was using it).

A little bit off-topic, but it would be great to have a "deprecated APIs in 
Python 3" list somewhere in the Python documentation (see 
https://docs.djangoproject.com/en/dev/internals/deprecation/ for an example).

--
nosy: +berker.peksag

___
Python tracker 

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



[issue27113] sqlite3 connect parameter "check_same_thread" not documented

2016-05-25 Thread Berker Peksag

Berker Peksag added the comment:

This is a duplicate of issue 16509, but I'm going to keep this open since there 
is a patch attached here.

--
nosy: +berker.peksag
stage:  -> needs patch
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



[issue16509] sqlite3 docs do not explain check_same_thread

2016-05-25 Thread Berker Peksag

Berker Peksag added the comment:

Issue 27113 has a patch and more detailed description so I'm going to close 
this one as a 'duplicate'.

Thanks for the report!

--
nosy: +berker.peksag
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> sqlite3 connect parameter "check_same_thread" not documented

___
Python tracker 

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



[issue27113] sqlite3 connect parameter "check_same_thread" not documented

2016-05-25 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: needs patch -> patch review

___
Python tracker 

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



[issue27051] Create PIP gui

2016-05-25 Thread Upendra Kumar

Upendra Kumar added the comment:

I am posting flow of logic for application and related page layouts.

Related layouts are :

1. welcome_v1
2. select_venv_system
3. install_pyPI_v1
4. install_local_archive_v1
5. install_pythonlibs_v1
6. install_requirements_v1
7. update_package_v1
8. remove_package_v1
9. finish_tasks_v1 ( can be decided later depending on further options )

Here , update_package_v1 and remove_package_v1 will be very similar.
Therefore, for now I have made layout for update_package_v1 only.

--
Added file: http://bugs.python.org/file42992/design_flow.pdf

___
Python tracker 

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



[issue27051] Create PIP gui

2016-05-25 Thread Upendra Kumar

Changes by Upendra Kumar :


Added file: http://bugs.python.org/file42994/select_venv_system.jpg

___
Python tracker 

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



[issue27051] Create PIP gui

2016-05-25 Thread Upendra Kumar

Changes by Upendra Kumar :


Added file: http://bugs.python.org/file42993/welcome_v1.jpg

___
Python tracker 

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



[issue27051] Create PIP gui

2016-05-25 Thread Upendra Kumar

Changes by Upendra Kumar :


Added file: http://bugs.python.org/file42995/install_pyPI_v1.png

___
Python tracker 

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



[issue27051] Create PIP gui

2016-05-25 Thread Upendra Kumar

Changes by Upendra Kumar :


Added file: http://bugs.python.org/file42996/install_requirement_v1.jpg

___
Python tracker 

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



[issue27051] Create PIP gui

2016-05-25 Thread Upendra Kumar

Changes by Upendra Kumar :


Added file: http://bugs.python.org/file42997/install_local_archive_v1.jpg

___
Python tracker 

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



[issue27051] Create PIP gui

2016-05-25 Thread Upendra Kumar

Changes by Upendra Kumar :


Added file: http://bugs.python.org/file42998/update_package_v1.png

___
Python tracker 

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



[issue27118] Several Py_XDE/INCREFs in typeobject.c are not necessary

2016-05-25 Thread Xiang Zhang

Xiang Zhang added the comment:

It's my pleasure and thanks for your time reviewing this thread too.

--

___
Python tracker 

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



[issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression)

2016-05-25 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +yselivanov

___
Python tracker 

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



[issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression)

2016-05-25 Thread STINNER Victor

STINNER Victor added the comment:

It's a regression introduced by the PEP 479 in Lib/contextlib.py by the 
changeset 36a8d935c322, "PEP 479: Change StopIteration handling inside 
generators (Closes issue #22906)".

--

___
Python tracker 

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



[issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression)

2016-05-25 Thread STINNER Victor

STINNER Victor added the comment:

Workaround, or maybe fix?, for the issue:

diff -r 0af15b8ef3b2 Lib/contextlib.py
--- a/Lib/contextlib.py Thu May 12 10:37:58 2016 +0300
+++ b/Lib/contextlib.py Wed May 25 15:56:50 2016 +0200
@@ -87,6 +87,8 @@ class _GeneratorContextManager(ContextDe
 # (see PEP 479).
 if exc.__cause__ is value:
 return False
+if exc is value:
+return
 raise
 except:
 # only re-raise if it's *not* the exception that was

--

___
Python tracker 

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



[issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression)

2016-05-25 Thread STINNER Victor

STINNER Victor added the comment:

Simplified script to reproduce the bug.

--
nosy: +haypo
Added file: http://bugs.python.org/file42999/hang_bug2.py

___
Python tracker 

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



[issue26814] [WIP] Add a new _PyObject_FastCall() function which avoids the creation of a tuple or dict for arguments

2016-05-25 Thread STINNER Victor

STINNER Victor added the comment:

I fixed even more issues with my setup to run benchmark. Results should be even 
more reliable. Moreover, I fixed multiple reference leaks in the code which 
introduced performance regressions. I started to write articles to explain how 
to run stable benchmarks:

* https://haypo.github.io/journey-to-stable-benchmark-system.html
* https://haypo.github.io/journey-to-stable-benchmark-deadcode.html
* https://haypo.github.io/journey-to-stable-benchmark-average.html

Summary of benchmarks at the revision e6f3bf996c01:

Faster (25):
- pickle_list: 1.29x faster
- etree_generate: 1.22x faster
- pickle_dict: 1.19x faster
- etree_process: 1.16x faster
- mako_v2: 1.13x faster
- telco: 1.09x faster
- raytrace: 1.08x faster
- etree_iterparse: 1.08x faster
- regex_compile: 1.07x faster
- json_dump_v2: 1.07x faster
- etree_parse: 1.06x faster
- regex_v8: 1.05x faster
- call_method_unknown: 1.05x faster
- chameleon_v2: 1.05x faster
- fastunpickle: 1.04x faster
- django_v3: 1.04x faster
- chaos: 1.04x faster
- 2to3: 1.03x faster
- pathlib: 1.03x faster
- unpickle_list: 1.03x faster
- json_load: 1.03x faster
- fannkuch: 1.03x faster
- call_method: 1.02x faster
- unpack_sequence: 1.02x faster
- call_method_slots: 1.02x faster

Slower (4):
- regex_effbot: 1.08x slower
- nbody: 1.08x slower
- spectral_norm: 1.07x slower
- nqueens: 1.06x slower

Not significat (13):
- tornado_http
- startup_nosite
- simple_logging
- silent_logging
- richards
- pidigits
- normal_startup
- meteor_contest
- go
- formatted_logging
- float
- fastpickle
- call_simple

I'm now investigating why 4 benchmarks are slower.

Note: I'm still using my patched CPython benchmark suite to get more stable 
benchmark. I will send patches upstream later.

--

___
Python tracker 

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



[issue27113] sqlite3 connect parameter "check_same_thread" not documented

2016-05-25 Thread Thomas Kluyver

Changes by Thomas Kluyver :


--
nosy: +takluyver

___
Python tracker 

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



[issue27123] Allow `install_headers` command to follow specific directory structure

2016-05-25 Thread Sylvain Corlay

New submission from Sylvain Corlay:

(instead of making a flat copy of the specified list of headers)

Unlike wheel's `data_files`, which allows to specify data files as a list of 
tuples

`[(target_directory, [list of files for target directory])]` 

the `headers` setup keyword argument only let's you specify a list of files 
that will be copied over to a sub-directory of `sysconfig.get_path('include')`.

It would be useful to enable the same feature for headers as we have for data 
files.

--
components: Distutils
messages: 266360
nosy: dstufft, eric.araujo, sylvain.corlay
priority: normal
severity: normal
status: open
title: Allow `install_headers` command to follow specific directory structure
type: enhancement
versions: Python 2.7, Python 3.6

___
Python tracker 

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



[issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression)

2016-05-25 Thread Nick Coghlan

Nick Coghlan added the comment:

The suggested fix looks basically correct to me - the problem is that the new 
except clause added by that patch is currently missing the "don't re-raise the 
passed in exception" logic needed to fully abide by the context management 
protocol, but we missed that on the patch review.

The only tweak I would recommend is putting that check before the check for 
StopIteration being converted to RuntimeError so it's immediately obvious to 
the reader that it takes priority over the exc.__cause__ check.

The comment on that clause should also be adjusted to reflect the fixed 
behaviour.

--

___
Python tracker 

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



[issue26936] android: test_socket fails

2016-05-25 Thread Xavier de Gaye

Xavier de Gaye added the comment:

This patch fixes the testGetServBy test for API 21 and 23 (fixing the cases a) 
and e) of my previous msg).

--
keywords: +patch
Added file: http://bugs.python.org/file43000/null-proto.patch

___
Python tracker 

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



[issue26936] android: test_socket fails

2016-05-25 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Problems with the socket module on Android:
API 21:
a) Both getservbyname() and getservbyport() fail when the optional 
'protocolname' parameter is not set to 'tcp' or 'udp'.
b) getservbyname() fails when 'servicename' is set to 'http'.
getaddrinfo() fails either when:
c) 'port' is 'http'.
d) Or the optional 'type' is not set to socket.SOCK_STREAM or 
socket.SOCK_DGRAM and 'port' is a string.

API 23:
e) getservbyport() fails when the optional 'protocolname' parameter is not 
set to 'tcp' or 'udp'.

IMHO case b) and c) are difficult to fix.
For case d), one could use the Python implementation of getaddrinfo, but 
Android does not have the deprecated getipnodebyaddr(), so it is necessary to 
disable ipv6 in this case. Not sure if this is worth it.

--

___
Python tracker 

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



[issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression)

2016-05-25 Thread STINNER Victor

STINNER Victor added the comment:

> The loop seems to be in PyErr_SetObject in a loop that recursively go through 
> PyException_GetContext.

We should also fix this function to avoid the infinite loop.

Maybe we should deny setting "exc.__context__=exc" (modify 
PyException_SetContext for that). Maybe raise a new RuntimeError in this case?

--

___
Python tracker 

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



[issue27097] ceval: Wordcode follow up, explicit unsigned short read

2016-05-25 Thread STINNER Victor

STINNER Victor added the comment:

ushort3.patch LGTM.

You might also add (copy) the added assertions in PyCode_New*().

--

___
Python tracker 

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



[issue27096] Ability to get random bytes from random.Random (as with os.urandom)

2016-05-25 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Sorry Campbell, I concur with Serhiy that this isn't worth growing the API.

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue26936] android: test_socket fails

2016-05-25 Thread Xavier de Gaye

Xavier de Gaye added the comment:

This patch fixes the testGetaddrinfo test for API 21 (the test runs fine on API 
23):
The failing statement 'socket.getaddrinfo(HOST, "http")' in testGetaddrinfo 
does not test explicitly for "http" and for the absence of the optional 'type' 
parameter.
When is_android is True, the 'socket.getaddrinfo('127.0.0.1', "echo", 
type=socket.SOCK_DGRAM)' statement is run instead and the test is ok.

--
dependencies: +add is_android in test.support to detect Android platform
Added file: http://bugs.python.org/file43001/test-getaddrinfo.patch

___
Python tracker 

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



[issue27124] binascii.a2b_hex raises binascii.Error, not TypeError

2016-05-25 Thread Lennart Grahl

New submission from Lennart Grahl:

When using binascii.a2b_hex (or binascii.unhexlify) and the argument is 
invalid, the doc states that it should raise a TypeError for invalid arguments 
(e.g. passing an odd-length string).

However, it does raise binascii.Error instead of TypeError:

try:
binascii.a2b_hex('a')
except Exception as exc:
print(type(exc))

--
assignee: docs@python
components: Documentation
messages: 266368
nosy: Lennart Grahl, docs@python
priority: normal
severity: normal
status: open
title: binascii.a2b_hex raises binascii.Error, not TypeError
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression)

2016-05-25 Thread Yury Selivanov

Yury Selivanov added the comment:

> 
> Maybe we should deny setting "exc.__context__=exc" (modify 
> PyException_SetContext for that). Maybe raise a new RuntimeError in this case?

There is a patch for that somewhere on the tracker

--

___
Python tracker 

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



[issue27124] binascii.a2b_hex raises binascii.Error and ValueError, not TypeError

2016-05-25 Thread Lennart Grahl

Lennart Grahl added the comment:

When using binascii.a2b_hex (or binascii.unhexlify) and the argument is 
invalid, the doc states that it should raise a TypeError for invalid arguments 
(e.g. passing an odd-length string).

However, it does raise binascii.Error instead of TypeError:

try:
binascii.a2b_hex('a')
except Exception as exc:
print(type(exc))

What surprised me even more was that it raises ValueError (although 
binascii.Error inherits ValueError) in case a unicode string has been passed as 
an argument:

try:
binascii.a2b_hex('ä')
except binascii.Error:
print('binascii.Error')
except ValueError:
print('ValueError')

--
title: binascii.a2b_hex raises binascii.Error, not TypeError -> 
binascii.a2b_hex raises binascii.Error and ValueError, not TypeError

___
Python tracker 

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



[issue27124] binascii.a2b_hex raises binascii.Error and ValueError, not TypeError

2016-05-25 Thread Steven D'Aprano

Steven D'Aprano added the comment:

In Python 3.x, 'a' is just as much a Unicode string as 'ä'. I agree that 
binascii.a2b_hex should raise ValueError for argument 'ä', or ';' for that 
matter, as they are invalid values. There's an inconsistency in why some 
invalid characters raise ValueError and some raise binascii.Error. But since 
binascii.Error is a subclass of ValueError, it probably doesn't matter that 
much, so long as the documentation is clear.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue27010] email library could "recover" from bad mime boundary like (some?) email clients do

2016-05-25 Thread Andrea De Pasquale

Andrea De Pasquale added the comment:

Isn't this covered by the following test case?

Lib/test/test_email/test_defect_handling.py:18

--

___
Python tracker 

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



[issue6818] remove/delete method for zipfile/tarfile objects

2016-05-25 Thread Denis Akhiyarov

Denis Akhiyarov added the comment:

has this been merged?

--
nosy: +Denis Akhiyarov

___
Python tracker 

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



[issue23883] __all__ lists are incomplete

2016-05-25 Thread Jacek Kołodziej

Jacek Kołodziej added the comment:

In this case I'm proposing a small patch just for testing pydoc module's 
__all__ list and left the decision to you, whether to apply it or not. :)

Test doesn't use test.support.check__all__ (see msg266312) - blacklist would be 
huge and expected list, as you already pointed out, has only one value.

--
Added file: http://bugs.python.org/file43002/Issue23883_pydoc_all.patch

___
Python tracker 

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



[issue27097] ceval: Wordcode follow up, explicit unsigned short read

2016-05-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eda3716d6425 by Serhiy Storchaka in branch 'default':
Issue #27097: Python interpreter is now about 7% faster due to optimized
https://hg.python.org/cpython/rev/eda3716d6425

--
nosy: +python-dev

___
Python tracker 

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



[issue27097] ceval: Wordcode follow up, explicit unsigned short read

2016-05-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved

___
Python tracker 

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



[issue25823] Speed-up oparg decoding on little-endian machines

2016-05-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Corresponding patch was committed in issue27097.

--
dependencies:  -ceval: use Wordcode, 16-bit bytecode
resolution:  -> out of date
stage:  -> resolved
status: open -> closed
superseder:  -> ceval: Wordcode follow up, explicit unsigned short read

___
Python tracker 

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



[issue27097] ceval: Wordcode follow up, explicit unsigned short read

2016-05-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
status: open -> closed

___
Python tracker 

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



[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-05-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I join in the congratulations, Demur! Thank you for your contributions.

I left this issue open for updating the documentation and other polishing.

--

___
Python tracker 

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



[issue27097] ceval: Wordcode follow up, explicit unsigned short read

2016-05-25 Thread Berker Peksag

Berker Peksag added the comment:

Debug builds are broken after eda3716d6425: 
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/4332/steps/compile/logs/stdio

--
nosy: +berker.peksag

___
Python tracker 

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



[issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression)

2016-05-25 Thread Emanuel Barry

Emanuel Barry added the comment:

Yes, and it seems that it is waiting for a review. 
http://bugs.python.org/issue25782

--
nosy: +ebarry

___
Python tracker 

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



[issue27097] ceval: Wordcode follow up, explicit unsigned short read

2016-05-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b26d07812a8e by Serhiy Storchaka in branch 'default':
Fixed the use of _Py_IS_ALIGNED (issue #27097).
https://hg.python.org/cpython/rev/b26d07812a8e

--

___
Python tracker 

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



[issue27097] ceval: Wordcode follow up, explicit unsigned short read

2016-05-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Opps, sorry. Fixed now. Thank you Berker for fast response.

--

___
Python tracker 

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



[issue27010] email library could "recover" from bad mime boundary like (some?) email clients do

2016-05-25 Thread R. David Murray

R. David Murray added the comment:

Yes.  The current behavior is not a bug, the question is, do we want to deal 
with that XXX comment in the test by detecting the duplicate and reconizing the 
"extra" mime part?  The defect detection would remain.

--
stage:  -> needs patch
type:  -> enhancement

___
Python tracker 

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



[issue27054] Python installation problem: No module named 'encodings'

2016-05-25 Thread Steve Dower

Steve Dower added the comment:

I suspect PYTHONHOME is the problem and not the installation method. There have 
been thousands of (presumably successful) installations of Python 3.5, and I 
expect most of them are just for the current user (as that's the default). If 
these were all failing for this reason, we'd have heard before now :)

There are likely to be some configurations that will cause the initial install 
to fail if you aren't running as an administrator, but that doesn't sound like 
the issue here.

Rogue installers that write to Python's registry keys (e.g. Anaconda) are more 
likely to cause problems here, as are those that globally set environment 
variables like PYTHONHOME/PYTHONPATH. If, like me, you install a lot of 
different bundles to figure out which is best, then some of these may be 
lingering around.

But I'm 99.99% certain that our installer is not at fault and there's nothing 
to fix here.

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



[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-25 Thread Mark Grandi

Mark Grandi added the comment:

in 'test_winreg.py', there should probably be a test that covers 
REG_QWORD_LITTLE_ENDIAN, even if they are essentially equivalent 

Also, in Py2Reg and Reg2Py, it seems that both are missing the 'case' clause 
for REG_QWORD_LITTLE_ENDIAN as well

case REG_QWORD:
case REG_QWORD_LITTLE_ENDIAN:


And sure, i would have the documentation changes listed in 
'Doc/whatsnew/3.6.rst'. And now that I think about it, the documentation in 
'/Doc/library/winreg.rst' should probably mention that REG_QWORD and 
REG_QWORD_LITTLE_ENDIAN are new as of python 3.6

--

___
Python tracker 

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



[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-25 Thread Steve Dower

Steve Dower added the comment:

Thanks!

I don't think we need to mention doc changes in whatsnew, but I've made the 
description more general and added the "New in version 3.6" notes to the winreg 
page.

The formatting was presumably copied from the surrounding code, but I've fixed 
all instances of it.

I can't actually add ``case REG_QWORD_LITTLE_ENDIAN:`` as it has the same value 
as REG_QWORD and won't compile.

--

___
Python tracker 

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



[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ed4eec682199 by Steve Dower in branch 'default':
Closes #23026: Documentation improvements and code formatting
https://hg.python.org/cpython/rev/ed4eec682199

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



[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-25 Thread Mark Grandi

Mark Grandi added the comment:

Oh, I didn't realize that both REG_QWORD and REG_QWORD_LITTLE_ENDIAN had the 
same value, that works then.

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

___
Python tracker 

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



[issue27054] Python installation problem: No module named 'encodings'

2016-05-25 Thread Zachary Ware

Changes by Zachary Ware :


--
stage:  -> resolved

___
Python tracker 

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



[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-25 Thread Zachary Ware

Changes by Zachary Ware :


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

___
Python tracker 

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



[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-05-25 Thread Demur Rumed

Demur Rumed added the comment:

A documentation touch up for EXTENDED_ARG is included in #27095

--

___
Python tracker 

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



[issue27097] ceval: Wordcode follow up, explicit unsigned short read

2016-05-25 Thread STINNER Victor

STINNER Victor added the comment:

Why not using sizeof(unsigned short) in the macro, rtbaer than 2?

--

___
Python tracker 

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



[issue27112] tokenize.__all__ list is incomplete

2016-05-25 Thread Jacek Kołodziej

Jacek Kołodziej added the comment:

> * All names in black list are implementation details. Names in white list are 
> stable and already repeated in docs.

Assumption here is that implementation details shouldn't "look" public - they 
should have names starting with "_"; I think blacklisting names in these tests 
encourages good practice - if something "looks" public, either:
* it should be documented and placed in __all__
* renamed to something that doesn't look public anymore
* in some special cases - be explicitely blacklisted in test.

But ok, assuming we go with whitelisting and plain self.assertCountEqual:

> * White list consists mostly from token.__all__.

Should I then do:

import token
expected = token.__all__ + ["COMMENT", "NL", "ENCODING", "TokenInfo", 
"TokenError", "detect_encoding", "untokenize", "open", "tokenize"]

?

> IMO changing all the names adds too much churn with minimal benefit.

I wouldn't call it minimal, it has some positive impact on readability, see 
last line from The Zen of Python. :) Of course, final call is yours.

Single import of unittest is such a small change I would rather keep it.

I fully agree existing TestMisc class is a good place for this test, though.

--

___
Python tracker 

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



[issue27106] configparser.__all__ is incomplete

2016-05-25 Thread Łukasz Langa

Łukasz Langa added the comment:

The reason we specifically omitted Error was two-fold:
- the name "Error" is very generic and during a star-import might easily shadow 
some other class of the same name;
- Error is only a base class for exceptions raised by configparser and as such 
isn't part of the public API. You can see the same behavior in 
concurrent.futures for example. However, now I noticed configparser.Error is 
listed in the documentation so the assertion that "it's not public API" is 
effectively incorrect.

So I'm torn a little here. On the one hand, it's nice to add Error for 
completeness. On the other hand, is this change solving a real issue or just 
satisfying your inner librarian? The reason we have to ask ourselves this 
question is that this change bears a small risk of breaking user code that was 
working before. Take a look at this example:
```
from wave import *
from configparser import *

cfg = ConfigParser()
cfg.read('appconfig.ini')
try:
  with Wave_read(cfg['samples']['sad_trombone']) as wav:
n = wav.getnframes()
frames = wav.readframes(n)
except Error as e:
  print("Invalid sample:", e)
except KeyError as e:
  print("Can't find {!r} in the config".format(str(e)))
else:
  play_sound(frames)
```
Sure, it's bad code but the point is: it was working before and had a decent 
error handling strategy. With the change in __all__, it will just crash because 
wave.Error was never caught.

Is this likely to happen? I don't think so. Knowing my luck, will it happen to 
somebody? Yeah. So the question remains: why do we want Error in __all__ in the 
first place? Is it worth it?

--

___
Python tracker 

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



[issue24225] Idlelib: changing file names

2016-05-25 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Ned, the rename (only) patch is useless to read as it is hg's bloated expansion 
of the rename commands in i3rename.bat.

The main update is based on my review of Al's patch.  In user testing, I 
discovered that the debugger depended on 'RemoteDebugger.py' being prefix + 
'Debugger.py', so that its code needed more than a simple name replacement when 
I changed to 'debugger.py' and 'debugger_r.py'.  We both missed "from idlelib 
import PathBrowser" buried in EditorWindow.open_path_browser.  I plan to 
collapse the update patches after I finish live user testing.  I am now using 
patched IDLE for further editing.

--

___
Python tracker 

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



[issue27125] Typo in Python 2 multiprocessing documentation

2016-05-25 Thread Phoenix

New submission from Phoenix:

At https://docs.python.org/2/library/multiprocessing.html#authentication-keys 
there is a typo in the documentation:

"If authentication is requested but do authentication key is specified ..."

s/b (emphasis added)

"If authentication is requested but **no** authentication key is specified..."

--
assignee: docs@python
components: Documentation
messages: 266393
nosy: docs@python, phx
priority: normal
severity: normal
status: open
title: Typo in Python 2 multiprocessing documentation
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



  1   2   >