Steve Dower | 23 Jul 21:16 2016

PEP 514: Python registration in the Windows registry

PEP 514 is now ready for pronouncement, so this is the last chance for 
any feedback (BDFL-delegate Paul has been active on the github PR, so I 
don't expect he has a lot of feedback left).

The most major change from the previous post is the addition of some 
code examples at the end. Honestly, I don't expect many tools written in 
Python to be scanning the registry (since once you're in Python you 
probably don't need to find it), but hopefully they'll help clarify the 
PEP for people who prefer code.

Full text below.

Cheers,
Steve

----------

PEP: 514
Title: Python registration in the Windows registry
Version: $Revision$
Last-Modified: $Date$
Author: Steve Dower <steve.dower <at> python.org>
Status: Draft
Type: Informational
Content-Type: text/x-rst
Created: 02-Feb-2016
Post-History: 02-Feb-2016, 01-Mar-2016, 18-Jul-2016

Abstract
========
(Continue reading)

Ronald Oussoren | 23 Jul 14:26 2016
Picon

PEP 447: Add __getdescriptor__ to metaclasses

Hi,

It’s getting a tradition for me to work on PEP 447 during the EuroPython sprints and disappear afterwards. Hopefully I can manage to avoid the latter step this year…

Last year the conclusion appeared to be that this is an acceptable PEP, but Mark Shannon had a concern about a default implementation for __getdescriptor__ on type in <https://mail.python.org/pipermail/python-dev/2015-July/140938.html> (follow the link for more context):
 
> "__getdescriptor__" is fundamentally different from "__getattribute__" in that > is defined in terms of itself. > > object.__getattribute__ is defined in terms of type.__getattribute__, but > type.__getattribute__ just does > dictionary lookups. However defining type.__getattribute__ in terms of > __descriptor__ causes a circularity as > __descriptor__ has to be looked up on a type. > > So, not only must the cycle be broken by special casing "type", but that > "__getdescriptor__" can be defined > not only by a subclass, but also a metaclass that uses "__getdescriptor__" to > define "__getdescriptor__" on the class. > (and so on for meta-meta classes, etc.)
My reaction that year is in <https://mail.python.org/pipermail/python-dev/2015-August/141114.html>. As I wrote there I did not fully understand the concerns Mark has, probably because I’m focussed too much on the implementation in CPython.  If removing type.__getdescriptor__ and leaving this special method as an optional hook for subclasses of type fixes the conceptual concerns then that’s fine by me. I used type.__getdescriptor__ as the default implementation both because it appears to be cleaner to me and because this gives subclasses an easy way to access the default implementation.

The implementation of the PEP in issue 18181 <http://bugs.python.org/issue18181> does special-case type.__getdescriptor__ but only as an optimisation, the code would work just as well without that special casing because the normal attribute lookup machinery is not used when accessing special methods written in C. That is, the implementation of object.__getattribute__ directly accesses fields of the type struct at the C level.  Some magic behavior appears to be necessary even without the addition of __getdescriptor__ (type is a subclass of itself, object.__getattribute__ has direct access to dict.__getitem__, …).

I’m currently working on getting the patch in 18181 up-to-date w.r.t. the current trunk, the patch in the issue no longer applies cleanly. After that I’ll try to think up some tests that seriously try to break the new behaviour, and I want to update a patch I have for PyObjC to make use of the new functionality to make sure that the PEP actually fixes the issues I had w.r.t. builtin.super’s behavior.

What is the best way forward after that? As before this is a change in behavior that, unsurprisingly, few core devs appear to be comfortable with evaluating, combined with new functionality that will likely see little use beyond PyObjC (although my opinions of that shouldn’t carry much weight, I thought that decorators would have limited appeal when those where introduced and couldn’t have been more wrong about that).

Ronald

<div>Hi,<div class=""><br class=""></div>
<div class="">It&rsquo;s getting a tradition for me to work on PEP 447 during the EuroPython sprints and disappear afterwards. Hopefully I can manage to avoid the latter step this year&hellip;</div>
<div class=""><br class=""></div>
<div class="">Last year the conclusion appeared to be that this is an acceptable PEP, but Mark Shannon had a concern about a default implementation for __getdescriptor__ on type in &lt;<a href="https://mail.python.org/pipermail/python-dev/2015-July/140938.html" class="">https://mail.python.org/pipermail/python-dev/2015-July/140938.html</a>&gt; (follow the link for more context):</div>
<div class="">&nbsp;</div>
<div class="">&gt; "__getdescriptor__" is fundamentally different from "__getattribute__" in that
&gt; is defined in terms of itself.
&gt; 
&gt; object.__getattribute__ is defined in terms of type.__getattribute__, but
&gt; type.__getattribute__ just does 
&gt; dictionary lookups. However defining type.__getattribute__ in terms of
&gt; __descriptor__ causes a circularity as
&gt; __descriptor__ has to be looked up on a type.
&gt; 
&gt; So, not only must the cycle be broken by special casing "type", but that
&gt; "__getdescriptor__" can be defined
&gt; not only by a subclass, but also a metaclass that uses "__getdescriptor__" to
&gt; define  "__getdescriptor__" on the class.
&gt; (and so on for meta-meta classes, etc.)<div class="">My reaction that year is in &lt;<a href="https://mail.python.org/pipermail/python-dev/2015-August/141114.html" class="">https://mail.python.org/pipermail/python-dev/2015-August/141114.html</a>&gt;. As I wrote there I did not fully understand the concerns Mark has, probably because I&rsquo;m focussed too much on the implementation in CPython. &nbsp;If removing type.__getdescriptor__ and leaving this special method as an optional hook for subclasses of type fixes the conceptual concerns then that&rsquo;s fine by me. I used type.__getdescriptor__ as the default implementation both because it appears to be cleaner to me and because this gives subclasses an easy way to access the default implementation.</div>
</div>
<div class=""><br class=""></div>
<div class="">The implementation of the PEP in issue 18181 &lt;<a href="http://bugs.python.org/issue18181" class="">http://bugs.python.org/issue18181</a>&gt; does special-case type.__getdescriptor__ but only as an optimisation, the code would work just as well without that special casing because the normal attribute lookup machinery is not used when accessing special methods written in C. That is, the implementation of object.__getattribute__ directly accesses fields of the type struct at the C level. &nbsp;Some magic behavior appears to be necessary even without the addition of __getdescriptor__ (type is a subclass of itself, object.__getattribute__ has direct access to dict.__getitem__, &hellip;).</div>
<div class=""><br class=""></div>
<div class="">I&rsquo;m currently working on getting the patch in 18181 up-to-date w.r.t. the current trunk, the patch in the issue no longer applies cleanly. After that I&rsquo;ll try to think up some tests that seriously try to break the new behaviour, and I want to update a patch I have for PyObjC to make use of the new functionality to make sure that the PEP actually fixes the issues I had w.r.t. builtin.super&rsquo;s behavior.</div>
<div class=""><br class=""></div>
<div class="">What is the best way forward after that? As before this is a change in behavior that, unsurprisingly, few core devs appear to be comfortable with evaluating, combined with new functionality that will likely see little use beyond PyObjC (although my opinions of that shouldn&rsquo;t carry much weight, I thought that decorators would have limited appeal when those where introduced and couldn&rsquo;t have been more wrong about that).</div>
<div class=""><br class=""></div>
<div class="">Ronald</div>
<div class=""><br class=""></div>
<div class="">P.S. The PEP itself: &lt;<a href="https://www.python.org/dev/peps/pep-0447" class="">https://www.python.org/dev/peps/pep-0447</a>&gt;</div>
</div>
Brett Cannon | 22 Jul 22:04 2016
Gravatar

The devguide is now hosted on GitHub

https://github.com/python/devguide

I have also moved all issues over as well and hooked up Read The Docs so that there's a mirror which is always up-to-date (vs. docs.python.org/devguide which is on a cronjob).
<div><div dir="ltr">
<a href="https://github.com/python/devguide">https://github.com/python/devguide</a><br><div><br></div>
<div>I have also moved all issues over as well and hooked up Read The Docs so that there's a mirror which is always up-to-date (vs. <a href="http://docs.python.org/devguide">docs.python.org/devguide</a> which is on a cronjob).</div>
</div></div>
Python tracker | 22 Jul 18:08 2016

Summary of Python tracker Issues


ACTIVITY SUMMARY (2016-07-15 - 2016-07-22)
Python tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.

Issues counts and deltas:
  open    5586 (+24)
  closed 33762 (+47)
  total  39348 (+71)

Open issues with patches: 2441 

Issues opened (42)
==================

#25507: IDLE: user code 'import tkinter; tkinter.font' should fail
http://bugs.python.org/issue25507  reopened by terry.reedy

#27521: Misleading compress level header on files created with gzip
http://bugs.python.org/issue27521  opened by ddorda

#27524: Update os.path for PEP 519/__fspath__()
http://bugs.python.org/issue27524  opened by brett.cannon

#27526: test_venv.TestEnsurePip fails mysteriously when /tmp is too sm
http://bugs.python.org/issue27526  opened by r.david.murray

#27530: Non-Critical Compiler WARNING: Python Embedding C++11 does not
http://bugs.python.org/issue27530  opened by Daniel Lord

#27534: IDLE: Reduce number and time for user process imports
http://bugs.python.org/issue27534  opened by terry.reedy

#27535: Memory leaks when opening tons of files
http://bugs.python.org/issue27535  opened by Александр Карпинский

#27536: Convert readme to reStructuredText
http://bugs.python.org/issue27536  opened by louis.taylor

#27539: negative Fraction ** negative int not normalized
http://bugs.python.org/issue27539  opened by Vedran.Čačić

#27540: msvcrt.ungetwch() calls _ungetch()
http://bugs.python.org/issue27540  opened by arigo

#27541: Repr of collection's subclasses
http://bugs.python.org/issue27541  opened by serhiy.storchaka

#27544: Document the ABCs for instance/subclass checks of dict view ty
http://bugs.python.org/issue27544  opened by story645

#27546: Integrate tkinter and asyncio (and async)
http://bugs.python.org/issue27546  opened by terry.reedy

#27547: Integer Overflow Crash On float(array.array())
http://bugs.python.org/issue27547  opened by pabstersac

#27558: SystemError with bare `raise` in threading or multiprocessing
http://bugs.python.org/issue27558  opened by Romuald

#27561: Warn against subclassing builtins, and overriding their method
http://bugs.python.org/issue27561  opened by Kirk Hansen

#27562: Import error encodings (Windows xp compatibility)
http://bugs.python.org/issue27562  opened by Iovan Irinel

#27564: 2.7.12 Windows Installer package broken.
http://bugs.python.org/issue27564  opened by busfault

#27565: Offer error context manager for code.interact
http://bugs.python.org/issue27565  opened by Claudiu Saftoiu

#27566: Tools/freeze/winmakemakefile.py clean target should use 'del' 
http://bugs.python.org/issue27566  opened by David D

#27568: "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI 
http://bugs.python.org/issue27568  opened by remram

#27569: Windows install problems
http://bugs.python.org/issue27569  opened by ricardoe

#27570: Avoid memcpy(. . ., NULL, 0) etc calls
http://bugs.python.org/issue27570  opened by martin.panter

#27572: Support bytes-like objects when base is given to int()
http://bugs.python.org/issue27572  opened by xiang.zhang

#27573: code.interact() should print an exit message
http://bugs.python.org/issue27573  opened by steven.daprano

#27574: Faster parsing keyword arguments
http://bugs.python.org/issue27574  opened by serhiy.storchaka

#27575: dict viewkeys intersection slow for large dicts
http://bugs.python.org/issue27575  opened by David Su2

#27576: An unexpected difference between dict and OrderedDict
http://bugs.python.org/issue27576  opened by belopolsky

#27577: Make implementation and doc of tuple and list more compliant
http://bugs.python.org/issue27577  opened by xiang.zhang

#27578: inspect.findsource raises exception with empty __init__.py
http://bugs.python.org/issue27578  opened by Alexander Todorov

#27579: Add a tutorial for AsyncIO in the documentation
http://bugs.python.org/issue27579  opened by matrixise

#27580: CSV Null Byte Error
http://bugs.python.org/issue27580  opened by bobbyocean

#27581: Fix overflow check in PySequence_Tuple
http://bugs.python.org/issue27581  opened by xiang.zhang

#27582: Mispositioned SyntaxError caret for unknown code points
http://bugs.python.org/issue27582  opened by ncoghlan

#27583: configparser: modifying default_section at runtime
http://bugs.python.org/issue27583  opened by rk

#27584: New addition of vSockets to the python socket module
http://bugs.python.org/issue27584  opened by Cathy Avery

#27585: asyncio.Lock deadlock after cancellation
http://bugs.python.org/issue27585  opened by sss

#27587: Issues, reported by PVS-Studio static analyzer
http://bugs.python.org/issue27587  opened by pavel-belikov

#27588: Type (typing) objects are hashable and comparable for equality
http://bugs.python.org/issue27588  opened by Gareth.Rees

#27589: asyncio doc: issue in as_completed() doc
http://bugs.python.org/issue27589  opened by haypo

#27590: tarfile module next() method hides exceptions
http://bugs.python.org/issue27590  opened by JieGhost

#27591: multiprocessing: Possible uninitialized pointer use in Windows
http://bugs.python.org/issue27591  opened by Rosuav

Most recent 15 issues with no replies (15)
==========================================

#27590: tarfile module next() method hides exceptions
http://bugs.python.org/issue27590

#27589: asyncio doc: issue in as_completed() doc
http://bugs.python.org/issue27589

#27588: Type (typing) objects are hashable and comparable for equality
http://bugs.python.org/issue27588

#27584: New addition of vSockets to the python socket module
http://bugs.python.org/issue27584

#27581: Fix overflow check in PySequence_Tuple
http://bugs.python.org/issue27581

#27577: Make implementation and doc of tuple and list more compliant
http://bugs.python.org/issue27577

#27570: Avoid memcpy(. . ., NULL, 0) etc calls
http://bugs.python.org/issue27570

#27566: Tools/freeze/winmakemakefile.py clean target should use 'del' 
http://bugs.python.org/issue27566

#27565: Offer error context manager for code.interact
http://bugs.python.org/issue27565

#27534: IDLE: Reduce number and time for user process imports
http://bugs.python.org/issue27534

#27530: Non-Critical Compiler WARNING: Python Embedding C++11 does not
http://bugs.python.org/issue27530

#27526: test_venv.TestEnsurePip fails mysteriously when /tmp is too sm
http://bugs.python.org/issue27526

#27520: Issue when building PGO
http://bugs.python.org/issue27520

#27511: Add PathLike objects support to BZ2File
http://bugs.python.org/issue27511

#27505: Missing documentation for setting module __class__ attribute
http://bugs.python.org/issue27505

Most recent 15 issues waiting for review (15)
=============================================

#27591: multiprocessing: Possible uninitialized pointer use in Windows
http://bugs.python.org/issue27591

#27584: New addition of vSockets to the python socket module
http://bugs.python.org/issue27584

#27582: Mispositioned SyntaxError caret for unknown code points
http://bugs.python.org/issue27582

#27581: Fix overflow check in PySequence_Tuple
http://bugs.python.org/issue27581

#27574: Faster parsing keyword arguments
http://bugs.python.org/issue27574

#27573: code.interact() should print an exit message
http://bugs.python.org/issue27573

#27572: Support bytes-like objects when base is given to int()
http://bugs.python.org/issue27572

#27570: Avoid memcpy(. . ., NULL, 0) etc calls
http://bugs.python.org/issue27570

#27568: "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI 
http://bugs.python.org/issue27568

#27558: SystemError with bare `raise` in threading or multiprocessing
http://bugs.python.org/issue27558

#27546: Integrate tkinter and asyncio (and async)
http://bugs.python.org/issue27546

#27544: Document the ABCs for instance/subclass checks of dict view ty
http://bugs.python.org/issue27544

#27539: negative Fraction ** negative int not normalized
http://bugs.python.org/issue27539

#27536: Convert readme to reStructuredText
http://bugs.python.org/issue27536

#27534: IDLE: Reduce number and time for user process imports
http://bugs.python.org/issue27534

Top 10 most discussed issues (10)
=================================

#23951: Update devguide style to use a similar theme as Docs
http://bugs.python.org/issue23951  12 msgs

#27558: SystemError with bare `raise` in threading or multiprocessing
http://bugs.python.org/issue27558  12 msgs

#1621: Do not assume signed integer overflow behavior
http://bugs.python.org/issue1621   9 msgs

#26662: configure/Makefile doesn't check if "python" command works, ne
http://bugs.python.org/issue26662   9 msgs

#27582: Mispositioned SyntaxError caret for unknown code points
http://bugs.python.org/issue27582   9 msgs

#23262: webbrowser module broken with Firefox 36+
http://bugs.python.org/issue23262   8 msgs

#27469: Unicode filename gets crippled on Windows when drag and drop
http://bugs.python.org/issue27469   8 msgs

#27580: CSV Null Byte Error
http://bugs.python.org/issue27580   8 msgs

#24954: No way to generate or parse timezone as produced by datetime.i
http://bugs.python.org/issue24954   7 msgs

#27561: Warn against subclassing builtins, and overriding their method
http://bugs.python.org/issue27561   7 msgs

Issues closed (45)
==================

#19142: Cross-compile fails trying to execute foreign pgen on build ho
http://bugs.python.org/issue19142  closed by martin.panter

#21708: Deprecate nonstandard behavior of a dumbdbm database
http://bugs.python.org/issue21708  closed by serhiy.storchaka

#24034: Make fails Objects/typeslots.inc
http://bugs.python.org/issue24034  closed by martin.panter

#25393: 'resource' module documentation error
http://bugs.python.org/issue25393  closed by python-dev

#26207: distutils msvccompiler fails due to mspdb140.dll error on debu
http://bugs.python.org/issue26207  closed by steve.dower

#26380: Add an http method enum
http://bugs.python.org/issue26380  closed by ethan.furman

#26559: logging.handlers.MemoryHandler flushes on shutdown but not rem
http://bugs.python.org/issue26559  closed by python-dev

#26696: Document collections.abc.ByteString
http://bugs.python.org/issue26696  closed by brett.cannon

#26844: Wrong error message during import
http://bugs.python.org/issue26844  closed by brett.cannon

#27083: PYTHONCASEOK is ignored on Windows
http://bugs.python.org/issue27083  closed by brett.cannon

#27309: Visual Styles support to tk/tkinter file and message dialogs
http://bugs.python.org/issue27309  closed by steve.dower

#27417: Call CoInitializeEx on startup
http://bugs.python.org/issue27417  closed by steve.dower

#27472: add the 'unix_shell' attribute to test.support
http://bugs.python.org/issue27472  closed by xdegaye

#27512: os.fspath is certain to crash when exception raised in __fspat
http://bugs.python.org/issue27512  closed by brett.cannon

#27515: Dotted name re-import does not rebind after deletion
http://bugs.python.org/issue27515  closed by terry.reedy

#27522: Reference cycle in email.feedparser
http://bugs.python.org/issue27522  closed by r.david.murray

#27523: Silence Socket Depreciation Warnings.
http://bugs.python.org/issue27523  closed by Decorater

#27525: Wrong OS header on file created by gzip module
http://bugs.python.org/issue27525  closed by ddorda

#27527: Make not yielding from or awaiting a coroutine a SyntaxError
http://bugs.python.org/issue27527  closed by r.david.murray

#27528: Document that filterwarnings(message=...) matches the start of
http://bugs.python.org/issue27528  closed by martin.panter

#27529: Tkinter memory leak on OS X
http://bugs.python.org/issue27529  closed by ned.deily

#27531: Documentation for assert_not_called() has wrong signature
http://bugs.python.org/issue27531  closed by berker.peksag

#27532: Dictionary iterator has no len()
http://bugs.python.org/issue27532  closed by r.david.murray

#27533: release GIL in nt._isdir
http://bugs.python.org/issue27533  closed by steve.dower

#27537: Segfault Via Resource Exhaustion
http://bugs.python.org/issue27537  closed by ned.deily

#27538: Segfault on error in code object checking
http://bugs.python.org/issue27538  closed by ned.deily

#27542: Segfault in gcmodule.c:360 visit_decref
http://bugs.python.org/issue27542  closed by ned.deily

#27543: from module import function creates package reference to the m
http://bugs.python.org/issue27543  closed by brett.cannon

#27545: missing pyshellext.vcxproj prevents puilding 3.6
http://bugs.python.org/issue27545  closed by python-dev

#27548: Integer Overflow On bin()
http://bugs.python.org/issue27548  closed by serhiy.storchaka

#27549: Integer Overflow Crash On bytearray()
http://bugs.python.org/issue27549  closed by serhiy.storchaka

#27550: Integer Overflow Crash On Arithmetic Operations
http://bugs.python.org/issue27550  closed by serhiy.storchaka

#27551: Integer Overflow On print()
http://bugs.python.org/issue27551  closed by serhiy.storchaka

#27552: Integer Overflow On min()
http://bugs.python.org/issue27552  closed by serhiy.storchaka

#27553: Integer Overflow On unicode()
http://bugs.python.org/issue27553  closed by serhiy.storchaka

#27554: Integer Overflow On dir()
http://bugs.python.org/issue27554  closed by serhiy.storchaka

#27555: Integer Overflow on oct()
http://bugs.python.org/issue27555  closed by serhiy.storchaka

#27556: Integer overflow on hex()
http://bugs.python.org/issue27556  closed by serhiy.storchaka

#27557: Integer Overflow on int()
http://bugs.python.org/issue27557  closed by serhiy.storchaka

#27559: Crash On bytearray()
http://bugs.python.org/issue27559  closed by martin.panter

#27560: Memory overallocation crash and keyboard interrupt stops worki
http://bugs.python.org/issue27560  closed by martin.panter

#27563: docs for `gc.get_referrers` should explain the result format (
http://bugs.python.org/issue27563  closed by cool-RR

#27567: Add constants EPOLLRDHUP and POLLRDHUP to module select.
http://bugs.python.org/issue27567  closed by python-dev

#27571: 3.6 Seems to be ignoring the _sodium pyd file made with pip.
http://bugs.python.org/issue27571  closed by brett.cannon

#27586: Is this a regular expression library bug?
http://bugs.python.org/issue27586  closed by tim.peters

ACTIVITY SUMMARY (2016-07-15 - 2016-07-22)
Python tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.

Issues counts and deltas:
  open    5586 (+24)
  closed 33762 (+47)
  total  39348 (+71)

Open issues with patches: 2441 

Issues opened (42)
==================

#25507: IDLE: user code 'import tkinter; tkinter.font' should fail
http://bugs.python.org/issue25507  reopened by terry.reedy

#27521: Misleading compress level header on files created with gzip
http://bugs.python.org/issue27521  opened by ddorda

#27524: Update os.path for PEP 519/__fspath__()
http://bugs.python.org/issue27524  opened by brett.cannon

#27526: test_venv.TestEnsurePip fails mysteriously when /tmp is too sm
http://bugs.python.org/issue27526  opened by r.david.murray

#27530: Non-Critical Compiler WARNING: Python Embedding C++11 does not
http://bugs.python.org/issue27530  opened by Daniel Lord

#27534: IDLE: Reduce number and time for user process imports
http://bugs.python.org/issue27534  opened by terry.reedy

#27535: Memory leaks when opening tons of files
http://bugs.python.org/issue27535  opened by Александр Карпинский

#27536: Convert readme to reStructuredText
http://bugs.python.org/issue27536  opened by louis.taylor

#27539: negative Fraction ** negative int not normalized
http://bugs.python.org/issue27539  opened by Vedran.Čačić

#27540: msvcrt.ungetwch() calls _ungetch()
http://bugs.python.org/issue27540  opened by arigo

#27541: Repr of collection's subclasses
http://bugs.python.org/issue27541  opened by serhiy.storchaka

#27544: Document the ABCs for instance/subclass checks of dict view ty
http://bugs.python.org/issue27544  opened by story645

#27546: Integrate tkinter and asyncio (and async)
http://bugs.python.org/issue27546  opened by terry.reedy

#27547: Integer Overflow Crash On float(array.array())
http://bugs.python.org/issue27547  opened by pabstersac

#27558: SystemError with bare `raise` in threading or multiprocessing
http://bugs.python.org/issue27558  opened by Romuald

#27561: Warn against subclassing builtins, and overriding their method
http://bugs.python.org/issue27561  opened by Kirk Hansen

#27562: Import error encodings (Windows xp compatibility)
http://bugs.python.org/issue27562  opened by Iovan Irinel

#27564: 2.7.12 Windows Installer package broken.
http://bugs.python.org/issue27564  opened by busfault

#27565: Offer error context manager for code.interact
http://bugs.python.org/issue27565  opened by Claudiu Saftoiu

#27566: Tools/freeze/winmakemakefile.py clean target should use 'del' 
http://bugs.python.org/issue27566  opened by David D

#27568: "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI 
http://bugs.python.org/issue27568  opened by remram

#27569: Windows install problems
http://bugs.python.org/issue27569  opened by ricardoe

#27570: Avoid memcpy(. . ., NULL, 0) etc calls
http://bugs.python.org/issue27570  opened by martin.panter

#27572: Support bytes-like objects when base is given to int()
http://bugs.python.org/issue27572  opened by xiang.zhang

#27573: code.interact() should print an exit message
http://bugs.python.org/issue27573  opened by steven.daprano

#27574: Faster parsing keyword arguments
http://bugs.python.org/issue27574  opened by serhiy.storchaka

#27575: dict viewkeys intersection slow for large dicts
http://bugs.python.org/issue27575  opened by David Su2

#27576: An unexpected difference between dict and OrderedDict
http://bugs.python.org/issue27576  opened by belopolsky

#27577: Make implementation and doc of tuple and list more compliant
http://bugs.python.org/issue27577  opened by xiang.zhang

#27578: inspect.findsource raises exception with empty __init__.py
http://bugs.python.org/issue27578  opened by Alexander Todorov

#27579: Add a tutorial for AsyncIO in the documentation
http://bugs.python.org/issue27579  opened by matrixise

#27580: CSV Null Byte Error
http://bugs.python.org/issue27580  opened by bobbyocean

#27581: Fix overflow check in PySequence_Tuple
http://bugs.python.org/issue27581  opened by xiang.zhang

#27582: Mispositioned SyntaxError caret for unknown code points
http://bugs.python.org/issue27582  opened by ncoghlan

#27583: configparser: modifying default_section at runtime
http://bugs.python.org/issue27583  opened by rk

#27584: New addition of vSockets to the python socket module
http://bugs.python.org/issue27584  opened by Cathy Avery

#27585: asyncio.Lock deadlock after cancellation
http://bugs.python.org/issue27585  opened by sss

#27587: Issues, reported by PVS-Studio static analyzer
http://bugs.python.org/issue27587  opened by pavel-belikov

#27588: Type (typing) objects are hashable and comparable for equality
http://bugs.python.org/issue27588  opened by Gareth.Rees

#27589: asyncio doc: issue in as_completed() doc
http://bugs.python.org/issue27589  opened by haypo

#27590: tarfile module next() method hides exceptions
http://bugs.python.org/issue27590  opened by JieGhost

#27591: multiprocessing: Possible uninitialized pointer use in Windows
http://bugs.python.org/issue27591  opened by Rosuav

Most recent 15 issues with no replies (15)
==========================================

#27590: tarfile module next() method hides exceptions
http://bugs.python.org/issue27590

#27589: asyncio doc: issue in as_completed() doc
http://bugs.python.org/issue27589

#27588: Type (typing) objects are hashable and comparable for equality
http://bugs.python.org/issue27588

#27584: New addition of vSockets to the python socket module
http://bugs.python.org/issue27584

#27581: Fix overflow check in PySequence_Tuple
http://bugs.python.org/issue27581

#27577: Make implementation and doc of tuple and list more compliant
http://bugs.python.org/issue27577

#27570: Avoid memcpy(. . ., NULL, 0) etc calls
http://bugs.python.org/issue27570

#27566: Tools/freeze/winmakemakefile.py clean target should use 'del' 
http://bugs.python.org/issue27566

#27565: Offer error context manager for code.interact
http://bugs.python.org/issue27565

#27534: IDLE: Reduce number and time for user process imports
http://bugs.python.org/issue27534

#27530: Non-Critical Compiler WARNING: Python Embedding C++11 does not
http://bugs.python.org/issue27530

#27526: test_venv.TestEnsurePip fails mysteriously when /tmp is too sm
http://bugs.python.org/issue27526

#27520: Issue when building PGO
http://bugs.python.org/issue27520

#27511: Add PathLike objects support to BZ2File
http://bugs.python.org/issue27511

#27505: Missing documentation for setting module __class__ attribute
http://bugs.python.org/issue27505

Most recent 15 issues waiting for review (15)
=============================================

#27591: multiprocessing: Possible uninitialized pointer use in Windows
http://bugs.python.org/issue27591

#27584: New addition of vSockets to the python socket module
http://bugs.python.org/issue27584

#27582: Mispositioned SyntaxError caret for unknown code points
http://bugs.python.org/issue27582

#27581: Fix overflow check in PySequence_Tuple
http://bugs.python.org/issue27581

#27574: Faster parsing keyword arguments
http://bugs.python.org/issue27574

#27573: code.interact() should print an exit message
http://bugs.python.org/issue27573

#27572: Support bytes-like objects when base is given to int()
http://bugs.python.org/issue27572

#27570: Avoid memcpy(. . ., NULL, 0) etc calls
http://bugs.python.org/issue27570

#27568: "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI 
http://bugs.python.org/issue27568

#27558: SystemError with bare `raise` in threading or multiprocessing
http://bugs.python.org/issue27558

#27546: Integrate tkinter and asyncio (and async)
http://bugs.python.org/issue27546

#27544: Document the ABCs for instance/subclass checks of dict view ty
http://bugs.python.org/issue27544

#27539: negative Fraction ** negative int not normalized
http://bugs.python.org/issue27539

#27536: Convert readme to reStructuredText
http://bugs.python.org/issue27536

#27534: IDLE: Reduce number and time for user process imports
http://bugs.python.org/issue27534

Top 10 most discussed issues (10)
=================================

#23951: Update devguide style to use a similar theme as Docs
http://bugs.python.org/issue23951  12 msgs

#27558: SystemError with bare `raise` in threading or multiprocessing
http://bugs.python.org/issue27558  12 msgs

#1621: Do not assume signed integer overflow behavior
http://bugs.python.org/issue1621   9 msgs

#26662: configure/Makefile doesn't check if "python" command works, ne
http://bugs.python.org/issue26662   9 msgs

#27582: Mispositioned SyntaxError caret for unknown code points
http://bugs.python.org/issue27582   9 msgs

#23262: webbrowser module broken with Firefox 36+
http://bugs.python.org/issue23262   8 msgs

#27469: Unicode filename gets crippled on Windows when drag and drop
http://bugs.python.org/issue27469   8 msgs

#27580: CSV Null Byte Error
http://bugs.python.org/issue27580   8 msgs

#24954: No way to generate or parse timezone as produced by datetime.i
http://bugs.python.org/issue24954   7 msgs

#27561: Warn against subclassing builtins, and overriding their method
http://bugs.python.org/issue27561   7 msgs

Issues closed (45)
==================

#19142: Cross-compile fails trying to execute foreign pgen on build ho
http://bugs.python.org/issue19142  closed by martin.panter

#21708: Deprecate nonstandard behavior of a dumbdbm database
http://bugs.python.org/issue21708  closed by serhiy.storchaka

#24034: Make fails Objects/typeslots.inc
http://bugs.python.org/issue24034  closed by martin.panter

#25393: 'resource' module documentation error
http://bugs.python.org/issue25393  closed by python-dev

#26207: distutils msvccompiler fails due to mspdb140.dll error on debu
http://bugs.python.org/issue26207  closed by steve.dower

#26380: Add an http method enum
http://bugs.python.org/issue26380  closed by ethan.furman

#26559: logging.handlers.MemoryHandler flushes on shutdown but not rem
http://bugs.python.org/issue26559  closed by python-dev

#26696: Document collections.abc.ByteString
http://bugs.python.org/issue26696  closed by brett.cannon

#26844: Wrong error message during import
http://bugs.python.org/issue26844  closed by brett.cannon

#27083: PYTHONCASEOK is ignored on Windows
http://bugs.python.org/issue27083  closed by brett.cannon

#27309: Visual Styles support to tk/tkinter file and message dialogs
http://bugs.python.org/issue27309  closed by steve.dower

#27417: Call CoInitializeEx on startup
http://bugs.python.org/issue27417  closed by steve.dower

#27472: add the 'unix_shell' attribute to test.support
http://bugs.python.org/issue27472  closed by xdegaye

#27512: os.fspath is certain to crash when exception raised in __fspat
http://bugs.python.org/issue27512  closed by brett.cannon

#27515: Dotted name re-import does not rebind after deletion
http://bugs.python.org/issue27515  closed by terry.reedy

#27522: Reference cycle in email.feedparser
http://bugs.python.org/issue27522  closed by r.david.murray

#27523: Silence Socket Depreciation Warnings.
http://bugs.python.org/issue27523  closed by Decorater

#27525: Wrong OS header on file created by gzip module
http://bugs.python.org/issue27525  closed by ddorda

#27527: Make not yielding from or awaiting a coroutine a SyntaxError
http://bugs.python.org/issue27527  closed by r.david.murray

#27528: Document that filterwarnings(message=...) matches the start of
http://bugs.python.org/issue27528  closed by martin.panter

#27529: Tkinter memory leak on OS X
http://bugs.python.org/issue27529  closed by ned.deily

#27531: Documentation for assert_not_called() has wrong signature
http://bugs.python.org/issue27531  closed by berker.peksag

#27532: Dictionary iterator has no len()
http://bugs.python.org/issue27532  closed by r.david.murray

#27533: release GIL in nt._isdir
http://bugs.python.org/issue27533  closed by steve.dower

#27537: Segfault Via Resource Exhaustion
http://bugs.python.org/issue27537  closed by ned.deily

#27538: Segfault on error in code object checking
http://bugs.python.org/issue27538  closed by ned.deily

#27542: Segfault in gcmodule.c:360 visit_decref
http://bugs.python.org/issue27542  closed by ned.deily

#27543: from module import function creates package reference to the m
http://bugs.python.org/issue27543  closed by brett.cannon

#27545: missing pyshellext.vcxproj prevents puilding 3.6
http://bugs.python.org/issue27545  closed by python-dev

#27548: Integer Overflow On bin()
http://bugs.python.org/issue27548  closed by serhiy.storchaka

#27549: Integer Overflow Crash On bytearray()
http://bugs.python.org/issue27549  closed by serhiy.storchaka

#27550: Integer Overflow Crash On Arithmetic Operations
http://bugs.python.org/issue27550  closed by serhiy.storchaka

#27551: Integer Overflow On print()
http://bugs.python.org/issue27551  closed by serhiy.storchaka

#27552: Integer Overflow On min()
http://bugs.python.org/issue27552  closed by serhiy.storchaka

#27553: Integer Overflow On unicode()
http://bugs.python.org/issue27553  closed by serhiy.storchaka

#27554: Integer Overflow On dir()
http://bugs.python.org/issue27554  closed by serhiy.storchaka

#27555: Integer Overflow on oct()
http://bugs.python.org/issue27555  closed by serhiy.storchaka

#27556: Integer overflow on hex()
http://bugs.python.org/issue27556  closed by serhiy.storchaka

#27557: Integer Overflow on int()
http://bugs.python.org/issue27557  closed by serhiy.storchaka

#27559: Crash On bytearray()
http://bugs.python.org/issue27559  closed by martin.panter

#27560: Memory overallocation crash and keyboard interrupt stops worki
http://bugs.python.org/issue27560  closed by martin.panter

#27563: docs for `gc.get_referrers` should explain the result format (
http://bugs.python.org/issue27563  closed by cool-RR

#27567: Add constants EPOLLRDHUP and POLLRDHUP to module select.
http://bugs.python.org/issue27567  closed by python-dev

#27571: 3.6 Seems to be ignoring the _sodium pyd file made with pip.
http://bugs.python.org/issue27571  closed by brett.cannon

#27586: Is this a regular expression library bug?
http://bugs.python.org/issue27586  closed by tim.peters
Guido van Rossum | 22 Jul 16:36 2016

Should we fix these errors?

Somebody did some research and found some bugs in CPython (IIUC). The
published some questionable fragments. If there's a volunteer we could
probably easily fix these. (I know we already have occasional Coverity
scans and there are other tools too (anybody try lgtm yet?) But this
seems honest research (also Python leaves Ruby in the dust :-):

http://www.viva64.com/en/b/0414/

--

-- 
--Guido van Rossum (python.org/~guido)
Tian JiaLin | 22 Jul 08:10 2016
Picon
Gravatar

Convert from unsigned long long to PyLong

HI There, 

Maybe I should not post this in the dev group, but I think it has some relationship on the Python core.

I'm using MySQLdb as the MySQL client. Recently I got a weird problem of this library. After looking into it, I suspect the problem may related to the conversion from unsigned long to PyLongObject. 

Here is the detail, If you are familiar with MySQLdb, the following snippet is a way to query the data from MySQL: 


connection = MySQLdb.connect(...) 

connection.autocommit(True) 
try: 
    cursor = connection.cursor() 
    if not cursor.execute(sql, values) > 0: 
            return None 
    row = cursor.fetchone() 
finally: 
    connection.close() 
return row[0] 


Sometimes the return value of execute method would be 18446744073709552000 even there is no matched data available. I checked the source code of the library, the underlying implementation is https://github.com/farcepest/MySQLdb1/blob/master/_mysql.c#L835

static PyObject * 
_mysql_ConnectionObject_affected_rows( 
        _mysql_ConnectionObject *self, 
        PyObject *args) 

        if (!PyArg_ParseTuple(args, "")) return NULL; 
        check_connection(self)
        return PyLong_FromUnsignedLongLong(mysql_affected_rows(&(self->connection))); 


And here is the official doc for mysql_affected_rows http://dev.mysql.com/doc/refman/5.7/en/mysql-affected-rows.html

Let me give a superficial understanding, please correct me if I were wrong. 

In a 64-bit system, the mysql_affected_rows is supposed to return a number of unsigned long, which means the range should be 0 ~ 2^64 (18446744073709551616), How could it be possible the function PyLong_FromUnsignedLongLong return a converted value larger than 2^64, that's what I don't understand. 

Does anyone have some ideas of it? 


The versions of the components I used: 

Python: 2.7.6 
MySQL 5.7.11 
MySQLdb 1.2.5 


Thanks 
<div><div dir="ltr">
<span>HI There,&nbsp;</span><br><br>Maybe I should not post this in the dev group, but I think it has some relationship on the Python core.<br><br><span>I'm using MySQLdb as the MySQL client. Recently I got a weird problem of this library. After looking into it, I suspect the problem may related to the conversion from unsigned long to PyLongObject.&nbsp;</span><br><br><span>Here is the detail, If you are familiar with MySQLdb, the following snippet is a way to query the data from MySQL:&nbsp;</span><br><br><br><span>connection = MySQLdb.connect(...)&nbsp;</span><br><br><span>connection.autocommit(True)&nbsp;</span><br><span>try:&nbsp;</span><br><span>&nbsp; &nbsp; cursor = connection.cursor()&nbsp;</span><br><span>&nbsp; &nbsp; if not cursor.execute(sql, values) &gt; 0:&nbsp;</span><br><span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return None&nbsp;</span><br><span>&nbsp; &nbsp; row = cursor.fetchone()&nbsp;</span><br><span>finally:&nbsp;</span><br><span>&nbsp; &nbsp; connection.close()&nbsp;</span><br><span>return row[0]&nbsp;</span><br><br><br><span>Sometimes the return value of execute method would be 18446744073709552000 even there is no matched data available. I checked the source code of the library, the underlying implementation is&nbsp;</span><a href="https://github.com/farcepest/MySQLdb1/blob/master/_mysql.c#L835" target="_blank" rel="nofollow">https://github.com/farcepest/MySQLdb1/blob/master/_mysql.c#L835</a><span>,&nbsp;</span><br><br><span>static PyObject *&nbsp;</span><br><span>_mysql_ConnectionObject_≤/span><span>affected_rows(&nbsp;</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_mysql_≤/span><span>ConnectionObject *self,&nbsp;</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PyObject *args)&nbsp;</span><br><span>{&nbsp;</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!PyArg_ParseTuple(args, "")) return NULL;&nbsp;</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;check_connection(self)</span><span>;&nbsp;</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return PyLong_FromUnsignedLongLong(</span><span>mysql_affected_rows(&amp;(self-&gt;</span><span>connection)));&nbsp;</span><br><span>}&nbsp;</span><br><br><span>And here is the official doc for mysql_affected_rows&nbsp;</span><a href="http://dev.mysql.com/doc/refman/5.7/en/mysql-affected-rows.html" target="_blank" rel="nofollow">http://dev.mysql.com/doc/refman/5.7/en/mysql-affected-rows.html</a><span>.&nbsp;</span><br><br><span>Let me give a superficial understanding, please correct me if I were wrong.&nbsp;</span><br><br><span>In a 64-bit system, the mysql_affected_rows is supposed to return a number of unsigned long, which means the range should be 0 ~ 2^64 (18446744073709551616), How could it be possible the function PyLong_FromUnsignedLongLong return a converted value larger than 2^64, that's what I don't understand.&nbsp;</span><br><br><span>Does anyone have some ideas of it?&nbsp;</span><br><br><br><span>The versions of the components I used:&nbsp;</span><br><br><span>Python: 2.7.6&nbsp;</span><br><span>MySQL 5.7.11&nbsp;</span><br><span>MySQLdb 1.2.5&nbsp;</span><br><br><br><span>Thanks&nbsp;</span><br>
</div></div>
Barry Warsaw | 19 Jul 01:40 2016
Gravatar

Fun with ExitStack

I was trying to debug a problem in some work code and I ran into some
interesting oddities with contextlib.ExitStack and other context managers in
Python 3.5.

This program creates a temporary directory, and I wanted to give it a --keep
flag to not automatically delete the tempdir at program exit.  I was using an
ExitStack to manage a bunch of resources, and the temporary directory is the
first thing pushed into the ExitStack.  At that point in the program, I check
the value of --keep and if it's set, I use ExitStack.pop_all() to clear the
stack, and thus, presumably, prevent the temporary directory from being
deleted.

There's this relevant quote in the contextlib documentation:

"""
Each instance [of an ExitStack] maintains a stack of registered callbacks that
are called in reverse order when the instance is closed (either explicitly or
implicitly at the end of a with statement). Note that callbacks are not
invoked implicitly when the context stack instance is garbage collected.
"""

However if I didn't save the reference to the pop_all'd ExitStack, the tempdir
would be immediately deleted.  If I did save a reference to the pop_all'd
ExitStack, the tempdir would live until the saved reference went out of scope
and got refcounted away.

As best I can tell this happens because TemporaryDirectory.__init__() creates
a weakref finalizer which ends up calling the _cleanup() function.  Although
it's rather difficult to trace, it does appear that when the ExitStack is
gc'd, this finalizer gets triggered (via weakref.detach()), thus causing the
_cleanup() method to be called and the tmpdir to get deleted.  I "fix" this by
doing:

    def __init__(self):
        tmpdir = TemporaryDirectory()
        self._tmpdir = (tmpdir.name if keep
                        else self.resources.enter_context(tmpdir))

There must be more to the story because when __init__() exits in the --keep
case, tmpdir should have gotten refcounted away and the directory deleted, but
it doesn't.  I haven't dug down deep enough to figure that out.

Now, while I was debugging that behavior, I ran across more interesting bits.
I put this in a file to drive some tests:

------snip snip-----
with ExitStack() as resources:
    print('enter context')
    tmpdir = resources.enter_context(X())
    resources.pop_all()
    print('exit context')
------snip snip-----

Let's say X is:

class X:
    def __enter__(self):
        print('enter Foo')
        return self

    def __exit__(self, *args, **kws):
        print('exit Foo')
        return False

the output is:

enter context
enter Foo
exit context

So far so good.  A fairly standard context manager class doesn't get its
__exit__() called even when the program exits.  Let's try this:

 <at> contextmanager
def X():
    print('enter bar')
    yield
    print('exit bar')

still good:

enter context
enter bar
exit context

Let's modify X a little bit to be a more common idiom:

 <at> contextmanager
def X():
    print('enter foo')
    try:
        yield
    finally:
        print('exit foo')

enter context
enter foo
exit foo
exit context

Ah, the try-finally changes the behavior!  There's probably some documentation
somewhere that defines how a generator gets finalized, and that triggers the
finally clause, whereas in the previous example, nothing after the yield gets
run.  I just can't find that anything that would describe the observed
behavior.

It's all very twisty, and I'm not sure Python is doing anything wrong, but I'm
also not sure it's *not* doing anything wrong. ;)

In any case, the contextlib documentation quoted above should probably be more
liberally sprinkled with salty caveats.  Just calling .pop_all() isn't
necessarily enough to ensure that resources managed by an ExitStack will
survive its garbage collection.

Cheers,
-Barry
I was trying to debug a problem in some work code and I ran into some
interesting oddities with contextlib.ExitStack and other context managers in
Python 3.5.

This program creates a temporary directory, and I wanted to give it a --keep
flag to not automatically delete the tempdir at program exit.  I was using an
ExitStack to manage a bunch of resources, and the temporary directory is the
first thing pushed into the ExitStack.  At that point in the program, I check
the value of --keep and if it's set, I use ExitStack.pop_all() to clear the
stack, and thus, presumably, prevent the temporary directory from being
deleted.

There's this relevant quote in the contextlib documentation:

"""
Each instance [of an ExitStack] maintains a stack of registered callbacks that
are called in reverse order when the instance is closed (either explicitly or
implicitly at the end of a with statement). Note that callbacks are not
invoked implicitly when the context stack instance is garbage collected.
"""

However if I didn't save the reference to the pop_all'd ExitStack, the tempdir
would be immediately deleted.  If I did save a reference to the pop_all'd
ExitStack, the tempdir would live until the saved reference went out of scope
and got refcounted away.

As best I can tell this happens because TemporaryDirectory.__init__() creates
a weakref finalizer which ends up calling the _cleanup() function.  Although
it's rather difficult to trace, it does appear that when the ExitStack is
gc'd, this finalizer gets triggered (via weakref.detach()), thus causing the
_cleanup() method to be called and the tmpdir to get deleted.  I "fix" this by
doing:

    def __init__(self):
        tmpdir = TemporaryDirectory()
        self._tmpdir = (tmpdir.name if keep
                        else self.resources.enter_context(tmpdir))

There must be more to the story because when __init__() exits in the --keep
case, tmpdir should have gotten refcounted away and the directory deleted, but
it doesn't.  I haven't dug down deep enough to figure that out.

Now, while I was debugging that behavior, I ran across more interesting bits.
I put this in a file to drive some tests:

------snip snip-----
with ExitStack() as resources:
    print('enter context')
    tmpdir = resources.enter_context(X())
    resources.pop_all()
    print('exit context')
------snip snip-----

Let's say X is:

class X:
    def __enter__(self):
        print('enter Foo')
        return self

    def __exit__(self, *args, **kws):
        print('exit Foo')
        return False

the output is:

enter context
enter Foo
exit context

So far so good.  A fairly standard context manager class doesn't get its
__exit__() called even when the program exits.  Let's try this:

 <at> contextmanager
def X():
    print('enter bar')
    yield
    print('exit bar')

still good:

enter context
enter bar
exit context

Let's modify X a little bit to be a more common idiom:

 <at> contextmanager
def X():
    print('enter foo')
    try:
        yield
    finally:
        print('exit foo')

enter context
enter foo
exit foo
exit context

Ah, the try-finally changes the behavior!  There's probably some documentation
somewhere that defines how a generator gets finalized, and that triggers the
finally clause, whereas in the previous example, nothing after the yield gets
run.  I just can't find that anything that would describe the observed
behavior.

It's all very twisty, and I'm not sure Python is doing anything wrong, but I'm
also not sure it's *not* doing anything wrong. ;)

In any case, the contextlib documentation quoted above should probably be more
liberally sprinkled with salty caveats.  Just calling .pop_all() isn't
necessarily enough to ensure that resources managed by an ExitStack will
survive its garbage collection.

Cheers,
-Barry
Ethan Furman | 19 Jul 00:00 2016
Picon
Gravatar

Re: PEP 467: next round

On 07/18/2016 02:45 PM, Brett Cannon wrote:
> On Mon, 18 Jul 2016 at 14:35 Alexander Belopolsky wrote:
>> On Mon, Jul 18, 2016 at 5:01 PM, Jonathan Goble wrote:

>>> full(), despite its use in numpy, is also unintuitive to me (my first
>>> thought is that it would indicate whether an object has room for more
>>> entries).
>>>
>>> Perhaps bytes.fillsize?
>>
>> I wouldn't want to see bytes.full() either.  Maybe bytes.of_size()?
>
> Or bytes.fromsize() to stay with the trend of naming constructor methods
>  as from*() ?

bytes.fromsize() sounds good to me, thanks for brainstorming that one for
me.  I wasn't really happy with 'size()' either.

--
~Ethan~
Ethan Furman | 18 Jul 22:17 2016
Picon
Gravatar

PEP 467: next round

Taking into consideration the comments from the last round:

- 'bytes.zeros' renamed to 'bytes.size', with option byte filler
   (defaults to b'\x00')
- 'bytes.byte' renamed to 'fromint', add 'bchr' function
- deprecation and removal softened to deprecation/discouragement

-----------

PEP: 467
Title: Minor API improvements for binary sequences
Version: $Revision$
Last-Modified: $Date$
Author: Nick Coghlan <ncoghlan <at> gmail.com>, Ethan Furman <ethan <at> stoneleaf.us>
Status: Draft
Type: Standards Track
Content-Type: text/x-rst
Created: 2014-03-30
Python-Version: 3.6
Post-History: 2014-03-30 2014-08-15 2014-08-16 2016-06-07

Abstract
========

During the initial development of the Python 3 language specification, the
core ``bytes`` type for arbitrary binary data started as the mutable type
that is now referred to as ``bytearray``. Other aspects of operating in
the binary domain in Python have also evolved over the course of the Python
3 series.

This PEP proposes five small adjustments to the APIs of the ``bytes``,
``bytearray`` and ``memoryview`` types to make it easier to operate entirely
in the binary domain:

* Deprecate passing single integer values to ``bytes`` and ``bytearray``
* Add ``bytes.size`` and ``bytearray.size`` alternative constructors
* Add ``bytes.fromint`` and ``bytearray.fromint`` alternative constructors
* Add ``bytes.getbyte`` and ``bytearray.getbyte`` byte retrieval methods
* Add ``bytes.iterbytes``, ``bytearray.iterbytes`` and
   ``memoryview.iterbytes`` alternative iterators

Proposals
=========

Deprecation of current "zero-initialised sequence" behaviour without removal
----------------------------------------------------------------------------

Currently, the ``bytes`` and ``bytearray`` constructors accept an integer
argument and interpret it as meaning to create a zero-initialised sequence
of the given size::

     >>> bytes(3)
     b'\x00\x00\x00'
     >>> bytearray(3)
     bytearray(b'\x00\x00\x00')

This PEP proposes to deprecate that behaviour in Python 3.6, but to leave
it in place for at least as long as Python 2.7 is supported, possibly
indefinitely.

No other changes are proposed to the existing constructors.

Addition of explicit "count and byte initialised sequence" constructors
-----------------------------------------------------------------------

To replace the deprecated behaviour, this PEP proposes the addition of an
explicit ``size`` alternative constructor as a class method on both
``bytes`` and ``bytearray`` whose first argument is the count, and whose
second argument is the fill byte to use (defaults to ``\x00``)::

     >>> bytes.size(3)
     b'\x00\x00\x00'
     >>> bytearray.size(3)
     bytearray(b'\x00\x00\x00')
     >>> bytes.size(5, b'\x0a')
     b'\x0a\x0a\x0a\x0a\x0a'
     >>> bytearray.size(5, b'\x0a')
     bytearray(b'\x0a\x0a\x0a\x0a\x0a')

It will behave just as the current constructors behave when passed a single
integer.

Addition of "bchr" function and explicit "single byte" constructors
-------------------------------------------------------------------

As binary counterparts to the text ``chr`` function, this PEP proposes
the addition of a ``bchr`` function and an explicit ``fromint`` alternative
constructor as a class method on both ``bytes`` and ``bytearray``::

     >>> bchr(ord("A"))
     b'A'
     >>> bchr(ord(b"A"))
     b'A'
     >>> bytes.fromint(65)
     b'A'
     >>> bytearray.fromint(65)
     bytearray(b'A')

These methods will only accept integers in the range 0 to 255 (inclusive)::

     >>> bytes.fromint(512)
     Traceback (most recent call last):
       File "<stdin>", line 1, in <module>
     ValueError: integer must be in range(0, 256)

     >>> bytes.fromint(1.0)
     Traceback (most recent call last):
       File "<stdin>", line 1, in <module>
     TypeError: 'float' object cannot be interpreted as an integer

The documentation of the ``ord`` builtin will be updated to explicitly note
that ``bchr`` is the primary inverse operation for binary data, while ``chr``
is the inverse operation for text data, and that ``bytes.fromint`` and
``bytearray.fromint`` also exist.

Behaviourally, ``bytes.fromint(x)`` will be equivalent to the current
``bytes([x])`` (and similarly for ``bytearray``). The new spelling is
expected to be easier to discover and easier to read (especially when used
in conjunction with indexing operations on binary sequence types).

As a separate method, the new spelling will also work better with higher
order functions like ``map``.

Addition of "getbyte" method to retrieve a single byte
------------------------------------------------------

This PEP proposes that ``bytes`` and ``bytearray`` gain the method ``getbyte``
which will always return ``bytes``::

     >>> b'abc'.getbyte(0)
     b'a'

If an index is asked for that doesn't exist, ``IndexError`` is raised::

     >>> b'abc'.getbyte(9)
     Traceback (most recent call last):
       File "<stdin>", line 1, in <module>
     IndexError: index out of range

Addition of optimised iterator methods that produce ``bytes`` objects
---------------------------------------------------------------------

This PEP proposes that ``bytes``, ``bytearray`` and ``memoryview`` gain an
optimised ``iterbytes`` method that produces length 1 ``bytes`` objects
rather than integers::

     for x in data.iterbytes():
         # x is a length 1 ``bytes`` object, rather than an integer

For example::

     >>> tuple(b"ABC".iterbytes())
     (b'A', b'B', b'C')

The method can be used with arbitrary buffer exporting objects by wrapping
them in a ``memoryview`` instance first::

     for x in memoryview(data).iterbytes():
         # x is a length 1 ``bytes`` object, rather than an integer

For ``memoryview``, the semantics of ``iterbytes()`` are defined such that::

     memview.tobytes() == b''.join(memview.iterbytes())

This allows the raw bytes of the memory view to be iterated over without
needing to make a copy, regardless of the defined shape and format.

The main advantage this method offers over the ``map(bytes.byte, data)``
approach is that it is guaranteed *not* to fail midstream with a
``ValueError`` or ``TypeError``. By contrast, when using the ``map`` based
approach, the type and value of the individual items in the iterable are
only checked as they are retrieved and passed through the ``bytes.byte``
constructor.

Design discussion
=================

Why not rely on sequence repetition to create zero-initialised sequences?
-------------------------------------------------------------------------

Zero-initialised sequences can be created via sequence repetition::

     >>> b'\x00' * 3
     b'\x00\x00\x00'
     >>> bytearray(b'\x00') * 3
     bytearray(b'\x00\x00\x00')

However, this was also the case when the ``bytearray`` type was originally
designed, and the decision was made to add explicit support for it in the
type constructor. The immutable ``bytes`` type then inherited that feature
when it was introduced in PEP 3137.

This PEP isn't revisiting that original design decision, just changing the
spelling as users sometimes find the current behaviour of the binary sequence
constructors surprising. In particular, there's a reasonable case to be made
that ``bytes(x)`` (where ``x`` is an integer) should behave like the
``bytes.byte(x)`` proposal in this PEP. Providing both behaviours as separate
class methods avoids that ambiguity.

References
==========

.. [1] Initial March 2014 discussion thread on python-ideas
    (https://mail.python.org/pipermail/python-ideas/2014-March/027295.html)
.. [2] Guido's initial feedback in that thread
    (https://mail.python.org/pipermail/python-ideas/2014-March/027376.html)
.. [3] Issue proposing moving zero-initialised sequences to a dedicated API
    (http://bugs.python.org/issue20895)
.. [4] Issue proposing to use calloc() for zero-initialised binary sequences
    (http://bugs.python.org/issue21644)
.. [5] August 2014 discussion thread on python-dev
    (https://mail.python.org/pipermail/python-ideas/2014-March/027295.html)
.. [6] June 2016 discussion thread on python-dev
    (https://mail.python.org/pipermail/python-dev/2016-June/144875.html)

Copyright
=========

This document has been placed in the public domain.
Steve Dower | 16 Jul 00:20 2016

PEP 514: Python registration in the Windows registry

Hi all

I'd like to get this PEP approved (status changed to Active, IIUC).

So far (to my knowledge), Anaconda is writing out the new metadata and 
Visual Studio is reading it. Any changes to the schema now will require 
somewhat public review anyway, so I don't see any harm in approving the 
PEP right now.

To reiterate, this doesn't require changing anything about CPython at 
all and has no backwards compatibility impact on official releases (but 
hopefully it will stop alternative distros from overwriting our 
essential metadata and causing problems).

I suppose I look to Guido first, unless he wants to delegate to one of 
the other Windows contributors?

Cheers,
Steve

URL: https://www.python.org/dev/peps/pep-0514/

Full text
-------

PEP: 514
Title: Python registration in the Windows registry
Version: $Revision$
Last-Modified: $Date$
Author: Steve Dower <steve.dower <at> python.org>
Status: Draft
Type: Informational
Content-Type: text/x-rst
Created: 02-Feb-2016
Post-History: 02-Feb-2016, 01-Mar-2016

Abstract
========

This PEP defines a schema for the Python registry key to allow third-party
installers to register their installation, and to allow applications to 
detect
and correctly display all Python environments on a user's machine. No
implementation changes to Python are proposed with this PEP.

Python environments are not required to be registered unless they want to be
automatically discoverable by external tools.

The schema matches the registry values that have been used by the official
installer since at least Python 2.5, and the resolution behaviour 
matches the
behaviour of the official Python releases.

Motivation
==========

When installed on Windows, the official Python installer creates a 
registry key
for discovery and detection by other applications. This allows tools such as
installers or IDEs to automatically detect and display a user's Python
installations.

Third-party installers, such as those used by distributions, typically 
create
identical keys for the same purpose. Most tools that use the registry to 
detect
Python installations only inspect the keys used by the official 
installer. As a
result, third-party installations that wish to be discoverable will 
overwrite
these values, resulting in users "losing" their Python installation.

By describing a layout for registry keys that allows third-party 
installations
to register themselves uniquely, as well as providing tool developers 
guidance
for discovering all available Python installations, these collisions 
should be
prevented.

Definitions
===========

A "registry key" is the equivalent of a file-system path into the 
registry. Each
key may contain "subkeys" (keys nested within keys) and "values" (named and
typed attributes attached to a key).

``HKEY_CURRENT_USER`` is the root of settings for the currently 
logged-in user,
and this user can generally read and write all settings under this root.

``HKEY_LOCAL_MACHINE`` is the root of settings for all users. Generally, any
user can read these settings but only administrators can modify them. It is
typical for values under ``HKEY_CURRENT_USER`` to take precedence over 
those in
``HKEY_LOCAL_MACHINE``.

On 64-bit Windows, ``HKEY_LOCAL_MACHINE\Software\Wow6432Node`` is a 
special key
that 32-bit processes transparently read and write to rather than 
accessing the
``Software`` key directly.

Structure
=========

We consider there to be a single collection of Python environments on a 
machine,
where the collection may be different for each user of the machine. 
There are
three potential registry locations where the collection may be stored 
based on
the installation options of each environment::

     HKEY_CURRENT_USER\Software\Python\<Company>\<Tag>
     HKEY_LOCAL_MACHINE\Software\Python\<Company>\<Tag>
     HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\<Company>\<Tag>

Environments are uniquely identified by their Company-Tag pair, with two 
options
for conflict resolution: include everything, or give priority to user
preferences.

Tools that include every installed environment, even where the 
Company-Tag pairs
match, should ensure users can easily identify whether the registration was
per-user or per-machine.

When tools are selecting a single installed environment from all registered
environments, the intent is that user preferences from ``HKEY_CURRENT_USER``
will override matching Company-Tag pairs in ``HKEY_LOCAL_MACHINE``.

Official Python releases use ``PythonCore`` for Company, and the value of
``sys.winver`` for Tag. Other registered environments may use any values for
Company and Tag. Recommendations are made in the following sections.

Python environments are not required to register themselves unless they 
want to
be automatically discoverable by external tools.

Backwards Compatibility
-----------------------

Python 3.4 and earlier did not distinguish between 32-bit and 64-bit 
builds in
``sys.winver``. As a result, it is possible to have valid side-by-side
installations of both 32-bit and 64-bit interpreters.

To ensure backwards compatibility, applications should treat 
environments listed
under the following two registry keys as distinct, even when the Tag 
matches::

     HKEY_LOCAL_MACHINE\Software\Python\PythonCore\<Tag>
     HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\PythonCore\<Tag>

Environments listed under ``HKEY_CURRENT_USER`` may be treated as 
distinct from
both of the above keys, potentially resulting in three environments 
discovered
using the same Tag. Alternatively, a tool may determine whether the per-user
environment is 64-bit or 32-bit and give it priority over the per-machine
environment, resulting in a maximum of two discovered environments.

It is not possible to detect side-by-side installations of both 64-bit and
32-bit versions of Python prior to 3.5 when they have been installed for the
current user. Python 3.5 and later always uses different Tags for 64-bit and
32-bit versions.

Environments registered under other Company names must use distinct Tags to
support side-by-side installations. Tools consuming these registrations are
not required to disambiguate tags other than by preferring the user's 
setting.

Company
-------

The Company part of the key is intended to group related environments and to
ensure that Tags are namespaced appropriately. The key name should be
alphanumeric without spaces and likely to be unique. For example, a 
trademarked
name, a UUID, or a hostname would be appropriate::

     HKEY_CURRENT_USER\Software\Python\ExampleCorp
     HKEY_CURRENT_USER\Software\Python\6C465E66-5A8C-4942-9E6A-D29159480C60
     HKEY_CURRENT_USER\Software\Python\www.example.com

The company name ``PyLauncher`` is reserved for the PEP 397 launcher
(``py.exe``). It does not follow this convention and should be ignored 
by tools.

If a string value named ``DisplayName`` exists, it should be used to 
identify
the environment category to users. Otherwise, the name of the key should be
used.

If a string value named ``SupportUrl`` exists, it may be displayed or 
otherwise
used to direct users to a web site related to the environment.

A complete example may look like::

     HKEY_CURRENT_USER\Software\Python\ExampleCorp
         (Default) = (value not set)
         DisplayName = "Example Corp"
         SupportUrl = "http://www.example.com"

Tag
---

The Tag part of the key is intended to uniquely identify an environment 
within
those provided by a single company. The key name should be alphanumeric 
without
spaces and stable across installations. For example, the Python language
version, a UUID or a partial/complete hash would be appropriate; an integer
counter that increases for each new environment may not::

     HKEY_CURRENT_USER\Software\Python\ExampleCorp\3.6
     HKEY_CURRENT_USER\Software\Python\ExampleCorp\6C465E66

If a string value named ``DisplayName`` exists, it should be used to 
identify
the environment to users. Otherwise, the name of the key should be used.

If a string value named ``SupportUrl`` exists, it may be displayed or 
otherwise
used to direct users to a web site related to the environment.

If a string value named ``Version`` exists, it should be used to 
identify the
version of the environment. This is independent from the version of Python
implemented by the environment.

If a string value named ``SysVersion`` exists, it must be in ``x.y`` or
``x.y.z`` format matching the version returned by ``sys.version_info`` 
in the
interpreter. Otherwise, if the Tag matches this format it is used. If 
not, the
Python version is unknown.

Note that each of these values is recommended, but optional. A complete 
example
may look like this::

     HKEY_CURRENT_USER\Software\Python\ExampleCorp\6C465E66
         (Default) = (value not set)
         DisplayName = "Distro 3"
         SupportUrl = "http://www.example.com/distro-3"
         Version = "3.0.12345.0"
         SysVersion = "3.6.0"

InstallPath
-----------

Beneath the environment key, an ``InstallPath`` key must be created. 
This key is
always named ``InstallPath``, and the default value must match 
``sys.prefix``::

     HKEY_CURRENT_USER\Software\Python\ExampleCorp\3.6\InstallPath
         (Default) = "C:\ExampleCorpPy36"

If a string value named ``ExecutablePath`` exists, it must be a path to the
``python.exe`` (or equivalent) executable. Otherwise, the interpreter 
executable
is assumed to be called ``python.exe`` and exist in the directory 
referenced by
the default value.

If a string value named ``WindowedExecutablePath`` exists, it must be a 
path to
the ``pythonw.exe`` (or equivalent) executable. Otherwise, the windowed
interpreter executable is assumed to be called ``pythonw.exe`` and exist 
in the
directory referenced by the default value.

A complete example may look like::

     HKEY_CURRENT_USER\Software\Python\ExampleCorp\6C465E66\InstallPath
         (Default) = "C:\ExampleDistro30"
         ExecutablePath = "C:\ExampleDistro30\ex_python.exe"
         WindowedExecutablePath = "C:\ExampleDistro30\ex_pythonw.exe"

Help
----

Beneath the environment key, a ``Help`` key may be created. This key is 
always
named ``Help`` if present and has no default value.

Each subkey of ``Help`` specifies a documentation file, tool, or URL 
associated
with the environment. The subkey may have any name, and the default 
value is a
string appropriate for passing to ``os.startfile`` or equivalent.

If a string value named ``DisplayName`` exists, it should be used to 
identify
the help file to users. Otherwise, the key name should be used.

A complete example may look like::

     HKEY_CURRENT_USER\Software\Python\ExampleCorp\6C465E66\Help
         Python\
             (Default) = "C:\ExampleDistro30\python36.chm"
             DisplayName = "Python Documentation"
         Extras\
             (Default) = "http://www.example.com/tutorial"
             DisplayName = "Example Distro Online Tutorial"

Other Keys
----------

Some other registry keys are used for defining or inferring search paths 
under
certain conditions. A third-party installation is permitted to define 
these keys
under their Company-Tag key, however, the interpreter must be modified and
rebuilt in order to read these values. Alternatively, the interpreter may be
modified to not use any registry keys for determining search paths. 
Making such
changes is a decision for the third party; this PEP makes no recommendation
either way.

Copyright
=========

This document has been placed in the public domain.
Python tracker | 15 Jul 18:08 2016

Summary of Python tracker Issues


ACTIVITY SUMMARY (2016-07-08 - 2016-07-15)
Python tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.

Issues counts and deltas:
  open    5562 (+12)
  closed 33715 (+39)
  total  39277 (+51)

Open issues with patches: 2429 

Issues opened (33)
==================

#27469: Unicode filename gets crippled on Windows when drag and drop
http://bugs.python.org/issue27469  reopened by eryksun

#27470: -3 commandline option documented differently via man
http://bugs.python.org/issue27470  opened by mgilson

#27471: sre_constants.error: bad escape \d
http://bugs.python.org/issue27471  opened by Noah Petherbridge

#27472: add the 'unix_shell' attribute to test.support
http://bugs.python.org/issue27472  opened by xdegaye

#27477: IDLE: Switch dialogs to ttk widgets.
http://bugs.python.org/issue27477  opened by terry.reedy

#27482: heap-buffer-overflow on address 0x6250000078ff
http://bugs.python.org/issue27482  opened by mtowalski

#27483: Expose HEAD_LOCK/HEAD_UNLOCK in pystate.c
http://bugs.python.org/issue27483  opened by fijall

#27485: urllib.splitport -- is it official or not?
http://bugs.python.org/issue27485  opened by gvanrossum

#27486: FTPlib hangs on some pasv responses
http://bugs.python.org/issue27486  opened by Byoungwoo Song

#27487: -m switch regression in Python 3.5.2 (under rare circumstances
http://bugs.python.org/issue27487  opened by wolma

#27490: ARM cross-compile: pgen built without $(CFLAGS) as $(LIBRARY) 
http://bugs.python.org/issue27490  opened by Thomas Perl

#27491: Errors when building with UNICODE character set
http://bugs.python.org/issue27491  opened by Minmin.Gong

#27492: Enhance bytearray_repr with bytes_repr's logic
http://bugs.python.org/issue27492  opened by xiang.zhang

#27493: logging module fails with unclear error when supplied a (Posix
http://bugs.python.org/issue27493  opened by rhendrikse

#27494: 2to3 parser failure caused by a comma after a generator expres
http://bugs.python.org/issue27494  opened by jstasiak

#27495: Pretty printing sorting for set and frozenset instances
http://bugs.python.org/issue27495  opened by danilo.bellini

#27496: unicodedata.name() doesn't have names for control characters
http://bugs.python.org/issue27496  opened by zwol

#27497: csv module: Add return value to DictWriter.writeheader
http://bugs.python.org/issue27497  opened by lsowen

#27499: PY_SSIZE_T_CLEAN conflicts with Py_LIMITED_API
http://bugs.python.org/issue27499  opened by dholth

#27500: ProactorEventLoop cannot open connection to ::1
http://bugs.python.org/issue27500  opened by sebastien.bourdeauducq

#27501: Add typing.py class describing a PEP 3118 buffer object
http://bugs.python.org/issue27501  opened by Daniel Moisset

#27502: Python -m Module Vulnerable to Buffer Over Flow.
http://bugs.python.org/issue27502  opened by DhirajMishra

#27505: Missing documentation for setting module __class__ attribute
http://bugs.python.org/issue27505  opened by ncoghlan

#27506: make bytes/bytearray delete a keyword argument
http://bugs.python.org/issue27506  opened by xiang.zhang

#27507: bytearray.extend lacks overflow check when increasing buffer
http://bugs.python.org/issue27507  opened by xiang.zhang

#27509: Some tests breaks PGO build on Windows
http://bugs.python.org/issue27509  opened by Charles G.

#27511: Add PathLike objects support to BZ2File
http://bugs.python.org/issue27511  opened by xiang.zhang

#27512: os.fspath is certain to crash when exception raised in __fspat
http://bugs.python.org/issue27512  opened by xiang.zhang

#27513: email.utils.getaddresses does not handle Header objects
http://bugs.python.org/issue27513  opened by frispete

#27515: Dotted name re-import does not rebind after deletion
http://bugs.python.org/issue27515  opened by terry.reedy

#27516: Wrong initialization of python path with embeddable distributi
http://bugs.python.org/issue27516  opened by palm.kevin

#27517: LZMACompressor and LZMADecompressor raise exceptions if given 
http://bugs.python.org/issue27517  opened by benfogle

#27520: Issue when building PGO
http://bugs.python.org/issue27520  opened by Decorater

Most recent 15 issues with no replies (15)
==========================================

#27520: Issue when building PGO
http://bugs.python.org/issue27520

#27511: Add PathLike objects support to BZ2File
http://bugs.python.org/issue27511

#27505: Missing documentation for setting module __class__ attribute
http://bugs.python.org/issue27505

#27494: 2to3 parser failure caused by a comma after a generator expres
http://bugs.python.org/issue27494

#27491: Errors when building with UNICODE character set
http://bugs.python.org/issue27491

#27486: FTPlib hangs on some pasv responses
http://bugs.python.org/issue27486

#27482: heap-buffer-overflow on address 0x6250000078ff
http://bugs.python.org/issue27482

#27470: -3 commandline option documented differently via man
http://bugs.python.org/issue27470

#27451: gzip.py: Please save more of the gzip header for later examina
http://bugs.python.org/issue27451

#27446: struct: allow per-item byte order
http://bugs.python.org/issue27446

#27445: Charset instance not passed to set_payload()
http://bugs.python.org/issue27445

#27435: ctypes and AIX - also for 2.7.X (and later)
http://bugs.python.org/issue27435

#27428: Document WindowsRegistryFinder inherits from MetaPathFinder
http://bugs.python.org/issue27428

#27426: Encoding mismatch causes some tests to fail on Windows
http://bugs.python.org/issue27426

#27420: Docs for os.link - say what happens if link already exists
http://bugs.python.org/issue27420

Most recent 15 issues waiting for review (15)
=============================================

#27517: LZMACompressor and LZMADecompressor raise exceptions if given 
http://bugs.python.org/issue27517

#27512: os.fspath is certain to crash when exception raised in __fspat
http://bugs.python.org/issue27512

#27511: Add PathLike objects support to BZ2File
http://bugs.python.org/issue27511

#27507: bytearray.extend lacks overflow check when increasing buffer
http://bugs.python.org/issue27507

#27506: make bytes/bytearray delete a keyword argument
http://bugs.python.org/issue27506

#27501: Add typing.py class describing a PEP 3118 buffer object
http://bugs.python.org/issue27501

#27495: Pretty printing sorting for set and frozenset instances
http://bugs.python.org/issue27495

#27492: Enhance bytearray_repr with bytes_repr's logic
http://bugs.python.org/issue27492

#27491: Errors when building with UNICODE character set
http://bugs.python.org/issue27491

#27477: IDLE: Switch dialogs to ttk widgets.
http://bugs.python.org/issue27477

#27472: add the 'unix_shell' attribute to test.support
http://bugs.python.org/issue27472

#27461: Optimize PNGs
http://bugs.python.org/issue27461

#27454: PyUnicode_InternInPlace can use PyDict_SetDefault
http://bugs.python.org/issue27454

#27453: $CPP invocation in configure must use $CPPFLAGS
http://bugs.python.org/issue27453

#27452: IDLE: Cleanup config code
http://bugs.python.org/issue27452

Top 10 most discussed issues (10)
=================================

#26988: Add AutoNumberedEnum to stdlib
http://bugs.python.org/issue26988  19 msgs

#27078: Make f'' strings faster than .format: BUILD_STRING opcode?
http://bugs.python.org/issue27078  15 msgs

#27487: -m switch regression in Python 3.5.2 (under rare circumstances
http://bugs.python.org/issue27487  15 msgs

#27512: os.fspath is certain to crash when exception raised in __fspat
http://bugs.python.org/issue27512  14 msgs

#14977: mailcap does not respect precedence in the presence of wildcar
http://bugs.python.org/issue14977  13 msgs

#18966: Threads within multiprocessing Process terminate early
http://bugs.python.org/issue18966  13 msgs

#27392: Add a server_side keyword parameter to create_connection
http://bugs.python.org/issue27392  12 msgs

#27515: Dotted name re-import does not rebind after deletion
http://bugs.python.org/issue27515  12 msgs

#27469: Unicode filename gets crippled on Windows when drag and drop
http://bugs.python.org/issue27469  11 msgs

#27497: csv module: Add return value to DictWriter.writeheader
http://bugs.python.org/issue27497  10 msgs

Issues closed (37)
==================

#8538: Add FlagAction to argparse
http://bugs.python.org/issue8538  closed by haypo

#10697: host and port attributes not documented well in function urlli
http://bugs.python.org/issue10697  closed by martin.panter

#20674: Update comments in dictobject.c
http://bugs.python.org/issue20674  closed by r.david.murray

#22125: Cure signedness warnings introduced by #22003
http://bugs.python.org/issue22125  closed by berker.peksag

#25548: Show the address in the repr for class objects
http://bugs.python.org/issue25548  closed by python-dev

#25572: _ssl doesn't build on OSX 10.11
http://bugs.python.org/issue25572  closed by matrixise

#26176: EmailMessage example doesn't work
http://bugs.python.org/issue26176  closed by r.david.murray

#26446: Mention in the devguide that core dev stuff falls under the PS
http://bugs.python.org/issue26446  closed by berker.peksag

#26896: mix-up with the terms 'importer', 'finder', 'loader' in the im
http://bugs.python.org/issue26896  closed by brett.cannon

#26972: mistakes in docstrings in the import machinery
http://bugs.python.org/issue26972  closed by brett.cannon

#27027: add the 'is_android' attribute to test.support
http://bugs.python.org/issue27027  closed by xdegaye

#27180: Doc/pathlib: Please describe the behaviour of Path().rename() 
http://bugs.python.org/issue27180  closed by berker.peksag

#27285: Document the deprecation of pyvenv in favor of `python3 -m ven
http://bugs.python.org/issue27285  closed by brett.cannon

#27369: Tests break with --with-system-expat and Expat 2.2.0
http://bugs.python.org/issue27369  closed by benjamin.peterson

#27442: expose the Android API level in sysconfig.get_config_vars()
http://bugs.python.org/issue27442  closed by xdegaye

#27455: Fix tkinter examples to be PEP8 compliant
http://bugs.python.org/issue27455  closed by berker.peksag

#27466: [Copy from github user macartur] time2netscape missing comma
http://bugs.python.org/issue27466  closed by orsenthil

#27468: Erroneous memory behaviour for objects created in another thre
http://bugs.python.org/issue27468  closed by Adria Garriga

#27473: bytes_concat seems to check overflow using undefined behaviour
http://bugs.python.org/issue27473  closed by serhiy.storchaka

#27474: Unify exception in _Py_bytes_contains for integers
http://bugs.python.org/issue27474  closed by serhiy.storchaka

#27475: define_macros uses incorrect parameter for msvc compilers
http://bugs.python.org/issue27475  closed by eryksun

#27476: Introduce a .github folder with PULL_REQUEST_TEMPLATE
http://bugs.python.org/issue27476  closed by berker.peksag

#27478: Python Can't run
http://bugs.python.org/issue27478  closed by orsenthil

#27479: Slicing strings out of bounds does not raise IndexError
http://bugs.python.org/issue27479  closed by eryksun

#27480: Cannot link _crypt and _nis modules on a host with glibc-2.12
http://bugs.python.org/issue27480  closed by r.david.murray

#27481: Replace TypeError with ValueError in doc regarding "embedded N
http://bugs.python.org/issue27481  closed by serhiy.storchaka

#27484: Some Examples in Format String Syntax are incorrect or poorly 
http://bugs.python.org/issue27484  closed by r.david.murray

#27488: Underscore not showing Mac El Capitan
http://bugs.python.org/issue27488  closed by zach.ware

#27489: Win 10, choco install python gets message: Access to the path 
http://bugs.python.org/issue27489  closed by eryksun

#27498: Regression in repr() of class object
http://bugs.python.org/issue27498  closed by python-dev

#27503: support RUSAGE_THREAD as a constant in the resource module
http://bugs.python.org/issue27503  closed by r.david.murray

#27504: Missing assertion methods in unittest documentation
http://bugs.python.org/issue27504  closed by berker.peksag

#27508: process thread with implicit join is killed unexpectedly
http://bugs.python.org/issue27508  closed by tim.peters

#27510: Found some Solution build missconfigurations.
http://bugs.python.org/issue27510  closed by steve.dower

#27514: SystemError when compiling deeply nested for loops
http://bugs.python.org/issue27514  closed by python-dev

#27518: small typo error in Grammar/Grammar
http://bugs.python.org/issue27518  closed by berker.peksag

#27519: update the references to http://mercurial.selenic.com
http://bugs.python.org/issue27519  closed by berker.peksag

Gmane