New submission from flaper87 <[email protected]>:

Pypy's logging module, in some cases, behaves differently from the standard 
python logging module. For example, 
https://bitbucket.org/pypy/pypy/src/b4b26fd9fe5be1855a8e4caebe0d2e3c5f3f1015/lib-python/2.7/logging/__init__.py?at=default#cl-157
 in 
standard python returns the level constant either an int is passed or a string.

the big difference is here 
http://hg.python.org/releasing/2.7.4/file/9290822f2280/Lib/logging/__init__.py#l137
 
https://bitbucket.org/pypy/pypy/src/b4b26fd9fe5be1855a8e4caebe0d2e3c5f3f1015/lib-python/2.7/logging/__init__.py?at=default#cl-137
 

phantom (pypy*) workspace/openstack/marconi $ python2.7                         
                                      
Python 2.7.4 (default, Apr  6 2013, 19:20:36) 
[GCC 4.8.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import logging
>>> logging.getLevelName('WARN')
30
>>>

(.venvpy)phantom (pypy*) workspace/openstack/marconi $ python                   
                                                                                
                                                                              
Python 2.7.3 (23314bb14a1f, Jun 16 2013, 08:12:59)
[PyPy 2.1.0-alpha0 with GCC 4.8.0 20130502 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``The time decreases!''
>>>> import logging
>>>> logging.getLevelName('WARN')
'Level WARN'
>>>>



What is the right procedure / rule to update files under lib-python ?

----------
assignedto: flaper87
messages: 5868
nosy: flaper87, pypy-issue
priority: bug
status: chatting
title: lib-python/logging behaves differently from standard python logging 
module

________________________________________
PyPy bug tracker <[email protected]>
<https://bugs.pypy.org/issue1517>
________________________________________
_______________________________________________
pypy-issue mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to