[issue27106] configparser.__all__ is incomplete

2016-05-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +lukasz.langa

___
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-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The blacklist is too long. I think it would be better to use white list.

--
nosy: +serhiy.storchaka

___
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-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I don't think test() should be exposed as public API.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue27083] PYTHONCASEOK is ignored on Windows

2016-05-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Did you forgot to upload a patch?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue27101] Compilation of python (modules) for foreign target platform problem.

2016-05-24 Thread Petr Ovtchenkov

Petr Ovtchenkov added the comment:

for 2.7 branch

--
Added file: 
http://bugs.python.org/file42984/0002-Compilation-ssl-module-for-foreign-target-platform.patch

___
Python tracker 

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



[issue27101] Compilation of python (modules) for foreign target platform problem.

2016-05-24 Thread Petr Ovtchenkov

Petr Ovtchenkov added the comment:

for 2.7 branch

--
versions: +Python 2.7
Added file: 
http://bugs.python.org/file42983/0001-Compilation-modules-for-foreign-target-platform.patch

___
Python tracker 

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



[issue27101] Compilation of python (modules) for foreign target platform problem.

2016-05-24 Thread Petr Ovtchenkov

Petr Ovtchenkov added the comment:

for 3.5 branch

--
Added file: 
http://bugs.python.org/file42982/0002-Compilation-ssl-module-for-foreign-target-platform.patch

___
Python tracker 

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



[issue27101] Compilation of python (modules) for foreign target platform problem.

2016-05-24 Thread Petr Ovtchenkov

Petr Ovtchenkov added the comment:

for 3.5 branch

--
Added file: 
http://bugs.python.org/file42981/0001-Compilation-modules-for-foreign-target-platform.patch

___
Python tracker 

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



[issue27101] Compilation of python (modules) for foreign target platform problem.

2016-05-24 Thread Petr Ovtchenkov

Changes by Petr Ovtchenkov :


Removed file: http://bugs.python.org/file42963/cpython.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-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +ronaldoussoren

___
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-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, the reap_children call is the culprit. I think resolving this problem is 
out of the scope of this simple issue (there is separate issue for this).

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue27111] redundant variables in long_add and long_sub

2016-05-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
stage:  -> patch review

___
Python tracker 

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



[issue27117] turtledemo does not work with IDLE's new dark theme.

2016-05-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



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

2016-05-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Hmm, don't know why my patch was not uploaded first time. It contained exactly 
what Victor said. Yes, we need to multiply or divide by 2 when convert from 
pointer difference to byte offset, but this doesn't affect performance. I think 
the next step is the change of the meaning of jump offsets and instruction 
numbers.

--
Added file: http://bugs.python.org/file42980/ushort2.patch

___
Python tracker 

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



[issue24235] ABCs don't fail metaclass instantiation

2016-05-24 Thread Luiz Poleto

Luiz Poleto added the comment:

This seems to be related to issues #5996 and #26306.

--
nosy: +luiz.poleto

___
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-24 Thread Luiz Poleto

Luiz Poleto added the comment:

Same as reported on issue #5996. Apparently this happens not only with tuple 
but with any builtin type.

There is a patch on that issue but there hasn't been any activity since 2011.

--
nosy: +luiz.poleto

___
Python tracker 

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



[issue27117] turtledemo does not work with IDLE's new dark theme.

2016-05-24 Thread Terry J. Reedy

New submission from Terry J. Reedy:

turtledemo imports IDLE's Percolator, ColorDelegator, and read-only text viewer 
and uses the first two to colorize demo text it loads into the text viewer.  
This works fine for traditional dark on white text color themes but not for 
IDLE's new white, etc, on dark theme (IDLE Dark).  The reason is that the text 
viewer was designed to display black on white text, not colorized  code.  
IDLE's editor tells tk how to display normal text.  The text view does not, so 
normal text is the default black on white.  The result is that special items 
are color on 'black' (dark blue actually) while normal text is black on white.  
The strange result can be viewed by selecting IDLE Dark in the preferences 
dialog and then selecting Help - Turtledemo or running 'python -m turtledemo' 
in a console.

The immediate workaround is for anyone running turtledemo to use a normal color 
theme, at least temporarily.  A longer-term solution might be to add a startup 
option to the text viewer to use the 'normal text' colors of the current theme.

--
messages: 266293
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: turtledemo does not work with IDLE's new dark theme.
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue27116] Documentation for regular expression alphanumeric matching are swapped. https://docs.python.org/2/library/re.html#regular-expression-syntax

2016-05-24 Thread Zachary Ware

Changes by Zachary Ware :


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



[issue27116] Documentation for regular expression alphanumeric matching are swapped. https://docs.python.org/2/library/re.html#regular-expression-syntax

2016-05-24 Thread Xiang Zhang

Xiang Zhang added the comment:

I don't think no need to swap. The current doc is right.

>>> re.findall(r'\W+', 'abcd123_#')
['#']
>>> re.findall(r'\w+', 'abcd123_#')
['abcd123_']

It's apparent that \w match alphanumeric and \W vice versa.

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue27116] Documentation for regular expression alphanumeric matching are swapped. https://docs.python.org/2/library/re.html#regular-expression-syntax

2016-05-24 Thread dananntang

New submission from dananntang:

https://docs.python.org/2/library/re.html#regular-expression-syntax
Section 7.2.1. Regular Expression Syntax

Documentation for \w and \W are wrong.
To be specific:
\w is to match any non-alphanumeric character, while \W is to match 
alphanumeric character

Fix: swap documentation for \w and \W

--
assignee: docs@python
components: Documentation
messages: 266291
nosy: dananntang, docs@python
priority: normal
severity: normal
status: open
title: Documentation for regular expression alphanumeric matching are swapped. 
https://docs.python.org/2/library/re.html#regular-expression-syntax
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



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

2016-05-24 Thread Demur Rumed

Demur Rumed added the comment:

There's some difficulty in changing next_instr to an unsigned short* unless 
pointer arithmetic converts it back to unsigned char*. Code relies on f_lasti 
to be a byte index more than it relies on f_lasti to be -1 at first. Should 
this change include converting jump offsets to word increments? This patch 
seeks to be a minimal change to achieve the desired aligned/batched memory read 
behavior of NEXTOP/NEXTARG. Perhaps a clear description of how deep the changes 
should be is in order

It's also a bit hard to assert pointer alignment without failling back to 
stdint's uintptr_t. It may be sufficient to assert f_lasti is an even number

--

___
Python tracker 

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



[issue27115] IDLE/tkinter: in simpledialog, != [OK] click

2016-05-24 Thread Terry J. Reedy

New submission from Terry J. Reedy:

On Win 10, Python 3.5 or 3.6, IDLE Shell or Editor with at least a few lines of 
text: hit Alt-G to open 'Goto' window.  Enter a line # other than the current 
one.  Hit .  Cursor moves to line enter, though it shrinks to one pixel 
wide from two pixels.  Line:col in status bar is updated.

Instead of hitting return, click [OK] button.  Same thing happens except that 
status bar line:col is NOT updated.  Here is relevant code in EditorWindow, 
about line 610

def goto_line_event(self, event):
text = self.text
lineno = tkSimpleDialog.askinteger("Goto",
"Go to line number:",parent=text)
text.mark_set("insert", "%d.0" % lineno)
text.see("insert")

Changing parent=text to parent=self.root makes no difference.  I have not yet 
tried simulating the interaction with button.invoke and 
event_generate('.

My guess is that one of the last two tk methods is supposed to generate a 
cursor moved event that is bound to a reset status bar function.  But somehow 
the previous click instead of keypress inhibits the event.  So this seems a tk 
bug.  Sethiy, what do you think?

The workaround for IDLE is to manually invoke a status bar update.

--
components: IDLE, Tkinter
messages: 266289
nosy: serhiy.storchaka, terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE/tkinter: in simpledialog,  != [OK] click
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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



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

2016-05-24 Thread Steve Dower

Steve Dower added the comment:

I'd appreciate at least one other person looking over my commit before I close 
this, just to confirm that the notes I added to the docs are fine.

--
stage:  -> commit review

___
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-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ac2a2534f793 by Steve Dower in branch 'default':
Issue #23026: winreg.QueryValueEx() now return an integer for REG_QWORD type. 
(Patch by hakril)
https://hg.python.org/cpython/rev/ac2a2534f793

--
nosy: +python-dev

___
Python tracker 

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



[issue27114] SSLContext._load_windows_store_certs fails with PermissionError

2016-05-24 Thread Steve Dower

Steve Dower added the comment:

Added a patch against 3.5 that handles PermissionError and warns about the 
failure.

I think this should be applied against 2.7, 3.5 and 3.6, and that it's 
unfortunately untestable (without adding extra API to force it to fail). Any 
concerns?

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file42979/27114_1.patch

___
Python tracker 

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



[issue27114] SSLContext._load_windows_store_certs fails with PermissionError

2016-05-24 Thread Steve Dower

New submission from Steve Dower:

In some restricted server scenarios, it is not possible to enumerate the 
Windows machine certificate store. A PermissionError is raised and the 
operation aborted.

Instead, we should simply return no certificates from 
_load_windows_store_certs. This will most likely cause the SSL request to fail 
(as the certificate cannot be verified), but it allows the use of SSL_CERT_FILE 
to use certificates from a local file. Without handling the PermissionError, it 
doesn't matter whether the environment variable is set or not - we simply fail 
every time.

--
assignee: steve.dower
components: Windows
messages: 266285
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: SSLContext._load_windows_store_certs fails with PermissionError
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue27110] smtpd.__all__ list is incomplete

2016-05-24 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On May 24, 2016, at 08:48 PM, R. David Murray wrote:

>Maybe we should blacklist MailmanProxy?  I think we are planning to deprecate
>it but just haven't yet done the work.  Looks fine otherwise.

It's probably not used much TBH.  aiosmtpd has a generic Proxy class.

--

___
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-24 Thread STINNER Victor

STINNER Victor added the comment:

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

I dislike this approach. I would prefer to use the unsigned short* type for 
next_instr, and put an assertion when next_instr is first assigned.

--

___
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-24 Thread Dave Sawyer

Changes by Dave Sawyer :


--
title: sqlite3 open parameter "check_same_thread" not documented -> 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



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

2016-05-24 Thread STINNER Victor

STINNER Victor added the comment:

> I'm pretty sure this is undefined behavior.

Are you talking about the exact C implementation, or the risk of unaligned 
memory accesses?

I suggest to add an assertion to ensure that the pointer is aligned to 16-bits.

--
nosy: +haypo

___
Python tracker 

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



[issue27113] sqlite3 open parameter "check_same_thread" not documented

2016-05-24 Thread Dave Sawyer

New submission from Dave Sawyer:

The sqlite3.connect method has 6 parameters. 5 of them are documented.  See 
below and search for "check_same_thread".  Patch adds documentation for this 
parameter.

sqlite3.connect(database[, timeout, detect_types, isolation_level, 
check_same_thread, factory, cached_statements])
Opens a connection to the SQLite database file database. You can use ":memory:" 
to open a database connection to a database that resides in RAM instead of on 
disk.

When a database is accessed by multiple connections, and one of the processes 
modifies the database, the SQLite database is locked until that transaction is 
committed. The timeout parameter specifies how long the connection should wait 
for the lock to go away until raising an exception. The default for the timeout 
parameter is 5.0 (five seconds).

For the isolation_level parameter, please see the Connection.isolation_level 
property of Connection objects.

SQLite natively supports only the types TEXT, INTEGER, REAL, BLOB and NULL. If 
you want to use other types you must add support for them yourself. The 
detect_types parameter and the using custom converters registered with the 
module-level register_converter() function allow you to easily do that.

detect_types defaults to 0 (i. e. off, no type detection), you can set it to 
any combination of PARSE_DECLTYPES and PARSE_COLNAMES to turn type detection on.

By default, the sqlite3 module uses its Connection class for the connect call. 
You can, however, subclass the Connection class and make connect() use your 
class instead by providing your class for the factory parameter.

Consult the section SQLite and Python types of this manual for details.

The sqlite3 module internally uses a statement cache to avoid SQL parsing 
overhead. If you want to explicitly set the number of statements that are 
cached for the connection, you can set the cached_statements parameter. The 
currently implemented default is to cache 100 statements.

--
assignee: docs@python
components: Documentation
files: doc_parm.patch
keywords: patch
messages: 266281
nosy: Dave Sawyer, docs@python
priority: normal
severity: normal
status: open
title: sqlite3 open parameter "check_same_thread" not documented
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file42978/doc_parm.patch

___
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-24 Thread R. David Murray

R. David Murray added the comment:

Look at your mimetypes patch, for example.   That if __name__='__main__' clause 
is all that is needed.  The test_main stuff can be dropped.

The question, I suppose, is the reap_children call, and that may be why it 
hasn't been converted yet.

--

___
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-24 Thread Demur Rumed

Demur Rumed added the comment:

There is no strict aliasing issues because aliasing is explicitly allowed for 
char buffers. The only issue is unaligned memory reads, but allocations are 
well aligned, so there'd have to be explicit work to allocate & then put code 
at an uneven offset. CPython never does this. This leaves the only issue being 
if a jump has an uneven jump offset. But jumping into the middle of an 
instruction is already undefined behavior because if I jump into a byte that 
happens to be BINARY_ADD on an empty stack it's undefined behavior. Jumping 
into the middle of an instruction thus falls under "Undefined behavior due to 
invalid bytecode"

tl;dr There is no undefined behavior given correct bytecode layout, & we 
already have undefined behavior given incorrect bytecode layout. PREDICT 
concerns may be valid; the solution there may be to have a PEEKOPARG which we 
can then check the short value before splitting it if the opcode portion matches

--

___
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-24 Thread Jacek Kołodziej

Jacek Kołodziej added the comment:

David, what do you mean by "new format"? Can you point me to some existing code?

--

___
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-24 Thread Jacek Kołodziej

Jacek Kołodziej added the comment:

Per Martin's request, I've created a few new issues for next batch of module's 
__all__ list updates:
* cgi: #27105
* configparser: #27106
* mailbox: #27107
* mimetypes: #27108
* plistlib: #27109
* smtpd: #27110
* tokenize: #27112

I've also looked at pydoc module, but I'm not sure what to do with it: `doc` 
function has only a brief docstring, it's not mentioned in docs at all. Should 
it really be in pydoc.__all__?

--

___
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-24 Thread Campbell Barton

Campbell Barton added the comment:

@serhiy.storchaka, while a properly working function that uses getrandbits 
isn't so complex, its not trivial either.

It needs to create smaller chunks and join them (also check zero size case 
which raises an error if passed).

eg:

```
def urandom_from_random(rng, length):
if length == 0:
return b''

import sys
chunk_size = 65535
chunks = []
while length >= chunk_size:
chunks.append(rng.getrandbits(chunk_size * 8).to_bytes(chunk_size, 
sys.byteorder))
length -= chunk_size
if length:
chunks.append(rng.getrandbits(length * 8).to_bytes(length, 
sys.byteorder))
result = b''.join(chunks)
return result
```

--

___
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-24 Thread Jacek Kołodziej

Changes by Jacek Kołodziej :


Removed file: http://bugs.python.org/file42972/smtpd_all.patch

___
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-24 Thread Jacek Kołodziej

New submission from Jacek Kołodziej:

That's a child issue of #23883, created to propose a patch fixing tokenize 
module's __all__ list.

Changes in tests go farther: I've changed import from

from tokenize import ...

to

import tokenize

and adjusted all its usages accordingly.

The module must be imported in order to test its __all__ list through 
test.support.check__all__ helper and just adding this single import would 
either force us to either do
* import tokenize as tokenize_module
* or from tokenize import tokenize as tokenize_function

I think going third way: with just "import tokenize" and changing its uses in 
the rest of tests result in celarer code, but of course I guess this may be too 
much for a single patch.

--
components: Library (Lib)
files: tokenize_all.patch
keywords: patch
messages: 266275
nosy: Unit03
priority: normal
severity: normal
status: open
title: tokenize.__all__ list is incomplete
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file42976/tokenize_all.patch

___
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-24 Thread Jacek Kołodziej

Changes by Jacek Kołodziej :


Added file: http://bugs.python.org/file42977/smtpd_all.patch

___
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-24 Thread R. David Murray

R. David Murray added the comment:

LGTM

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



[issue27107] mailbox.__all__ list is incomplete

2016-05-24 Thread R. David Murray

R. David Murray added the comment:

Rather than adding the new class to the list of tests, we could take this 
opportunity to convert this test file to the new format, unless there's some 
reason that doesn't work (I don't expect there to be).

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



[issue27110] smtpd.__all__ list is incomplete

2016-05-24 Thread R. David Murray

R. David Murray added the comment:

Maybe we should blacklist MailmanProxy?  I think we are planning to deprecate 
it but just haven't yet done the work.  Looks fine otherwise.

--
components: +email
nosy: +barry, r.david.murray

___
Python tracker 

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



[issue27111] redundant variables in long_add and long_sub

2016-05-24 Thread Oren Milman

Changes by Oren Milman :


Added file: http://bugs.python.org/file42975/CPythonTestOutput.txt

___
Python tracker 

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



[issue27111] redundant variables in long_add and long_sub

2016-05-24 Thread Oren Milman

Changes by Oren Milman :


Added file: http://bugs.python.org/file42974/patchedCPythonTestOutput.txt

___
Python tracker 

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



[issue27111] redundant variables in long_add and long_sub

2016-05-24 Thread Oren Milman

New submission from Oren Milman:

 the proposed changes 
In Objects/longobject.c in long_add and long_sub, the variables 'result' and 
'r' (respectively), are used only once, and don't seem to make the code any 
clearer.

It seems the 'result' and 'r' variables were added in revision 40751. Back 
then, CONVERT_BINOP was used, and required calling Py_DECREF for a and b before 
returning.
Later on, in revision 43313, CONVERT_BINOP was removed, along with the calls to 
Py_DECREF it required, but the 'result' and 'r' variables were left untouched, 
and remained there to this day.


 diff 
The patches diff is attached.


 tests 
I built the patched CPython for x86, and played with it a little. Everything 
seemed to work as usual.

In addition, I ran 'python -m test' (on my 64-bit Windows 10) before and after 
applying the patch, and got quite the same output.
the outputs of both runs are attached.

--
components: Interpreter Core
files: proposedPatches.diff
keywords: patch
messages: 266271
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: redundant variables in long_add and long_sub
versions: Python 3.6
Added file: http://bugs.python.org/file42973/proposedPatches.diff

___
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-24 Thread Jacek Kołodziej

New submission from Jacek Kołodziej:

That's a child issue of #23883, created to propose a patch fixing smtpd 
module's __all__ list.

--
components: Library (Lib)
files: smtpd_all.patch
keywords: patch
messages: 266270
nosy: Unit03
priority: normal
severity: normal
status: open
title: smtpd.__all__ list is incomplete
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file42972/smtpd_all.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-24 Thread Jacek Kołodziej

New submission from Jacek Kołodziej:

That's a child issue of #23883, created to propose a patch fixing plistlib 
module's __all__ list.

--
components: Library (Lib)
files: plistlib_all.patch
keywords: patch
messages: 266269
nosy: Unit03
priority: normal
severity: normal
status: open
title: plistlib.__all__ list is incomplete
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file42971/plistlib_all.patch

___
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-24 Thread Jacek Kołodziej

New submission from Jacek Kołodziej:

That's a child issue of #23883, created to propose a patch fixing mimetypes 
module's __all__ list.

--
components: Library (Lib)
files: mimetypes_all.patch
keywords: patch
messages: 266268
nosy: Unit03
priority: normal
severity: normal
status: open
title: mimetypes.__all__ list is incomplete
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file42970/mimetypes_all.patch

___
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-24 Thread Jacek Kołodziej

New submission from Jacek Kołodziej:

That's a child issue of #23883, created to propose a patch fixing mailbox 
module's __all__ list.

--
components: Library (Lib)
files: mailbox_all.patch
keywords: patch
messages: 266267
nosy: Unit03
priority: normal
severity: normal
status: open
title: mailbox.__all__ list is incomplete
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file42969/mailbox_all.patch

___
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-24 Thread Jacek Kołodziej

New submission from Jacek Kołodziej:

That's a child issue of #23883, created to propose a patch fixing configparser 
module's __all__ list.

--
components: Library (Lib)
files: configparser_all.patch
keywords: patch
messages: 266266
nosy: Unit03
priority: normal
severity: normal
status: open
title: configparser.__all__ is incomplete
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file42968/configparser_all.patch

___
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-24 Thread Jacek Kołodziej

New submission from Jacek Kołodziej:

That's a child issue of #23883, created to propose a patch fixing cgi module's 
__all__ list.

--
components: Library (Lib)
files: cgi_all.patch
keywords: patch
messages: 266265
nosy: Unit03
priority: normal
severity: normal
status: open
title: cgi.__all__ is incomplete
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file42967/cgi_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-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I hope following patch is free from undefined behavior.

--

___
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-24 Thread Adrian Wielgosik

Adrian Wielgosik added the comment:

I'm pretty sure this is undefined behavior. Here's how similar code was fixed 
in Chromium:

https://codereview.chromium.org/9117014/patch/1/2

--
nosy: +Adrian Wielgosik

___
Python tracker 

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



[issue27104] enable-framework

2016-05-24 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution: rejected -> not a bug
stage:  -> resolved

___
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-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Using Raymond's microbenchmark from issue25823:

$ ./python.exe exercise_oparg.py
Unpatched:  0.8331978429996525
Patched:0.7600522060020012

Pybench exposes 7% speed up (detailed report is attached).

--
Added file: http://bugs.python.org/file42966/pybench-diff.txt

___
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-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What if change the type of next_instr to unsigned short*? This would guarantee 
that the read is aligned since the start of code data is aligned.

I have small doubt about PREDICT(). I doubt that the compiler is smart enough 
to infer that *next_instr and *(unsigned short*)next_instr & 255 is the same. 
It can do unneeded work. I don't know whether this have negative effect.

--

___
Python tracker 

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



[issue14196] Unhandled exceptions in pdb return value display

2016-05-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Georg, if you agree that Xavier's analysis is correct, we can close this as not 
a bug.

--
nosy: +georg.brandl, terry.reedy

___
Python tracker 

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



[issue24511] Add methods for async protocols

2016-05-24 Thread mdcb

Changes by mdcb :


--
nosy: +mdcb...@gmail.com

___
Python tracker 

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



[issue24510] Make _PyCoro_GetAwaitableIter a public API

2016-05-24 Thread mdcb

Changes by mdcb :


--
nosy: +mdcb...@gmail.com

___
Python tracker 

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



[issue27083] PYTHONCASEOK is ignored on Windows

2016-05-24 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> brett.cannon

___
Python tracker 

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



[issue27059] find_spec and find_loader ignore package/path argument

2016-05-24 Thread Brett Cannon

Brett Cannon added the comment:

https://docs.python.org/3.6/library/importlib.html#examples has an Examples 
section that's new to the Python 3.6 docs which covers your use-case.

--

___
Python tracker 

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



[issue27104] enable-framework

2016-05-24 Thread Alexandra Beebe

Alexandra Beebe added the comment:

Never mind... User error.

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



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

2016-05-24 Thread Mark Dickinson

Mark Dickinson added the comment:

> has undefined behaviour, according to the C standards.

I retract this; I'm no longer convinced this is true. Sorry for the noise.

--

___
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-24 Thread Mark Dickinson

Mark Dickinson added the comment:

This assignment:

oparg = *(unsigned short*)next_instr

has undefined behaviour, according to the C standards. I'm not sure it's a good 
idea to introduce this into the core.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue27104] enable-framework

2016-05-24 Thread Alexandra Beebe

New submission from Alexandra Beebe:

When trying to build a framework on osx getting this error during install.

Mage:Python-3.4.4 alexandra$ sudo make install
Password:
Creating directory 
/Library/Frameworks/Python.framework/Versions/3.4/Resources/English.lproj
Creating directory /Library/Frameworks/Python.framework/Versions/3.4/lib
ln -fsn include/python3.4m 
/Library/Frameworks/Python.framework/Versions/3.4/Headers
sed 's/%VERSION%/'"`DYLD_FRAMEWORK_PATH=/Volumes/RAM/Python-3.4.4 ./python.exe 
-c 'import platform; print(platform.python_version())'`"'/g' < 
Mac/Resources/framework/Info.plist > 
/Library/Frameworks/Python.framework/Versions/3.4/Resources/Info.plist
sed: 1: "s/%VERSION%/3.4.4
PyMod ...": unescaped newline inside substitute pattern
make: *** [frameworkinstallstructure] Error 1

--
components: Installation, Macintosh
messages: 266255
nosy: alexandra.be...@gmail.com, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: enable-framework
type: compile error
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



[issue7159] Urllib2 authentication memory.

2016-05-24 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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

___
Python tracker 

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



[issue27103] regrtest: capture stdout (-W) option is incompatible with refleak hunter (-R)

2016-05-24 Thread STINNER Victor

New submission from STINNER Victor:

The -R option of regrtest replaces sys.stdout with a io.StringIO object. 
Problem: the refleak are hunted after stdout is replaced, and so each print() 
increaes the total reference counter which is seen as a leak.

Example:

$ cat Lib/test/test_noop.py 
"noop"

$ ./python -u -m test -R 3:3 -W test_noop 
Run tests sequentially
0:00:00 [1/1] test_noop

--
Ran 0 tests in 0.000s

OK
beginning 6 repetitions
123456

--
Ran 0 tests in 0.000s

OK
.
(...)
test_noop leaked [9, 9, 9] references, sum=27
test_noop failed
1 test failed:
test_noop
Total duration: 0:00:01

--
components: Tests
messages: 266254
nosy: haypo
priority: normal
severity: normal
status: open
title: regrtest: capture stdout (-W) option is incompatible with refleak hunter 
(-R)
versions: Python 3.6

___
Python tracker 

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



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

2016-05-24 Thread Zachary Ware

Zachary Ware added the comment:

Clement Rouault added the comment:
> Stated as you did, it makes sens. Should the change of return type be 
> acknowledged somewhere in the documentation ?

Yes, it should be mentioned in Doc/whatsnew/3.6.rst and probably also
somewhere in Doc/library/winreg.rst

--

___
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-24 Thread Clement Rouault

Clement Rouault added the comment:

Stated as you did, it makes sens. Should the change of return type be 
acknowledged somewhere in the documentation ?

--

___
Python tracker 

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



[issue27102] Spam

2016-05-24 Thread Zachary Ware

Changes by Zachary Ware :


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

___
Python tracker 

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



[issue27102] Spam

2016-05-24 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy:  -cerberos
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
title: nice story -> Spam

___
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-24 Thread Upendra Kumar

Upendra Kumar added the comment:

3. Detecting Virtual Environment

Virtual environment can be detected using pip module :

from pip.locations import running_under_virtualenv

if running_under_virtualenv():
  #If user provided path for virtual environment, evrything okay
else:
  #Prompt for error

--

___
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-24 Thread Upendra Kumar

Upendra Kumar added the comment:

2. Detecting different versions of Python installed :


For Windows :

It is explained in PEP 514 by Steve Dower. 

Windows has registry keys which can be accessed by winreg or _winreg module.

Priority of registry keys :
HKEY_CURRENT_USER > HKEY_LOCAL_MACHINE

On 64 bit Windows there is another registry key for 32 bit programs,
HKEY_LOCAL_MACHINE\Software\Wow6432Node

Therefore using registry keys we can know about Python packages installed by 
enumerating on :

1. HKEY_CURRENT_USER\Software\Python\\\
2. HKEY_LOCAL_MACHINE\Software\Python\\\
3. HKEY_LOCAL_MACHINE\Wow6432Node\Python\\\

 will tell the version number of Python, and in  key there 
are two more subkeys which will tell the location of Python executable :

1. 
2. 




For Linux :

We can find Python installations in /usr/bin/pythonXYZ




For MAC OS :

It can be searched for in 

/Library/Frameworks/
/System/Library/Frameworks

If Python was installed by Homebrew :

Then the location can be in 
/usr/local

--

___
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-24 Thread Upendra Kumar

Upendra Kumar added the comment:

These are some of the code parts which may be necessary :

1. Code for identification of OS

from sys import platform

if platform.startswith("linux"):
#linux
elif platform == "darwin":
#mac os x
else platform == "win32":
# Windows

--

___
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-24 Thread Steve Dower

Steve Dower added the comment:

Changing a return value type without notice certainly can't go into a 
maintenance release. I'd assumed an extra import too, but since it's 
transparent this is 3.6 only (definitely not a security fix, so 2.7 isn't up 
for discussion).

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



[issue7159] Urllib2 authentication memory.

2016-05-24 Thread Brad Olson

Brad Olson added the comment:

Yes, Go ahead. Thanks.

On Tue, May 24, 2016 at 1:56 AM, Terry J. Reedy 
wrote:

>
> Terry J. Reedy added the comment:
>
> Should this be closed?  A substantial patch was pushed year ago and I see
> no indication of further issue.
>
> --
> nosy: +terry.reedy
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue27095] Simplify MAKE_FUNCTION

2016-05-24 Thread Demur Rumed

Demur Rumed added the comment:

May've been best to wait on posting a patch, but long weekend yesterday made 
time available

mkfu3 updates mkfu2 with wordcode. Includes fix to EXTENDED_ARG documentation

--
Added file: http://bugs.python.org/file42965/mkfu3.patch

___
Python tracker 

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



[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-24 Thread R. David Murray

R. David Murray added the comment:

Agreed.  Time to close the issue.  If someone wants to do actual testing as 
Raymond suggests, and finds a name that actually works, they can either reopen 
this with a report or open a new issue.

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

___
Python tracker 

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



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

2016-05-24 Thread Paul Moore

Paul Moore added the comment:

Hmm, OK. So code that currently needs to access QWORD values and decodes the 
bytes returned would be broken by this change. Equally it is possible (albeit 
not ideal) to get the data out with the current behaviour.

I can't judge how likely it is that anyone has written code like this - 
personally, I'd prefer not to take the risk. But if someone else feels I'm 
being over-cautious, that's fine.

--

___
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-24 Thread Clement Rouault

Clement Rouault added the comment:

My comment was about the behavior of `winreg.QueryValueEx`. The current 
behavior is:

>>> import winreg
>>> tstkey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, "TestKey")
>>> winreg.QueryValueEx(tstkey, "MYDWORD") # a REG_DWORD value
(16909060, 4)
>>> winreg.QueryValueEx(tstkey, "MYQWORD") # a REG_QWORD value
(b'\x08\x07\x06\x05\x04\x03\x02\x01', 11)

With this patch the new behavior would be:

>>> winreg.QueryValueEx(tstkey, "MYQWORD") # a REG_QWORD value
(72623859790382856, 11)

I agree that exposing REG_QWORD is a new feature.

--

___
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-24 Thread Paul Moore

Paul Moore added the comment:

I'm not sure I follow your comment. In Python 3.5,

>>> from winreg import REG_QWORD
Traceback (most recent call last):
  File "", line 1, in 
ImportError: cannot import name 'REG_QWORD'

So exposing REG_QWORD from the winreg module would be a change in behaviour, 
not a bug fix.

--

___
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-24 Thread STINNER Victor

STINNER Victor added the comment:

> New changeset 3a57eafd8401 by Serhiy Storchaka in branch 'default':
> Issue #26647: Python interpreter now uses 16-bit wordcode instead of bytecode.
> https://hg.python.org/cpython/rev/3a57eafd8401

Yeah, congrats Demur!

--

___
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-24 Thread Clement Rouault

Clement Rouault added the comment:

I would like to discuss the fact that this patch is a new feature.

In the current state, CPython handles the `REG_QWORD` type as an unkown type 
and returns the raw registry value: a string of size 8.
In my opinion this behavior does not match the Windows documentation 
(REG_QWORD: A 64-bit number)
or CPython's own behavior regarding REG_DWORD that returns a Python `int` (more 
important).

Is this enough to consider this a bugfix ? and therefore port it to 2.7 ?

--

___
Python tracker 

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



[issue27091] Python IDLE doesn't like 

2016-05-24 Thread Eryk Sun

Changes by Eryk Sun :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> IDLE crashes when pasting non-BMP unicode char on Py3

___
Python tracker 

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



[issue27091] Python IDLE doesn't like 

2016-05-24 Thread Christian Kleineidam

Christian Kleineidam added the comment:

My version is: Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:16:59) [MSC 
v.1900 32 bit (Intel)] on win32

Yes, I think the issue is likely a dublicate of 
http://bugs.python.org/issue13153

--

___
Python tracker 

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



[issue26915] Test identity first in membership operation of ItemsView, ValuesView and Sequence in collections.abc

2016-05-24 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: rhettinger -> 

___
Python tracker 

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



[issue26971] python v3.5.1: sys.paths not respecting DESTDIRS and DESTSHARED

2016-05-24 Thread Johannes S.

Johannes S. added the comment:

I tried it again and I also tried 3.6.0a1 now. 3.6.0a1 has the issue as well. I 
have downloaded the tarballs from 
https://www.python.org/downloads/release/python-351/ and 
https://www.python.org/downloads/release/python-360a1/.

I have run it on my Laptop (Arch Linux) now. The issue did *not* occur there. 
But I discovered that I can trigger a similar issue by specifying the libdir 
explicitly with

`../configure --prefix="/some/dir" --libdir="/some/dir/lib64"`.

I thing it would be reasonable to assume that both issues are related.

--
versions: +Python 3.6

___
Python tracker 

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



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

2016-05-24 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +tim.peters

___
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-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

$ ./python -m timeit -s 'from os import urandom' 'urandom(100)'
10 loops, best of 3: 132 msec per loop
$ ./python -m timeit -s 'from random import getrandbits' 'n = 100; 
getrandbits(n*8).to_bytes(n, "little")'
100 loops, best of 3: 14.1 msec per loop

With the purposed method this can be up to 3.4 times faster, but as I said in 
issue27072, I don't think API growing is worth the benefit.

--
assignee:  -> rhettinger
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-24 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Further churning of the names will cause more harm than good.  I recommend 
closing this (to end the bike-shedding and the stream of superlatives from the 
OP).  This ship has sailed and users are already relying on the published API.

Foord: "In the absence of a *dramatically* better name leave it alone."
Storchaka: "I vote for status quo."
Murray:  "I say leave well enough alone unless someone comes up with a simply 
brilliant better name."
Smith: "I'm not against adding a new name if it makes glorious sense, but we 
should not remove the old names from unittest as that causes unnecessary pain 
(based on past experience)."

FWIW, most of the suggestions in this issue would not help with a "never read 
the docs, just reading the code" kind of user.  Without biasing the result,  
ask other Python user's to guess what "assertItemsEqual" or 
"assertElementsEqual" do, and see whether they correctly deduce that it tests 
the equality of two unordered multisets formed from two input iterables.

--

___
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-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh, I forgot to add a note in What's New. And the documentation of the dis 
module should be updated (EXTENDED_ARG etc). Could anyone do this?

--
stage: commit review -> needs 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-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage:  -> patch review
Added file: http://bugs.python.org/file42964/ushort.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-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



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

2016-05-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3a57eafd8401 by Serhiy Storchaka in branch 'default':
Issue #26647: Python interpreter now uses 16-bit wordcode instead of bytecode.
https://hg.python.org/cpython/rev/3a57eafd8401

--

___
Python tracker 

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



[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-05-24 Thread Nick Coghlan

Nick Coghlan added the comment:

As Jonathan notes, the cause for confusion here is that we currently retrieve 
the attributes in the opposite order from the way we execute them, prompting 
the "Why is it looking for __exit__ first?", "Oh, __enter__ must be optional, 
so it didn't care that it was missing" train of thought.

If I recall correctly, rather than stemming from any particular design 
principle, the current behaviour is an artifact of the initial implementation 
that didn't use any dedicated opcodes: since CPython uses a stack-based VM, we 
needed __enter__ to be above __exit__ on the stack, and the most efficient way 
to achieve that was to do the attribute lookups in the reverse order of 
invocation.

When SETUP_WITH was introduced, that original method lookup ordering (and 
associated error message precedence) was preserved, even though the technical 
rationale for that ordering no longer applied.

Given that, I don't see any problem with switching the lookup order now, and I 
agree that should be less confusing, given that the most obvious explanation 
for getting an error message about __enter__ when both are missing is that the 
interpreter tries to call __enter__ before it tries to do anything with 
__exit__. (That intuitive explanation still isn't 100% accurate, but it's 
closer than thinking __enter__ is optional)

--

___
Python tracker 

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