[issue28000] Build fails on AIX with _LINUX_SOURCE_COMPAT flag

2016-09-07 Thread Martin Panter

Martin Panter added the comment:

Would it be appropriate to always build with _LINUX_SOURCE_COMPAT enabled or 
disabled? Or is there a disadvantage (e.g. compatibility with different AIX 
versions, or less functionality?)

Do you know if this would also be applicable to 2.7?

--
nosy: +martin.panter
stage:  -> patch review
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



[issue27895] Spelling fixes

2016-09-07 Thread Martin Panter

Changes by Martin Panter :


--
versions: +Python 2.7, Python 3.5

___
Python tracker 

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



[issue27993] In the argparse there are typos with endings in plural words

2016-09-07 Thread Martin Panter

Martin Panter added the comment:

Thanks for the patch. I found a few more related instances to fix too.

--
nosy: +martin.panter
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 2.7, Python 3.5

___
Python tracker 

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



[issue27895] Spelling fixes

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9a68ab141c33 by Martin Panter in branch '2.7':
Issue #27895:  Spelling fixes (Contributed by Ville Skyttä).
https://hg.python.org/cpython/rev/9a68ab141c33

--

___
Python tracker 

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



[issue27570] Avoid memcpy(. . ., NULL, 0) etc calls

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d465da1e5902 by Martin Panter in branch '2.7':
Issue #27570: Avoid zero-length memcpy() calls with null source pointers
https://hg.python.org/cpython/rev/d465da1e5902

--

___
Python tracker 

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



[issue27993] In the argparse there are typos with endings in plural words

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c07aadf9f5cb by Martin Panter in branch '2.7':
Issue #27993: Fix problems with the plural “objects” in docs and comments
https://hg.python.org/cpython/rev/c07aadf9f5cb

--

___
Python tracker 

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



[issue26359] CPython build options for out-of-the box performance

2016-09-07 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 

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



[issue26307] no PGO for built-in modules with `make profile-opt`

2016-09-07 Thread Gregory P. Smith

Gregory P. Smith added the comment:

My change means that the build/ directory tree exists but won't have any files 
other than *.gc?? files in it after a make clean.  I doubt this will bother 
anyone.  That felt better for clean than just avoiding the removal of build/ 
entirely.

--
resolution:  -> fixed
stage: needs patch -> commit review
status: open -> closed

___
Python tracker 

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



[issue15578] Crash when modifying sys.modules during import

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 731e5617cc8d by Gregory P. Smith in branch '2.7':
Fix placement of Misc/NEWS item for issue #15578.
https://hg.python.org/cpython/rev/731e5617cc8d

--

___
Python tracker 

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



[issue18844] allow weights in random.choice

2016-09-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Using a generator doesn't prevents state to be saved and restored.

--

___
Python tracker 

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



[issue28013] PPC64 Fedora socket and ssl compile failure

2016-09-07 Thread Martin Panter

Martin Panter added the comment:

Looks like enabling C99 is the trigger. This is an old bug with the bluetooth 
header (or at least a regression triggered by an old patch, I haven’t followed 
the whole story):
https://marc.info/?i=CAOcK=cpahp-zbuwopa3yb0zcampwqgujzqcp+ktpjrx6tkd...@mail.gmail.com

--

___
Python tracker 

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



[issue28014] Strange interaction between methods in subclass of C OrderedDict

2016-09-07 Thread Zachary Ware

Changes by Zachary Ware :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> KeyError thrown by optimised collections.OrderedDict.popitem()

___
Python tracker 

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



[issue27275] KeyError thrown by optimised collections.OrderedDict.popitem()

2016-09-07 Thread Zachary Ware

Zachary Ware added the comment:

Attaching test case from #28014 here since this issue looks close enough to 
that one to be caused by the same thing.

--
nosy: +zach.ware
Added file: http://bugs.python.org/file44459/simple_lru.py

___
Python tracker 

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



[issue28014] Strange interaction between methods in subclass of C OrderedDict

2016-09-07 Thread Xiang Zhang

Xiang Zhang added the comment:

Please see issue27275. Someone has already complained about this. And I think 
the cause is the gap between Pure Python implementation and C implementation 
when it comes to subclasses.

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue26798] add BLAKE2 to hashlib

2016-09-07 Thread Martin Panter

Martin Panter added the comment:

Seems the test fails if the installed Python tree is not writable:
http://buildbot.python.org/all/builders/x86%20Gentoo%20Installed%20with%20X%203.x/builds/1005/steps/test/logs/stdio
==
ERROR: test_blake2b_vectors (test.test_hashlib.HashLibTestCase)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.6/test/test_hashlib.py",
 line 537, in test_blake2b_vectors
for msg, key, md in read_vectors('blake2b'):
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.6/test/test_hashlib.py",
 line 50, in read_vectors
with support.open_urlresource(URL.format(hash_name)) as f:
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.6/test/support/__init__.py",
 line 1061, in open_urlresource
with open(fn, "wb") as out:
PermissionError: [Errno 13] Permission denied: 
'/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.6/test/data/blake2b.txt'

==
ERROR: test_blake2s_vectors (test.test_hashlib.HashLibTestCase)

--

___
Python tracker 

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



[issue28014] Strange interaction between methods in subclass of C OrderedDict

2016-09-07 Thread Zachary Ware

New submission from Zachary Ware:

I'm not certain that the implementation of this subclass of OrderedDict is 
actually sane, but it works in 3.4 and fails in 3.5+.

The buggy implementation:

class SimpleLRUCache(OrderedDict):

def __init__(self, size):
super().__init__()
self.size = size

def __getitem__(self, item):
value = super().__getitem__(item)
self.move_to_end(item)
return value

def __setitem__(self, key, value):
while key not in self and len(self) >= self.size:
self.popitem(last=False)
super().__setitem__(key, value)
self.move_to_end(key)


When trying to add a new item after `size` items are already in the cache, it 
will throw a KeyError with the key of the item in the oldest position.  
Something like:

>>> s = SimpleLRUCache(2)
>>> s['t1'] = 1
>>> s['t2'] = 2
>>> s['t2'] # gives 2, properly moves 2 to the end
>>> s['t3'] = 3

Traceback (most recent call last):
  File "", line 1, in 
  File "simple_lru.py", line 14, in __setitem__
self.popitem(last=False)
  File "simple_lru.py", line 9, in __getitem__
self.move_to_end(item)
KeyError: 't3'


I can work around the failure by implementing __getitem__ as follows:

def __getitem__(self, item):
value = super().__getitem__(item)
del self[item]
self[item] = value
return value

Attached is a script with a couple of tests that pass with 3.4 and fail with 
3.5+.

--
files: simple_lru.py
messages: 274959
nosy: eric.snow, zach.ware
priority: normal
severity: normal
status: open
title: Strange interaction between methods in subclass of C OrderedDict
type: behavior
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file44458/simple_lru.py

___
Python tracker 

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



[issue28013] PPC64 Fedora socket and ssl compile failure

2016-09-07 Thread Benjamin Peterson

Benjamin Peterson added the comment:

It's strange because it seems to imply the system headers are
syntatically invalid.

--

___
Python tracker 

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



[issue28013] PPC64 Fedora socket and ssl compile failure

2016-09-07 Thread Martin Panter

New submission from Martin Panter:

First build that failed is 
. 
Sample of the error messages:

In file included from /usr/include/bluetooth/bluetooth.h:37:0,
 from 
/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Modules/socketmodule.h:58,
 from 
/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Modules/socketmodule.c:321:
/usr/include/bluetooth/bluetooth.h: In function ‘bt_get_le64’:
/usr/include/bluetooth/bluetooth.h:238:18: error: expected 
specifier-qualifier-list before ‘typeof’
  return bswap_64(bt_get_unaligned((const uint64_t *) ptr));
  ^
/usr/include/bluetooth/bluetooth.h:238:18: error: called object is not a 
function or function pointer
  return bswap_64(bt_get_unaligned((const uint64_t *) ptr));
  ^
/usr/include/bluetooth/bluetooth.h:238:18: error: ‘struct ’ has no 
member named ‘__v’
  return bswap_64(bt_get_unaligned((const uint64_t *) ptr));
  ^

Benjamin, the commits leading up to this include a lot of your C99 changes, so 
I added you, but I don’t have any definitive proof it’s your fault :)

--
components: Extension Modules
keywords: buildbot
messages: 274957
nosy: benjamin.peterson, martin.panter
priority: normal
severity: normal
status: open
title: PPC64 Fedora socket and ssl compile failure
type: compile error
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



[issue28012] Spam

2016-09-07 Thread Berker Peksag

Changes by Berker Peksag :


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

___
Python tracker 

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



[issue28012] Spam

2016-09-07 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy:  -gukaar77
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
title: meditation -> Spam

___
Python tracker 

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



[issue28012] meditation

2016-09-07 Thread Gukas Artunyan

New submission from Gukas Artunyan:

Hi! 

Here are some of my meditations on life and art, please read them and tell me 
what you  think, here is the link 

My best to you, gukaar77

--
messages: 274956
nosy: gukaar77
priority: normal
severity: normal
status: open
title: meditation

___
Python tracker 

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



[issue28011] winreg KEY_READ also fails for some keys

2016-09-07 Thread Pabitra

Pabitra added the comment:

Same applies for Python 3.5 as well.

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



[issue27985] Implement PEP 526

2016-09-07 Thread Guido van Rossum

Guido van Rossum added the comment:

Oh, dang, I misread the definition of _ClassVar. It's fine then!
Looking forward to the next installment.

--

___
Python tracker 

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



[issue15578] Crash when modifying sys.modules during import

2016-09-07 Thread Eric Snow

Changes by Eric Snow :


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

___
Python tracker 

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



[issue15578] Crash when modifying sys.modules during import

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2d6dd8402d77 by Eric Snow in branch '2.7':
Issue #15578: Correctly incref the parent module while importing.
https://hg.python.org/cpython/rev/2d6dd8402d77

--
nosy: +python-dev

___
Python tracker 

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



[issue22555] Tracking issue for adjustments to binary/text boundary handling

2016-09-07 Thread Nick Coghlan

Nick Coghlan added the comment:

Likely to be resolved, or at least significantly updated, for 3.6 due to PEP 
528 and PEP 529:


* Using sys.stdin consistently at the default interactive prompt: issue 1602
* Improved Unicode handling in the Windows console: issue 17620
* Allowing text encoding and error handling to be specified in subprocess 
module APIs: issue 6135

New change landing in 3.6:

* Changing the Windows default encoding to UTF-8 to better match bytes handling 
conventions on *nix systems: issue 27781


Likely deferred to 3.7:

* providing a way to change the encoding of an existing stream: issue 15216
* utilities for clearing out surrogates from strings: issue 18814
* treating "wsgistr" as a serialisation format: issue 22264
* defining a formatting mini-language for hex output: issue 22385

--
dependencies: +Change sys.getfilesystemencoding() on Windows to UTF-8, 
subprocess seems to use local encoding and give no choice

___
Python tracker 

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



[issue27364] Deprecate invalid escape sequences in str/bytes

2016-09-07 Thread Emanuel Barry

Changes by Emanuel Barry :


Added file: 
http://bugs.python.org/file44457/invalid_stdlib_escapes_3_rebased_2.patch

___
Python tracker 

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



[issue28011] winreg KEY_READ also fails for some keys

2016-09-07 Thread Pabitra

New submission from Pabitra:

UAC does not give KEY_ALL_ACCESS on various keys, that's a know fact. But, 
KEY_READ access also throws WindowsError: [Error 5] Access is denied for few 
keys.

Out of all the keys in HKEY_USERS, I am trying to access, "S-1-5-18",  
"S-1-5-19" and  "S-1-5-20". Openkey() with KEY_READ works fine for "S-1-5-18". 
However for "S-1-5-19" and  "S-1-5-20" it fails (even if I use KEY_READ access).

Then how can I read the values for those specific keys, if KEY_READ also shows 
access denied?

--
components: Windows
files: Winreg.jpg
messages: 274951
nosy: pabitra, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: winreg KEY_READ also fails for some keys
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file44456/Winreg.jpg

___
Python tracker 

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



[issue15352] importlib.h should be regenerated when the marshaling code changes

2016-09-07 Thread Eric Snow

Eric Snow added the comment:

Thanks for the patch Meador.

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

___
Python tracker 

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



[issue15352] importlib.h should be regenerated when the marshaling code changes

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 344f44bd793f by Eric Snow in branch 'default':
Issue #15352: Rebuild frozen modules when marshal.c is changed.
https://hg.python.org/cpython/rev/344f44bd793f

--
nosy: +python-dev

___
Python tracker 

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



[issue24277] Take the new email package features out of provisional status

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d82927c18931 by R David Murray in branch 'default':
#24277: Fix some incorrect backslashes in email example.
https://hg.python.org/cpython/rev/d82927c18931

--

___
Python tracker 

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



[issue6721] Locks in the standard library should be sanitized on fork

2016-09-07 Thread Davin Potts

Changes by Davin Potts :


--
nosy: +davin

___
Python tracker 

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



[issue24277] Take the new email package features out of provisional status

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ad297312a478 by R David Murray in branch 'default':
#24277: Fix 3.4 whats new link broken by email doc changes.
https://hg.python.org/cpython/rev/ad297312a478

--

___
Python tracker 

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



[issue26667] Update importlib to accept pathlib.Path objects

2016-09-07 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> fixed
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



[issue26667] Update importlib to accept pathlib.Path objects

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1a36cf6389d8 by Brett Cannon in branch 'default':
Issue #26667: Add path-like object support to importlib.util.
https://hg.python.org/cpython/rev/1a36cf6389d8

--
nosy: +python-dev

___
Python tracker 

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



[issue17211] pkgutil.iter_modules and walk_packages should return a namedtuple

2016-09-07 Thread Eric Snow

Eric Snow added the comment:

I've applied the patch with a couple small changes.  Thanks for the help!

--
nosy: +eric.snow
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[issue17211] pkgutil.iter_modules and walk_packages should return a namedtuple

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4f023e60564b by Eric Snow in branch 'default':
Issue #17211: Yield a namedtuple in pkgutil.
https://hg.python.org/cpython/rev/4f023e60564b

--
nosy: +python-dev

___
Python tracker 

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



[issue28007] Bad .pyc files prevent import of otherwise valid .py files.

2016-09-07 Thread R. David Murray

R. David Murray added the comment:

That makes sense to me as a use case for warnings only.

--

___
Python tracker 

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



[issue28007] Bad .pyc files prevent import of otherwise valid .py files.

2016-09-07 Thread Nick Coghlan

Nick Coghlan added the comment:

I run into this kind of problem when switching back and forth between running 
things directly on my laptop and running them as a mounted volume in a 
container, since the permissions and SELinux labels on the cache can get messed 
up.

However, in those cases, writing back to the cache will also fail (since it's a 
"those are not your files, hands off" permissions problem).

So I'd be a fan of downgrading problems with the .pyc cache to warnings in 
general - if we read it and that fails, OK, we'll revert to using the source. 
If we try to write it, and that fails, well that's potentially OK too - writing 
to the cache is to speed up the *next* invocation of the module, and whether or 
not we actually care about that is going to be situational.

--

___
Python tracker 

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



[issue24277] Take the new email package features out of provisional status

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bd5b38e3db1a by R David Murray in branch 'default':
#24277: What's New and news entries for previous commit.
https://hg.python.org/cpython/rev/bd5b38e3db1a

--

___
Python tracker 

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



[issue24277] Take the new email package features out of provisional status

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b97118691363 by R David Murray in branch 'default':
#24277: The new email API is no longer provisional.
https://hg.python.org/cpython/rev/b97118691363

--
nosy: +python-dev

___
Python tracker 

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



[issue1602] windows console doesn't print or input Unicode

2016-09-07 Thread Steve Dower

Steve Dower added the comment:

Thanks! I've made the changes you suggested.

--

___
Python tracker 

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



[issue27985] Implement PEP 526

2016-09-07 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Guido,

I fixed __annotations__ in interactive REPL, will fix other minor things and 
submit a new patch tomorrow morning.

There are two important questions in typing.py:

> Why is the second isinstance() needed? Isn't _ClassVar a subclass of
> TypingMeta

and 

> This being a metaclass, the name should end in Meta, like most
> other subclasses of TypingMeta. (And they don't have a leading _,
> though they're still not public.)

The problem with ClassVar is that it is not actually a class, and _ClassVar is 
not a metaclass, it is just a class. I deviated from the common pattern in 
module for the following reason. ClassVar is going to be extensively used at 
class scope, where all annotations are evaluated. Therefore I wanted not to 
create new class objects by __getitem__ like it is going for other classes like 
Union etc (I tried to timeit this and ClassVar is almost ten times faster than 
Union)

What do you think?
Should I keep it like this, or rewrite in a common pattern for the module?

--

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-09-07 Thread Larry Hastings

Larry Hastings added the comment:

> My reading of this is that for OpenSSL Python defines a range of
> compatible sonames at the time of the first release in a series (e.g.
> 3.4.0), and then will never extend that in either direction for that
> release series. Put another way: patches to extend the supported
> OpenSSL versions are not acceptable in patch releases of Python.
> 
> Is that reading accurate?

So, as RM, I don't exactly directly interact with our OpenSSL support.  I don't 
decide on a version anywhere.  I do test against it when I build and test, but 
I do my testing on Linux so I just wind up with whatever version of OpenSSL my 
OS shipped with.  The decision about what version(s) to support on Windows and 
Mac falls to the Windows and Mac "platform experts", respectively Steve Dower 
and Ned Deily.  When it's a platform-specific question regarding those two 
platforms, I defer to them.

With all that said, my understanding is that the OpenSSL devs aren't very 
strict about what changes they make in minor releases (say, 1.0.2g -> 1.0.2h).  
I mean, sure, they might add bugs--it happens.  But that's not what I'm talking 
about.  IIUC they may introduce new features or even break APIs.  So changing 
the OpenSSL version for an existing release doesn't seem like a very good idea, 
unless it's necessary to fix awful security holes.  I wouldn't want to upgrade 
to a new OpenSSL point release just on basic "gee it's nice to stay current on 
software" general principles.

As for this modifying the list of acceptable ciphers thing--at this point I'm 
fine with it, even for 3.4.

I hope that clarified it for you.  Sadly that's all the clarity I've got on 
hand.

--

___
Python tracker 

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



[issue6766] Cannot modify dictionaries inside dictionaries using Managers from multiprocessing

2016-09-07 Thread Davin Potts

Davin Potts added the comment:

Fixed in upcoming 3.6.

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



[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-09-07 Thread Steve Dower

Steve Dower added the comment:

I'm in favor of merging Berker's patch, once the string comparison is made a 
little more robust. Right now there's a risk of matching a prefix rather than a 
whole word, and potentially overrunning the buffer (unless I've forgotten how 
stricmp works).

--
nosy: +steve.dower

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-09-07 Thread Donald Stufft

Donald Stufft added the comment:

> Is switching to a different SSL library without OS vendor support any more
> reasonable than switching to a newer python without that same support?

There are OSs that ship with Python 3.4 and LibreSSL.

--

___
Python tracker 

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



[issue28005] Broken encoding modules are silently skipped.

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2b2e7b39bb68 by Steve Dower in branch 'default':
Issue #28005: Allow ImportErrors in encoding implementation to propagate.
https://hg.python.org/cpython/rev/2b2e7b39bb68

--
nosy: +python-dev

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-09-07 Thread Jim Jewett

Jim Jewett added the comment:

On Sep 6, 2016 10:55 PM, Donald Stufft added the comment:

> In the hypothetical case we don't backport ChaCha20 support and 3DES and
AES constructs in TLS are no longer secure... what do you do? Do you just
plug your fingers in your ears and hope nobody attacks you?

That works fine for an awful lot of uses.

For the ones where it doesn't work, people can either upgrade to 3.5 or get
support from a reseller like red hat or caconical or ActiveState or ...

Providing the support for free isn't *wrong*, but "we don't add new things
except to the current release" is a both clear and sensible ... overriding
should be rare.  Assuming an override should be accepted just because
"security" reminds me of the boy who cried wolf.

> > Future OpenSSLs don't affect Python 3.4, as Python 3.4 won't be
upgraded to them.  ...

> Well except LibreSSL already supports this just fine,

Is switching to a different SSL library without OS vendor support any more
reasonable than switching to a newer python without that same support?

--

___
Python tracker 

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



[issue28005] Broken encoding modules are silently skipped.

2016-09-07 Thread Steve Dower

Changes by Steve Dower :


--
assignee:  -> steve.dower
nosy: +steve.dower
resolution:  -> fixed
stage: test needed -> 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



[issue27930] logging's QueueListener drops log messages

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 121b5b41c9e8 by Vinay Sajip in branch 'default':
Fixes #27930: improved QueueListener behaviour.
https://hg.python.org/cpython/rev/121b5b41c9e8

New changeset b2ea0ede3753 by Vinay Sajip in branch '3.5':
Fixes #27930: improved QueueListener behaviour.
https://hg.python.org/cpython/rev/b2ea0ede3753

New changeset 89b185372b2c by Vinay Sajip in branch 'default':
Closes #27930: Merged fix from 3.5.
https://hg.python.org/cpython/rev/89b185372b2c

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



[issue27985] Implement PEP 526

2016-09-07 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

> I think this is how exec() already works

This is not exactly like this, exec() emits ast.Module while interactive input 
emits ast.Interactive (this one skips compiler_body in compile.c), but I think 
I have got your point, will fix this.

--

___
Python tracker 

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



[issue27985] Implement PEP 526

2016-09-07 Thread Guido van Rossum

Guido van Rossum added the comment:

Each statement at the REPL should re-initialize __annotations__ if it
contains any annotations. I think this is how exec() already works. It
adds __annotations__ to the namespace as needed, but just updates it
if present. Inside a class it's different, that should be considered a
single block.

--

___
Python tracker 

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



[issue27979] Remove bundled libffi

2016-09-07 Thread Zachary Ware

Zachary Ware added the comment:

The patch will need to be updated to just completely remove the 
--with(out)-system-ffi check everywhere but OSX.  It will also need to make 
some changes after the latest patch in #27976.

--

___
Python tracker 

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



[issue27868] Unconditionally state when a build succeeds

2016-09-07 Thread Brett Cannon

Brett Cannon added the comment:

I'm not going to do this because I'm willing to bet someone is relying on the 
fact nothing is printed to stdout. Benjamin says that if you're not happy with 
this then "you're not a well-behaved UNIX user".

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



[issue27976] Deprecate building with bundled copy of libffi on non-Darwin POSIX platforms

2016-09-07 Thread Zachary Ware

Zachary Ware added the comment:

Finally got a new patch created.  After talking it over with Ned yesterday, 
this patch makes sure that nothing changes on OSX.

--
Added file: http://bugs.python.org/file44455/issue27976.diff

___
Python tracker 

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



[issue27985] Implement PEP 526

2016-09-07 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

I could change STORE_ANNOTATION opcode so that it will recreate __annotations__ 
if __name__ == '__main__'.

Or do you now think that it should re-create it always? I still think that 
always re-creating __annotations__ if they don't exist seems like silencing a 
possible error. As I mentioned in previous discussion, I think we should allow 
people to explicitly del __annotations__ (for example if someone wants to make 
a class with annotations that are "invisible" to runtime tools) and warn them 
if later they use annotations.

--

___
Python tracker 

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



[issue27911] Unnecessary error checks in exec_builtin_or_dynamic

2016-09-07 Thread Brett Cannon

Brett Cannon added the comment:

Thanks for the patch!

--
resolution:  -> fixed
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



[issue27911] Unnecessary error checks in exec_builtin_or_dynamic

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 96c6816825dc by Brett Cannon in branch 'default':
Issue #27911: Remove some unnecessary error checks in import.c.
https://hg.python.org/cpython/rev/96c6816825dc

--
nosy: +python-dev

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2016-09-07 Thread Eric Snow

Changes by Eric Snow :


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



[issue20476] If new email policies are used, default message factory should be EmailMessage

2016-09-07 Thread R. David Murray

R. David Murray added the comment:

Here's the patch to add the message_factory policy attribute.

--
Added file: http://bugs.python.org/file44454/message_factory.diff

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 90549c3c609c by Eric Snow in branch 'default':
Issue #15767: Add ModuleNotFoundError.
https://hg.python.org/cpython/rev/90549c3c609c

New changeset 5fdb8c897023 by Eric Snow in branch 'default':
Issue #15767: Use ModuleNotFoundError.
https://hg.python.org/cpython/rev/5fdb8c897023

--

___
Python tracker 

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



[issue6766] Cannot modify dictionaries inside dictionaries using Managers from multiprocessing

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 39e7307f9aee by Davin Potts in branch 'default':
Fixes issue #6766: Updated multiprocessing Proxy Objects to support nesting
https://hg.python.org/cpython/rev/39e7307f9aee

--
nosy: +python-dev

___
Python tracker 

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



[issue27985] Implement PEP 526

2016-09-07 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

We discussed this at some point on python/typing. At that time we decided that

class C:

del __annotations__
x: int

Should be an error. Do you think that it should behave in a different way in 
interactive REPL and/or at module level?

--

___
Python tracker 

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



[issue27985] Implement PEP 526

2016-09-07 Thread Guido van Rossum

Guido van Rossum added the comment:

I played with the REPL, and found this:

>>> del __annotations__
del __annotations__
>>> x: int = 0
x: int = 0
Traceback (most recent call last):
  File "", line 1, in 
NameError: __annotations__ not found
>>> 

I would expect this to re-create __annotations__.

--

___
Python tracker 

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



[issue27570] Avoid memcpy(. . ., NULL, 0) etc calls

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e231dcad3a9b by Martin Panter in branch '3.5':
Issue #27570: Avoid zero-length memcpy() calls with null source pointers
https://hg.python.org/cpython/rev/e231dcad3a9b

New changeset 2d0fb659372c by Martin Panter in branch 'default':
Issue #27570: Merge null pointer fixes from 3.5
https://hg.python.org/cpython/rev/2d0fb659372c

--
nosy: +python-dev

___
Python tracker 

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



[issue27993] In the argparse there are typos with endings in plural words

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8f02a1a6b647 by Martin Panter in branch '3.5':
Issue #27993: Fix problems with plural objects in docs and comments
https://hg.python.org/cpython/rev/8f02a1a6b647

New changeset bb2a7134d82b by Martin Panter in branch 'default':
Issue #27993: Merge plural fixes from 3.5
https://hg.python.org/cpython/rev/bb2a7134d82b

--
nosy: +python-dev

___
Python tracker 

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



[issue27895] Spelling fixes

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ff3df2b1ac7f by Martin Panter in branch '3.5':
Issue #27895:  Spelling fixes (Contributed by Ville Skyttä).
https://hg.python.org/cpython/rev/ff3df2b1ac7f

--

___
Python tracker 

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



[issue27985] Implement PEP 526

2016-09-07 Thread Guido van Rossum

Guido van Rossum added the comment:

Hey Ivan, Brett and I divided the review, he started at the bottom and I 
started at the top, we're meeting at Lib/typing.py.

--

___
Python tracker 

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



[issue28010] http.client.HTTPConnection.putrequest incorrect arguments

2016-09-07 Thread p0lm

New submission from p0lm:

Currently the arguments for HTTPConnection.putrequest in the http.client 
documentation are listed as "request, selector, skip_host=False, 
skip_accept_encoding=False". This does not reflect the correct arguments:
>>> from http.client import HTTPConnection
>>> help(HTTPConnection.putrequest)

putrequest(self, method, url, skip_host=0, skip_accept_encoding=0)
Send a request to the server.

`method' specifies an HTTP request method, e.g. 'GET'.
`url' specifies the object being requested, e.g. '/index.html'.
`skip_host' if True does not add automatically a 'Host:' header
`skip_accept_encoding' if True does not add automatically an
   'Accept-Encoding:' header

Fix:
Change `request` and `selector` to `method` and `url` respectively.

--
assignee: docs@python
components: Documentation
messages: 274913
nosy: docs@python, p0lm
priority: normal
severity: normal
status: open
title: http.client.HTTPConnection.putrequest incorrect arguments
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue6766] Cannot modify dictionaries inside dictionaries using Managers from multiprocessing

2016-09-07 Thread Davin Potts

Davin Potts added the comment:

Attaching updated patch to reflect Yury's suggested changes from review.

--
Added file: 
http://bugs.python.org/file44453/issue_6766_py36.nogit.yuryfeedback.patch

___
Python tracker 

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



[issue1602] windows console doesn't print or input Unicode

2016-09-07 Thread Berker Peksag

Berker Peksag added the comment:

I left some minor comments for Doc/whatsnew/3.6.rst on Rietveld.

In Lib/test/test_winconsoleio.py:

* self.assert_() (deprecated) can be replaced by self.assertTrue()

* We can add

  if __name__ == '__main__':
  unittest.main()

--
nosy: +berker.peksag

___
Python tracker 

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



[issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8

2016-09-07 Thread Steve Dower

Steve Dower added the comment:

One minor change - I removed the unused definition of 
Py_FileSystemDefaultDecodeErrors.

--

___
Python tracker 

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



[issue28009] core logic of uuid.getnode() is broken for AIX - all versions

2016-09-07 Thread Michael Felt

New submission from Michael Felt:

Short version:

the five routines get_node() calls to get the MAC address either fail by 
definition, or is wrong.

The one routine that works - is wrong because it returns the same value 
regardless of the system it runs on - wrong character is used to identify the 
string containing the mac address.

Recommended: correct and call the one routine that can work for AIX.

Details (using Python2.7 as template, applies to all Python3 versions as well)

  +511  def getnode():
  +512  """Get the hardware address as a 48-bit positive integer.
  +513
  +514  The first time this runs, it may launch a separate program, which 
could
  +515  be quite slow.  If all attempts to obtain the hardware address 
fail, we
  +516  choose a random 48-bit number with its eighth bit set to 1 as 
recommended
  +517  in RFC 4122.
  +518  """
  +519
  +520  global _node
  +521  if _node is not None:
  +522  return _node
  +523
  +524  import sys
  +525  if sys.platform == 'win32':
  +526  getters = [_windll_getnode, _netbios_getnode, _ipconfig_getnode]
  +527  else:
  +528  getters = [_unixdll_getnode, _ifconfig_getnode, _arp_getnode,
  +529 _lanscan_getnode, _netstat_getnode]
  +530
  +531  for getter in getters + [_random_getnode]:
  +532  try:
  +533  _node = getter()
  +534  except:
  +535  continue
  +536  if _node is not None:
  +537  return _node
  +538
  +539  _last_timestamp = None

unixdll_getnode depends on finding uuid_generate_time in either libuuid, libc, 
or None

On a default install of AIX:
find_library("uuid") returns None
nm -Ae /usr/lib/*.a | grep uuid_generate # does not return a function name, no 
.a archives are stripped

  +339  def _ifconfig_getnode():
  +340  """Get the hardware address on Unix by running ifconfig."""
  +341  # This works on Linux ('' or '-a'), Tru64 ('-av'), but not all 
Unixes.
  +342  for args in ('', '-a', '-av'):
  +343  mac = _find_mac('ifconfig', args, ['hwaddr', 'ether'], lambda 
i: i+1)
  +344  if mac:
  +345  return mac

Does not work on AIX - why call it?

  +347  def _arp_getnode():
  +348  """Get the hardware address on Unix by running arp."""
  +349  import os, socket
  +350  try:
  +351  ip_addr = socket.gethostbyname(socket.gethostname())
  +352  except EnvironmentError:
  +353  return None
  +354
  +355  # Try getting the MAC addr from arp based on our IP address 
(Solaris).
  +356  return _find_mac('arp', '-an', [ip_addr], lambda i: -1)

Does not work on one Linux system I tried
root@x066:~# arp -an 192.168.129.66
arp: in 2 entries no match found.

on AIX:
root@x064:[/data/prj/aixtools/python/python-2.7.12.1]arp -an 192.168.129.64
  ? (192.168.129.254) at XX:YY:11:aa:ZZ:ca [ethernet] stored in bucket 27
...
Nothing for it's own IP address
again, why call it.

 +358  def _lanscan_getnode():
  +359  """Get the hardware address on Unix by running lanscan."""
  +360  # This might work on HP-UX.
  +361  return _find_mac('lanscan', '-ai', ['lan0'], lambda i: 0)

Again, from comments - looks like it should work on HP-UX, so why call it on AIX
(linux was probably solved via one of the first two, so no impact there)

So, finally, after 4 guaranteed failures the following is called:

 +363  def _netstat_getnode():
  +364  """Get the hardware address on Unix by running netstat."""
  +365  # This might work on AIX, Tru64 UNIX and presumably on IRIX.
  +366  try:
  +367  pipe = _popen('netstat', '-ia')
  +368  if not pipe:
  +369  return
  +370  with pipe:
  +371  words = pipe.readline().rstrip().split()
  +372  try:
  +373  i = words.index('Address')
  +374  except ValueError:
  +375  return
  +376  for line in pipe:
  +377  try:
  +378  words = line.rstrip().split()
  +379  word = words[i]
  +380  if len(word) == 17 and word.count(':') == 5:
  +381  mac = int(word.replace(':', ''), 16)
  +382  if mac:
  +383  return mac
  +384  except (ValueError, IndexError):
  +385  pass
  +386  except OSError:
  +387  pass

For AIX - lines 380 and 381 do work - except the answer is ALWAYS the same:

See host x071:
michael@x071:[/usr/lib]netstat -ia
Name  Mtu   Network AddressIpkts IerrsOpkts Oerrs  Coll
en0   1500  link#2  fa.d1.8c.f7.62.4 553220627 0 181051589 0 0
01:00:5e:00:00:01
en0   1500  192.168.129 x071 553220627 0 181051589 0 0
224.0.0.1
en1   65390 link#3  fa.d1.8c.f7.62.5  

[issue27983] "Cannot perform PGO build because llvm-profdata was not found in PATH" error upon make

2016-09-07 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
assignee:  -> gregory.p.smith
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



[issue27983] "Cannot perform PGO build because llvm-profdata was not found in PATH" error upon make

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 279450d88fb0 by Gregory P. Smith in branch '3.5':
Fixes issue# 27983: Cause lack of llvm-profdata tool when using clang -
https://hg.python.org/cpython/rev/279450d88fb0

New changeset 9f2467e13c98 by Gregory P. Smith in branch 'default':
Fixes Issue #27983: Cause lack of llvm-profdata tool when using clang as
https://hg.python.org/cpython/rev/9f2467e13c98

--
nosy: +python-dev

___
Python tracker 

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



[issue18844] allow weights in random.choice

2016-09-07 Thread Raymond Hettinger

Raymond Hettinger added the comment:

There isn't really an option to return a generator because it conflicts the 
rest of the module that uses lists elsewhere and that allows state to be saved 
and restored before and after any function call.  One of the design reviewers 
also said that the generator form would harder for students to use.

I left the text in the examples section unchanged because it is still valid 
(showing how to make a cumulative distribution and how to build a fast 
alternative for the special case of small integer weights). Before the 3.6 
release, I expect to expand this section to provide recipes for a MCMC 
application (using choices() with a passed-in CDF) and some other examples 
suggested by the design reviewers.

The optimization hacks in the other patch don't seem worth it.  The current 
code is readable and runs fast (the principal steps are all C functions).

--

___
Python tracker 

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



[issue1602] windows console doesn't print or input Unicode

2016-09-07 Thread Steve Dower

Steve Dower added the comment:

I can't actually come up with many useful tests for this... so far I can 
validate that we can open the console IO object from 0, 1, 2, "CON", "CONIN$" 
and "CONOUT$", get fileno(), check readable()/writable() and close (multiple 
times without crashing).

Anything else requires a real console with a real person with a real keyboard.

But I fixed a couple of issues in fd handling as a result of the tests, so it's 
not a complete waste.

--
Added file: http://bugs.python.org/file44452/1602_6.patch

___
Python tracker 

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



[issue27995] Upgrade Python 3.4 to OpenSSL 1.0.2h on Windows

2016-09-07 Thread Larry Hastings

Larry Hastings added the comment:

I talked this over with Steve Dower, the current "platform expert" for Windows. 
 As he points out: the 3.4 Windows build is effectively unsupported.  The 
Windows platform expert for Python 3.4 resigned from core Python development.  
Also, of course, all future Python 3.4 releases will be source releases only.  
In short: if you make this change, you'd probably be the only person who would 
test it before it goes out the door.

But!  We still have Windows buildbots that can build Python 3.4.  And, since 
you're using a version of OpenSSL that we have checked in (on svn.python.org), 
it is theoretically possible to run this build on the buildbots.

So!  My price is: since you're going to have to coordinate with someone with 
the commit bit for this, you (and they) need to get this to pass on a Python 
buildbot.  Create a server-side clone, check in the change, and kick off a 
custom build.  When you get it working, post the results here, and after that 
you'll have my blessing to check this in to 3.4.

--

___
Python tracker 

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



[issue27989] incomplete signature with help function using typing

2016-09-07 Thread David E. Franco G.

David E. Franco G. added the comment:

I think that removing the "typing." is for the best, with the example above 

>>> help(foo)
Help on function foo in module __main__:

foo(data:typing.List[typing.Any]) -> typing.Iterator[typing.Tuple[int, 
typing.Any]]

>>> 


leaving the "typing." produce result that I think are ugly and distracting, not 
only that, is unnecessary long to convey the same information that can be in a 
more neat way without it, and more so while more complicated/long the signature 
is. 

just compare the above with this

>>> help(foo)
Help on function foo in module __main__:

foo(data:List[Any]) -> Iterator[Tuple[int, Any]]:

>>> 

which is a clear winner to me.

Or perhaps alongside modifying inspect.formatannotation also change the 
__repr__ in typing to exclude the `typing.` or like with for instance TypeVar 
produce a repr that include some marker instead, like ~ and in that way 
indicate that one is using typing object resulting in something like this

>>> help(foo)
Help on function foo in module __main__:

foo(data:~List[Any]) -> ~Iterator[~Tuple[int, ~Any]]:

>>> 

which is a little weird but still neat

--

___
Python tracker 

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



[issue22233] http.client splits headers on non-\r\n characters

2016-09-07 Thread Martin Panter

Martin Panter added the comment:

Your modifications look sensible David; thanks for handling this.

--

___
Python tracker 

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



[issue27989] incomplete signature with help function using typing

2016-09-07 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-09-07 Thread Larry Hastings

Larry Hastings added the comment:

Okay.  We (Ned Deily + Steve Dower + me) talked it over here at the core dev 
sprints, and they convinced me that it's basically okay to add the CHACHA20 
string to 3.4 and 3.5--it has some history, and OpenSSL is a little different, 
etc etc.  So go for it.

I suspect it won't affect very many people anyway, because not many will use 
Python 3.4 with a version of OpenSSL that supports ChaCha20.  It's more likely 
with 3.5 users--not with our binary installers, but perhaps the Linux 
distributions that release during what remains of 2016.

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



[issue28002] Some f-strings do not round trip through Tools/parser/test_unparse.py

2016-09-07 Thread Eric V. Smith

Changes by Eric V. Smith :


--
title: f-strings do not round trip through Tools/parser/test_unparse.py -> Some 
f-strings do not round trip through Tools/parser/test_unparse.py

___
Python tracker 

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



[issue21826] Performance issue (+fix) AIX ctypes.util with no /sbin/ldconfig present

2016-09-07 Thread Michael Felt

Michael Felt added the comment:

re: issue 26439 and issue 27435 would like to show:

without patch, find_library() is consistently slow, and in default situations, 
returns nothing.

root@x064:[/data/prj/aixtools/python/python-2.7.10]./python -m timeit -n 100 
'import ctypes.util; ctypes.util.find_library("crypt")'
100 loops, best of 3: 29.6 msec per loop
root@x064:[/data/prj/aixtools/python/python-2.7.10]./python -m timeit -n 100 
'import ctypes.util; ctypes.util.find_library("crypt")'
100 loops, best of 3: 28.8 msec per loop
root@x064:[/data/prj/aixtools/python/python-2.7.10]./python -m timeit -n 100 
'import ctypes.util; ctypes.util.find_library("c")'
100 loops, best of 3: 29.4 msec per loop
root@x064:[/data/prj/aixtools/python/python-2.7.10]./python -m timeit -n 100 
'import ctypes.util; ctypes.util.find_library("m")'
100 loops, best of 3: 29.8 msec per loop
root@x064:[/data/prj/aixtools/python/python-2.7.10]cd -
/data/prj/aixtools/python/python-2.7.12.1
root@x064:[/data/prj/aixtools/python/python-2.7.12.1]./python -m timeit -n 100 
'import ctypes.util; ctypes.util.find_library("crypt")'
100 loops, best of 3: 13.5 msec per loop
root@x064:[/data/prj/aixtools/python/python-2.7.12.1]./python -m timeit -n 100 
'import ctypes.util; ctypes.util.find_library("c")'
100 loops, best of 3: 21.4 msec per loop
root@x064:[/data/prj/aixtools/python/python-2.7.12.1]./python -m timeit -n 100 
'import ctypes.util; ctypes.util.find_library("m")'
100 loops, best of 3: 26.1 msec per loop

The results can be explained as follows:
no patch - all fail, nothing is ever found in a default environment.

with patch: crypt - the answer includes the archive member libcrypt.so, so it 
is found "earlier" than for "c" which must look for legacy names, which is 
faster than "m" which does not exist.

What I consider "frightening" - and a good reason to stay with Python2 as long 
as possible is the follow difference
Python3.6a2 - unpatched, versus Python3.6a4 - ctypes.util patched for AIX:

root@x064:[/data/prj/aixtools/python/python-3.6.0.162]./python -m timeit -n 100 
'import ctypes.util; ctypes.util.find_library("crypt")'
100 loops, best of 3: 84.1 msec per loop
root@x064:[/data/prj/aixtools/python/python-3.6.0.162]cd ../*164
root@x064:[/data/prj/aixtools/python/python-3.6.0.164]./python -m timeit -n 100 
'import ctypes.util; ctypes.util.find_library("crypt")'
100 loops, best of 3: 66.6 msec per loop

FYI: this is on a POWER6 (so h/w is 'quite old', msec should be seen as 
relative, not as accurate for newer hardware)

--
nosy: +Michael.Felt

___
Python tracker 

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



[issue22233] http.client splits headers on non-\r\n characters

2016-09-07 Thread R. David Murray

R. David Murray added the comment:

I want to stack another patch on top of this, so I committed it.  If you see 
anything I screwed up, Martin, please let me know.

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



[issue22233] http.client splits headers on non-\r\n characters

2016-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 69900c5992c5 by R David Murray in branch '3.5':
#22233: Only split headers on \r and/or \n, per email RFCs.
https://hg.python.org/cpython/rev/69900c5992c5

New changeset 4d2369b901be by R David Murray in branch 'default':
Merge: #22233: Only split headers on \r and/or \n, per email RFCs.
https://hg.python.org/cpython/rev/4d2369b901be

--
nosy: +python-dev

___
Python tracker 

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



[issue28006] Remove tracing overhead from the fine-grained fast opcodes

2016-09-07 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I'm going to withdraw this one.  I'm not familiar enough with this part of the 
code to reliably make changes to it.

--
status: open -> closed

___
Python tracker 

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



[issue23545] Turn on extra warnings on GCC

2016-09-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue28006] Remove tracing overhead from the fine-grained fast opcodes

2016-09-07 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Working on a revised patch.  Stand by.

--
assignee: steve.dower -> rhettinger

___
Python tracker 

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



[issue28008] PEP 530, asynchronous comprehensions implementation

2016-09-07 Thread Yury Selivanov

New submission from Yury Selivanov:

This patch is supposed to be committed after issue #28003.

--
assignee: yselivanov
components: Interpreter Core
files: async_comp_1.patch
keywords: patch
messages: 274897
nosy: haypo, lukasz.langa, ned.deily, yselivanov
priority: release blocker
severity: normal
stage: patch review
status: open
title: PEP 530, asynchronous comprehensions implementation
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file44451/async_comp_1.patch

___
Python tracker 

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



[issue27999] Make "global after use" a SyntaxError

2016-09-07 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

OK, then I think after will be safer. Let us came back to this right after PEP 
526.

--

___
Python tracker 

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



[issue27999] Make "global after use" a SyntaxError

2016-09-07 Thread Guido van Rossum

Guido van Rossum added the comment:

I strongly prefer to have it as a separate patch (either before or
after) to avoid the appearance of piggy-backing this in with a much
larger change.

--

___
Python tracker 

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



[issue19500] Add client-side SSL session resumption

2016-09-07 Thread Christian Heimes

Christian Heimes added the comment:

Session resumption is currently broken in OpenSSL 1.1.0, 
https://github.com/openssl/openssl/issues/1550

--

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-09-07 Thread Christian Heimes

Christian Heimes added the comment:

On 2016-09-07 05:06, Larry Hastings wrote:
> 
> Larry Hastings added the comment:
> 
>> FWIW the cipher list (at least the restricted ones for
>> ssl.create_default_context()) is explicitly documented
>> as being able to be changed at any time without prior deprecation
> 
> Yes.  To be specific:  "The protocol, options, cipher and other settings may 
> change to more restrictive values anytime without prior deprecation."
> 
> https://docs.python.org/3/library/ssl.html#ssl.create_default_context
> 
> I've seen no documentation suggesting that we can add new ciphers at any time.

ChaCha20 is part of the HIGH cipher set. That means the patch does not
*add* ChaCha20. It's already added by the HIGH rule. The patch rather
moves the cipher ChaCha20 Poly1305 suits in the right place.

Christian

--

___
Python tracker 

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



[issue10839] email module should not allow some header field repetitions

2016-09-07 Thread R. David Murray

R. David Murray added the comment:

I've committed Berker's patch from #27331, and I'm about to take the new email 
API out of provisional status.

Barry is committed to not changing this behavior in 2.7 and I agree.  In any 
case 2.7 doesn't differentiate between headers being added by the user and 
headers coming from the parsed message, and the latter *have* to allow 
duplicates even if the fields aren't supposed to be.  The python3 code does 
make a distinction between these two cases, which is what allowed me to do the 
fix in the new policies.  (Yes, you *could* fix feedparser and message in 2.7 
so it also could tell, but that is an invasive change).

So, I'm re-closing this as fixed.  It's "won't fix" for 2.7 and compat32.

--
status: open -> closed
versions: +Python 3.5, Python 3.6 -Python 2.7

___
Python tracker 

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



[issue28006] Remove tracing overhead from the fine-grained fast opcodes

2016-09-07 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue28005] Broken encoding modules are silently skipped.

2016-09-07 Thread Sye van der Veen

Changes by Sye van der Veen :


--
nosy: +syeberman

___
Python tracker 

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



[issue27137] Python implementation of `functools.partial` is not a class

2016-09-07 Thread Emanuel Barry

Emanuel Barry added the comment:

Thank you Serhiy for the comments! Here's a new patch. I'm fine with the 
recursive repr tests failing for now; it's something I believe we can fix 
during the beta phase if we don't have time before (fix as in modify the C 
implementation to match the Python version instead of the other way around).

--
Added file: http://bugs.python.org/file44450/functools_partial_4.patch

___
Python tracker 

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



[issue27989] incomplete signature with help function using typing

2016-09-07 Thread Guido van Rossum

Guido van Rossum added the comment:

I've lost you -- why don't you upload a patch?

--

___
Python tracker 

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



  1   2   3   >