PEP 3003 - Python Language Moratorium
I've checked draft (!) PEP 3003, "Python Language Moratorium", into SVN. As authors I've listed Jesse, Brett and myself. On python-ideas the moratorium idea got fairly positive responses (more positive than I'd expected, in fact) but I'm bracing myself for fierce discussion here on python-dev. It's important to me that if if this is accepted it is a "rough consensus" decision (working code we already have plenty of :-), not something enforced by a vocal minority or an influential individual such as myself. If there's too much opposition I'll withdraw the PEP so as not to waste everybody's time with a fruitless discussion. The PEP tries to spell out some gray areas but I'm sure there will be others; that's life. Do note that the PEP proposes to be *retroactive* back to the 3.1 release, i.e. the "frozen" version of the language is the state in which it was released as 3.1. -- --Guido van Rossum (python.org/~guido)
Guido van Rossum
The PEP tries to spell out some gray areas but I'm sure there will be others; that's life. Do note that the PEP proposes to be *retroactive* back to the 3.1 release, i.e. the "frozen" version of the language is the state in which it was released as 3.1.
I've done a quick check through the NEWS file and it seems no post-3.1 change would be affected by this PEP. I'm for the PEP myself. Antoine.
On Tue, Nov 3, 2009 at 10:20 AM, "Martin v. Löwis"
* General language semantics The language operates as-is with only specific exemptions (see below).
Would PEP 382 (namespace packages) fall under the moratorium?
Import semantics are a bit of a gray area. However I think the moratorium shouldn't be interpreted to prohibit this. I think there was a question on python-ideas about import semantics, and my response was something like "import semantics vary between Python implementations anyway." I'll add this to the PEP. -- --Guido van Rossum (python.org/~guido)
On Tue, Nov 3, 2009 at 09:35, Guido van Rossum
I've checked draft (!) PEP 3003, "Python Language Moratorium", into SVN. As authors I've listed Jesse, Brett and myself.
On python-ideas the moratorium idea got fairly positive responses (more positive than I'd expected, in fact) but I'm bracing myself for fierce discussion here on python-dev. It's important to me that if if this is accepted it is a "rough consensus" decision (working code we already have plenty of :-), not something enforced by a vocal minority or an influential individual such as myself. If there's too much opposition I'll withdraw the PEP so as not to waste everybody's time with a fruitless discussion.
Are you going to gauge it roughly from python-dev feedback, or should we take a more formal vote on python-committers once the PEP has settled?
The PEP tries to spell out some gray areas but I'm sure there will be others; that's life. Do note that the PEP proposes to be *retroactive* back to the 3.1 release, i.e. the "frozen" version of the language is the state in which it was released as 3.1.
I'm obviously +1 for this. I think one thing to decide is how long the moratorium is in effect. As of right now the PEP's abstract says for "at least two years", which taking into account the release schedule Benjamin is proposing and assuming acceptance at the end of the year puts us at roughly the release of Python 3.3. Should we just say this will be in affect until development is open for Python 3.4? -Brett
On Tue, Nov 3, 2009 at 11:21 AM, Brett Cannon
Are you going to gauge it roughly from python-dev feedback, or should we take a more formal vote on python-committers once the PEP has settled?
I'll not take a formal vote unless the discussion suggests there's a lot of pushback. So far I've seen very little.
The PEP tries to spell out some gray areas but I'm sure there will be others; that's life. Do note that the PEP proposes to be *retroactive* back to the 3.1 release, i.e. the "frozen" version of the language is the state in which it was released as 3.1.
I'm obviously +1 for this.
I think one thing to decide is how long the moratorium is in effect. As of right now the PEP's abstract says for "at least two years",
Yeah, I changed that from Jesse's and your "not to exceed two years".
which taking into account the release schedule Benjamin is proposing and assuming acceptance at the end of the year puts us at roughly the release of Python 3.3. Should we just say this will be in affect until development is open for Python 3.4?
I like the actual time limit, because it doesn't allow the backdoor of releasing 3.4 early. I'm fine with saying the moratorium effectively ends after 3.3 is released. -- --Guido van Rossum (python.org/~guido)
Guido van Rossum wrote:
I've checked draft (!) PEP 3003, "Python Language Moratorium", into SVN. As authors I've listed Jesse, Brett and myself.
On python-ideas the moratorium idea got fairly positive responses (more positive than I'd expected, in fact) but I'm bracing myself for fierce discussion here on python-dev. It's important to me that if if this is accepted it is a "rough consensus" decision (working code we already have plenty of :-), not something enforced by a vocal minority or an influential individual such as myself. If there's too much opposition I'll withdraw the PEP so as not to waste everybody's time with a fruitless discussion.
The PEP tries to spell out some gray areas but I'm sure there will be others; that's life. Do note that the PEP proposes to be *retroactive* back to the 3.1 release, i.e. the "frozen" version of the language is the state in which it was released as 3.1.
+1.
This suspension of features is designed to allow non-CPython implementations to "catch up" to the core implementation of the language, help ease adoption of Python 3.x, and provide a more stable base for the community.
I'd also add "to allow users to catch up"... ;-) One question: There are currently number of patch waiting on the tracker for additional Unicode feature support and it's also likely that we'll want to upgrade to a more recent Unicode version within the next few years. How would such indirect changes be seen under the moratorium ? -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 03 2009)
Python/Zope Consulting and Support ... http://www.egenix.com/ mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/
On Tue, Nov 3, 2009 at 11:23 AM, M.-A. Lemburg
This suspension of features is designed to allow non-CPython implementations to "catch up" to the core implementation of the language, help ease adoption of Python 3.x, and provide a more stable base for the community.
I'd also add "to allow users to catch up"... ;-)
IMO that's implied by "help ease adoption".
One question:
There are currently number of patch waiting on the tracker for additional Unicode feature support and it's also likely that we'll want to upgrade to a more recent Unicode version within the next few years.
How would such indirect changes be seen under the moratorium ?
That would fall under the Case-by-Case Exemptions section. "Within the next few years" sounds like it might well wait until the moratorium is ended though. :-) -- --Guido van Rossum (python.org/~guido)
Guido van Rossum writes:
On Tue, Nov 3, 2009 at 11:23 AM, M.-A. Lemburg
wrote:
One question:
There are currently number of patch waiting on the tracker for additional Unicode feature support and it's also likely that we'll want to upgrade to a more recent Unicode version within the next few years.
How would such indirect changes be seen under the moratorium ?
That would fall under the Case-by-Case Exemptions section. "Within the next few years" sounds like it might well wait until the moratorium is ended though. :-)
(1) Unicode "feature support" (eg, implementing access to various databases, implementation of new algorithms) strikes me as worth a hearing but very dubious under case-by-case (the case I have in mind is when necessary to support (2) or (3)). (2) Adjusting existing implementations of Unicode features (eg, universal newline, which currently does not conform to the relevant TR AFAIK, thus dubious IMO) to conform to (new versions of) Unicode seems worthy of consideration on a cost/benefit basis. I would expect that in most cases the costs that lead to a moratorium would outweigh prospective benefits, though. I don't know of an example where I'd support an exception to the moratorium for this, though. It's hard to imagine that things like the algorithm for UTF-16 are going to change, and support for things like bidi are currently outside of the scope of the moratorium as I understand it -- they'd be stdlib facilities. (3) Upgrading the character repertoire and property databases (eg, case and composition) seems like a shoo-in to me. That's why the databases are versioned. Of course there are costs to upgrading (backward compatibility in some corner cases, eg) that might outweigh the benefits at any given time, but I don't think this should fall under the moratorium if someone finds a benefit to upgrading the databases within the moratorium period.
Guido> I've checked draft (!) PEP 3003, "Python Language Moratorium", Guido> into SVN. LGTM. Skip
On Nov 3, 2009, at 12:35 PM, Guido van Rossum wrote:
I've checked draft (!) PEP 3003, "Python Language Moratorium", into SVN. As authors I've listed Jesse, Brett and myself.
On python-ideas the moratorium idea got fairly positive responses (more positive than I'd expected, in fact) but I'm bracing myself for fierce discussion here on python-dev. It's important to me that if if this is accepted it is a "rough consensus" decision (working code we already have plenty of :-), not something enforced by a vocal minority or an influential individual such as myself. If there's too much opposition I'll withdraw the PEP so as not to waste everybody's time with a fruitless discussion.
The PEP tries to spell out some gray areas but I'm sure there will be others; that's life. Do note that the PEP proposes to be *retroactive* back to the 3.1 release, i.e. the "frozen" version of the language is the state in which it was released as 3.1.
I think this is a great idea. I'd love to see the energy normally put into evolving the language into making the stdlib really kick ass. -Barry
Barry Warsaw wrote:
On Nov 3, 2009, at 12:35 PM, Guido van Rossum wrote:
I've checked draft (!) PEP 3003, "Python Language Moratorium", into SVN. As authors I've listed Jesse, Brett and myself.
On python-ideas the moratorium idea got fairly positive responses (more positive than I'd expected, in fact) but I'm bracing myself for fierce discussion here on python-dev. It's important to me that if if this is accepted it is a "rough consensus" decision (working code we already have plenty of :-), not something enforced by a vocal minority or an influential individual such as myself. If there's too much opposition I'll withdraw the PEP so as not to waste everybody's time with a fruitless discussion.
The PEP tries to spell out some gray areas but I'm sure there will be others; that's life. Do note that the PEP proposes to be *retroactive* back to the 3.1 release, i.e. the "frozen" version of the language is the state in which it was released as 3.1.
I think this is a great idea. I'd love to see the energy normally put into evolving the language into making the stdlib really kick ass.
+lots Michael
-Barry
------------------------------------------------------------------------
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.u...
On Nov 3, 2009, at 3:42 PM, Michael Foord wrote:
Barry Warsaw wrote:
On Nov 3, 2009, at 12:35 PM, Guido van Rossum wrote:
I've checked draft (!) PEP 3003, "Python Language Moratorium", into SVN. As authors I've listed Jesse, Brett and myself.
On python-ideas the moratorium idea got fairly positive responses (more positive than I'd expected, in fact) but I'm bracing myself for fierce discussion here on python-dev. It's important to me that if if this is accepted it is a "rough consensus" decision (working code we already have plenty of :-), not something enforced by a vocal minority or an influential individual such as myself. If there's too much opposition I'll withdraw the PEP so as not to waste everybody's time with a fruitless discussion.
The PEP tries to spell out some gray areas but I'm sure there will be others; that's life. Do note that the PEP proposes to be *retroactive* back to the 3.1 release, i.e. the "frozen" version of the language is the state in which it was released as 3.1.
I think this is a great idea. I'd love to see the energy normally put into evolving the language into making the stdlib really kick ass.
+lots
Ditto. Doug
On Tue, Nov 3, 2009 at 12:35 PM, Guido van Rossum
I've checked draft (!) PEP 3003, "Python Language Moratorium", into SVN. As authors I've listed Jesse, Brett and myself.
On python-ideas the moratorium idea got fairly positive responses (more positive than I'd expected, in fact) but I'm bracing myself for fierce discussion here on python-dev. It's important to me that if if this is accepted it is a "rough consensus" decision (working code we already have plenty of :-), not something enforced by a vocal minority or an influential individual such as myself. If there's too much opposition I'll withdraw the PEP so as not to waste everybody's time with a fruitless discussion.
The PEP tries to spell out some gray areas but I'm sure there will be others; that's life. Do note that the PEP proposes to be *retroactive* back to the 3.1 release, i.e. the "frozen" version of the language is the state in which it was released as 3.1.
-- --Guido van Rossum (python.org/~guido)
+1 - I'll work on some grammar kinks in my prose asap
On Tue, Nov 3, 2009 at 2:35 PM, Guido van Rossum
fierce discussion here on python-dev. It's important to me that if if this is accepted it is a "rough consensus" decision (working code we
+1 to the PEP. -- . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/
+1. There are no compelling language changes on the horizon ("yield from" is nice but not necessary). I see the main benefit of a moratorium as social rather than technical by encouraging people to work on the lib instead of the language. Plus, I'd gladly proxy my vote to any one of the three PEP authors so 3/3 is a no-brainer. -Jack
Jack Diederich wrote:
+1. There are no compelling language changes on the horizon ("yield from" is nice but not necessary).
Another +1 here. A note in the PEP that there are no changes to SVN that would need to be rolled back due to the moratorium would be a good addition (as per Antoine's review of the NEWS file). Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------
Guido van Rossum, 03.11.2009 18:35:
Python, as a language is more than the core implementation -- CPython -- with a rich, mature and vibrant community of implementations, such as Jython [2]_, IronPython [3]_ and PyPy [4]_ that are a benefit not only to the community, but to the language itself.
I noticed that this says "such as", but if it's intended to name the major implementations, I wonder why Cython is missing from that list. Stefan
Stefan Behnel wrote:
Guido van Rossum, 03.11.2009 18:35:
Python, as a language is more than the core implementation -- CPython -- with a rich, mature and vibrant community of implementations, such as Jython [2]_, IronPython [3]_ and PyPy [4]_ that are a benefit not only to the community, but to the language itself.
I noticed that this says "such as", but if it's intended to name the major implementations, I wonder why Cython is missing from that list.
Is Cython an implementation of Python? It's a grey area, but it seems like Cython is a "Python inspired" language (similar to Shedskin) rather than an implementation of Python: The Cython language is very close to the Python language, but Cython additionally supports calling C functions and declaring C types on variables and class attributes. This allows the compiler to generate very efficient C code from Cython code. (From http://www.cython.org/ ) There are several partial implementations, including Python inspired languages, but if we are looking at 'major complete implementations' then the current list seems to be: CPython, Jython, IronPython and PyPy. Even Unladen Swallow is a fork (sorry - I mean branch) of CPython rather than a separate implementation. All the best, Michael Foord
Stefan
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.u...
Michael Foord, 05.11.2009 10:13:
Stefan Behnel wrote:
if it's intended to name the major implementations, I wonder why Cython is missing from that list.
Is Cython an implementation of Python?
We certainly aim for Python compatibility. That's a proclaimed 1.0 goal. Not sure if that means Py3 or Py2 syntax, but that's just a parser detail, after all.
It's a grey area, but it seems like Cython is a "Python inspired" language (similar to Shedskin) rather than an implementation of Python:
The Cython language is very close to the Python language, but Cython additionally supports calling C functions and declaring C types on variables and class attributes. This allows the compiler to generate very efficient C code from Cython code.
(From http://www.cython.org/ )
Cython is different from Shedskin because Shedskin /requires/ the 'Python' code to be static. Cython does not. It /optimises/ static code, but it will not complain about dynamic code. It /does/ make some static assumptions in that it considers builtins true builtins. However, it does not prevent you from replacing them in your code, as long as you do it inside the module. Certainly a restriction compared to Python, where you can import a module into a changed dict environment that redefines 'object', but not a major restriction IMO, and certainly not one that impacts much code.
There are several partial implementations, including Python inspired languages, but if we are looking at 'major complete implementations' then the current list seems to be: CPython, Jython, IronPython and PyPy.
Cython certainly is not a complete implementation, sure. It still lacks support for local classes, for example, metaclasses aren't handled, and generators are still in design stage. But if one of the goals of the moratorium is to let implementations catch up with the syntax, then Cython is certainly in line with that. I doubt that there will be much left on the TODO list two years from now.
Even Unladen Swallow is a fork (sorry - I mean branch) of CPython rather than a separate implementation.
Cython is somewhere in the middle. It's not a fork or branch. Rather, it depends on the normal CPython runtime for certain features, such as the standard library, the type/object implementation, garbage collection, and a couple of dynamic features. But that doesn't prevent it from compiling your module into an executable application. Stefan
Stefan Behnel wrote:
Michael Foord, 05.11.2009 10:13:
Stefan Behnel wrote:
if it's intended to name the major implementations, I wonder why Cython is missing from that list.
Is Cython an implementation of Python?
We certainly aim for Python compatibility. That's a proclaimed 1.0 goal. Not sure if that means Py3 or Py2 syntax, but that's just a parser detail, after all.
Right, but I think the main point is that Cython is not an implementation of Python. It uses Python syntax, calling into the Python runtime for many of its features, and *extending* Python syntax for compilation to C. (Right?) Obviously a grey area - but if you take Cython code and try to run it on ClassicPython then you are likely to have syntax errors. The same is not true of the other full implementations (although where they use native platform features you may not have the same libraries available - but the language is unchanged). All the best, Michael
It's a grey area, but it seems like Cython is a "Python inspired" language (similar to Shedskin) rather than an implementation of Python:
The Cython language is very close to the Python language, but Cython additionally supports calling C functions and declaring C types on variables and class attributes. This allows the compiler to generate very efficient C code from Cython code.
(From http://www.cython.org/ )
Cython is different from Shedskin because Shedskin /requires/ the 'Python' code to be static. Cython does not. It /optimises/ static code, but it will not complain about dynamic code.
It /does/ make some static assumptions in that it considers builtins true builtins. However, it does not prevent you from replacing them in your code, as long as you do it inside the module. Certainly a restriction compared to Python, where you can import a module into a changed dict environment that redefines 'object', but not a major restriction IMO, and certainly not one that impacts much code.
There are several partial implementations, including Python inspired languages, but if we are looking at 'major complete implementations' then the current list seems to be: CPython, Jython, IronPython and PyPy.
Cython certainly is not a complete implementation, sure. It still lacks support for local classes, for example, metaclasses aren't handled, and generators are still in design stage. But if one of the goals of the moratorium is to let implementations catch up with the syntax, then Cython is certainly in line with that. I doubt that there will be much left on the TODO list two years from now.
Even Unladen Swallow is a fork (sorry - I mean branch) of CPython rather than a separate implementation.
Cython is somewhere in the middle. It's not a fork or branch. Rather, it depends on the normal CPython runtime for certain features, such as the standard library, the type/object implementation, garbage collection, and a couple of dynamic features. But that doesn't prevent it from compiling your module into an executable application.
Stefan
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.u...
Michael Foord, 05.11.2009 11:18:
Stefan Behnel wrote:
We certainly aim for Python compatibility. That's a proclaimed 1.0 goal.
Right, but I think the main point is that Cython is not an implementation of Python. It uses Python syntax, calling into the Python runtime for many of its features
It is a Python implementation in the sense that it implements syntax and semantics of the Python language, be it through generated C code or by calling into the CPython runtime. You could theoretically drop the entire interpreter from CPython, and Cython would still work with the remaining parts - not that it would be worth the effort on either side...
and *extending* Python syntax for compilation to C.
Programmers can decide themselves if they want to statically type variables, and they can do so without breaking with Python syntax. It is certainly not required to use non-Python syntax to compile Python code, not even if you want to get a fast binary module as a result.
Obviously a grey area - but if you take Cython code and try to run it on ClassicPython then you are likely to have syntax errors. The same is not true of the other full implementations (although where they use native platform features you may not have the same libraries available - but the language is unchanged).
To me, the term "Python implementation" just means something that implements the Python language. That shouldn't prevent it from providing additional features. Jython can interface with Java code, IronPython can interface with .NET code, Cython can interface with C code. Not sure what PyPy allows in addition to being a Python implementation, but there surely are language features also in PyPy that no other Python implementation provides. Stefan
To me, the term "Python implementation" just means something that implements the Python language. That shouldn't prevent it from providing additional features. Jython can interface with Java code, IronPython can interface with .NET code, Cython can interface with C code. Not sure what PyPy allows in addition to being a Python implementation, but there surely are language features also in PyPy that no other Python implementation provides.
Stefan
Hi. Features available in PyPy (or Java or IronPython) are not language features. These are features are available through normal python syntax, just some libraries are available extra. Python is something that passes most of CPython's test suite, modulo stuff that is considered implementation detail (like reference counting). In fact, some of extra PyPy features can be achieved via extension modules like greenlets. Cython might as well at some point become one, but so far it does not even import the whole test suite (correct me if I'm wrong), hence it's not yet python. Even if the ultimate goal is to support whole Python, it's not achieved yet, so it should not be considered implementation of Python (as of today, it might as well be one tomorrow). Cheers, fijal
Maciej Fijalkowski, 05.11.2009 11:58:
Python is something that passes most of CPython's test suite, modulo stuff that is considered implementation detail (like reference counting).
Certainly not an implementation detail to Cython. ;)
Cython might as well at some point become one, but so far it does not even import the whole test suite (correct me if I'm wrong), hence it's not yet python.
The test suite is a problem anyway, given that Cython doesn't implement a specific level of the Python language. It aims for 2.6 compatibility, but it already implements many of the Py3k PEPs, for example. But, yes, it doesn't currently import the test suite (without cheating). Many of the tests fail to compile due to the use of lambda statements (which won't take long to support on top of the existing closures) and conditionally defined classes (which will likely take longer, unless we cheat a bit by special casing the simple cases). BTW, other implementations lack some standard library modules. I find it a lot easier to work around missing syntax than to work around missing dependencies. But maybe that's just me. Stefan
Stefan Behnel wrote:
Michael Foord, 05.11.2009 11:18:
Stefan Behnel wrote:
We certainly aim for Python compatibility. That's a proclaimed 1.0 goal.
Right, but I think the main point is that Cython is not an implementation of Python. It uses Python syntax, calling into the Python runtime for many of its features
It is a Python implementation in the sense that it implements syntax and semantics of the Python language, be it through generated C code or by calling into the CPython runtime.
Implementing Python by calling into Python does not seem to really be a 'new implementation'... In that sense Cython is a wrapper not an implementation.
You could theoretically drop the entire interpreter from CPython, and Cython would still work with the remaining parts - not that it would be worth the effort on either side...
and *extending* Python syntax for compilation to C.
Programmers can decide themselves if they want to statically type variables, and they can do so without breaking with Python syntax. It is certainly not required to use non-Python syntax to compile Python code, not even if you want to get a fast binary module as a result.
But you extend the language. Coders can write Python or 'not-Python' (or perhaps 'Python plus'). Where you extend the language you are no longer implementing Python but a language oriented tool with Python inspired syntax intended for use with Python.
Obviously a grey area - but if you take Cython code and try to run it on ClassicPython then you are likely to have syntax errors. The same is not true of the other full implementations (although where they use native platform features you may not have the same libraries available - but the language is unchanged).
To me, the term "Python implementation" just means something that implements the Python language.
Which Cython doesn't - it can parse Python and it calls into Python. It doesn't implement runtime features (from the sounds of it).
That shouldn't prevent it from providing additional features.
Heh. Imagine if Microsoft had taken IronPython and added new syntax, that wasn't valid Python, and still tried to claim that IronPython was an implementation of Python. Few people would agree...
Jython can interface with Java code, IronPython can interface with .NET code, Cython can interface with C code. Not sure what PyPy allows in addition to being a Python implementation, but there surely are language features also in PyPy that no other Python implementation provides.
No. All of these implementation provide their integration through existing language features of Python, not by adding new *language* level features. All the best, Michael
Stefan
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.u...
Michael Foord, 05.11.2009 12:38:
Stefan Behnel wrote:
Michael Foord, 05.11.2009 11:18:
I think the main point is that Cython is not an implementation of Python. It uses Python syntax, calling into the Python runtime for many of its features
It is a Python implementation in the sense that it implements syntax and semantics of the Python language, be it through generated C code or by calling into the CPython runtime.
Implementing Python by calling into Python does not seem to really be a 'new implementation'... In that sense Cython is a wrapper not an implementation.
Would it help anyone if we started forking CPython, just so we can say "look, we implement Python"? (note that this will never happen, I'm just trying to find out where we can draw the line here) To clarify this statement:
You could theoretically drop the entire interpreter from CPython, and Cython would still work with the remaining parts
I think the main parts of CPython that we (re-)use are: - all built-in types - ref-counting and garbage collection - frames for traceback reporting - stdlib There may be other parts, but that's what comes to my mind right now. You can additionally use the CPython interpreter through the 'exec' statement or by calling into uncompiled code. For a Python implementation, I don't see any use in reimplementing the built-in types, for example. They are well done and pretty fast, especially when used from C code, i.e. outside of the interpreter. The frame/traceback handling code is only for interaction with uncompiled Python code, so that you get nice looking tracebacks (which I personally wouldn't consider a required part of the language itself). Most Python implementations do not reimplement the stdlib, or at most a minor part of it, so that's right out of the discussion. I'm not sure how to value the ref-counting/GC reuse, but I doubt that it is worth being considered an argument for Cython being a CPython wrapper.
Programmers can decide themselves if they want to statically type variables, and they can do so without breaking with Python syntax. It is certainly not required to use non-Python syntax to compile Python code, not even if you want to get a fast binary module as a result.
But you extend the language. Coders can write Python or 'not-Python' (or perhaps 'Python plus'). Where you extend the language you are no longer implementing Python but a language oriented tool with Python inspired syntax intended for use with Python.
But that's just a detail of the parser. It wouldn't be hard at all to switch off the support for extended features when compiling .py files (as opposed to .pyx files). It's just not currently done. Would you consider Cython a Python implementation if we implemented this? (which I guess we will do anyway at some point, simply because the extensions are actually invalid code in the given context) Stefan
On Thu, Nov 5, 2009 at 13:13, Stefan Behnel
Would you consider Cython a Python implementation if we implemented this? (which I guess we will do anyway at some point, simply because the extensions are actually invalid code in the given context)
Why do you want to be recognized as a Python implementation, anyway? I don't really understand why this seems so important to you. It's not like python-dev doesn't want to listen to you, right? Cheers, Dirkjan
Dirkjan Ochtman schrieb:
On Thu, Nov 5, 2009 at 13:13, Stefan Behnel
wrote: Would you consider Cython a Python implementation if we implemented this? (which I guess we will do anyway at some point, simply because the extensions are actually invalid code in the given context)
Why do you want to be recognized as a Python implementation, anyway? I don't really understand why this seems so important to you.
Advertising, I assume. That's what Stefan often does (at least it feels this way, for me). -- Thanks, Thomas
Thomas Heller
Why do you want to be recognized as a Python implementation, anyway? I don't really understand why this seems so important to you.
Advertising, I assume. That's what Stefan often does (at least it feels this way, for me).
Well, it's true that their work often goes unnoticed in favour of more pie-in-the-sky things such as PyPy and unladen-swallow.
On Thu, Nov 5, 2009 at 6:32 PM, Antoine Pitrou
Thomas Heller
writes: Why do you want to be recognized as a Python implementation, anyway? I don't really understand why this seems so important to you.
Advertising, I assume. That's what Stefan often does (at least it feels this way, for me).
Well, it's true that their work often goes unnoticed in favour of more pie-in-the-sky things such as PyPy and unladen-swallow.
Perhaps something to do with naming. "PyPy" and "unladen-swallow" are obviously more eye-catching than "Cython". Just my $0.02.
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/abpillai%40gmail.com
Regards, -- --Anand
On Thu, Nov 5, 2009 at 3:05 PM, Anand Balachandran Pillai
Perhaps something to do with naming. "PyPy" and "unladen-swallow" are obviously more eye-catching than "Cython".
Heh, CLPython is not very catchy either. Maybe that's why it's still under the radar here. - Willem
Antoine Pitrou, 05.11.2009 14:02:
Thomas Heller writes:
Why do you want to be recognized as a Python implementation, anyway? I don't really understand why this seems so important to you.
Advertising, I assume. That's what Stefan often does (at least it feels this way, for me).
Well, it's true that their work often goes unnoticed in favour of more pie-in-the-sky things such as PyPy and unladen-swallow.
That's likely got to do with it. It's not the first time I read about the "four" Python implementations. It may be related to the lack of Cython developers at the language summits, but, well, it's not like those were cheap to join either, if you count travel time/costs etc. I'm well aware, and I openly admit that Cython is laging behind in terms of Python language features when compared with other Python implementations. A reason for this is that the goal of the Cython project to design a /superset/ of the Python language is simply more ambitious (and certainly more time consuming) than just writing "yet another Python implementation". We put a lot of thought work into language design between Python and C, and also into code performance optimisations, where others can just go straight for CPython compatibility. But this doesn't mean we are not writing a Python implementation. It just means that we do more than that, and that this 'more' takes time. It has often been argued that it's easy to implement Python faster if you actually don't implement Python, but that doesn't apply to the current Cython anymore. What it lacks in terms of features is nothing that would impact the performance of existing features in any way. Like most of the other Python implementations, Cython is ready to use now. Unlike most others, it has all batteries included. And unlike some others, it's fast and even scales extremely well with various performance requirements. Personally, I consider Cython one of the killer arguments against performance prejudices about the CPython platform, if not about the Python language itself. Stefan
Stefan, I think your attempts to see Cython accepted as one of the major Python implementations is misguided. It is not self-contained, it is an add-on tool for CPython (like its ancestor PyRex). I think Cython is incredibly useful (and I spoke to many very happy users yesterday at UCB) but trying to present it as a separate Python implementation is not useful. Please stop the discussion about this topic, they are distracting. -- --Guido van Rossum (python.org/~guido)
Thomas Heller, 05.11.2009 13:53:
Advertising, I assume. That's what Stefan often does (at least it feels this way, for me).
Well, there's nothing inherently wrong with telling people about the right tool for the job, especially when it's free. And don't forget that postings are self-selecting by their topic, so you may simply not have come across the non-advertising posts of mine, and I may have skipped worthy non-advertising-affine topics that flew below my minimum level of conscious reading. Stefan
On Thu, Nov 5, 2009 at 4:53 AM, Thomas Heller
Dirkjan Ochtman schrieb:
On Thu, Nov 5, 2009 at 13:13, Stefan Behnel
wrote: Would you consider Cython a Python implementation if we implemented this? (which I guess we will do anyway at some point, simply because the extensions are actually invalid code in the given context)
Why do you want to be recognized as a Python implementation, anyway? I don't really understand why this seems so important to you.
Advertising, I assume. That's what Stefan often does (at least it feels this way, for me).
I'm skeptical about Cython as a Python implementation. AFAIK it requires CPython to work (for the runtime functionality) and while Cython's syntax is very Python-like, it is probably best characterized as an extended subset (:-). I guess when it runs the entire standard test suite without errors it could claim to be a Python implementation; until then, I would rather consider it a useful tool to go with CPython. (The name is actually a bit confusing, but I don't have a desire to change it.) -- --Guido van Rossum (python.org/~guido)
Maciej Fijalkowski, 05.11.2009 19:01:
Most Python implementations do not reimplement the stdlib, or at most a minor part of it, so that's right out of the discussion.
Did you actually check?
Well, I know that Jython uses the original stdlib modules through svn:externals in the build, last thing I heard about IronPython was that they are allowed to use other people's code now, so I imagine they do the same thing, and I wouldn't expect PyPy to rewrite the existing Python code that exists in the stdlib. So the only remaining problem are the C extensions in CPython, and that's the minor part I mentioned above. Stefan
Stefan wrote:
It /does/ make some static assumptions in that it considers builtins true builtins. However, it does not prevent you from replacing them in your code, as long as you do it inside the module. Certainly a restriction compared to Python, where you can import a module into a changed dict environment that redefines 'object', but not a major restriction IMO, and certainly not one that impacts much code.
To me this is a deal breaker which prevents Cython from being a Python implementation. From a talk given by Colin Winter at the LLVM dev meeting (http://llvm.org/devmtg/2009-10/) it seems like Unladen Swallow wanted to do something like this as well and Guido said no. In this case the breaking change is so subtle that I'd personally hate to run into something like this porting code to Cython and having to figure out why it's not working. More generally if all the implementations pick and choose what features of Python we want to ignore for performance reasons then we'll just end up w/ a bunch of incompatible things that look very similar.
On Thu, Nov 5, 2009 at 10:35 AM, Dino Viehland
Stefan wrote:
It /does/ make some static assumptions in that it considers builtins true builtins. However, it does not prevent you from replacing them in your code, as long as you do it inside the module. Certainly a restriction compared to Python, where you can import a module into a changed dict environment that redefines 'object', but not a major restriction IMO, and certainly not one that impacts much code.
To me this is a deal breaker which prevents Cython from being a Python implementation. From a talk given by Colin Winter at the LLVM dev meeting (http://llvm.org/devmtg/2009-10/) it seems like Unladen Swallow wanted to do something like this as well and Guido said no. In this case the breaking change is so subtle that I'd personally hate to run into something like this porting code to Cython and having to figure out why it's not working.
To clarify, I was joking when I told that story (or at least I was joking with Guido when I asked him if we could break that). It clearly *would* be easier if we could just ignore this point of Python compatibility, but that's not an option, so we've had to optimize around it. It's not that hard to do, but it's still extra work. Collin Winter
Dino Viehland, 05.11.2009 19:35:
Stefan wrote:
It /does/ make some static assumptions in that it considers builtins true builtins. However, it does not prevent you from replacing them in your code, as long as you do it inside the module. Certainly a restriction compared to Python, where you can import a module into a changed dict environment that redefines 'object', but not a major restriction IMO, and certainly not one that impacts much code.
To me this is a deal breaker which prevents Cython from being a Python implementation. From a talk given by Colin Winter at the LLVM dev meeting (http://llvm.org/devmtg/2009-10/) it seems like Unladen Swallow wanted to do something like this as well and Guido said no. In this case the breaking change is so subtle that I'd personally hate to run into something like this porting code to Cython and having to figure out why it's not working.
I assume that this is artificially exaggerated to make a point, as this behaviour is obviously not a technical requirement but an optimisation, which could potentially be disabled. Stefan
Stefan wrote:
I assume that this is artificially exaggerated to make a point, as this behaviour is obviously not a technical requirement but an optimisation, which could potentially be disabled.
If there's a way to disable this then that's fine and IMO when it was disabled you'd still be Python. But changing behavior in the name of optimization is no longer just an optimization. For what it's worth in IronPython we're going to look at making this faster in the future as well. We already cache built-in values locally in a module and invalidate the cache when the builtins changes. In the future I'd like to even combine loading a global and invoking it into a single call site for even better optimizations. And you could even imagine an extreme scenario where when built-ins changed all the code in the system that depended upon them is re-compiled punishing users who actually do this but I doubt we'll go that far. But the important thing is that the optimizations don't change the language behavior otherwise I don't think you're still Python. But of course that's what makes it so challenging and fun to try and optimize Python :)
On Thu, 5 Nov 2009 08:13:55 pm Michael Foord wrote:
There are several partial implementations, including Python inspired languages, but if we are looking at 'major complete implementations' then the current list seems to be: CPython, Jython, IronPython and PyPy. Even Unladen Swallow is a fork (sorry - I mean branch) of CPython rather than a separate implementation.
I don't know how mature or active it is, so it may not count as either major or complete, but there's also CLPython: http://common-lisp.net/project/clpython/ -- Steven D'Aprano
On Fri, Nov 6, 2009 at 6:18 AM, Steven D'Aprano
I don't know how mature or active it is, so it may not count as either major or complete, but there's also CLPython:
CLPython is in steady development, quite complete and stable on the language level (somewhere between 2.5 and 2.6), but missing most built-in library functionality. (It reuses the pure-Python parts of the stdlib.) As its developer, I don't care much about being mentioned in discussions or presentations, as CLPython is not as widely used as IronPython and Jython. But in a PEP like this, which is directly about alternative implementations, it deserves to be mentioned, IMHO. - Willem
On Fri, 6 Nov 2009 08:46:00 pm Willem Broekema wrote:
CLPython is in steady development, quite complete and stable on the language level (somewhere between 2.5 and 2.6), but missing most built-in library functionality. (It reuses the pure-Python parts of the stdlib.)
As its developer, I don't care much about being mentioned in discussions or presentations, as CLPython is not as widely used as IronPython and Jython. But in a PEP like this, which is directly about alternative implementations, it deserves to be mentioned, IMHO.
Willem, the rationale for this PEP is to give alternative implementations the chance to catch up with CPython. Given your statement that CLPython is quite complete on the language level, but missing standard library features, how do you think the moratorium will help CLPython? -- Steven D'Aprano
On Sun, Nov 8, 2009 at 1:16 AM, Steven D'Aprano
Willem, the rationale for this PEP is to give alternative implementations the chance to catch up with CPython.
Given your statement that CLPython is quite complete on the language level, but missing standard library features, how do you think the moratorium will help CLPython?
It would be great to have a pause in Python-the-language, so that CLPython might at the end of the moratorium finally be up to date with the latest 2.x and 3.x features. Supporting standard libraries is a bigger challenge, as the ones written in C need rewriting. Whether or not there is a pause on that front does not matter too much to that situation. - Willem
On Tue, Nov 3, 2009 at 9:35 AM, Guido van Rossum
I've checked draft (!) PEP 3003, "Python Language Moratorium", into SVN. As authors I've listed Jesse, Brett and myself.
I haven't seen substantial opposition against the PEP -- in fact I can't recall any, and many people have explicitly posted in support of it. So unless opposition suddenly appears in the next few days, I'll move it to the Accepted state next Monday. -- --Guido van Rossum (python.org/~guido)
[GvR]
I haven't seen substantial opposition against the PEP -- in fact I can't recall any, and many people have explicitly posted in support of it. So unless opposition suddenly appears in the next few days, I'll move it to the Accepted state next Monday.
But it would have been so much fun to have a never ending python-ideas thread on BEGIN/END blocks ;-) C'est la vie, Raymond
Raymond Hettinger, 05.11.2009 23:11:
[GvR]
I haven't seen substantial opposition against the PEP -- in fact I can't recall any, and many people have explicitly posted in support of it. So unless opposition suddenly appears in the next few days, I'll move it to the Accepted state next Monday.
But it would have been so much fun to have a never ending python-ideas thread on BEGIN/END blocks ;-)
According to the PEP, you can still have that. It just won't lead to an implementation being merged (or at least becoming part of a release) within the next two years. Stefan
On Thu, Nov 5, 2009 at 23:05, Guido van Rossum
I haven't seen substantial opposition against the PEP -- in fact I can't recall any, and many people have explicitly posted in support of it. So unless opposition suddenly appears in the next few days, I'll move it to the Accepted state next Monday.
Let me state first, I think the PEP is great, and I have no objection to its current form. I do have one qualm, where I wonder if the PEP shouldn't be a little stricter. As a gentoo developer and Mercurial maintainer, most of the pain in the recent migration towards 2.6 has not been in language changes, but in the standard library. Unfortunately, it's exempt from the moratorium in the PEP. Which makes me wonder, why are we not adding another moratorium, on deprecations in the standard library? In other words, let's not deprecate things like md5 or sha or the popen family of functions, but keep all of that as it is, for both 2.x and 3.x, so people can direct their energy towards other things (hopefully porting their 2.x codebase to 3.x). The standard library has already been through a lot of evolution in the 2.x to 3.x transition, so one might assume there's not a lot of stuff in the 3.x stdlib that would need deprecation in the short term. And for 2.x, well, I'd certainly hope we don't need to deprecate much more there before it finally gets EOL'ed, so it should be a relatively light maintenance load to bear. Is this just crazy talk? Cheers, Dirkjan
On Thu, Nov 5, 2009 at 5:53 PM, Dirkjan Ochtman
On Thu, Nov 5, 2009 at 23:05, Guido van Rossum
wrote: I haven't seen substantial opposition against the PEP -- in fact I can't recall any, and many people have explicitly posted in support of it. So unless opposition suddenly appears in the next few days, I'll move it to the Accepted state next Monday.
Let me state first, I think the PEP is great, and I have no objection to its current form.
I do have one qualm, where I wonder if the PEP shouldn't be a little stricter. As a gentoo developer and Mercurial maintainer, most of the pain in the recent migration towards 2.6 has not been in language changes, but in the standard library. Unfortunately, it's exempt from the moratorium in the PEP.
Which makes me wonder, why are we not adding another moratorium, on deprecations in the standard library? In other words, let's not deprecate things like md5 or sha or the popen family of functions, but keep all of that as it is, for both 2.x and 3.x, so people can direct their energy towards other things (hopefully porting their 2.x codebase to 3.x).
The standard library has already been through a lot of evolution in the 2.x to 3.x transition, so one might assume there's not a lot of stuff in the 3.x stdlib that would need deprecation in the short term. And for 2.x, well, I'd certainly hope we don't need to deprecate much more there before it finally gets EOL'ed, so it should be a relatively light maintenance load to bear.
Is this just crazy talk?
Cheers,
Dirkjan
I'm against restricting deprecation warnings within the stdlib as part of this. I actually want more things cleaned up and possibly deprecated. That being said, a deprecation warning just means we will remove it One Day - anything being deprecated will need a PEP and follow the long path to actual removal. So, -1 from me ;) jesse
On Thu, Nov 5, 2009 at 3:21 PM, Jesse Noller
On Thu, Nov 5, 2009 at 5:53 PM, Dirkjan Ochtman
wrote: On Thu, Nov 5, 2009 at 23:05, Guido van Rossum
wrote: I haven't seen substantial opposition against the PEP -- in fact I can't recall any, and many people have explicitly posted in support of it. So unless opposition suddenly appears in the next few days, I'll move it to the Accepted state next Monday.
Let me state first, I think the PEP is great, and I have no objection to its current form.
I do have one qualm, where I wonder if the PEP shouldn't be a little stricter. As a gentoo developer and Mercurial maintainer, most of the pain in the recent migration towards 2.6 has not been in language changes, but in the standard library. Unfortunately, it's exempt from the moratorium in the PEP.
Which makes me wonder, why are we not adding another moratorium, on deprecations in the standard library? In other words, let's not deprecate things like md5 or sha or the popen family of functions, but keep all of that as it is, for both 2.x and 3.x, so people can direct their energy towards other things (hopefully porting their 2.x codebase to 3.x).
The standard library has already been through a lot of evolution in the 2.x to 3.x transition, so one might assume there's not a lot of stuff in the 3.x stdlib that would need deprecation in the short term. And for 2.x, well, I'd certainly hope we don't need to deprecate much more there before it finally gets EOL'ed, so it should be a relatively light maintenance load to bear.
Is this just crazy talk?
Cheers,
Dirkjan
I'm against restricting deprecation warnings within the stdlib as part of this. I actually want more things cleaned up and possibly deprecated. That being said, a deprecation warning just means we will remove it One Day - anything being deprecated will need a PEP and follow the long path to actual removal.
So, -1 from me ;)
jesse
Actually, I think Dirkjan has a point. I'm not sure that we need another moratorium (that's a rather dramatic kind of decision which should be very rare indeed) but I do agree that deprecations are often more of a pain than they're worth. For example, take the deprecation of the md5 and sha modules in Python 2.6. They make it a bit of a pain to write code that *cleanly* supports Python 2.4 (doesn't have hashlib) through 2.6 (warns when importing md5 instead of hashlib). You can silence the warning, but that is in itself not particularly clean, and users really hate having the warnings. I have come to the conclusion that there are better ways to pre-announce that a module is going to disappear instead of deprecation warnings. -- --Guido van Rossum (python.org/~guido)
On Thu, Nov 5, 2009 at 6:26 PM, Guido van Rossum
I'm against restricting deprecation warnings within the stdlib as part of this. I actually want more things cleaned up and possibly deprecated. That being said, a deprecation warning just means we will remove it One Day - anything being deprecated will need a PEP and follow the long path to actual removal.
So, -1 from me ;)
jesse
Actually, I think Dirkjan has a point. I'm not sure that we need another moratorium (that's a rather dramatic kind of decision which should be very rare indeed) but I do agree that deprecations are often more of a pain than they're worth.
For example, take the deprecation of the md5 and sha modules in Python 2.6. They make it a bit of a pain to write code that *cleanly* supports Python 2.4 (doesn't have hashlib) through 2.6 (warns when importing md5 instead of hashlib). You can silence the warning, but that is in itself not particularly clean, and users really hate having the warnings.
I have come to the conclusion that there are better ways to pre-announce that a module is going to disappear instead of deprecation warnings.
I'm interested in hearing how to handle "pending removals" other than deprecation warnings - I guess I'm against the idea that we shouldn't remove/plan to remove things from the stdlib and signal those intentions to users during the moratorium. The mechanics of that can be something other than deprecation warnings, we can add a line to the current moratorium that puts the nix on deprecation warnings (because yes, Dirkjan is right - they can be a pain) but we should outline the alternative process. jesse
On Thu, Nov 5, 2009 at 15:26, Guido van Rossum
On Thu, Nov 5, 2009 at 3:21 PM, Jesse Noller
wrote: On Thu, Nov 5, 2009 at 5:53 PM, Dirkjan Ochtman
wrote: On Thu, Nov 5, 2009 at 23:05, Guido van Rossum
wrote: I haven't seen substantial opposition against the PEP -- in fact I can't recall any, and many people have explicitly posted in support of it. So unless opposition suddenly appears in the next few days, I'll move it to the Accepted state next Monday.
Let me state first, I think the PEP is great, and I have no objection to its current form.
I do have one qualm, where I wonder if the PEP shouldn't be a little stricter. As a gentoo developer and Mercurial maintainer, most of the pain in the recent migration towards 2.6 has not been in language changes, but in the standard library. Unfortunately, it's exempt from the moratorium in the PEP.
Which makes me wonder, why are we not adding another moratorium, on deprecations in the standard library? In other words, let's not deprecate things like md5 or sha or the popen family of functions, but keep all of that as it is, for both 2.x and 3.x, so people can direct their energy towards other things (hopefully porting their 2.x codebase to 3.x).
The standard library has already been through a lot of evolution in the 2.x to 3.x transition, so one might assume there's not a lot of stuff in the 3.x stdlib that would need deprecation in the short term. And for 2.x, well, I'd certainly hope we don't need to deprecate much more there before it finally gets EOL'ed, so it should be a relatively light maintenance load to bear.
Is this just crazy talk?
Cheers,
Dirkjan
I'm against restricting deprecation warnings within the stdlib as part of this. I actually want more things cleaned up and possibly deprecated. That being said, a deprecation warning just means we will remove it One Day - anything being deprecated will need a PEP and follow the long path to actual removal.
So, -1 from me ;)
jesse
Actually, I think Dirkjan has a point. I'm not sure that we need another moratorium (that's a rather dramatic kind of decision which should be very rare indeed) but I do agree that deprecations are often more of a pain than they're worth.
For example, take the deprecation of the md5 and sha modules in Python 2.6. They make it a bit of a pain to write code that *cleanly* supports Python 2.4 (doesn't have hashlib) through 2.6 (warns when importing md5 instead of hashlib). You can silence the warning, but that is in itself not particularly clean, and users really hate having the warnings.
I have come to the conclusion that there are better ways to pre-announce that a module is going to disappear instead of deprecation warnings.
What exactly are those better ways? Document as deprecated only? -Brett
What exactly are those better ways? Document as deprecated only?
-Brett
A switch to ENABLE those warnings? Lord knows I'm sick of filtering them out of logs. A switch to enable deprecation warnings would give developers a chance to see them when migrating to a new version of python. And it would prevent users from having to deal with them. -- Bobby R. Ward ------------------------------ bobbyrward@gmail.com http://github.com/bobbyrward http://launchpad.net/~bobbyrward "While many languages can be used to encrypt data, PERL has something built-in that gives you encryption. Perl calls it `syntax`." -- http://uncyclopedia.wikia.com/wiki/Perl
On Thu, Nov 5, 2009 at 4:13 PM, Yuvgoog Greenle
On Fri, Nov 6, 2009 at 1:55 AM, Bobby R. Ward
wrote: A switch to ENABLE those warnings?
I think a few people I know would still be raising strings like exceptions if not for the deprecation warnings. Most people won't turn on the switch with the extra warnings. --yuv
Yep and their code will break in the future as a result. Thats their problem (or whoever employed them and neglected to do code reviews and beat them with a stick for using a Python 1.x "feature" in 2009). SUGGESTION: Our Whats New document currently has a single "new, improved and deprecated" section in it. We should make Deprecations its own section so that they're easy to find all in one concise place when upgrading code between releases. Having seen the fallout from adding deprecating warnings to code: many annoyed developers whos workflow you've interrupted who will all eventually turn the warning off by default at all times. I have to agree. The DeprecationWarning being on by default is a failed experiement. We should treat it and the rarely noticed PendingDeprecationWarning as the same thing by default. -gps
Gregory P. Smith schrieb:
On Thu, Nov 5, 2009 at 4:13 PM, Yuvgoog Greenle
wrote: On Fri, Nov 6, 2009 at 1:55 AM, Bobby R. Ward
wrote: A switch to ENABLE those warnings?
I think a few people I know would still be raising strings like exceptions if not for the deprecation warnings. Most people won't turn on the switch with the extra warnings. --yuv
Yep and their code will break in the future as a result. Thats their problem (or whoever employed them and neglected to do code reviews and beat them with a stick for using a Python 1.x "feature" in 2009).
SUGGESTION: Our Whats New document currently has a single "new, improved and deprecated" section in it. We should make Deprecations its own section so that they're easy to find all in one concise place when upgrading code between releases.
Good point, I'll make that change if AMK agrees. Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out.
A.M. Kuchling schrieb:
On Sun, Nov 08, 2009 at 10:27:46PM +0100, Georg Brandl wrote:
Good point, I'll make that change if AMK agrees.
It's certainly fine with me. Do we want to only make that change to the 2.7 "What's New", or should we also do it for the 2.6 one?
Why not for 2.6 as well, it's an immediate benefit, especially since the list of deprecations in 2.6 is huge. Georg
On 5 Nov, 11:55 pm, bobbyrward@gmail.com wrote:
What exactly are those better ways? Document as deprecated only?
-Brett
A switch to ENABLE those warnings?
Lord knows I'm sick of filtering them out of logs.
A switch to enable deprecation warnings would give developers a chance to see them when migrating to a new version of python. And it would prevent users from having to deal with them.
PendingDeprecationWarning is silent by default and requires a switch to be enabled. Jean-Paul
A switch to enable deprecation warnings would give developers a chance to see them when migrating to a new version of python. And it would prevent users from having to deal with them.
PendingDeprecationWarning is silent by default and requires a switch to be enabled.
So what we need is perhaps not a stdlib moratorium, but rather strict adherence to a sequence of PendingDeprecationWarning -> DeprecationWarning -> Removal? (The first one seems to have been underused so far.) That way nothing could get removed without having had at least two warnings in subsequent minor versions, one silent and one loud. People who want to avoid loud warnings can check for silent ones before upgrading, and everyone is guaranteed to have seen a warning before final removal. - Hagen
On Thu, Nov 5, 2009 at 3:35 PM, Brett Cannon
On Thu, Nov 5, 2009 at 15:26, Guido van Rossum
wrote: I have come to the conclusion that there are better ways to pre-announce that a module is going to disappear instead of deprecation warnings.
What exactly are those better ways? Document as deprecated only?
Sorry, I have an existence proof, but no construction. :-) Ideas welcome. Silent deprecations, loud documentation, biweekly home visits, whatever, as long as it doesn't log a message by default. The thing is, in practice, people will be testing with a new release anyway, and that's the earliest time they are likely to take action (other than silencing the warnings). -- --Guido van Rossum (python.org/~guido)
On Thu, Nov 5, 2009 at 19:23, Guido van Rossum
On Thu, Nov 5, 2009 at 3:35 PM, Brett Cannon
wrote: On Thu, Nov 5, 2009 at 15:26, Guido van Rossum
wrote: I have come to the conclusion that there are better ways to pre-announce that a module is going to disappear instead of deprecation warnings.
What exactly are those better ways? Document as deprecated only?
Sorry, I have an existence proof, but no construction. :-)
Ideas welcome. Silent deprecations, loud documentation, biweekly home visits, whatever, as long as it doesn't log a message by default.
Well, one option is to come up with the equivalent of -3, but for all warnings; the antithesis of -W. And obviously glaring deprecation warnings in the docs (removal has been discussed but always shot down as someone who comes across old code might still need docs for it). The clarification I need is will this in any way influence when modules are removed. If they stay in for the life of a major version then I want it made clear that bug fixes for the code take lower priority over all other code in the standard library. -Brett
Brett Cannon wrote:
On Thu, Nov 5, 2009 at 19:23, Guido van Rossum
wrote: On Thu, Nov 5, 2009 at 3:35 PM, Brett Cannon
wrote: On Thu, Nov 5, 2009 at 15:26, Guido van Rossum
wrote: I have come to the conclusion that there are better ways to pre-announce that a module is going to disappear instead of deprecation warnings. What exactly are those better ways? Document as deprecated only? Sorry, I have an existence proof, but no construction. :-)
Ideas welcome. Silent deprecations, loud documentation, biweekly home visits, whatever, as long as it doesn't log a message by default.
Well, one option is to come up with the equivalent of -3, but for all warnings; the antithesis of -W. And obviously glaring deprecation warnings in the docs (removal has been discussed but always shot down as someone who comes across old code might still need docs for it).
For a PEP 3003-specific solution, we could adopt a policy that we will add only Pending Deprecation warnings during the moratorium period. The actually deprecation clock would then only start in the first release after the moratorium ends (i.e. full Deprecation Warning in that release, removal in the following release). No doubt some third party developers would end up being shocked by a raft of warnings at that point, but those that are paying more attention would get a chance to clean up the warnings without alarming their users. Longer term, a solution may be to extend the standard deprecation period one release and make pending deprecation warnings required rather than optional. That way, on the ball developers would have a full release to quash deprecation warnings before their users encountered them by default. That is: Release X.Y: deprecated in docs, pending deprecation in code Release X.Y+1: deprecated in code Release X.Y+2: removed in code and docs (Or we could just make that the policy now and not do anything specific in relation to the moratorium and the standard library) Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------
On Fri, Nov 6, 2009 at 10:35, Nick Coghlan
Longer term, a solution may be to extend the standard deprecation period one release and make pending deprecation warnings required rather than optional. That way, on the ball developers would have a full release to quash deprecation warnings before their users encountered them by default.
That is:
Release X.Y: deprecated in docs, pending deprecation in code Release X.Y+1: deprecated in code Release X.Y+2: removed in code and docs
(Or we could just make that the policy now and not do anything specific in relation to the moratorium and the standard library)
This sounds like an improvement for things like Mercurial, at least. We did support 2.3-2.6 until relatively recently, and I think that's hard to get around for software that actually has to work on the user's box. This is a bit different from webapps, I suspect, where you "only" have to support the servers, which you often have more control over. But supporting 4 releases in a row has been a bit of a PITA. Luckily, we finally felt it was time to drop 2.3, so now we can make use of luxuries such as subprocess... Still, supporting 3 releases seems relatively common in the Python world (after all, parts of Zope still require 2.4, I think), and so it would be nice if the stdlib moved a little bit slower. Cheers, Dirkjan
Dirkjan Ochtman wrote:
On Fri, Nov 6, 2009 at 10:35, Nick Coghlan
wrote: Longer term, a solution may be to extend the standard deprecation period one release and make pending deprecation warnings required rather than optional. That way, on the ball developers would have a full release to quash deprecation warnings before their users encountered them by default.
That is:
Release X.Y: deprecated in docs, pending deprecation in code Release X.Y+1: deprecated in code Release X.Y+2: removed in code and docs
(Or we could just make that the policy now and not do anything specific in relation to the moratorium and the standard library)
This sounds like an improvement for things like Mercurial, at least. We did support 2.3-2.6 until relatively recently, and I think that's hard to get around for software that actually has to work on the user's box. This is a bit different from webapps, I suspect, where you "only" have to support the servers, which you often have more control over.
But supporting 4 releases in a row has been a bit of a PITA. Luckily, we finally felt it was time to drop 2.3, so now we can make use of luxuries such as subprocess... Still, supporting 3 releases seems relatively common in the Python world (after all, parts of Zope still require 2.4, I think), and so it would be nice if the stdlib moved a little bit slower.
I would personally be open to the open to the idea of requiring 2 releases worth of Pending Deprecation warnings. Then you would have the following situation for warnings-free operation on up to 3 versions of Python: Release X.Y-2: old approach only Release X.Y-1: no change Release X.Y: new approach added, old approach deprecated in docs, pending deprecation warning in code Release X.Y+1: no change Release X.Y+2: deprecation warning in code Release X.Y+3: old approach removed from docs and code Libraries and applications supporting up to 3 Python versions simultaneously would then have a clear path to follow: use the old mechanism up to Release X.Y+1, then switch to the new mechanism in Release X.Y+2 We would be looking at around 5 years to completely kill off a feature at that point, which actually aligns fairly well with the time period for which we provide source-only security patches for really old branches. Making such a system practical would probably require some additional infrastructure in the warnings module to handle the details though. Specifically, rather than having to update the code to raise the correct kind of warning each release, it would be better to instead be able to write something like "warnings.warn_deprecated(msg, (3, 4))" and have it generate PendingDeprecationWarning messages in 3.2 and 3.3, and then DeprecationWarning messages in 3.4 and later. In code, something like: def warn_deprecated(msg, version, ref=sys.version, stacklevel=2): deprecated = version >= ref if deprecated: category = DeprecationWarning else: category = PendingDeprecationWarning warn(msg, category, stacklevel) return deprecated Would people be interested in such a helper method (along with a corresponding C API, naturally)? With the reference version passed in as an optional argument, it would even be applicable to more than just the Python core and standard library. Regards, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dirkjan Ochtman wrote:
But supporting 4 releases in a row has been a bit of a PITA. Luckily, we finally felt it was time to drop 2.3, so now we can make use of luxuries such as subprocess... Still, supporting 3 releases seems relatively common in the Python world (after all, parts of Zope still require 2.4, I think), and so it would be nice if the stdlib moved a little bit slower.
The current release of Zope (finally) requires 2.5 or 2.6: we have a "don't intentionally break 2.4" policy in place, however, FBO those users whose system Python is still 2.4, and who can't / won't build their own Python. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkr0ewgACgkQ+gerLs4ltQ7W2ACeOXPwhpg8Hi4/XZom/B59/7GD 4mwAnRkixQm0A3ZkNRQMPW1JIbEOy1iC =gTbW -----END PGP SIGNATURE-----
On Thu, Nov 5, 2009 at 9:55 PM, Brett Cannon
The clarification I need is will this in any way influence when modules are removed. If they stay in for the life of a major version then I want it made clear that bug fixes for the code take lower priority over all other code in the standard library.
I think we should be as cautious as ever with removing modules. We've had our chance for clean-up without abandon with Py3k; now we should stick with our commitment to backwards compatibility. In fact, we should probably be *more* conservative than we already were given that the amount of code written in Python is always increasing and hence the cumulative pain caused by incompatible changes will increase too. I'm fine with silent deprecations or requiring a flag to turn on deprecation warnings (like Java does). We're not yet at the point where C is, but who wouldn't be next to C on the TIOBE index? :-) -- --Guido van Rossum (python.org/~guido)
On Fri, Nov 6, 2009 at 6:02 PM, Guido van Rossum
I'm fine with silent deprecations or requiring a flag to turn on deprecation warnings (like Java does).
It's easier for java because they have compile time for the deprecation warnings. Maybe we should somehow silence all warnings when running eggs? --yuv
On Fri, Nov 6, 2009 at 11:02 AM, Guido van Rossum
On Thu, Nov 5, 2009 at 9:55 PM, Brett Cannon
wrote: The clarification I need is will this in any way influence when modules are removed. If they stay in for the life of a major version then I want it made clear that bug fixes for the code take lower priority over all other code in the standard library.
I think we should be as cautious as ever with removing modules. We've had our chance for clean-up without abandon with Py3k; now we should stick with our commitment to backwards compatibility. In fact, we should probably be *more* conservative than we already were given that the amount of code written in Python is always increasing and hence the cumulative pain caused by incompatible changes will increase too.
I'm fine with silent deprecations or requiring a flag to turn on deprecation warnings (like Java does).
We're not yet at the point where C is, but who wouldn't be next to C on the TIOBE index? :-)
I'd take being next to lisp if it meant that we didn't have to become any more like C ;). And speaking of TIOBE, my impression- and apparently yours- was that Python was on its way up, but TIOBE lists us as being down from a little over a year ago. Anybody know anything about their methodology? Geremy Condra
On Fri, Nov 6, 2009 at 8:25 AM, geremy condra
And speaking of TIOBE, my impression- and apparently yours- was that Python was on its way up, but TIOBE lists us as being down from a little over a year ago. Anybody know anything about their methodology?
There's a detailed explanation at: http://www.tiobe.com/index.php/content/paperinfo/tpci/tpci_definition.htm Andre
On Fri, Nov 6, 2009 at 08:02, Guido van Rossum
On Thu, Nov 5, 2009 at 9:55 PM, Brett Cannon
wrote: The clarification I need is will this in any way influence when modules are removed. If they stay in for the life of a major version then I want it made clear that bug fixes for the code take lower priority over all other code in the standard library.
I think we should be as cautious as ever with removing modules. We've had our chance for clean-up without abandon with Py3k; now we should stick with our commitment to backwards compatibility. In fact, we should probably be *more* conservative than we already were given that the amount of code written in Python is always increasing and hence the cumulative pain caused by incompatible changes will increase too.
I'm fine with silent deprecations or requiring a flag to turn on deprecation warnings (like Java does).
We can discuss this on the stdlib-sig and come back with a proposal on how to update PEP 4 with an explicit policy on how to handle deprecations (either Nick's proposal or some flag, and then how long to let the deprecation last, i.e. three versions or the life of a major version of Python).
We're not yet at the point where C is, but who wouldn't be next to C on the TIOBE index? :-)
-- --Guido van Rossum (python.org/~guido)
Brett Cannon wrote:
On Fri, Nov 6, 2009 at 08:02, Guido van Rossum
wrote: The clarification I need is will this in any way influence when modules are removed. If they stay in for the life of a major version then I want it made clear that bug fixes for the code take lower priority over all other code in the standard library. I think we should be as cautious as ever with removing modules. We've had our chance for clean-up without abandon with Py3k; now we should stick with our commitment to backwards compatibility. In fact, we should probably be *more* conservative than we already were given that
On Thu, Nov 5, 2009 at 9:55 PM, Brett Cannon
wrote: the amount of code written in Python is always increasing and hence the cumulative pain caused by incompatible changes will increase too. I'm fine with silent deprecations or requiring a flag to turn on deprecation warnings (like Java does).
We can discuss this on the stdlib-sig and come back with a proposal on how to update PEP 4 with an explicit policy on how to handle deprecations (either Nick's proposal or some flag, and then how long to let the deprecation last, i.e. three versions or the life of a major version of Python).
Complete removal of modules during the seems to have caused problems especially for people supporting a range of versions. On the other hand, you want to be able to replace and cease support of modules. So rather that complete removal, perhaps move them to a new package called, for instance, 'old'. And move their doc sections to a new chapter call 'Old Modules' which would begin with something like "The following modules have been replaced but are still present in the *old* package for back compatibility. They are no longer maintained and will possibly disappear in the future, such as if there is ever a Python4." This suggestion based on the "3. Non-essential Built-in Functions" of the 2.x doc, whose contents disappeared in 3.0 (even though that seems not to have been specified in the doc). Terry Jan Reedy
Guido van Rossum schrieb:
Actually, I think Dirkjan has a point. I'm not sure that we need another moratorium (that's a rather dramatic kind of decision which should be very rare indeed) but I do agree that deprecations are often more of a pain than they're worth.
For example, take the deprecation of the md5 and sha modules in Python 2.6. They make it a bit of a pain to write code that *cleanly* supports Python 2.4 (doesn't have hashlib) through 2.6 (warns when importing md5 instead of hashlib). You can silence the warning, but that is in itself not particularly clean, and users really hate having the warnings.
Trying to import hashlib and importing md5 on ImportError isn't *too* unclean, is it? Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out.
On Fri, Nov 6, 2009 at 3:24 PM, Georg Brandl
Guido van Rossum schrieb:
Actually, I think Dirkjan has a point. I'm not sure that we need another moratorium (that's a rather dramatic kind of decision which should be very rare indeed) but I do agree that deprecations are often more of a pain than they're worth.
For example, take the deprecation of the md5 and sha modules in Python 2.6. They make it a bit of a pain to write code that *cleanly* supports Python 2.4 (doesn't have hashlib) through 2.6 (warns when importing md5 instead of hashlib). You can silence the warning, but that is in itself not particularly clean, and users really hate having the warnings.
Trying to import hashlib and importing md5 on ImportError isn't *too* unclean, is it?
That's not all -- you also have to modify the code that uses the module, unless you use "import as", which has problems of its own. Plus, I may not care (yet) about supporting 2.7, and yet I am forced to change my code to cleanly support 2.6. I really don't like it. -- --Guido van Rossum (python.org/~guido)
Georg Brandl wrote:
Guido van Rossum schrieb:
Actually, I think Dirkjan has a point. I'm not sure that we need another moratorium (that's a rather dramatic kind of decision which should be very rare indeed) but I do agree that deprecations are often more of a pain than they're worth.
For example, take the deprecation of the md5 and sha modules in Python 2.6. They make it a bit of a pain to write code that *cleanly* supports Python 2.4 (doesn't have hashlib) through 2.6 (warns when importing md5 instead of hashlib). You can silence the warning, but that is in itself not particularly clean, and users really hate having the warnings.
Trying to import hashlib and importing md5 on ImportError isn't *too* unclean, is it?
Having had to do this myself a few times, I was always a little surprised the "import-or" idea [1] didn't get more support the last time it was proposed. Ah well, don't need to worry about that idea again until 3.4 or so :) Cheers, Nick P.S. For anyone unfamiliar with it, "import-or" was a suggestion made around the time xml.etree was added to the standard library to provide a "import x or y as z" shorthand for: try: import x as z except ImportError: import y as z (allowing "from a or b import c" was also part of the suggestion, as was allowing multiple "or" elements in a single import request) Support for the idea was lukewarm at best, hostile at worst (hence the lack of PEP). Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------
On Fri, Nov 6, 2009 at 6:42 PM, Nick Coghlan
Georg Brandl wrote:
Guido van Rossum schrieb:
Actually, I think Dirkjan has a point. I'm not sure that we need another moratorium (that's a rather dramatic kind of decision which should be very rare indeed) but I do agree that deprecations are often more of a pain than they're worth.
For example, take the deprecation of the md5 and sha modules in Python 2.6. They make it a bit of a pain to write code that *cleanly* supports Python 2.4 (doesn't have hashlib) through 2.6 (warns when importing md5 instead of hashlib). You can silence the warning, but that is in itself not particularly clean, and users really hate having the warnings.
Trying to import hashlib and importing md5 on ImportError isn't *too* unclean, is it?
Having had to do this myself a few times, I was always a little surprised the "import-or" idea [1] didn't get more support the last time it was proposed.
Ah well, don't need to worry about that idea again until 3.4 or so :)
Cheers, Nick
P.S. For anyone unfamiliar with it, "import-or" was a suggestion made around the time xml.etree was added to the standard library to provide a "import x or y as z" shorthand for: try: import x as z except ImportError: import y as z
(allowing "from a or b import c" was also part of the suggestion, as was allowing multiple "or" elements in a single import request)
Support for the idea was lukewarm at best, hostile at worst (hence the lack of PEP).
I'm still -1 on that -- while it may sound like a good shorthand if you have to deal with this, it's IMO pretty mysterious if you encounter this and don't already happen to know what it means. Also, it makes no sense without the 'as' clause which makes it a bit awkward. (I could probably come up with a few more arguments against it, just trying to hint that I'm personally less than lukewarm. :-) -- --Guido van Rossum (python.org/~guido)
Guido> ... it's IMO pretty mysterious if you encounter this and don't Guido> already happen to know what it means. If you require parens maybe it parses better: import (a or b or c) as mod Given that the or operator shortcuts I think that (a or b or c) terminates once a module is found isn't too hard to grasp. Skip
On 12:10 pm, skip@pobox.com wrote:
Guido> ... it's IMO pretty mysterious if you encounter this and don't Guido> already happen to know what it means.
If you require parens maybe it parses better:
import (a or b or c) as mod
Given that the or operator shortcuts I think that (a or b or c) terminates once a module is found isn't too hard to grasp.
Did everyone forget what the subject of this thread is? Jean-Paul
exarkun@twistedmatrix.com schrieb:
On 12:10 pm, skip@pobox.com wrote:
Guido> ... it's IMO pretty mysterious if you encounter this and don't Guido> already happen to know what it means.
If you require parens maybe it parses better:
import (a or b or c) as mod
Given that the or operator shortcuts I think that (a or b or c) terminates once a module is found isn't too hard to grasp.
Did everyone forget what the subject of this thread is?
Why? The subject of this thread is "Importing module alternatives cleanly". We just happened to forget adapting the "Subject:" line. Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out.
On Thu, Nov 5, 2009 at 14:53, Dirkjan Ochtman
On Thu, Nov 5, 2009 at 23:05, Guido van Rossum
wrote: I haven't seen substantial opposition against the PEP -- in fact I can't recall any, and many people have explicitly posted in support of it. So unless opposition suddenly appears in the next few days, I'll move it to the Accepted state next Monday.
Let me state first, I think the PEP is great, and I have no objection to its current form.
I do have one qualm, where I wonder if the PEP shouldn't be a little stricter. As a gentoo developer and Mercurial maintainer, most of the pain in the recent migration towards 2.6 has not been in language changes, but in the standard library. Unfortunately, it's exempt from the moratorium in the PEP.
Which makes me wonder, why are we not adding another moratorium, on deprecations in the standard library? In other words, let's not deprecate things like md5 or sha or the popen family of functions, but keep all of that as it is, for both 2.x and 3.x, so people can direct their energy towards other things (hopefully porting their 2.x codebase to 3.x).
The standard library has already been through a lot of evolution in the 2.x to 3.x transition, so one might assume there's not a lot of stuff in the 3.x stdlib that would need deprecation in the short term. And for 2.x, well, I'd certainly hope we don't need to deprecate much more there before it finally gets EOL'ed, so it should be a relatively light maintenance load to bear.
Is this just crazy talk?
So you are basically asking for a moratorium on stdlib deprecations. Considering how much was removed in Python 3 from 2.6 this is a really minor worry. And the only deprecation that I can see potentially coming down the pipeline is optparse for argparse and cProfile to help finish PEP 3108. And, as Jesse said in another reply, it would be nice to take this time to reflect upon where we want the stdlib to go and to potentially clear other things out. So I am -0 on this as leaving stuff in for an extra release isn't going to kill us, but I would prefer to not put it off. -Brett
Guido van Rossum wrote:
On Tue, Nov 3, 2009 at 9:35 AM, Guido van Rossum
wrote: I've checked draft (!) PEP 3003, "Python Language Moratorium", into SVN. As authors I've listed Jesse, Brett and myself.
I haven't seen substantial opposition against the PEP -- in fact I can't recall any, and many people have explicitly posted in support of it. So unless opposition suddenly appears in the next few days, I'll move it to the Accepted state next Monday.
My view is that instead of there being new language features appearing in the next few years, what we have in Python 3 _are_ the new language features. We just need time to digest them before looking for more. :-) +1
On Fri, 6 Nov 2009 09:05:17 am Guido van Rossum wrote:
On Tue, Nov 3, 2009 at 9:35 AM, Guido van Rossum
wrote: I've checked draft (!) PEP 3003, "Python Language Moratorium", into SVN. As authors I've listed Jesse, Brett and myself.
I haven't seen substantial opposition against the PEP -- in fact I can't recall any, and many people have explicitly posted in support of it. So unless opposition suddenly appears in the next few days, I'll move it to the Accepted state next Monday.
I'm not a core developer, but I have made some objections on the python-ideas list. For what it is worth, I don't think a moratorium is needed, and it is not cost free. Whether the cost is worth it is a matter of opinion, but I've read posts suggesting that there's no downside to a moratorium. I think that's naive. Firstly, the core developers are very conservative in the features they add to the language. Nobody suggests that will change -- there are (as far as I know) a grand total of *one* proposed language changes under consideration for 3.2, namely "yield from". It isn't like the moratorium is needed to stem a flood of vast numbers of incompatible language changes, and this is not likely to change. The given reason for the moratorium is to give the developers of other Python implementations a chance to catch up. But as far as I know -- and I welcome correction -- only one such developer has spoken up, and he says that new language features generally aren't a problem for IronPython, but some standard library features are: http://mail.python.org/pipermail/python-ideas/2009-October/006328.html (In fairness, I should point out that Dino did not vote against the moratorium, he gave a conditional "in favour" vote but asked for some wiggle-room. A moratorium with wiggle-room is not a moratorium.) A moratorium isn't cost-free. With the back-end free to change, patches will go stale over 2+ years. People will lose interest or otherwise move on. Those with good ideas but little patience will be discouraged. I fully expect that, human nature being as it is, those proposing a change, good or bad, will be told not to bother wasting their time, there's a moratorium on at least as often as they'll be encouraged to bide their time while the moratorium is on. A moratorium turns Python's conservativeness up to 11. If Python already has a reputation for being conservative in the features it accepts -- and I think it does -- then a moratorium risks giving the impression that Python has become the language of choice for old guys sitting on their porch yelling at the damn kids to get off the lawn. That's a plus for Cobol. I don't think it is a plus for Python. What one person sees as "stable", another may see as "moribund". Perception does matter. Nick Coglan spoke of Jython having "fell by the wayside" when CPython introduced new style classes: http://mail.python.org/pipermail/python-ideas/2009-October/006431.html I think that speaks to the opposite conclusion that Nick intended. If developers craved stability, and were put off by the pace of changes to CPython, why weren't they migrating to Jython, which had one new production release in six years? http://www.jython.org/archive/22/news.html Nick also described C as changing much more slowly over its life that Python has. This is misleading: it is true that the C standard has been stable, but that doesn't mean that C compilers have been. Changes to the standard were driven by changes introduced by the implementations, not visa versa. Likewise for Cobol, where the first implementation to introduce OOP was released in 1997, but the standard wasn't updated until 2002. Python is nothing like that. Python doesn't have an official standard, and Guido has dismissed the need for an ISO standard. The other implementations have historically let CPython lead as far as language evolution goes. If CPython stops, likely Python stops. Who is going to risk adding language features that break compatibility with the most popular implementation? It won't be Python anymore. The PEP says the moratorium will last "at least" two years from the release of 3.1. Given the normal slow pace of new language features, two years isn't bad -- that's effectively just 3.2. But Guido has suggested it could last to 3.3. Could it last beyond that? 3.4? Until some distant future Python-4000? At the very least, I believe, any moratorium should have a clear end date. A clear end date will be a powerful counter to the impression that Python the language is moribund. It says, this is an exceptional pause, not a permanent halt. -- Steven D'Aprano
...
A moratorium isn't cost-free. With the back-end free to change, patches will go stale over 2+ years. People will lose interest or otherwise move on. Those with good ideas but little patience will be discouraged. I fully expect that, human nature being as it is, those proposing a change, good or bad, will be told not to bother wasting their time, there's a moratorium on at least as often as they'll be encouraged to bide their time while the moratorium is on.
I believe if you go back to the very beginning of this thread, Guido considers this a *feature* not a *bug*. He wanted to introduce a moratorium at least partially because he was tired of endless threads about anonymous code blocks, etc. Which aren't going to be included in the language anyway, so he may as well make a point to say "and neither will anything else for a while". I don't mean to put words into his mouth, so please correct me if I'm wrong. John =:->
John Arbash Meinel wrote:
He wanted to introduce a moratorium at least partially because he was tired of endless threads about anonymous code blocks, etc. Which aren't going to be included in the language anyway, so he may as well make a point to say "and neither will anything else for a while".
I have not said anything on this topic either way. But I think a general moratorium is a false solution to that particular problem. Guido should just make a clear pronouncement (again) and let people quote that in response to initial posts, before they *appear* to gain steam. Each time Python doubles in popularity, the number of people wanting such things will approximately double. That is the price of success. Terry Jan Reedy
John Arbash Meinel wrote:
He wanted to introduce a moratorium at least partially because he was tired of endless threads about anonymous code blocks, etc. Which aren't going to be included in the language anyway, so he may as well make a point to say "and neither will anything else for a while".
If anonymous code blocks still get discussed even when they have no chance of being accepted, this suggests that a moratorium is *not* going to stop discussion of new features. I'm a bit confused about Guido's reasons for wanting a moratorium. He started out by saying that the intention wasn't to stop people discussing ideas, then later he seemed to say that he was finding all these discussions were distracting, then he explicitly said he wanted to "crush" people's hopes of getting new features into the language. That all sounds like he actually *does* want to discourage such discussions. -- Greg
Greg Ewing
If anonymous code blocks still get discussed even when they have no chance of being accepted, this suggests that a moratorium is *not* going to stop discussion of new features.
Well, if they get discussed, it's probably that some people can't help participating in the discussions, even though they know the idea is doomed to failure ;)
On Sun, 8 Nov 2009 11:14:59 am Steven D'Aprano wrote:
At the very least, I believe, any moratorium should have a clear end date. A clear end date will be a powerful counter to the impression that Python the language is moribund. It says, this is an exceptional pause, not a permanent halt.
Proposal: No new language features in odd-numbered point releases (3.3, 3.5, ...). Even-numbered point releases (3.4, 3.6, ...) may include new language features provided they meet the usual standards for new features. 3.2 is a special case: as an even-numbered release, it would normally allow new features, but in recognition of the special nature of the 2.x to 3.1/3.2 migration, no new language features will be allowed. Advantages: * It slows down changes to the language while still allowing sufficiently high-standard new features. * Alternate implementations have a stable language version to aim for. Assuming point releases come ever 12-18 months, that stable language version will last 2-3 years. * It doesn't have the psychological baggage of an unconditional ban on new features for the indefinite future. It gives a fixed, known schedule for when new features will be permitted, without the uncertainty of "at the BDFL's pleasure". -- Steven D'Aprano
On Sun, Nov 8, 2009 at 6:06 PM, Steven D'Aprano
On Sun, 8 Nov 2009 11:14:59 am Steven D'Aprano wrote:
At the very least, I believe, any moratorium should have a clear end date. A clear end date will be a powerful counter to the impression that Python the language is moribund. It says, this is an exceptional pause, not a permanent halt.
Proposal:
No new language features in odd-numbered point releases (3.3, 3.5, ...). Even-numbered point releases (3.4, 3.6, ...) may include new language features provided they meet the usual standards for new features.
3.2 is a special case: as an even-numbered release, it would normally allow new features, but in recognition of the special nature of the 2.x to 3.1/3.2 migration, no new language features will be allowed.
Advantages:
* It slows down changes to the language while still allowing sufficiently high-standard new features.
* Alternate implementations have a stable language version to aim for. Assuming point releases come ever 12-18 months, that stable language version will last 2-3 years.
* It doesn't have the psychological baggage of an unconditional ban on new features for the indefinite future. It gives a fixed, known schedule for when new features will be permitted, without the uncertainty of "at the BDFL's pleasure".
-- Steven D'Aprano
FWIW, I view a definite end point as a definite plus. Geremy Condra
On Nov 8, 2009, at 7:01 PM, geremy condra
On Sun, Nov 8, 2009 at 6:06 PM, Steven D'Aprano
wrote: On Sun, 8 Nov 2009 11:14:59 am Steven D'Aprano wrote:
At the very least, I believe, any moratorium should have a clear end date. A clear end date will be a powerful counter to the impression that Python the language is moribund. It says, this is an exceptional pause, not a permanent halt.
Proposal:
No new language features in odd-numbered point releases (3.3, 3.5, ...). Even-numbered point releases (3.4, 3.6, ...) may include new language features provided they meet the usual standards for new features.
3.2 is a special case: as an even-numbered release, it would normally allow new features, but in recognition of the special nature of the 2.x to 3.1/3.2 migration, no new language features will be allowed.
Advantages:
* It slows down changes to the language while still allowing sufficiently high-standard new features.
* Alternate implementations have a stable language version to aim for. Assuming point releases come ever 12-18 months, that stable language version will last 2-3 years.
* It doesn't have the psychological baggage of an unconditional ban on new features for the indefinite future. It gives a fixed, known schedule for when new features will be permitted, without the uncertainty of "at the BDFL's pleasure".
-- Steven D'Aprano
FWIW, I view a definite end point as a definite plus.
Geremy Condra
There is a time outlined in the pep.
On Sun, Nov 8, 2009 at 8:22 PM, Jesse Noller
On Nov 8, 2009, at 7:01 PM, geremy condra
wrote: On Sun, Nov 8, 2009 at 6:06 PM, Steven D'Aprano
wrote: On Sun, 8 Nov 2009 11:14:59 am Steven D'Aprano wrote:
At the very least, I believe, any moratorium should have a clear end date. A clear end date will be a powerful counter to the impression that Python the language is moribund. It says, this is an exceptional pause, not a permanent halt.
Proposal:
No new language features in odd-numbered point releases (3.3, 3.5, ...). Even-numbered point releases (3.4, 3.6, ...) may include new language features provided they meet the usual standards for new features.
3.2 is a special case: as an even-numbered release, it would normally allow new features, but in recognition of the special nature of the 2.x to 3.1/3.2 migration, no new language features will be allowed.
Advantages:
* It slows down changes to the language while still allowing sufficiently high-standard new features.
* Alternate implementations have a stable language version to aim for. Assuming point releases come ever 12-18 months, that stable language version will last 2-3 years.
* It doesn't have the psychological baggage of an unconditional ban on new features for the indefinite future. It gives a fixed, known schedule for when new features will be permitted, without the uncertainty of "at the BDFL's pleasure".
-- Steven D'Aprano
FWIW, I view a definite end point as a definite plus.
Geremy Condra
There is a time outlined in the pep.
I quote: "This PEP proposes a temporary moratorium (suspension) of all changes to the Python language syntax, semantics, and built-ins for a period of *at least two years* from the release of Python 3.1." Emphasis mine. Like I say, a definite end point would be much preferred to n > 2. If possible, I'd also like to hear some of Steven's other points addressed. Geremy Condra
On Sun, Nov 8, 2009 at 5:45 PM, geremy condra
I quote:
"This PEP proposes a temporary moratorium (suspension) of all changes to the Python language syntax, semantics, and built-ins for a period of *at least two years* from the release of Python 3.1."
Emphasis mine.
I since added this: """In particular, the moratorium would include Python 3.2 (to be released 18-24 months after 3.1) but (unless explicitly extended) allow Python 3.3 to once again include language changes."""
Like I say, a definite end point would be much preferred to n > 2.
My time machine doesn't work very well in the future. So I can't tell what we'll find necessary 2 years from now. But I would be fine with defining the time limit to be max(time(3.1) + 2 years, time(3.2)). I.e. the moratorium (unless explicitly extended) ends as soon as 3.2 has been released *and* at least 2 years have passed since 3.1.
If possible, I'd also like to hear some of Steven's other points addressed.
They haven't changed my mind. -- --Guido van Rossum (python.org/~guido)
On Sun, Nov 8, 2009 at 9:41 PM, Guido van Rossum
On Sun, Nov 8, 2009 at 5:45 PM, geremy condra
wrote: I quote:
"This PEP proposes a temporary moratorium (suspension) of all changes to the Python language syntax, semantics, and built-ins for a period of *at least two years* from the release of Python 3.1."
Emphasis mine.
I since added this:
"""In particular, the moratorium would include Python 3.2 (to be released 18-24 months after 3.1) but (unless explicitly extended) allow Python 3.3 to once again include language changes."""
Like I say, a definite end point would be much preferred to n > 2.
My time machine doesn't work very well in the future. So I can't tell what we'll find necessary 2 years from now. But I would be fine with defining the time limit to be max(time(3.1) + 2 years, time(3.2)). I.e. the moratorium (unless explicitly extended) ends as soon as 3.2 has been released *and* at least 2 years have passed since 3.1.
Ok, thanks for the clarification. Could you spell out what you would consider grounds for a future extension?
If possible, I'd also like to hear some of Steven's other points addressed.
They haven't changed my mind.
Ok, but the fact that you (or Steven) hold a particular set of beliefs is a singularly unconvincing argument. Could you explain why you don't agree, if only for the record? Geremy Condra
On Sun, Nov 8, 2009 at 19:50, geremy condra
On Sun, Nov 8, 2009 at 9:41 PM, Guido van Rossum
wrote: On Sun, Nov 8, 2009 at 5:45 PM, geremy condra
wrote: I quote:
"This PEP proposes a temporary moratorium (suspension) of all changes to the Python language syntax, semantics, and built-ins for a period of *at least two years* from the release of Python 3.1."
Emphasis mine.
I since added this:
"""In particular, the moratorium would include Python 3.2 (to be released 18-24 months after 3.1) but (unless explicitly extended) allow Python 3.3 to once again include language changes."""
Like I say, a definite end point would be much preferred to n > 2.
My time machine doesn't work very well in the future. So I can't tell what we'll find necessary 2 years from now. But I would be fine with defining the time limit to be max(time(3.1) + 2 years, time(3.2)). I.e. the moratorium (unless explicitly extended) ends as soon as 3.2 has been released *and* at least 2 years have passed since 3.1.
Ok, thanks for the clarification. Could you spell out what you would consider grounds for a future extension?
We feel it's necessary as a group or Guido does, simple as that. You can't plan it since it's over two years away. If the time comes and people feel the moratorium has been beneficial and should go longer, we will extend it. It will most likely be for the same reasons we started it.
If possible, I'd also like to hear some of Steven's other points addressed.
They haven't changed my mind.
Ok, but the fact that you (or Steven) hold a particular set of beliefs is a singularly unconvincing argument.
I disagree. Guido is the BDFL so his set of beliefs is enough unless faced with a huge number of people disagreeing. That has not occurred on this topic.
Could you explain why you don't agree, if only for the record?
Enough happens on python-dev based on gut feeling that there isn't a need. If we had to spell out objections to every email we received while discussing a PEP, threads would never end. Heck, I think this PEP discussion as gone on long enough and that Guido could pronounce at this point. -Brett
Thanks Brett. I've moved the moratorium PEP to Status: Accepted. I've
added the words about inclusion of 3.2 and exclusion of 3.3 (which
were eaten by a svn conflict when I previously tried to add them) and
added a section to th end stating that an extension will require
another PEP.
--Guido
On Mon, Nov 9, 2009 at 9:12 AM, Brett Cannon
On Sun, Nov 8, 2009 at 19:50, geremy condra
wrote: On Sun, Nov 8, 2009 at 9:41 PM, Guido van Rossum
wrote: On Sun, Nov 8, 2009 at 5:45 PM, geremy condra
wrote: I quote:
"This PEP proposes a temporary moratorium (suspension) of all changes to the Python language syntax, semantics, and built-ins for a period of *at least two years* from the release of Python 3.1."
Emphasis mine.
I since added this:
"""In particular, the moratorium would include Python 3.2 (to be released 18-24 months after 3.1) but (unless explicitly extended) allow Python 3.3 to once again include language changes."""
Like I say, a definite end point would be much preferred to n > 2.
My time machine doesn't work very well in the future. So I can't tell what we'll find necessary 2 years from now. But I would be fine with defining the time limit to be max(time(3.1) + 2 years, time(3.2)). I.e. the moratorium (unless explicitly extended) ends as soon as 3.2 has been released *and* at least 2 years have passed since 3.1.
Ok, thanks for the clarification. Could you spell out what you would consider grounds for a future extension?
We feel it's necessary as a group or Guido does, simple as that. You can't plan it since it's over two years away. If the time comes and people feel the moratorium has been beneficial and should go longer, we will extend it. It will most likely be for the same reasons we started it.
If possible, I'd also like to hear some of Steven's other points addressed.
They haven't changed my mind.
Ok, but the fact that you (or Steven) hold a particular set of beliefs is a singularly unconvincing argument.
I disagree. Guido is the BDFL so his set of beliefs is enough unless faced with a huge number of people disagreeing. That has not occurred on this topic.
Could you explain why you don't agree, if only for the record?
Enough happens on python-dev based on gut feeling that there isn't a need. If we had to spell out objections to every email we received while discussing a PEP, threads would never end. Heck, I think this PEP discussion as gone on long enough and that Guido could pronounce at this point.
-Brett
-- --Guido van Rossum (python.org/~guido)
On Sun, Nov 8, 2009 at 3:06 PM, Steven D'Aprano
No new language features in odd-numbered point releases (3.3, 3.5, ...). Even-numbered point releases (3.4, 3.6, ...) may include new language features provided they meet the usual standards for new features.
Oh no, not the eve/odd numbering scheme. Nobody will be able to remember which is which. -- --Guido van Rossum (python.org/~guido)
Guido van Rossum wrote:
On Sun, Nov 8, 2009 at 3:06 PM, Steven D'Aprano
wrote: No new language features in odd-numbered point releases (3.3, 3.5, ...). Even-numbered point releases (3.4, 3.6, ...) may include new language features provided they meet the usual standards for new features.
Oh no, not the eve/odd numbering scheme. Nobody will be able to remember which is which.
In this case, does it really matter? Usually the confusion is with stable/unstable being even/odd or odd/even, but in this case the options are stable/stable (it just happens that certain pairwise versions are related). -- Scott Dial scott@scottdial.com scodial@cs.indiana.edu
2009-11-03 18:35:10 Guido van Rossum napisał(a):
I've checked draft (!) PEP 3003, "Python Language Moratorium", into SVN. As authors I've listed Jesse, Brett and myself.
On python-ideas the moratorium idea got fairly positive responses (more positive than I'd expected, in fact) but I'm bracing myself for fierce discussion here on python-dev. It's important to me that if if this is accepted it is a "rough consensus" decision (working code we already have plenty of :-), not something enforced by a vocal minority or an influential individual such as myself. If there's too much opposition I'll withdraw the PEP so as not to waste everybody's time with a fruitless discussion.
The PEP tries to spell out some gray areas but I'm sure there will be others; that's life. Do note that the PEP proposes to be *retroactive* back to the 3.1 release, i.e. the "frozen" version of the language is the state in which it was released as 3.1.
Does moratorium allow to add support for e.g. 'from __future__ import yield_from' in Python 3.2? -- Arfrever Frehtes Taifersar Arahesis
On Thu, Nov 5, 2009 at 14:20, Arfrever Frehtes Taifersar Arahesis
2009-11-03 18:35:10 Guido van Rossum napisał(a):
I've checked draft (!) PEP 3003, "Python Language Moratorium", into SVN. As authors I've listed Jesse, Brett and myself.
On python-ideas the moratorium idea got fairly positive responses (more positive than I'd expected, in fact) but I'm bracing myself for fierce discussion here on python-dev. It's important to me that if if this is accepted it is a "rough consensus" decision (working code we already have plenty of :-), not something enforced by a vocal minority or an influential individual such as myself. If there's too much opposition I'll withdraw the PEP so as not to waste everybody's time with a fruitless discussion.
The PEP tries to spell out some gray areas but I'm sure there will be others; that's life. Do note that the PEP proposes to be *retroactive* back to the 3.1 release, i.e. the "frozen" version of the language is the state in which it was released as 3.1.
Does moratorium allow to add support for e.g. 'from __future__ import yield_from' in Python 3.2?
No. -Brett
participants (42)
-
"Martin v. Löwis"
-
A.M. Kuchling
-
Alexandre Vassalotti
-
Anand Balachandran Pillai
-
Andre Stechert
-
Antoine Pitrou
-
Arfrever Frehtes Taifersar Arahesis
-
Barry Warsaw
-
Bobby R. Ward
-
Brett Cannon
-
Collin Winter
-
Dino Viehland
-
Dirkjan Ochtman
-
Doug Hellmann
-
exarkun@twistedmatrix.com
-
Facundo Batista
-
Georg Brandl
-
geremy condra
-
Greg Ewing
-
Gregory P. Smith
-
Guido van Rossum
-
Hagen Fürstenau
-
Jack Diederich
-
Jesse Noller
-
John Arbash Meinel
-
M.-A. Lemburg
-
Maciej Fijalkowski
-
Mark Hammond
-
Michael Foord
-
MRAB
-
Nick Coghlan
-
Raymond Hettinger
-
Scott Dial
-
skip@pobox.com
-
Stefan Behnel
-
Stephen J. Turnbull
-
Steven D'Aprano
-
Terry Reedy
-
Thomas Heller
-
Tres Seaver
-
Willem Broekema
-
Yuvgoog Greenle