Re: Python 2.1 out

2001-04-19 Thread Carey Evans
Sean 'Shaleh' Perry [EMAIL PROTECTED] writes:

 last I checked it only helped derivatives of python, not python itself.

AIUI, the point is that Python 2.1 is a derivative of CNRI Python 1.6.1.

-- 
 Carey Evans  http://home.clear.net.nz/pages/c.evans/

Quiet, you'll miss the humorous conclusion.




Re: Python 2.1 out

2001-04-19 Thread Florian Weimer
D-Man [EMAIL PROTECTED] writes:

 On Wed, Apr 18, 2001 at 10:25:52PM +0200, Florian Weimer wrote:
 | Steve Purcell [EMAIL PROTECTED] writes:
 | 
 |  Licenses aside, there are the same technical issues with Python 2.1
 |  as with Python 2.0. 
 | 
 | Python 2.1 seems to print some diagnostic messages during run-time;
 | this might affect scripts which are invoked in cron jobs.
 
 Are you sure they aren't warnings regarding code that will not work as
 expected in future versions?

Yes, I think so.  But that doesn't make them less annoying. ;-)




Re: Python 2.1 out

2001-04-19 Thread Gregor Hoffleit
On Thu, Apr 19, 2001 at 10:04:24AM +0200, Florian Weimer wrote:
 D-Man [EMAIL PROTECTED] writes:
 
  On Wed, Apr 18, 2001 at 10:25:52PM +0200, Florian Weimer wrote:
  | Steve Purcell [EMAIL PROTECTED] writes:
  | 
  |  Licenses aside, there are the same technical issues with Python 2.1
  |  as with Python 2.0. 
  | 
  | Python 2.1 seems to print some diagnostic messages during run-time;
  | this might affect scripts which are invoked in cron jobs.
  
  Are you sure they aren't warnings regarding code that will not work as
  expected in future versions?
 
 Yes, I think so.  But that doesn't make them less annoying. ;-)

Could you mail an example of such a message ?

Gregor





Re: Python 2.1 out

2001-04-19 Thread Florian Weimer
Gregor Hoffleit [EMAIL PROTECTED] writes:

[Python warning messages]

 Could you mail an example of such a message ?

y = None
def fun():
y = None
def bar():
y
bar()

fun()

results in:

file:2: SyntaxWarning: local name 'y' in 'fun' shadows use of 'y' as global 
in nested scope 'bar'
  def fun():

There are probably other kinds of warnings; PyErr_Warn is called in a
number of places.  Python 2.1 provides a mechanism to switch off
warnings (the 'warnings' module, don't ask me about details :-/), but
by default, they are printed to stderr.




Re: Python 2.1 out

2001-04-19 Thread D-Man
On Thu, Apr 19, 2001 at 12:17:40PM +0200, Florian Weimer wrote:
| Gregor Hoffleit [EMAIL PROTECTED] writes:
| 
| [Python warning messages]
| 
|  Could you mail an example of such a message ?
| 
| y = None
| def fun():
| y = None
| def bar():
| y
| bar()
| 
| fun()
| 
| results in:
| 
| file:2: SyntaxWarning: local name 'y' in 'fun' shadows use of 'y' as global 
in nested scope 'bar'
|   def fun():

Yeah, that code will almost certainly break in 2.2 when nested scopes
become mandatory.  It may have been intended, but assignment to a
local variable overshadowing a global is rarely the intended effect.

Anyways, if you want to get rid of those message now, without changing
the code use the  -W option to the interpreter.  Example :

$ python -W ignore Scope.py

(I created a file called Scope.py with that code in it)


See the last paragraph at
http://www.python.org/doc/current/lib/warning-filter.html

-D




Re: Python 2.1 out

2001-04-18 Thread Steve Purcell
Vasko Miroslav wrote:
 as Python 2.1 is out, there is no need to keep Python2 and Python152
 in Debian, I think.
 [snip]
 and code-breakage features like nested scopes are disabled by default.


Licenses aside, there are the same technical issues with Python 2.1
as with Python 2.0. 

The byte code files are incompatible, and so are binaries of extension
modules written in C.

There could not be a full migration of Debian to Python 2.1 until
all extensions have been rebuilt and tested successfully with 2.1.

It could also take some time before developers of python-based packages
(Zope etc) declare them to be compatible with Python 2.1.

I expect this means that Python 1.5.2 will be around for a while yet.

-Steve

-- 
Steve Purcell, Pythangelist
Get testing at http://pyunit.sourceforge.net/
Any opinions expressed herein are my own and not necessarily those of Yahoo




Re: Python 2.1 out

2001-04-18 Thread D-Man
On Wed, Apr 18, 2001 at 10:25:52PM +0200, Florian Weimer wrote:
| Steve Purcell [EMAIL PROTECTED] writes:
| 
|  Licenses aside, there are the same technical issues with Python 2.1
|  as with Python 2.0. 
| 
| Python 2.1 seems to print some diagnostic messages during run-time;
| this might affect scripts which are invoked in cron jobs.

Are you sure they aren't warnings regarding code that will not work as
expected in future versions?

-D