Keyboard Shortcuts
Thread View
j: Next unread messagek: Previous unread messagej a: Jump to all threadsj l: Jump to MailingList overview
Python-Dev
Download Threads by month- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1999 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
October 2014
- 75 participants
- 48 discussions
by barry@zope.com May 18, 2021
May 18, 2021 It has been a while since I posted a copy of PEP 1 to the mailing lists and newsgroups. I've recently done some updating of a few sections, so in the interest of gaining wider community participation in the Python development process, I'm posting the latest revision of PEP 1 here. A version of the PEP is always available on-line at http://www.python.org/peps/pep-0001.html Enjoy, -Barry -------------------- snip snip -------------------- PEP: 1 Title: PEP Purpose and Guidelines Version: $Revision: 1.36 $ Last-Modified: $Date: 2002/07/29 18:34:59 $ Author: Barry A. Warsaw, Jeremy Hylton Status: Active Type: Informational Created: 13-Jun-2000 Post-History: 21-Mar-2001, 29-Jul-2002 What is a PEP? PEP stands for Python Enhancement Proposal. A PEP is a design document providing information to the Python community, or describing a new feature for Python. The PEP should provide a concise technical specification of the feature and a rationale for the feature. We intend PEPs to be the primary mechanisms for proposing new features, for collecting community input on an issue, and for documenting the design decisions that have gone into Python. The PEP author is responsible for building consensus within the community and documenting dissenting opinions. Because the PEPs are maintained as plain text files under CVS control, their revision history is the historical record of the feature proposal[1]. Kinds of PEPs There are two kinds of PEPs. A standards track PEP describes a new feature or implementation for Python. An informational PEP describes a Python design issue, or provides general guidelines or information to the Python community, but does not propose a new feature. Informational PEPs do not necessarily represent a Python community consensus or recommendation, so users and implementors are free to ignore informational PEPs or follow their advice. PEP Work Flow The PEP editor, Barry Warsaw <peps(a)python.org>, assigns numbers for each PEP and changes its status. The PEP process begins with a new idea for Python. It is highly recommended that a single PEP contain a single key proposal or new idea. The more focussed the PEP, the more successfully it tends to be. The PEP editor reserves the right to reject PEP proposals if they appear too unfocussed or too broad. If in doubt, split your PEP into several well-focussed ones. Each PEP must have a champion -- someone who writes the PEP using the style and format described below, shepherds the discussions in the appropriate forums, and attempts to build community consensus around the idea. The PEP champion (a.k.a. Author) should first attempt to ascertain whether the idea is PEP-able. Small enhancements or patches often don't need a PEP and can be injected into the Python development work flow with a patch submission to the SourceForge patch manager[2] or feature request tracker[3]. The PEP champion then emails the PEP editor <peps(a)python.org> with a proposed title and a rough, but fleshed out, draft of the PEP. This draft must be written in PEP style as described below. If the PEP editor approves, he will assign the PEP a number, label it as standards track or informational, give it status 'draft', and create and check-in the initial draft of the PEP. The PEP editor will not unreasonably deny a PEP. Reasons for denying PEP status include duplication of effort, being technically unsound, not providing proper motivation or addressing backwards compatibility, or not in keeping with the Python philosophy. The BDFL (Benevolent Dictator for Life, Guido van Rossum) can be consulted during the approval phase, and is the final arbitrator of the draft's PEP-ability. If a pre-PEP is rejected, the author may elect to take the pre-PEP to the comp.lang.python newsgroup (a.k.a. python-list(a)python.org mailing list) to help flesh it out, gain feedback and consensus from the community at large, and improve the PEP for re-submission. The author of the PEP is then responsible for posting the PEP to the community forums, and marshaling community support for it. As updates are necessary, the PEP author can check in new versions if they have CVS commit permissions, or can email new PEP versions to the PEP editor for committing. Standards track PEPs consists of two parts, a design document and a reference implementation. The PEP should be reviewed and accepted before a reference implementation is begun, unless a reference implementation will aid people in studying the PEP. Standards Track PEPs must include an implementation - in the form of code, patch, or URL to same - before it can be considered Final. PEP authors are responsible for collecting community feedback on a PEP before submitting it for review. A PEP that has not been discussed on python-list(a)python.org and/or python-dev(a)python.org will not be accepted. However, wherever possible, long open-ended discussions on public mailing lists should be avoided. Strategies to keep the discussions efficient include, setting up a separate SIG mailing list for the topic, having the PEP author accept private comments in the early design phases, etc. PEP authors should use their discretion here. Once the authors have completed a PEP, they must inform the PEP editor that it is ready for review. PEPs are reviewed by the BDFL and his chosen consultants, who may accept or reject a PEP or send it back to the author(s) for revision. Once a PEP has been accepted, the reference implementation must be completed. When the reference implementation is complete and accepted by the BDFL, the status will be changed to `Final.' A PEP can also be assigned status `Deferred.' The PEP author or editor can assign the PEP this status when no progress is being made on the PEP. Once a PEP is deferred, the PEP editor can re-assign it to draft status. A PEP can also be `Rejected'. Perhaps after all is said and done it was not a good idea. It is still important to have a record of this fact. PEPs can also be replaced by a different PEP, rendering the original obsolete. This is intended for Informational PEPs, where version 2 of an API can replace version 1. PEP work flow is as follows: Draft -> Accepted -> Final -> Replaced ^ +----> Rejected v Deferred Some informational PEPs may also have a status of `Active' if they are never meant to be completed. E.g. PEP 1. What belongs in a successful PEP? Each PEP should have the following parts: 1. Preamble -- RFC822 style headers containing meta-data about the PEP, including the PEP number, a short descriptive title (limited to a maximum of 44 characters), the names, and optionally the contact info for each author, etc. 2. Abstract -- a short (~200 word) description of the technical issue being addressed. 3. Copyright/public domain -- Each PEP must either be explicitly labelled as placed in the public domain (see this PEP as an example) or licensed under the Open Publication License[4]. 4. Specification -- The technical specification should describe the syntax and semantics of any new language feature. The specification should be detailed enough to allow competing, interoperable implementations for any of the current Python platforms (CPython, JPython, Python .NET). 5. Motivation -- The motivation is critical for PEPs that want to change the Python language. It should clearly explain why the existing language specification is inadequate to address the problem that the PEP solves. PEP submissions without sufficient motivation may be rejected outright. 6. Rationale -- The rationale fleshes out the specification by describing what motivated the design and why particular design decisions were made. It should describe alternate designs that were considered and related work, e.g. how the feature is supported in other languages. The rationale should provide evidence of consensus within the community and discuss important objections or concerns raised during discussion. 7. Backwards Compatibility -- All PEPs that introduce backwards incompatibilities must include a section describing these incompatibilities and their severity. The PEP must explain how the author proposes to deal with these incompatibilities. PEP submissions without a sufficient backwards compatibility treatise may be rejected outright. 8. Reference Implementation -- The reference implementation must be completed before any PEP is given status 'Final,' but it need not be completed before the PEP is accepted. It is better to finish the specification and rationale first and reach consensus on it before writing code. The final implementation must include test code and documentation appropriate for either the Python language reference or the standard library reference. PEP Template PEPs are written in plain ASCII text, and should adhere to a rigid style. There is a Python script that parses this style and converts the plain text PEP to HTML for viewing on the web[5]. PEP 9 contains a boilerplate[7] template you can use to get started writing your PEP. Each PEP must begin with an RFC822 style header preamble. The headers must appear in the following order. Headers marked with `*' are optional and are described below. All other headers are required. PEP: <pep number> Title: <pep title> Version: <cvs version string> Last-Modified: <cvs date string> Author: <list of authors' real names and optionally, email addrs> * Discussions-To: <email address> Status: <Draft | Active | Accepted | Deferred | Final | Replaced> Type: <Informational | Standards Track> * Requires: <pep numbers> Created: <date created on, in dd-mmm-yyyy format> * Python-Version: <version number> Post-History: <dates of postings to python-list and python-dev> * Replaces: <pep number> * Replaced-By: <pep number> The Author: header lists the names and optionally, the email addresses of all the authors/owners of the PEP. The format of the author entry should be address(a)dom.ain (Random J. User) if the email address is included, and just Random J. User if the address is not given. If there are multiple authors, each should be on a separate line following RFC 822 continuation line conventions. Note that personal email addresses in PEPs will be obscured as a defense against spam harvesters. Standards track PEPs must have a Python-Version: header which indicates the version of Python that the feature will be released with. Informational PEPs do not need a Python-Version: header. While a PEP is in private discussions (usually during the initial Draft phase), a Discussions-To: header will indicate the mailing list or URL where the PEP is being discussed. No Discussions-To: header is necessary if the PEP is being discussed privately with the author, or on the python-list or python-dev email mailing lists. Note that email addresses in the Discussions-To: header will not be obscured. Created: records the date that the PEP was assigned a number, while Post-History: is used to record the dates of when new versions of the PEP are posted to python-list and/or python-dev. Both headers should be in dd-mmm-yyyy format, e.g. 14-Aug-2001. PEPs may have a Requires: header, indicating the PEP numbers that this PEP depends on. PEPs may also have a Replaced-By: header indicating that a PEP has been rendered obsolete by a later document; the value is the number of the PEP that replaces the current document. The newer PEP must have a Replaces: header containing the number of the PEP that it rendered obsolete. PEP Formatting Requirements PEP headings must begin in column zero and the initial letter of each word must be capitalized as in book titles. Acronyms should be in all capitals. The body of each section must be indented 4 spaces. Code samples inside body sections should be indented a further 4 spaces, and other indentation can be used as required to make the text readable. You must use two blank lines between the last line of a section's body and the next section heading. You must adhere to the Emacs convention of adding two spaces at the end of every sentence. You should fill your paragraphs to column 70, but under no circumstances should your lines extend past column 79. If your code samples spill over column 79, you should rewrite them. Tab characters must never appear in the document at all. A PEP should include the standard Emacs stanza included by example at the bottom of this PEP. A PEP must contain a Copyright section, and it is strongly recommended to put the PEP in the public domain. When referencing an external web page in the body of a PEP, you should include the title of the page in the text, with a footnote reference to the URL. Do not include the URL in the body text of the PEP. E.g. Refer to the Python Language web site [1] for more details. ... [1] http://www.python.org When referring to another PEP, include the PEP number in the body text, such as "PEP 1". The title may optionally appear. Add a footnote reference that includes the PEP's title and author. It may optionally include the explicit URL on a separate line, but only in the References section. Note that the pep2html.py script will calculate URLs automatically, e.g.: ... Refer to PEP 1 [7] for more information about PEP style ... References [7] PEP 1, PEP Purpose and Guidelines, Warsaw, Hylton http://www.python.org/peps/pep-0001.html If you decide to provide an explicit URL for a PEP, please use this as the URL template: http://www.python.org/peps/pep-xxxx.html PEP numbers in URLs must be padded with zeros from the left, so as to be exactly 4 characters wide, however PEP numbers in text are never padded. Reporting PEP Bugs, or Submitting PEP Updates How you report a bug, or submit a PEP update depends on several factors, such as the maturity of the PEP, the preferences of the PEP author, and the nature of your comments. For the early draft stages of the PEP, it's probably best to send your comments and changes directly to the PEP author. For more mature, or finished PEPs you may want to submit corrections to the SourceForge bug manager[6] or better yet, the SourceForge patch manager[2] so that your changes don't get lost. If the PEP author is a SF developer, assign the bug/patch to him, otherwise assign it to the PEP editor. When in doubt about where to send your changes, please check first with the PEP author and/or PEP editor. PEP authors who are also SF committers, can update the PEPs themselves by using "cvs commit" to commit their changes. Remember to also push the formatted PEP text out to the web by doing the following: % python pep2html.py -i NUM where NUM is the number of the PEP you want to push out. See % python pep2html.py --help for details. Transferring PEP Ownership It occasionally becomes necessary to transfer ownership of PEPs to a new champion. In general, we'd like to retain the original author as a co-author of the transferred PEP, but that's really up to the original author. A good reason to transfer ownership is because the original author no longer has the time or interest in updating it or following through with the PEP process, or has fallen off the face of the 'net (i.e. is unreachable or not responding to email). A bad reason to transfer ownership is because you don't agree with the direction of the PEP. We try to build consensus around a PEP, but if that's not possible, you can always submit a competing PEP. If you are interested assuming ownership of a PEP, send a message asking to take over, addressed to both the original author and the PEP editor <peps(a)python.org>. If the original author doesn't respond to email in a timely manner, the PEP editor will make a unilateral decision (it's not like such decisions can be reversed. :). References and Footnotes [1] This historical record is available by the normal CVS commands for retrieving older revisions. For those without direct access to the CVS tree, you can browse the current and past PEP revisions via the SourceForge web site at http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/python/nondist/peps/?cvsroot=… [2] http://sourceforge.net/tracker/?group_id=5470&atid=305470 [3] http://sourceforge.net/tracker/?atid=355470&group_id=5470&func=browse [4] http://www.opencontent.org/openpub/ [5] The script referred to here is pep2html.py, which lives in the same directory in the CVS tree as the PEPs themselves. Try "pep2html.py --help" for details. The URL for viewing PEPs on the web is http://www.python.org/peps/ [6] http://sourceforge.net/tracker/?group_id=5470&atid=305470 [7] PEP 9, Sample PEP Template http://www.python.org/peps/pep-0009.html Copyright This document has been placed in the public domain. Local Variables: mode: indented-text indent-tabs-mode: nil sentence-end-double-space: t fill-column: 70 End: 8 14
by Larry Hastings April 25, 2015
April 25, 2015 Argument Clinic "converters" specify how to convert an individual argument to the function you're defining. Although a converter could theoretically represent any sort of conversion, most of the time they directly represent types like "int" or "double" or "str". Because there's such variety in argument parsing, the converters are customizable with parameters. Many of these are common enough that Argument Clinic suggests some standard names. Examples: "zeroes=True" for strings and buffers means "permit internal \0 characters", and "bitwise=True" for unsigned integers means "copy the bits over, even if there's overflow/underflow, and even if the original is negative". A third example is "nullable=True", which means "also accept None for this parameter". This was originally intended for use with strings (compare the "s" and "z" format units for PyArg_ParseTuple), however it looks like we'll have a use for "nullable ints" in the ongoing Argument Clinic conversion work. Several people have said they found the name "nullable" surprising, suggesting I use another name like "allow_none" or "noneable". I, in turn, find their surprise surprising; "nullable" is a term long associated with exactly this concept. It's used in C# and SQL, and the term even has its own Wikipedia page: http://en.wikipedia.org/wiki/Nullable_type Most amusingly, Vala *used* to have an annotation called "(allow-none)", but they've broken it out into two annotations, "(nullable)" and "(optional)". http://blogs.gnome.org/desrt/2014/05/27/allow-none-is-dead-long-live-nullab… Before you say "the term 'nullable' will confuse end users", let me remind you: this is not user-facing. This is a parameter for an Argument Clinic converter, and will only ever be seen by CPython core developers. A group which I hope is not so easily confused. It's my contention that "nullable" is the correct name. But I've been asked to bring up the topic for discussion, to see if a consensus forms around this or around some other name. Let the bike-shedding begin, //arry/ 13 29
by Brett Cannon Feb. 27, 2015
Feb. 27, 2015 Here is some proposed wording. Since it is more of a clarification of what it takes to garner support -- which is just a new section -- rather than a complete rewrite I'm including just the diff to make it easier to read the changes. *diff -r 49d18bb47ebc pep-0011.txt* *--- a/pep-0011.txt Wed May 14 11:18:22 2014 -0400* *+++ b/pep-0011.txt Fri May 16 13:48:30 2014 -0400* @@ -2,22 +2,21 @@ Title: Removing support for little used platforms Version: $Revision$ Last-Modified: $Date$ -Author: martin(a)v.loewis.de (Martin von Löwis) +Author: Martin von Löwis <martin(a)v.loewis.de>, + Brett Cannon <brett(a)python.org> Status: Active Type: Process Content-Type: text/x-rst Created: 07-Jul-2002 Post-History: 18-Aug-2007 + 16-May-2014 Abstract -------- -This PEP documents operating systems (platforms) which are not -supported in Python anymore. For some of these systems, -supporting code might be still part of Python, but will be removed -in a future release - unless somebody steps forward as a volunteer -to maintain this code. +This PEP documents how an operating system (platform) garners +support in Python as well as documenting past support. Rationale @@ -37,16 +36,53 @@ change to the Python source code will work on all supported platforms. -To reduce this risk, this PEP proposes a procedure to remove code -for platforms with no Python users. +To reduce this risk, this PEP specifies what is required for a +platform to be considered supported by Python as well as providing a +procedure to remove code for platforms with little or no Python +users. +Supporting platforms +-------------------- + +Gaining official platform support requires two things. First, a core +developer needs to volunteer to maintain platform-specific code. This +core developer can either already be a member of the Python +development team or be given contributor rights on the basis of +maintaining platform support (it is at the discretion of the Python +development team to decide if a person is ready to have such rights +even if it is just for supporting a specific platform). + +Second, a stable buildbot must be provided [2]_. This guarantees that +platform support will not be accidentally broken by a Python core +developer who does not have personal access to the platform. For a +buildbot to be considered stable it requires that the machine be +reliably up and functioning (but it is up to the Python core +developers to decide whether to promote a buildbot to being +considered stable). + +This policy does not disqualify supporting other platforms +indirectly. Patches which are not platform-specific but still done to +add platform support will be considered for inclusion. For example, +if platform-independent changes were necessary in the configure +script which was motivated to support a specific platform that would +be accepted. Patches which add platform-specific code such as the +name of a specific platform to the configure script will generally +not be accepted without the platform having official support. + +CPU architecture and compiler support are viewed in a similar manner +as platforms. For example, to consider the ARM architecture supported +a buildbot running on ARM would be required along with support from +the Python development team. In general it is not required to have +a CPU architecture run under every possible platform in order to be +considered supported. Unsupporting platforms ---------------------- -If a certain platform that currently has special code in it is -deemed to be without Python users, a note must be posted in this -PEP that this platform is no longer actively supported. This +If a certain platform that currently has special code in Python is +deemed to be without Python users or lacks proper support from the +Python development team and/or a buildbot, a note must be posted in +this PEP that this platform is no longer actively supported. This note must include: - the name of the system @@ -69,8 +105,8 @@ forward and offer maintenance. -Resupporting platforms ----------------------- +Re-supporting platforms +----------------------- If a user of a platform wants to see this platform supported again, he may volunteer to maintain the platform support. Such an @@ -101,7 +137,7 @@ release is made. Developers of extension modules will generally need to use the same Visual Studio release; they are concerned both with the availability of the versions they need to use, and with keeping -the zoo of versions small. The Python source tree will keep +the zoo of versions small. The Python source tree will keep unmaintained build files for older Visual Studio releases, for which patches will be accepted. Such build files will be removed from the source tree 3 years after the extended support for the compiler has @@ -223,6 +259,7 @@ ---------- .. [1] http://support.microsoft.com/lifecycle/ +.. [2] http://buildbot.python.org/3.x.stable/ Copyright --------- 3 4
by Raymond Hettinger Jan. 3, 2015
Jan. 3, 2015 The current memory layout for dictionaries is unnecessarily inefficient. It has a sparse table of 24-byte entries containing the hash value, key pointer, and value pointer. Instead, the 24-byte entries should be stored in a dense table referenced by a sparse table of indices. For example, the dictionary: d = {'timmy': 'red', 'barry': 'green', 'guido': 'blue'} is currently stored as: entries = [['--', '--', '--'], [-8522787127447073495, 'barry', 'green'], ['--', '--', '--'], ['--', '--', '--'], ['--', '--', '--'], [-9092791511155847987, 'timmy', 'red'], ['--', '--', '--'], [-6480567542315338377, 'guido', 'blue']] Instead, the data should be organized as follows: indices = [None, 1, None, None, None, 0, None, 2] entries = [[-9092791511155847987, 'timmy', 'red'], [-8522787127447073495, 'barry', 'green'], [-6480567542315338377, 'guido', 'blue']] Only the data layout needs to change. The hash table algorithms would stay the same. All of the current optimizations would be kept, including key-sharing dicts and custom lookup functions for string-only dicts. There is no change to the hash functions, the table search order, or collision statistics. The memory savings are significant (from 30% to 95% compression depending on the how full the table is). Small dicts (size 0, 1, or 2) get the most benefit. For a sparse table of size t with n entries, the sizes are: curr_size = 24 * t new_size = 24 * n + sizeof(index) * t In the above timmy/barry/guido example, the current size is 192 bytes (eight 24-byte entries) and the new size is 80 bytes (three 24-byte entries plus eight 1-byte indices). That gives 58% compression. Note, the sizeof(index) can be as small as a single byte for small dicts, two bytes for bigger dicts and up to sizeof(Py_ssize_t) for huge dict. In addition to space savings, the new memory layout makes iteration faster. Currently, keys(), values, and items() loop over the sparse table, skipping-over free slots in the hash table. Now, keys/values/items can loop directly over the dense table, using fewer memory accesses. Another benefit is that resizing is faster and touches fewer pieces of memory. Currently, every hash/key/value entry is moved or copied during a resize. In the new layout, only the indices are updated. For the most part, the hash/key/value entries never move (except for an occasional swap to fill a hole left by a deletion). With the reduced memory footprint, we can also expect better cache utilization. For those wanting to experiment with the design, there is a pure Python proof-of-concept here: http://code.activestate.com/recipes/578375 YMMV: Keep in mind that the above size statics assume a build with 64-bit Py_ssize_t and 64-bit pointers. The space savings percentages are a bit different on other builds. Also, note that in many applications, the size of the data dominates the size of the container (i.e. the weight of a bucket of water is mostly the water, not the bucket). Raymond 27 70
by Benjamin Peterson Nov. 1, 2014
Nov. 1, 2014 I'm updating the 2.7 release PEP with the following release dates 2.7.9rc1 Nov 22 2.7.9 final December 5 I expect PEPs 476 and 477 can be done by then? Given that 2.7.9 has had some large changes, having multiple rcs is not unlikely. Hopefully, we can get a final out by 2015, though. 3 3
by Benjamin Peterson Oct. 31, 2014
Oct. 31, 2014 Multiple RGCs are not unlikely given. 1 1
by Python tracker Oct. 31, 2014
Oct. 31, 2014 ACTIVITY SUMMARY (2014-10-24 - 2014-10-31) 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 4626 (+20) closed 29911 (+34) total 34537 (+54) Open issues with patches: 2160 Issues opened (37) ================== #9351: argparse set_defaults on subcommands should override top level http://bugs.python.org/issue9351 reopened by r.david.murray #22716: Add reference to the object missing an attribute to AttributeE http://bugs.python.org/issue22716 reopened by flying sheep #22722: inheritable pipes are unwieldy without os.pipe2 http://bugs.python.org/issue22722 opened by bukzor #22724: byte-compile fails for cross-builds http://bugs.python.org/issue22724 opened by Benedikt.Morbach #22725: improve documentation for enumerate() (built-in function) http://bugs.python.org/issue22725 opened by vy0123 #22726: Idle: add help to config dialogs http://bugs.python.org/issue22726 opened by terry.reedy #22729: `wait` and `as_completed` depend on private api http://bugs.python.org/issue22729 opened by bwhmather #22731: test_capi test fails because of mismatched newlines http://bugs.python.org/issue22731 opened by steve.dower #22732: ctypes tests don't set correct restype for intptr_t functions http://bugs.python.org/issue22732 opened by steve.dower #22733: MSVC ffi_prep_args doesn't handle 64-bit arguments properly http://bugs.python.org/issue22733 opened by steve.dower #22734: marshal needs a lower stack depth for debug builds on Windows http://bugs.python.org/issue22734 opened by steve.dower #22735: Fix various crashes exposed through mro() customization http://bugs.python.org/issue22735 opened by abusalimov #22737: Provide a rejected execution model and implementations for fut http://bugs.python.org/issue22737 opened by Joshua.Harlow #22738: improve 'python -h' documentation for '-c' http://bugs.python.org/issue22738 opened by vy0123 #22739: "There is no disk in the drive" error http://bugs.python.org/issue22739 opened by Lachlan.Kingsford #22742: IDLE shows traceback when printing non-BMP character http://bugs.python.org/issue22742 opened by belopolsky #22743: Specify supported XML version http://bugs.python.org/issue22743 opened by Friedrich.Spee.von.Langenfeld #22744: os.mkdir on Windows silently strips trailing blanks from direc http://bugs.python.org/issue22744 opened by tegavu #22746: cgitb html: wrong encoding for utf-8 http://bugs.python.org/issue22746 opened by wrohdewald #22747: Interpreter fails in initialize on systems where HAVE_LANGINFO http://bugs.python.org/issue22747 opened by WanderingLogic #22750: xmlapp.py display bug when validate XML by DTD http://bugs.python.org/issue22750 opened by Spider06 #22751: Fix test___all__ warning about modified environment http://bugs.python.org/issue22751 opened by Michael.Cetrulo #22752: incorrect time.timezone value http://bugs.python.org/issue22752 opened by errx #22753: urllib2 localnet Changed test to lookup IP-address of localhos http://bugs.python.org/issue22753 opened by hakan #22755: contextlib.closing documentation should use a new example http://bugs.python.org/issue22755 opened by mjpieters #22757: TclStackFree: incorrect freePtr. Call out of sequence? http://bugs.python.org/issue22757 opened by Charleston #22758: Regression in Python 3.2 cookie parsing http://bugs.python.org/issue22758 opened by Tim.Graham #22761: Catching StopIteraion inside list comprehension http://bugs.python.org/issue22761 opened by tomirendo #22763: load_tests chaining into discover from non-discover entry poin http://bugs.python.org/issue22763 opened by rbcollins #22764: object lifetime fragility in unittest tests http://bugs.python.org/issue22764 opened by rbcollins #22765: Fixes for test_gdb (first frame address, entry values) http://bugs.python.org/issue22765 opened by bkabrda #22766: collections.Counter's in-place operators should return NotImpl http://bugs.python.org/issue22766 opened by Joshua.Chin #22768: Add a way to get the peer certificate of a SSL Transport http://bugs.python.org/issue22768 opened by mathieui #22769: Tttk tag_has() throws TypeError when called without item http://bugs.python.org/issue22769 opened by ddurrett #22770: test_ttk_guionly and test_tk can cause Tk segfaults on OS X wh http://bugs.python.org/issue22770 opened by ned.deily #22773: Export Readline version and expect ANSI sequence for version < http://bugs.python.org/issue22773 opened by David.Edelsohn #22775: SimpleCookie not picklable with HIGHEST_PROTOCOL http://bugs.python.org/issue22775 opened by Tim.Graham Most recent 15 issues with no replies (15) ========================================== #22769: Tttk tag_has() throws TypeError when called without item http://bugs.python.org/issue22769 #22765: Fixes for test_gdb (first frame address, entry values) http://bugs.python.org/issue22765 #22751: Fix test___all__ warning about modified environment http://bugs.python.org/issue22751 #22750: xmlapp.py display bug when validate XML by DTD http://bugs.python.org/issue22750 #22743: Specify supported XML version http://bugs.python.org/issue22743 #22742: IDLE shows traceback when printing non-BMP character http://bugs.python.org/issue22742 #22737: Provide a rejected execution model and implementations for fut http://bugs.python.org/issue22737 #22733: MSVC ffi_prep_args doesn't handle 64-bit arguments properly http://bugs.python.org/issue22733 #22729: `wait` and `as_completed` depend on private api http://bugs.python.org/issue22729 #22726: Idle: add help to config dialogs http://bugs.python.org/issue22726 #22714: target of 'import statement' entry in general index for 'i' is http://bugs.python.org/issue22714 #22706: Idle extension configuration and key bindings http://bugs.python.org/issue22706 #22704: Review extension enable options http://bugs.python.org/issue22704 #22703: Idle Code Context: separate changing current and future editor http://bugs.python.org/issue22703 #22700: email's header_value_parser missing defect report for 'abc@xyz http://bugs.python.org/issue22700 Most recent 15 issues waiting for review (15) ============================================= #22775: SimpleCookie not picklable with HIGHEST_PROTOCOL http://bugs.python.org/issue22775 #22773: Export Readline version and expect ANSI sequence for version < http://bugs.python.org/issue22773 #22770: test_ttk_guionly and test_tk can cause Tk segfaults on OS X wh http://bugs.python.org/issue22770 #22768: Add a way to get the peer certificate of a SSL Transport http://bugs.python.org/issue22768 #22766: collections.Counter's in-place operators should return NotImpl http://bugs.python.org/issue22766 #22765: Fixes for test_gdb (first frame address, entry values) http://bugs.python.org/issue22765 #22764: object lifetime fragility in unittest tests http://bugs.python.org/issue22764 #22758: Regression in Python 3.2 cookie parsing http://bugs.python.org/issue22758 #22753: urllib2 localnet Changed test to lookup IP-address of localhos http://bugs.python.org/issue22753 #22751: Fix test___all__ warning about modified environment http://bugs.python.org/issue22751 #22747: Interpreter fails in initialize on systems where HAVE_LANGINFO http://bugs.python.org/issue22747 #22746: cgitb html: wrong encoding for utf-8 http://bugs.python.org/issue22746 #22735: Fix various crashes exposed through mro() customization http://bugs.python.org/issue22735 #22734: marshal needs a lower stack depth for debug builds on Windows http://bugs.python.org/issue22734 #22733: MSVC ffi_prep_args doesn't handle 64-bit arguments properly http://bugs.python.org/issue22733 Top 10 most discussed issues (10) ================================= #22725: improve documentation for enumerate() (built-in function) http://bugs.python.org/issue22725 15 msgs #22153: Documentation of TestCase.runTest is incorrect and confusing http://bugs.python.org/issue22153 11 msgs #17896: Move Windows external libs from <src>\..\ to <src>\externals http://bugs.python.org/issue17896 9 msgs #22731: test_capi test fails because of mismatched newlines http://bugs.python.org/issue22731 9 msgs #22746: cgitb html: wrong encoding for utf-8 http://bugs.python.org/issue22746 8 msgs #22764: object lifetime fragility in unittest tests http://bugs.python.org/issue22764 8 msgs #10548: Error in setUp not reported as expectedFailure (unittest) http://bugs.python.org/issue10548 7 msgs #22672: float arguments in scientific notation not supported by argpar http://bugs.python.org/issue22672 7 msgs #22719: os.path.isfile & os.path.exists bug in while loop http://bugs.python.org/issue22719 7 msgs #22758: Regression in Python 3.2 cookie parsing http://bugs.python.org/issue22758 7 msgs Issues closed (34) ================== #7559: TestLoader.loadTestsFromName swallows import errors http://bugs.python.org/issue7559 closed by python-dev #8876: distutils should not assume that hardlinks will work http://bugs.python.org/issue8876 closed by pitrou #17381: IGNORECASE breaks unicode literal range matching http://bugs.python.org/issue17381 closed by serhiy.storchaka #18216: gettext doesn't check MO versions http://bugs.python.org/issue18216 closed by pitrou #22173: Update lib2to3.tests and test_lib2to3 to use test discovery http://bugs.python.org/issue22173 closed by python-dev #22177: Incorrect version reported after downgrade http://bugs.python.org/issue22177 closed by ezio.melotti #22196: namedtuple documentation could/should mention the new Enum typ http://bugs.python.org/issue22196 closed by ezio.melotti #22217: Reprs for zipfile classes http://bugs.python.org/issue22217 closed by serhiy.storchaka #22237: sorted() docs should state that the sort is stable http://bugs.python.org/issue22237 closed by ezio.melotti #22249: Possibly incorrect example is given for socket.getaddrinfo() http://bugs.python.org/issue22249 closed by python-dev #22305: Documentation on deepcopy's problems is misleading http://bugs.python.org/issue22305 closed by georg.brandl #22539: Table formatting errors in pydoc http://bugs.python.org/issue22539 closed by georg.brandl #22596: support.transient_internet() doesn't catch connection refused http://bugs.python.org/issue22596 closed by berker.peksag #22613: Several minor doc issues http://bugs.python.org/issue22613 closed by georg.brandl #22695: open() declared deprecated in python 3 docs http://bugs.python.org/issue22695 closed by Василий.Макаров #22723: visited-link styling is not accessible http://bugs.python.org/issue22723 closed by berker.peksag #22727: Improve benchmarks precision http://bugs.python.org/issue22727 closed by pitrou #22728: Deprecate spurious benchmarks http://bugs.python.org/issue22728 closed by pitrou #22730: ensurepip should work with pythonw.exe http://bugs.python.org/issue22730 closed by steve.dower #22736: tutorial links at top, book recommendations at bottom of modul http://bugs.python.org/issue22736 closed by python-dev #22740: Cache error http://bugs.python.org/issue22740 closed by georg.brandl #22741: suggestion for improving wording on len(s) (built-in function) http://bugs.python.org/issue22741 closed by r.david.murray #22745: cgitb with Py3: TypeError: 'str' does not support the buffer i http://bugs.python.org/issue22745 closed by wrohdewald #22748: Porting Extension Modules to Python 3 documentation mention ab http://bugs.python.org/issue22748 closed by python-dev #22749: remove obsolete remark in time.clock() docs http://bugs.python.org/issue22749 closed by python-dev #22754: Implicit String Literal Concatenation Is Evil http://bugs.python.org/issue22754 closed by r.david.murray #22756: testAssertEqualSingleLine gives poor errors http://bugs.python.org/issue22756 closed by python-dev #22759: pathlib: Path.exists broken http://bugs.python.org/issue22759 closed by pitrou #22760: re.sub does only first 16 replacements if re.S is used http://bugs.python.org/issue22760 closed by georg.brandl #22762: PyObject_Call called with an exception set while displaying a http://bugs.python.org/issue22762 closed by haypo #22767: `separators` argument to json.dumps() behaves unexpectedly acr http://bugs.python.org/issue22767 closed by r.david.murray #22771: shutil.make_archive() doesn't use its "verbose" argument http://bugs.python.org/issue22771 closed by python-dev #22772: doc error in __ifloordiv__ and __itruediv__ http://bugs.python.org/issue22772 closed by python-dev #22774: Weird S.rstrip() result http://bugs.python.org/issue22774 closed by pitrou 1 0
by Glenn Linderman Oct. 30, 2014
Oct. 30, 2014 New package manager from M$... article here <http://www.neowin.net/news/windows-10-oneget-a-linux-style-package-manageme…>. It seems doubtful that M$ will eliminate .msi (their obscure, hard to configure and use, installation format), so it seems doubtful that the addition of OneGet will _force_ any changes to Python packaging. However, it does open the question in my mind about whether there will be any _benefits_ of OneGet that would inspire helpful, useful changes to Python packaging. They speak of "trusted repositories", and the like, and it sounds like a the various *nix package managers (apt-get, et alia), but perhaps allowing multiple repositories rather than just a single source vendor repository (I'm actually not sure if *nix package managers allow multiple repositories or not, but from the way people talk about them, it always sounds like a "distribution" also provides "a repository" of additional packages). "trusted repositories" sounds more like Perl's CPAN. One of the links <http://blogs.technet.com/b/windowsserver/archive/2014/04/03/windows-managem…> contains this quote: "This first version of OneGet installs and searches software from Chocolatey repositories. Support of additional repositories will come in subsequent versions." I have no clue what a Chocolatey repository is (yet, will Google), but unknown others will come, it says... whether it is possible to write a "repository plugin" such that Perl's CPAN or Python's PyPI or other preexisting repositories can be accessed is not clear. The relationship between PowerShell and OneGet is not clear either... is OneGet written in PowerShell, or is PowerShell just one way to invoke OneGet, or??? Just a heads up. 5 6
by Tony Kelman Oct. 30, 2014
Oct. 30, 2014 Stephen J. Turnbull: > Python is open source. Nobody is objecting to "somebody else" doing > this.[1] The problem here is simply that some "somebody elses" are > trying to throw future work over the wall into python-dev space. If that's how it's seen at this point, then it sounds like the logical course of action for CPython-with-MinGW is to demonstrate feasibility in a fork. Get what currently works as a set of 80-something patches and PKGBUILD instructions into a single repository that is usable by a wider variety of people, in more distributions, etc. Set up as much CI as possible so every patch gets tested in as many configurations as we can. Experiment with extension compatibility and find out what is actually achievable, with or without needing to modify MinGW-w64 in the process. There are people, though evidently not much of python-dev, who have a need and desire to make this happen. It seems python-dev would rather have us spend zero time proposing changes that allow CPython itself to be built differently than today, and all of our time on MinGW extensions. I personally find 3 of the 4 combinations of how one could build CPython and how one could build extensions interesting and worth looking into for different reasons (the one that's uninteresting to me is the currently used all-MSVC method, due to its many limitations I listed earlier). Ray for example may only care about using MinGW for everything. Python's a big community with lots of room for different people to work on different aspects of the same set of problems. For the combination of MSVC Python and MinGW extensions that most of you have recommended we focus on, it would be more productive to engage with setuptools, distutils-sig, and likely numpy as well, instead of python-dev. My experience lies more in getting troublesome C codebases to build with MinGW than it does with the messy intricacies and backwards-compatibility requirements of Python extensions and package management however, so my ability to contribute on that side of things is more limited. I'll just note that every project I've ever had a patch for which improved functionality with a new compiler (whether GCC, MSVC, clang, icc or ifort, etc.) reacted with review and thanks for the patches, not "why do you want to do this?" pushback. If potential contributors have a desire to get it working in the first place, then they will also be invested in helping keep it working on an ongoing basis. Sincerely, Tony 14 38
by Victor Stinner Oct. 29, 2014
Oct. 29, 2014 Hi, At the end of August, I sent the PEP 475 which I wrote with Charles-François Natali: https://mail.python.org/pipermail/python-dev/2014-August/136077.html https://mail.python.org/pipermail/python-dev/2014-September/136101.html Antoine Pitrou wrote " I'm +1 on the whole PEP" and R. David Murray wrote "Personally, I really want Python to handle EINTR for me". What's the next step? Who wants to handle this PEP? Guido? Antoine? I will try to answer to questions if previous answers were not enough. Antoine Pitrou wrote: >> On Unix, the ``asyncio`` module uses the wakeup file descriptor to >> wake up its event loop. > How about Windows? I modified signal.set_wakeup_fd() in Python 3.5 to support a socket on Windows. So it becomes possible to support signals with signal.set_wakeup_fd() on Windows (for SelectorEventLoop and ProactorEventLoop): https://code.google.com/p/tulip/issues/detail?id=191 Antoine Pitrou wrote: >> Some signals are not interesting and should not interrupt the the >> application. There are two options to only interrupt an application >> on some signals: >> >> * Raise an exception in the signal handler, like ``KeyboardInterrupt`` for >> ``SIGINT`` >> * Use a I/O multiplexing function like ``select()`` with the Python >> signal "wakeup" file descriptor: see the function >> ``signal.set_wakeup_fd()``. > > This section looks a bit incomplete. Some calls such as os.read() or > os.write() will (should) return a partial result when interrupted and > they already handled >0 bytes. Perhaps other functions have a similar > behaviour? In Python 3.4, os.read() is dummy: it only calls the C function read() once. With the PEP 475, read() is only called again on EINTR if the signal handler did not raise an exception. When read() returns EINTR, there is "partial read", the read did not start yet. So I don't understand what should be added to the PEP. There is no specific change. Matthew Woodcraft wrote: > In any case I think PEP 475 should be explaining what is going to happen > to signal.siginterrupt(). Will setting flag=True be supported? If so, > will doing so change the behaviour of those parts of the stdlib which > have already been modified to retry after EINTR? In Python 3.4, signal.signal() calls siginterrupt(signum, True): syscalls raise InterruptedError when interrupted by a signal. Calling explicitly signal.siginterrupt(signum, True) doesn't change anything. In Python 3.4, signal.siginterrupt(signum, False) reduces the cases when InterruptedError is raised, but they are still cases when InterruptedError is raised. The exact behaviour probably depends on the operating system or even the version of the operating system. It's better to not rely on siginterrupt(False) to write portable code in Python 3.4. With the PEP, signal.siginterrupt(signum, False) is still supported. The PEP doesn't change the behaviour when the syscall is directly restarted by the C library. If the function returns EINTR, the interrupted syscall is retried if the signal handler didn't raise an exception. The main problem of siginterrupt(False) is that the Python signal handler is *not* called if the C library directly retries the interrupted syscall. Note: if signals are blocked, the C signal handlers are not called, so the PEP doesn't change the behaviour neither. Victor wrote: > I think that the stdlib should not handle InterruptedError exception > anymore in the Python code, to simplify the code. I modified the PEP to mention that: https://hg.python.org/peps/rev/627fefe0394f Victor 3 5