[issue13356] test_logging warning on 2.7

2011-11-07 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 8726ad774cf0 by Vinay Sajip in branch '2.7':
Closes #13356. Thanks to Florent Xicluna for the patch.
http://hg.python.org/cpython/rev/8726ad774cf0

--
nosy: +python-dev
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13356
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13356] test_logging warning on 2.7

2011-11-06 Thread Ezio Melotti

New submission from Ezio Melotti ezio.melo...@gmail.com:

$ ./python -Wd -3 -m test.regrtest -v test_logging
== CPython 2.7.2+ (2.7:39573be48b4a, Nov 6 2011, 17:13:44) [GCC 4.6.1]
==   Linux-3.0.0-12-generic-i686-with-debian-wheezy-sid little-endian
==   /home/wolf/dev/py/wide-2.7/build/test_python_6508
Testing with flags: sys.flags(debug=0, py3k_warning=1, division_warning=1, 
division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, 
no_user_site=0, no_site=0, ignore_environment=0, tabcheck=1, verbose=0, 
unicode=0, bytes_warning=0)
test_logging
[...]
test_listen_config_10_ok (test.test_logging.ConfigDictTest) ... 
/home/wolf/dev/py/wide-2.7/Lib/logging/config.py:599: UnicodeWarning: Unicode 
equal comparison failed to convert both arguments to Unicode - interpreting 
them as being unequal
  if name in existing:
ok
[...]

--
Ran 43 tests in 2.328s

OK
1 test OK.

--
assignee: vinay.sajip
components: Library (Lib)
messages: 147165
nosy: ezio.melotti, vinay.sajip
priority: normal
severity: normal
stage: needs patch
status: open
title: test_logging warning on 2.7
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13356
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13356] test_logging warning on 2.7

2011-11-06 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
dependencies: +UnicodeWarning raised on dict() and set()
nosy: +flox

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13356
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13356] test_logging warning on 2.7

2011-11-06 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

This is the expression which raises the warning.

 u'compiler.parser' in ['\xab\xd7\xbb', u'\u013f\xd6G']
__main__:1: UnicodeWarning: Unicode equal comparison failed to convert both 
arguments to Unicode - interpreting them as being unequal
False


See also issue #13360

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13356
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13356] test_logging warning on 2.7

2011-11-06 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

Thanks, Florent. This patch was by you in response to issue #8201 - do you have 
any suggestion as to the best way to resolve this? I tried changing the 
non-ASCII logger to '\xc3\xb4\xc3\xbc', which decodes cleanly to u'\xf4\xfc' 
(o-circumflex u-umlaut), but it apparently still fails to convert to Unicode 
when doing the comparison, and so still raises the warning. Is there any 
byte-string sequence which won't give the error in this circumstance? Obviously 
I could convert it to Unicode, but then the test is checking correct operation 
when you have a non-ASCII (byte-)string name as well as a Unicode name for 
loggers.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13356
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13356] test_logging warning on 2.7

2011-11-06 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

I suggest to use encoded string as keys in loggerDict.
It should solve both issue #8201 and this one.
Moreover, it seems in line with msg147191 from Martin on issue #13360.

Patch attached.

--
components: +Unicode
dependencies:  -UnicodeWarning raised on sequence and set comparisons
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file23620/issue13356_logging.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13356
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com