[issue11017] optparse: error: invalid integer value

2011-01-27 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I think it’s good: optparse checks for a leading 0 and will use int(value, 8) 
in that case.

--

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



[issue5305] imaplib should support international mailbox names

2011-01-27 Thread Hiroaki Kawai

Hiroaki Kawai hiroaki.ka...@gmail.com added the comment:

twisted's code does not work good for \t, \r, \n, those characters must 
encoded in modified base64 form according to RFC 3501.

--
nosy: +Hiroaki.Kawai

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



[issue11022] locale.setlocale() doesn't change I/O codec, os.environ[] does

2011-01-27 Thread Steffen Daode Nurpmeso

New submission from Steffen Daode Nurpmeso sdao...@googlemail.com:

This bug may be based on same problem as Issue 6203.
- My system locale is en_GB.UTF-8.
- Given a latin1 text file, open()+ will fail with
  'UnicodeDecodeError: 'utf8' codec can't decode byte 0xf6...'
- Using locale.setlocale(..., ...)
- Re-open causes same error, I/O layer codec has not been changed!
- Using os.environ[LC_ALL] = ...
- Re-open works properly, I/O layer codec has been changed.
P.S.: i am new to Python, please don't assume i can help in solving the problem!

--
components: Library (Lib)
messages: 127177
nosy: sdaoden
priority: normal
severity: normal
status: open
title: locale.setlocale() doesn't change I/O codec, os.environ[] does
versions: Python 3.1

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



[issue11022] locale.setlocale() doesn't change I/O codec, os.environ[] does

2011-01-27 Thread Steffen Daode Nurpmeso

Changes by Steffen Daode Nurpmeso sdao...@googlemail.com:


--
type:  - behavior

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



[issue11022] locale.setlocale() doesn't change I/O codec, os.environ[] does

2011-01-27 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 - Using locale.setlocale(..., ...)
 - Re-open causes same error, I/O layer codec has not been changed!

Yes, this is the expected behaviour with the current code.

TextIOWrapper uses indirectly locale.getpreferredencoding() to choose your file 
encoding. If locale has the CODESET constant, this function sets LC_CTYPE to  
and uses nl_langinfo(CODESET) to get the locale encoding.

locale.getpreferredencoding() has an option to not set the LC_CTYPE to : 
locale.getpreferredencoding(False).

Example:
---
$ python3.1
Type help, copyright, credits or license for more information.
 from locale import getpreferredencoding, setlocale, LC_CTYPE
 from locale import nl_langinfo, CODESET

 setlocale(LC_CTYPE, None)
'fr_FR.utf8'
 getpreferredencoding()
'UTF-8'
 getpreferredencoding(False)
'UTF-8'

 setlocale(LC_CTYPE, 'fr_FR.iso88591')
'fr_FR.iso88591'
 nl_langinfo(CODESET)
'ISO-8859-1'
 getpreferredencoding()
'UTF-8'
 getpreferredencoding(False)
'ISO-8859-1'
---

Setting LC_CTYPE does change directly nl_langinfo(CODESET) result, but not 
getpreferredencoding() result because getpreferredencoding() doesn't care of 
the current locale: it uses its own LC_CTYPE value ().

getpreferredencoding(False) uses the current locale and give the expected 
result.

 - Using os.environ[LC_ALL] = ...
 - Re-open works properly, I/O layer codec has been changed.

Set LC_ALL works because getpreferredencoding() sets the LC_CTYPE to  which 
will read the current value of the LC_ALL and LC_CTYPE environment 
variables.

--

Actually, TextIOWrapper doesn't use the current locale, it only uses 
(indirectly) the environment variables. I don't know which behaviour is better.

If you would like that TextIOWrapper uses your current locale, use: 
open(filename, encoding=locale.getpreferredencoding(True)).

Anyway, I don't know understand why do you change your locale, because you know 
that your file encoding is Latin1. Why don't you use directly: open(filename, 
encoding='latin1')?

--
nosy: +haypo

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



[issue11022] locale.setlocale() doesn't change I/O codec, os.environ[] does

2011-01-27 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 This bug may be based on same problem as Issue 6203.

Nope, both issues are different. Here you want that TextIOWrapper reads your 
current locale, and not your environment variables. Issue #6203 asks why 
LC_CTYPE is not C by default, but the user locale LC_CTYPE (read from LC_ALL or 
LC_CTYPE environment variables).

--

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



[issue6203] 3.x locale does not default to C, contrary to the documentation and to 2.x behavior

2011-01-27 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 To add a little bit more analysis: posix.device_encoding requires that
 the LC_CTYPE is set. Setting it just in this function would not be
 possible, as setlocale is not thread-safe.

open() does indirectly (locale.getpreferredencoding()) change temporary the 
locale (set LC_CTYPE to ) if the file is not a TTY (if it is a TTY, 
device_encoding() calls nl_langinfo(CODESET) without changing the current 
locale). If setlocale() is not thread-safe we have (maybe?) a problem here. See 
also #11022: report of an user not understanding why setlocale() doesn't impact 
open() (TextIOWrapper) encoding). A quick solution is to call 
locale.getpreferredencoding(False) which doesn't change the locale.

Do you really need os.device_encoding()? If we change TextIOWrapper to call 
locale.getpreferredencoding(False), os.device_encoding() and 
locale.getpreferredencoding(False) will give the same result. Except on 
Windows: os.device_encoding() uses GetConsoleCP() if fd==0 and 
GetConsoleOutputCP() if fd in (1, 2). But we can use GetConsoleCP() and 
GetConsoleOutputCP() directly in initstdio(). If someone closes sys.std* and 
recreate them later: os.device_encoding() can be use explicitly to keep the 
previous behaviour.

 It would still be better it is was unset afterwards. Third-party
 extensions could have LC_CTYPE-dependent behaviour.

If Python is embeded, it should not change the locale. Even if it is not 
embeded, it is maybe better to never set LC_CTYPE.

It is too late to touch such critical point in Python 3.2, but we may change it 
in Python 3.3.

--
nosy: +haypo
versions: +Python 3.3 -Python 3.2

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



[issue11008] logging.dictConfig not documented as new in version 2.7

2011-01-27 Thread Vinay Sajip

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

This also applies to Python 3.2 docs. I've made the changes - OK to checkin, 
Georg? (For 3.2, I mean)

--
assignee: docs@python - vinay.sajip
nosy: +georg.brandl, vinay.sajip
versions: +Python 3.2

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



[issue4177] Crash in MIMEText on FreeBSD

2011-01-27 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 Something is very wrong with our code too. I have dumped the text
 that's cousing the freeze and run it using the test case scripts.
 It worked slow, but worked.

I retried test_MIMEText.tar.bz2 on FreeBSD 8.0 with 640 MB of memory: the 
program takes ~5 minutes, but it doesn't fail (no memory error or crash).

I suppose that the crash cannot be reproduced by test_MIMEText.tar.bz2 example, 
only with the full program. Because I don't have access to the full program, I 
am unable to reproduce the bug, and because there is no activity on this issue 
since 2 years: I close this issue.

If you have more information (especially a short script to reproduce the 
crash), reopen the issue or create a new issue (maybe more specific? eg. patch 
MIMEText to use less memory).

--
nosy: +haypo
resolution:  - invalid
status: open - closed

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



[issue10952] Don't normalize module names to NFKC?

2011-01-27 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

It looks like there is nothing interesting to do here, so I close the issue 
(which is not a bug :-)).

--
resolution:  - invalid
status: open - closed

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



[issue11023] pep 227 missing text

2011-01-27 Thread Alan Isaac

New submission from Alan Isaac alan.is...@gmail.com:

In PEP 227 missing text is marked with XXX.  Most of this is just calls for 
examples and elaboration.  However under the Implementation section XXX marks a 
substantive question about the documentation.

Fixing this may be low priority, but a tracker search suggested it is currently 
not even being tracked ...

--
assignee: docs@python
components: Documentation
messages: 127184
nosy: aisaac, docs@python
priority: normal
severity: normal
status: open
title: pep 227 missing text
type: feature request

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



[issue5097] asyncore.dispatcher_with_send undocumented

2011-01-27 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

I documented this some months ago:
http://docs.python.org/library/asyncore.html#asyncore.dispatcher_with_send
Being asynchat's push() method more convenient for such kind of task I 
expressively avoided to be too specific about dispatcher_with_send.

--
resolution:  - fixed
status: open - closed
versions:  -Python 2.6, Python 3.1

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



[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Sebastian Spaeth

New submission from Sebastian Spaeth sebast...@sspaeth.de:

imaplib's Time2Internaldate returns invalid (as localized) INTERNALDATE 
strings. Appending a message with such a time string leads to a:
19 BAD Command Argument Error. 11 (for MS Exchange IMAP servers)

it returned 26-led-2011 18:23:44 +0100, however:

http://tools.ietf.org/html/rfc2060.html defines:
date_month  ::= Jan / Feb / Mar / Apr / May / Jun /
Jul / Aug / Sep / Oct / Nov / Dec

so it expects an English date format.

imaplib's Time2Internaldate uses time.strftime() to create the final string 
which uses the current locale, returning things such as:

26-led-2011 18:23:44 +0100 rather than 26-Jan-2011 18:23:44 +0100.

For the right thing to do, we would need to set 
locale.setlocale(locale.LC_TIME, '') to get English formatting or we would need 
to use some home-grown parser that hardcodes the proper terms.

--
components: Library (Lib)
messages: 127186
nosy: spaetz
priority: normal
severity: normal
status: open
title: imaplib: Time2Internaldate() returns localized strings
type: behavior
versions: Python 2.6

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



[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Sebastian Spaeth

Sebastian Spaeth sebast...@sspaeth.de added the comment:

P.S. To replicate this in ipython:

import locale, imaplib

locale.setlocale(locale.LC_ALL,'de_CH.utf8')
imaplib.Time2Internaldate(220254431)
Out[1]: '24-Dez-1976 06:47:11 +0100'

(Note the German 'Dez' rather than 'Dec')

--

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



[issue11022] locale.setlocale() doesn't change I/O codec, os.environ[] does

2011-01-27 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

 Anyway, I don't know understand why do you change your locale,
 because you know that your file encoding is Latin1. Why don't you
 use directly: open(filename, encoding='latin1')?

Fortunately Issue 9124 is being solved soon due to the very active
happy hacker haypo ...
I have read haypo's add-on to Issue 6203 and, since he refers to
this issue here, i'll add some thoughts of mine, though they possibly
should not belong into a bug tracker ...

My misunderstanding was based upon an old project of mine,
where i've used the environment to initialize the library state
upon program startup only, but afterwards the entire handling was centralized 
upon some Locale class (changes therein were dispatched
to and thus reflected by a TextCodec etc. - you may see Issue 9727,
though my solution was hardwired).
Like that turning one screw managed the entire system.

If Python would be my project, i would change this code,
because i do not see a real difference in os.environ[LC_]=
and locale.setlocale(LC_,)!
Both cases indicate the users desire to change a specific locale
setting and thus - of course - all the changes which that implies!
So why should there be a difference?

What i really have to say is that the (3.1) implementation of 
getpreferredencoding() is horror, not only in respect to SMP
(it's a no-go, then, even with locking, but that's not present).
If Python would be mine (after thinking one hour without any
feedback of anybody else), i would do the following:
- upon program startup, init LibC environment:
  setlocale(LC_ALL, );
  (see 
http://pubs.opengroup.org/onlinepubs/009695399/functions/setlocale.html)
  Then init this very basic codeset in an unthreaded state:
  global_very_default_codeset = nl_langinfo(CODESET);
  After that, rename this terrible do_setlocale argument to
  use_locale_active_on_program_startup.
  Then i would start a discussion wether such an argument is useful at
  all, because you possibly always ever say False.
  Do ya???

--

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



[issue1191964] asynchronous Subprocess

2011-01-27 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
versions: +Python 3.3 -Python 3.2

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



[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Sebastian Spaeth

Sebastian Spaeth sebast...@sspaeth.de added the comment:

CC'ing lavajoe as he seemed to be busy with some of imaplib's Date stuff the 
last couple of days.

--
nosy: +lavajoe

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



[issue11025] Distutils2 install command without setup.py or setup.cfg create an UNKNOWN-UNKNOWN.dist-info distribution

2011-01-27 Thread Boris FELD

New submission from Boris FELD lothiral...@gmail.com:

Distutils2 install command don't display error if you try to launch it in a 
directory without setup.py nor setup.cfg files. It install an 
UNKNOWN-UNKNOWN.dist-info distribution in your site-package with all meta-data 
file set to UNKNOWN.

--
assignee: tarek
components: Distutils2
files: METADATA
messages: 127190
nosy: Boris.FELD, eric.araujo, tarek, tarek-ziade
priority: normal
severity: normal
status: open
title: Distutils2 install command without setup.py or setup.cfg create an 
UNKNOWN-UNKNOWN.dist-info distribution
versions: Python 2.6
Added file: http://bugs.python.org/file20545/METADATA

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



[issue10932] distutils.core.setup - data_files misbehaviour ?

2011-01-27 Thread Thorsten Simons

Thorsten Simons t...@snomis.de added the comment:

Hi Éric, All,

thank you for the directions you gave me!
It's all about a call of os.path.basename() missing in sdist.py. Pls. see 
attached diff.

Regards,
Thorsten

--
keywords: +patch
Added file: http://bugs.python.org/file20546/fix-sdist.py.diff

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



[issue11026] Distutils2 install command fail with python 2.5/2.7

2011-01-27 Thread Boris FELD

New submission from Boris FELD lothiral...@gmail.com:

Distutils2 install command fail with both python 2.5 and python 2.7 while it 
works with python 2.6.

$ python -V
python 2.5.4
$ python -m distutils2.run install
usage: run.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: run.py --help [cmd1 cmd2 ...]
   or: run.py --help-commands
   or: run.py cmd --help

error: Invalid command install

$ python -V
Python 2.7.1
$ python -m distutils2.run install
usage: run.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: run.py --help [cmd1 cmd2 ...]
   or: run.py --help-commands
   or: run.py cmd --help

error: Invalid command install

It fail it a setup.cfg exists or not in the current directory.

--
assignee: tarek
components: Distutils2
messages: 127192
nosy: Boris.FELD, eric.araujo, tarek, tarek-ziade
priority: normal
severity: normal
status: open
title: Distutils2 install command fail with python 2.5/2.7
versions: Python 2.5, Python 2.7

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



[issue11026] Distutils2 install command fail with python 2.5/2.7

2011-01-27 Thread Boris FELD

Changes by Boris FELD lothiral...@gmail.com:


--
type:  - crash

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



[issue11027] Allow spaces around section header in ConfigParser

2011-01-27 Thread Kunjesh Kaushik

New submission from Kunjesh Kaushik kunjesh.kaus...@gmail.com:

It is often desirable to be able to write a section with spaces around the 
header, as in [ default ] instead of [default] for the sake of readability 
of configuration file. I am not sure if this is the standard format of 
configuration files.

The following (attached) patch will achieve the desired result. It is also 
backward-compatible. Kindly arrange for the patch to be applied to the 
repository or to a future release.

Original Code Location: 
http://svn.python.org/view/*checkout*/python/branches/release27-maint/Lib/ConfigParser.py?revision=84443

Index: Lib/ConfigParser.py
===
--- Lib/ConfigParser.py (revision 84443)
+++ Lib/ConfigParser.py (working copy)
@@ -432,7 +432,7 @@
 #
 SECTCRE = re.compile(
 r'\[' # [
-r'(?Pheader[^]]+)'  # very permissive!
+r'\s*(?Pheader[^]]+)\s*'# very permissive!
 r'\]' # ]
 )
 OPTCRE = re.compile(

--
components: Library (Lib)
files: allow_spaces_around_section_header.diff
keywords: patch
messages: 127193
nosy: Kunjesh.Kaushik
priority: normal
severity: normal
status: open
title: Allow spaces around section header in ConfigParser
type: feature request
versions: Python 2.7
Added file: 
http://bugs.python.org/file20547/allow_spaces_around_section_header.diff

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



[issue11026] Distutils2 install command fail with python 2.5/2.7

2011-01-27 Thread Boris FELD

Boris FELD lothiral...@gmail.com added the comment:

The new command for installation is install_dist, sorry.

--
resolution:  - invalid
status: open - closed

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



[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Joe Peterson

Joe Peterson j...@skyrush.com added the comment:

Sebastian,

Yes, in fact Alexander Belopolsky (belopolsky) brought up the the locale issue 
for this very function in one of the other issue comments.

The invert function, Internaldate2tuple(), actually does its own parsing using 
a regex match (and so does not have the problem), but you are right, 
Time2Internaldate() has this issue.

--
versions: +3rd party -Python 2.6

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



[issue11025] Distutils2 install command without setup.py or setup.cfg create an UNKNOWN-UNKNOWN.dist-info distribution

2011-01-27 Thread Boris FELD

Boris FELD lothiral...@gmail.com added the comment:

It also fails with python 2.5 and python 2.7 with install_dist command.

--
versions: +Python 2.5, Python 2.7

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



[issue11028] Implement the setup.py - setup.cfg in mkcfg

2011-01-27 Thread alain tty

New submission from alain tty alain...@gmail.com:

It shall be interesting to simplify the building of the setup.cfg from an 
existing setup.py.
A distutils2.mkcfg.load_existing_setup_script function already exists but it 
raises NotImplementedError.
Since taking into account setuptools could be straightforward we propose to add 
a implementation that takes care of distutils arguments only.

--
assignee: tarek
components: Distutils2
messages: 127197
nosy: alaintty, eric.araujo, tarek, tarek-ziade
priority: normal
severity: normal
status: open
title: Implement the setup.py - setup.cfg in mkcfg
type: feature request

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



[issue10680] argparse: titles and add_mutually_exclusive_group don't mix (even with workaround)

2011-01-27 Thread Martin von Gagern

Martin von Gagern martin.vgag...@gmx.net added the comment:

I've added a unit test for this nested mutex scenario. The attached patch 
includes the original fix as well, as for some reason the patch by loewis 
wouldn't apply to my tree automatically.

--
nosy: +gagern
Added file: http://bugs.python.org/file20548/issue10680_withTestcase.patch

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



[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Sebastian Spaeth

Sebastian Spaeth sebast...@sspaeth.de added the comment:

I think I found the issue he mentioned, however it was about the functions 
taking the local time (rather than UTC), which is fine.

The problem is that Time2Internaldate is used for every .append() operation 
internally, producing invalid dates which are handed to the IMAP server. So in 
most cases, the IMAP server will silently ignore the time and use the current 
time (as per IMAP RFC) or it will complain and barf out (as the MS Exchange 
server rightly does.

So this is more than just an inconvenience, it outright prevents intenational 
users from APPENDing new messages to a server (or silently bodges the message 
date) as there is no way around using that function...

Sorry if this sounds like whining :-) I don't even have a patch handy...

--

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



[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Joe Peterson

Joe Peterson j...@skyrush.com added the comment:

Yes, that's serious, certainly.

A patch should be fairly straightforward, given that part of the formatting 
logic is already there (for the TZ offset at the end).  You just need to format 
the 6 values, and do a lookup for the month name.

If you want to try to work up one, I can take a look, or maybe, if I have some 
time today, I'll try to do one quickly...

--

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



[issue6203] 3.x locale does not default to C, contrary to the documentation and to 2.x behavior

2011-01-27 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue11022] locale.setlocale() doesn't change I/O codec, os.environ[] does

2011-01-27 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue11029] Crash, 2.7.1, Tkinter and threads and line drawing

2011-01-27 Thread Scott M

New submission from Scott M scott.m...@comcast.net:

Running on dual core Windows XP. 

The function should draw a parabolicish shape for each click on launch. But if 
you click Launch over and over, very fast, you get bizarre crashes instead: 
Python.exe has encoutered a problem, yadda. tcl85.dll. It rarely takes many 
clicks.

Apologies for the coding style; this has been hacked down from a larger app.

In the console window:

Exception in thread Thread-5:
Traceback (most recent call last):
  File C:\Python27\lib\threading.py, line 530, in __bootstrap_inner
self.run()
  File C:\Documents and Settings\mayos\Desktop\PMT2\MyProjects\TkinterCrash.py
, line 47, in run
self.app.arrival_122((self.target, y, z))
  File C:\Documents and Settings\mayos\Desktop\PMT2\MyProjects\TkinterCrash.py
, line 100, in arrival_122
self.label.config(text= str(message[0])+   + str(message[1]))
  File C:\Python27\lib\lib-tk\Tkinter.py, line 1202, in configure
return self._configure('configure', cnf, kw)
  File C:\Python27\lib\lib-tk\Tkinter.py, line 1193, in _configure
self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
TclError: invalid command name source C:/Python27/tcl/tk8.5/menu.tcl

Exception in thread Thread-4:
Traceback (most recent call last):
  File C:\Python27\lib\threading.py, line 530, in __bootstrap_inner
self.run()
  File C:\Documents and Settings\mayos\Desktop\PMT2\MyProjects\TkinterCrash.py
, line 47, in run
self.app.arrival_122((self.target, y, z))
  File C:\Documents and Settings\mayos\Desktop\PMT2\MyProjects\TkinterCrash.py
, line 125, in arrival_122
self.graph.create_line(self.trackCoordinates[tn], new_yz)
  File C:\Python27\lib\lib-tk\Tkinter.py, line 2201, in create_line
return self._create('line', args, kw)
  File C:\Python27\lib\lib-tk\Tkinter.py, line 2189, in _create
*(args + self._options(cnf, kw
TclError: invalid command name line

Also saw:
  File C:\Python27\lib\lib-tk\Tkinter.py, line 2201, in create_line
return self._create('line', args, kw)
  File C:\Python27\lib\lib-tk\Tkinter.py, line 2189, in _create
*(args + self._options(cnf, kw
TclError: bad option 665.44997: must be addtag, bbox, bind, canvasx, 
canvasy, cget, configure, coords, create, dchars, delete, dtag, find, focus, 
gettags, icursor, index, insert, itemcget, itemconfigure, lower, move, 
postscript, raise, scale, scan, select, type, xview, or yview

--
components: Tkinter
files: TkinterCrash.py
messages: 127201
nosy: PythonInTheGrass
priority: normal
severity: normal
status: open
title: Crash, 2.7.1, Tkinter and threads and line drawing
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file20549/TkinterCrash.py

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



[issue11029] Crash, 2.7.1, Tkinter and threads and line drawing

2011-01-27 Thread Brian Curtin

Changes by Brian Curtin cur...@acm.org:


--
nosy: +brian.curtin

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



[issue11008] logging.dictConfig not documented as new in version 2.7

2011-01-27 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Yes, please go ahead.

--

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



[issue8914] Run clang's static analyzer

2011-01-27 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

Turns out I was using pax wrong. =) Thought it automatically compressed new 
files; turns out it doesn't. Using the zx compressor it shrank the 70 MB file 
down, so ignore the Google Docs upload and just grab this.

--
Added file: http://bugs.python.org/file20550/clang_analyzer_253.tar.xz

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



[issue11017] optparse: error: invalid integer value

2011-01-27 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Well, it is certainly intentional, then.  Whether it is good is a different 
story, but also a moot question since optparse has been replaced by argparse.

--

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



[issue8914] Run clang's static analyzer

2011-01-27 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

For the record, you don't have to use pax, recent GNU tar handles xz fine (use 
the -J option).

--
nosy: +pitrou

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



[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +r.david.murray
stage:  - needs patch
versions: +Python 2.7, Python 3.1, Python 3.2 -3rd party

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



[issue11027] Allow spaces around section header in ConfigParser

2011-01-27 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

A feature request can only go in to 3.3 at this point.  ConfigParser has had a 
serious overhaul in 3.2, by the way.

--
assignee:  - lukasz.langa
nosy: +lukasz.langa, r.david.murray
versions: +Python 3.3 -Python 2.7

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



[issue11030] regrtest - allow for relative path with --coverdir

2011-01-27 Thread Sandro Tosi

New submission from Sandro Tosi sandro.t...@gmail.com:

Hi, following up msg127157 here's a patch to allow for relative path when using 
--coverdir.

The current solution uses getcwd() but since CWD is replaced by a temporary 
location before calling main(), then the resulting dir is in an unexpected 
location.

using support.SAVECWD we use the saved CWD that's where the script is executed, 
so the relative path is created/used where expected.

--
assignee: sandro.tosi
components: Tests
files: regrtest_coverdir_relative_path-py3k.patch
keywords: patch
messages: 127207
nosy: sandro.tosi
priority: low
severity: normal
stage: patch review
status: open
title: regrtest - allow for relative path with --coverdir
versions: Python 3.3
Added file: 
http://bugs.python.org/file20551/regrtest_coverdir_relative_path-py3k.patch

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



[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Geoge R. Goffe

Geoge R. Goffe grgo...@yahoo.com added the comment:

Brett,

Here's the file you requested.

Thanks for your help.

George...

--
status: pending - open
Added file: http://bugs.python.org/file20552/readline.i.gz

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



[issue11022] locale.setlocale() doesn't change I/O codec, os.environ[] does

2011-01-27 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Both cases indicate the users desire to change a specific locale
 setting and thus - of course - all the changes which that implies!
 So why should there be a difference?

I don't think it's intentional. I would be +1 on changing to 
getpreferredencoding(False).

--
components: +IO
nosy: +loewis, pitrou
versions: +Python 3.2

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



[issue10999] os.chflags refers to stat constants, but the constants are not documented in the stat module

2011-01-27 Thread Michal Nowikowski

Changes by Michal Nowikowski godf...@gmail.com:


--
nosy: +godfryd

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



[issue3982] support .format for bytes

2011-01-27 Thread Uoti Urpala

Uoti Urpala uoti.urp...@pp1.inet.fi added the comment:

This kind of formatting is needed quite often when working on network protocols 
or file formats, and I think the replies here fail to address important issues. 
In general you can't encode after formatting, as that doesn't work with binary 
data, and often it's not appropriate for the low-level routines doing the 
formatting to know what charset the data is in even if it is text (so it should 
be fed in already encoded as bytes). The replies from Martin v. Löwis seem to 
argue that you could use methods other than formatting; that would work almost 
as well as an argument to remove formatting support from text strings, and IMO 
cases where formatting is the best option are common.

Here's an example (based on real use but simplified):

template = b
stuff here
header1: {}
header2: {}
more stuff


def lowlevel_send(s, b1, b2):  # s socket, b1 and b2 bytes
s.send(template.format(b1, b2))

To clarify the requirements a bit, the issue is not so much about having a 
.format method on byte string objects (that's just the most natural-looking way 
of solving it); the core requirement is to have a formatting operator that can 
take byte strings as *arguments* and produce byte string *output* where the 
arguments can be placed unchanged.

--
nosy: +uau

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



[issue11027] Allow spaces around section header in ConfigParser

2011-01-27 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

There's a case to be made that the current regex is buggy.  It already accepts 
whitespace around the header name but doesn't strip it.  ISTM, this is 
undesirable:  [ section header ]  -- ' section header ' instead of 'section 
header'.

 import configparser
 r = configparser.ConfigParser.SECTCRE
 r.match('[ section header ]').group('header')
' section header '

That result is not want people would usually want or expect.  I don't see any 
advantage to deferring this to 3.3.

--
keywords: +easy -patch
nosy: +rhettinger

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



[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

Martin actually asked for the file and deserves the thanks.

--

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



[issue11008] logging.dictConfig not documented as new in version 2.7

2011-01-27 Thread Vinay Sajip

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

Fix checked into py3k and release27-maint (r88214).

--
resolution:  - fixed
status: open - closed

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



[issue11022] locale.setlocale() doesn't change I/O codec, os.environ

2011-01-27 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 Both cases indicate the users desire to change a specific locale
 setting and thus - of course - all the changes which that implies!
 So why should there be a difference?
 
 I don't think it's intentional. I would be +1 on changing to 
 getpreferredencoding(False).

That won't actually work. If you always use the C library's locale
setting, most scripts will run in the C locale, and fail to read text
files properly.

--
title: locale.setlocale() doesn't change I/O codec, os.environ[] does - 
locale.setlocale() doesn't change I/O codec,   os.environ

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



[issue11027] Allow spaces around section header in ConfigParser

2011-01-27 Thread Kunjesh Kaushik

Kunjesh Kaushik kunjesh.kaus...@gmail.com added the comment:

Mr. Raymond has raised a valid point. On second thought, I think the submitted 
patch won't resolve the issue.

 import re
 r = re.compile(r'\[\s*(?Pheader[^]]+)\s*\]') # as in the patch
 r.match('[ section header ]').group('header')  # still has issues
'section header '

ISTM, the only solution to this problem is to strip the section headers while 
parsing the file. Subsequent access mechanism should also follow suit. IMHO, 
section headers should be made case-insensitive as well -- similar to option 
keys.

--

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



[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

What is /usr/lsd/Linux? This seems broken. Please take a look at 
/usr/lsd/Linux/include/readline/history.h - it appears to be an empty file. 
Make sure you have a working copy of the readline header files installed, and 
make sure the build process picks them up.

--

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



[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Geoge R. Goffe

Geoge R. Goffe grgo...@yahoo.com added the comment:

Martin,

I'm looking at the file right now. history.h is a link to readline.h which has 
6771 characters in it.

George...

goffe@goffeg bash-4.1 /usr/lsd };-) find . -name 'readline.h' -ls
205381    8 -r--r--r--   1 goffe    nonconf      6771 Nov 23 11:49 
./Linux/include/readline/readline.h
goffe@goffeg bash-4.1 /usr/lsd };-) l /usr/lsd/Linux/include/readline/history.h
lrwxrwxrwx 1 goffe nonconf 10 Nov 23 11:49 
/usr/lsd/Linux/include/readline/history.h - readline.h
goffe@goffeg bash-4.1 /usr/lsd };-) l /usr/lsd/Linux/include/readline/readline.h
-r--r--r-- 1 goffe nonconf 6771 Nov 23 11:49 
/usr/lsd/Linux/include/readline/readline.h

It's not what you know that hurts you, It's what you know that ain't so. Wil 
Rogers

--- On Thu, 1/27/11, Martin v. Löwis rep...@bugs.python.org wrote:

From: Martin v. Löwis rep...@bugs.python.org
Subject: [issue11013] Build of  2.7 svn fails in readline
To: grgo...@yahoo.com
Date: Thursday, January 27, 2011, 11:38 AM

Martin v. Löwis mar...@v.loewis.de added the comment:

What is /usr/lsd/Linux? This seems broken. Please take a look at 
/usr/lsd/Linux/include/readline/history.h - it appears to be an empty file. 
Make sure you have a working copy of the readline header files installed, and 
make sure the build process picks them up.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11013
___

--
Added file: http://bugs.python.org/file20553/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11013
___table cellspacing=0 cellpadding=0 border=0 trtd valign=top 
style=font: inherit;Martin,brbrI'm looking at the file right now. 
history.h is a link to readline.h which has 6771 characters in 
it.brbrGeorge...brbrgoffe@goffeg bash-4.1 /usr/lsd };-) find . -name 
'readline.h' -lsbr205381nbsp;nbsp;nbsp; 8 -r--r--r--nbsp;nbsp; 1 
goffenbsp;nbsp;nbsp; nonconfnbsp;nbsp;nbsp;nbsp;nbsp; 6771 Nov 23 11:49 
./Linux/include/readline/readline.hbrgoffe@goffeg bash-4.1 /usr/lsd };-) l 
/usr/lsd/Linux/include/readline/history.hbrlrwxrwxrwx 1 goffe nonconf 10 Nov 
23 11:49 /usr/lsd/Linux/include/readline/history.h -gt; 
readline.hbrgoffe@goffeg bash-4.1 /usr/lsd };-) l 
/usr/lsd/Linux/include/readline/readline.hbr-r--r--r-- 1 goffe nonconf 6771 
Nov 23 11:49 
/usr/lsd/Linux/include/readline/readline.hbrbrbrbrbrbrIt's not 
what you know that hurts you, It's what you know that ain't so. Wil 
Rogersbrbr--- On bThu,
 1/27/11, Martin v. Löwis ilt;rep...@bugs.python.orggt;/i/b 
wrote:brblockquote style=border-left: 2px solid rgb(16, 16, 255); 
margin-left: 5px; padding-left: 5px;brFrom: Martin v. Löwis 
lt;rep...@bugs.python.orggt;brSubject: [issue11013] Build of  2.7 svn fails 
in readlinebrTo: grgo...@yahoo.combrDate: Thursday, January 27, 2011, 11:38 
AMbrbrdiv class=plainMailbrMartin v. Löwis lt;a 
ymailto=mailto:mar...@v.loewis.de; 
href=/mc/compose?to=mar...@v.loewis.demar...@v.loewis.de/agt; added the 
comment:brbrWhat is /usr/lsd/Linux? This seems broken. Please take a look 
at /usr/lsd/Linux/include/readline/history.h - it appears to be an empty file. 
Make sure you have a working copy of the readline header files installed, and 
make sure the build process picks them 
up.brbr--brbr___brPython 
tracker lt;a ymailto=mailto:rep...@bugs.python.org;
 
href=/mc/compose?to=rep...@bugs.python.orgrep...@bugs.python.org/agt;brlt;a
 href=http://bugs.python.org/issue11013; 
target=_blankhttp://bugs.python.org/issue11013/agt;br___br/div/blockquote/td/tr/tablebr___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11027] Allow spaces around section header in ConfigParser

2011-01-27 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Well, there's still a backward compatibility issue: if this is changed, 
currently working code may break.  Maybe Lukasz or Fred will have a guess as to 
how likely that is, because I don't.

--
nosy: +fdrake

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



[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 I'm looking at the file right now. history.h is a link to readline.h

Ah, that's wrong. It must be a separate file, entirely different from
readline.h.

--

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



[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Geoge R. Goffe

Geoge R. Goffe grgo...@yahoo.com added the comment:

Martin,

I traced back to where that readline installation came from... It's the latest 
version from ftp.gnu.org + patches.

George...

It's not what you know that hurts you, It's what you know that ain't so. Wil 
Rogers

--- On Thu, 1/27/11, Martin v. Löwis rep...@bugs.python.org wrote:

From: Martin v. Löwis rep...@bugs.python.org
Subject: [issue11013] Build of  2.7 svn fails in readline
To: grgo...@yahoo.com
Date: Thursday, January 27, 2011, 12:12 PM

Martin v. Löwis mar...@v.loewis.de added the comment:

 I'm looking at the file right now. history.h is a link to readline.h

Ah, that's wrong. It must be a separate file, entirely different from
readline.h.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11013
___

--
Added file: http://bugs.python.org/file20554/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11013
___table cellspacing=0 cellpadding=0 border=0 trtd valign=top 
style=font: inherit;Martin,brbrI traced back to where that readline 
installation came from... It's the latest version from ftp.gnu.org + 
patches.brbrGeorge...brbrIt's not what you know that hurts you, It's 
what you know that ain't so. Wil Rogersbrbr--- On bThu, 1/27/11, Martin 
v. Löwis ilt;rep...@bugs.python.orggt;/i/b wrote:brblockquote 
style=border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 
5px;brFrom: Martin v. Löwis lt;rep...@bugs.python.orggt;brSubject: 
[issue11013] Build of  2.7 svn fails in readlinebrTo: 
grgo...@yahoo.combrDate: Thursday, January 27, 2011, 12:12 PMbrbrdiv 
class=plainMailbrMartin v. Löwis lt;a 
ymailto=mailto:mar...@v.loewis.de; 
href=/mc/compose?to=mar...@v.loewis.demar...@v.loewis.de/agt; added the 
comment:brbrgt; I'm looking at the file right now. history.h is a
 link to readline.hbrbrAh, that's wrong. It must be a separate file, 
entirely different 
frombrreadline.h.brbr--brbr___brPython
 tracker lt;a ymailto=mailto:rep...@bugs.python.org; 
href=/mc/compose?to=rep...@bugs.python.orgrep...@bugs.python.org/agt;brlt;a
 href=http://bugs.python.org/issue11013; 
target=_blankhttp://bugs.python.org/issue11013/agt;br___br/div/blockquote/td/tr/tablebr

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



[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 I traced back to where that readline installation came from... It's
 the latest version from ftp.gnu.org + patches.

Did you mean to imply that you have now fixed your installation, or that
you consider it correct?

--

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



[issue11029] Crash, 2.7.1, Tkinter and threads and line drawing

2011-01-27 Thread Scott M

Scott M scott.m...@comcast.net added the comment:

To make this more interesting, I'm trying to push for adoption of Python at a 
scripting tool where I work, and I uncovered this crasher in example code I was 
about to hand out, under the heading of look how easy Python is. For obvious 
reasons I'm holding off on handing out the example; I won't get far selling 
Python if it crashes when drawing lines... if this is a result of something 
boneheaded I did, please slap me upside the head ASAP. Conversely if there's a 
quick fix possible, that will speed Python adoption where I work... thanks.

--

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



[issue11027] Allow spaces around section header in ConfigParser

2011-01-27 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. fdr...@acm.org added the comment:

I doubt anyone is looking for section names with leading or trailing whitespace.

One approach to dealing with this is to provide and sectionxform similar to 
optionxform.  If we're wrong and someone really is expecting leading or 
trailing whitespace, they can set that (to str) to cancel out the change in 
behavior.

While I'd be surprised if anyone relies on this, it is a feature change, no 
matter how it's implemented, so must wait for 3.3.

--

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



[issue10999] os.chflags refers to stat constants, but the constants are not documented in the stat module

2011-01-27 Thread Michal Nowikowski

Michal Nowikowski godf...@gmail.com added the comment:

I have prepared a patch that:
- documents flags for os.chflags function in stat module
- adds links for these flags os module to stat module.

--
components: +None
keywords: +patch
Added file: http://bugs.python.org/file20555/documented-os_chflags-flags.diff

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



[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Joe Peterson

Joe Peterson j...@skyrush.com added the comment:

OK, I attached a patch that should work.  Note that this patch works for Python 
2 and Python 3.

As an aside, the str type is still returned as before (even in Python 3), and 
the _month_names list uses str.  As has been discussed, it may be more proper 
to return a bytes array and be consistent throughout imaplib, but this is not 
addressed here.

Also, I return a leading zero on the day instead of a leading space, since this 
appears to be what is returned by two IMAP servers I have just tested (gmail's 
and dovecot).

--
keywords: +patch
Added file: 
http://bugs.python.org/file20556/imaplib_Time2Internaldate_locale_fix.patch

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



[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Joe Peterson

Changes by Joe Peterson j...@skyrush.com:


Removed file: 
http://bugs.python.org/file20556/imaplib_Time2Internaldate_locale_fix.patch

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



[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Joe Peterson

Changes by Joe Peterson j...@skyrush.com:


Added file: 
http://bugs.python.org/file20557/imaplib_Time2Internaldate_locale_fix.patch

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



[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Geoge R. Goffe

Geoge R. Goffe grgo...@yahoo.com added the comment:

Martin,

After the rebuild/reinstall of readline, readline.h is different than 
history.h... AND NOT A LINK. NO OTHER CHANGES. Same build script...

I did NOT do svn up but this current build attempt succeeded. AND THE BEST 
PART... command line editing works now.  This probably explains why my 
python-3.x build and IDLE didn't do command line editing either. Sigh... To err 
is human, to get things really screwed up requires a computer.

I wonder why I had this problem with readline? Maybe it only happens with a 
fresh install? I'll try that.

Let me do an svn up and re-build... This worked WITHOUT INCIDENT. Go figure...

I guess you can close this bug... If I discover what the problem is/was, I'll 
let you guys know.

THANKS for all your help...

George...

It's not what you know that hurts you, It's what you know that ain't so. Wil 
Rogers

--- On Thu, 1/27/11, Martin v. Löwis rep...@bugs.python.org wrote:

From: Martin v. Löwis rep...@bugs.python.org
Subject: [issue11013] Build of  2.7 svn fails in readline
To: grgo...@yahoo.com
Date: Thursday, January 27, 2011, 12:29 PM

Martin v. Löwis mar...@v.loewis.de added the comment:

 I traced back to where that readline installation came from... It's
 the latest version from ftp.gnu.org + patches.

Did you mean to imply that you have now fixed your installation, or that
you consider it correct?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11013
___

--
Added file: http://bugs.python.org/file20558/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11013
___table cellspacing=0 cellpadding=0 border=0 trtd valign=top 
style=font: inherit;Martin,brbrAfter the rebuild/reinstall of readline, 
readline.h is different than history.h... AND NOT A LINK. NO OTHER CHANGES. 
Same build script...brbrI did NOT do svn up but this current build 
attempt succeeded. AND THE BEST PART... command line editing works now.nbsp; 
This probably explains why my python-3.x build and IDLE didn't do command line 
editing either. Sigh... To err is human, to get things really screwed up 
requires a computer.brbrI wonder why I had this problem with readline? 
Maybe it only happens with a fresh install? I'll try that.brbrLet me do an 
svn up and re-build... This worked WITHOUT INCIDENT. Go figure...brbrI 
guess you can close this bug... If I discover what the problem is/was, I'll let 
you guys know.brbrTHANKS for all your 
help...brbrGeorge...brbrbrIt's not what you know that hurts you, 
It's what
 you know that ain't so. Wil Rogersbrbr--- On bThu, 1/27/11, Martin v. 
Löwis ilt;rep...@bugs.python.orggt;/i/b wrote:brblockquote 
style=border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 
5px;brFrom: Martin v. Löwis lt;rep...@bugs.python.orggt;brSubject: 
[issue11013] Build of  2.7 svn fails in readlinebrTo: 
grgo...@yahoo.combrDate: Thursday, January 27, 2011, 12:29 PMbrbrdiv 
class=plainMailbrMartin v. Löwis lt;a 
ymailto=mailto:mar...@v.loewis.de; 
href=/mc/compose?to=mar...@v.loewis.demar...@v.loewis.de/agt; added the 
comment:brbrgt; I traced back to where that readline installation came 
from... It'sbrgt; the latest version from ftp.gnu.org + patches.brbrDid 
you mean to imply that you have now fixed your installation, or thatbryou 
consider it 
correct?brbr--brbr___brPython
 tracker lt;a
 ymailto=mailto:rep...@bugs.python.org; 
href=/mc/compose?to=rep...@bugs.python.orgrep...@bugs.python.org/agt;brlt;a
 href=http://bugs.python.org/issue11013; 
target=_blankhttp://bugs.python.org/issue11013/agt;br___br/div/blockquote/td/tr/tablebr

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



[issue11031] regrtest - --testdir, new command-line option to specify alternative test directory

2011-01-27 Thread Sandro Tosi

New submission from Sandro Tosi sandro.t...@gmail.com:

from msg127153 + msg127157 + msg127172 I prepared this patch to introduce a new 
cli option to regrtest.py, --testdir DIR, that allows to specify a different 
location for the directory containing the test files.

along the way, I added a description of what STDTESTS and NOTTESTS is and 
differentiate the call to findtests() if testdir is passed to not use those 
information.

--
assignee: sandro.tosi
components: Tests
files: regrtest_add_testdir-py3k.patch
keywords: patch
messages: 127227
nosy: sandro.tosi
priority: low
severity: normal
stage: patch review
status: open
title: regrtest - --testdir, new command-line option to specify alternative 
test directory
versions: Python 3.3
Added file: http://bugs.python.org/file20559/regrtest_add_testdir-py3k.patch

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



[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Geoge R. Goffe

Geoge R. Goffe grgo...@yahoo.com added the comment:

Martin,

command line editing with 3.2 (I just did a svn co) works now as well...

Regards and have a GREAT day,

George...

It's not what you know that hurts you, It's what you know that ain't so. Wil 
Rogers

--- On Thu, 1/27/11, Martin v. Löwis rep...@bugs.python.org wrote:

From: Martin v. Löwis rep...@bugs.python.org
Subject: [issue11013] Build of  2.7 svn fails in readline
To: grgo...@yahoo.com
Date: Thursday, January 27, 2011, 12:29 PM

Martin v. Löwis mar...@v.loewis.de added the comment:

 I traced back to where that readline installation came from... It's
 the latest version from ftp.gnu.org + patches.

Did you mean to imply that you have now fixed your installation, or that
you consider it correct?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11013
___

--
Added file: http://bugs.python.org/file20560/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11013
___table cellspacing=0 cellpadding=0 border=0 trtd valign=top 
style=font: inherit;Martin,brbrcommand line editing with 3.2 (I just did 
a svn co) works now as well...brbrRegards and have a GREAT 
day,brbrGeorge...brbrIt's not what you know that hurts you, It's what 
you know that ain't so. Wil Rogersbrbr--- On bThu, 1/27/11, Martin v. 
Löwis ilt;rep...@bugs.python.orggt;/i/b wrote:brblockquote 
style=border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 
5px;brFrom: Martin v. Löwis lt;rep...@bugs.python.orggt;brSubject: 
[issue11013] Build of  2.7 svn fails in readlinebrTo: 
grgo...@yahoo.combrDate: Thursday, January 27, 2011, 12:29 PMbrbrdiv 
class=plainMailbrMartin v. Löwis lt;a 
ymailto=mailto:mar...@v.loewis.de; 
href=/mc/compose?to=mar...@v.loewis.demar...@v.loewis.de/agt; added the 
comment:brbrgt; I traced back to where that readline installation came
 from... It'sbrgt; the latest version from ftp.gnu.org + patches.brbrDid 
you mean to imply that you have now fixed your installation, or thatbryou 
consider it 
correct?brbr--brbr___brPython
 tracker lt;a ymailto=mailto:rep...@bugs.python.org; 
href=/mc/compose?to=rep...@bugs.python.orgrep...@bugs.python.org/agt;brlt;a
 href=http://bugs.python.org/issue11013; 
target=_blankhttp://bugs.python.org/issue11013/agt;br___br/div/blockquote/td/tr/tablebr

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



[issue10848] Move test.regrtest from getopt to argparse

2011-01-27 Thread Sandro Tosi

Changes by Sandro Tosi sandro.t...@gmail.com:


Removed file: http://bugs.python.org/file20541/issue10848-testdir-py3k.patch

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



[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
resolution:  - invalid
status: open - closed

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



[issue10848] Move test.regrtest from getopt to argparse

2011-01-27 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

I've created two new issues (David, I think I've lost why I'd need 3 :) )

* issue11030 - finally allows to specify a relative dir with --coverdir
* issue11031 - to expose --testdir in order to specify a different location of 
the directory containing tests (disabling stdtest  nottest if testdir is set).

Thanks Nick for your explanation of what's the purpose of STDTEST  NOTTESTS, 
I've added a brief comment in the code to write that in stone :)

do you think issue11031 should be in dependencies?

--

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



[issue11027] Allow spaces around section header in ConfigParser

2011-01-27 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

Could just expand the docs to show examples of customizing behavior through 
monkey-patching or subclassing:

  class MyConfigParser(ConfigParser):
 SECTRE = re.compile(r'[\*(?Pheader[^]]+)\s*]'

or:

  RawConfigParser.SECTRE = re.compile(r'[\*(?Pheader[^]]+)\s*]'

--

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



[issue11022] locale.setlocale() doesn't change I/O codec, os.environ

2011-01-27 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Set version to 3.3, I think that it is too late to change such critical code in 
Python 3.2.

--
versions: +Python 3.3 -Python 3.1, Python 3.2

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



[issue10848] Move test.regrtest from getopt to argparse

2011-01-27 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I would say so, otherwise how are you going to run the tests you write :)

As for the other issue...I hadn't counted one for --testdir, but making that a 
new issue was a good idea.  So the other two I had in mind was for STDTESTS and 
NOTTESTS.  I still think the NOTTESTS pre-population should be eliminated by 
renaming the two problematic files, unless someone can explain why they need to 
be named test_xxx.  For STDTESTS...you can fix that as part of 11031 (don't 
return them if they don't exist in the test dir).

--
dependencies: +regrtest - --testdir, new command-line option to specify 
alternative test directory

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



[issue11022] locale.setlocale() doesn't change I/O codec, os.environ

2011-01-27 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 upon program startup, init LibC environment: setlocale(LC_ALL, );

Python 3 does something like that: Py_InitializeEx() calls setlocale(LC_CTYPE, 
). But I (and others) consider that as a bug (see #6203 discussion): Python 
should not do that (nor any library) implicitly, but a *program* can do that 
(once) at startup (explicitly).

--

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



[issue11022] locale.setlocale() doesn't change I/O codec, os.environ

2011-01-27 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

  Both cases indicate the users desire to change a specific locale
  setting and thus - of course - all the changes which that implies!
  So why should there be a difference?
  
  I don't think it's intentional. I would be +1 on changing to 
  getpreferredencoding(False).
 
 That won't actually work. If you always use the C library's locale
 setting, most scripts will run in the C locale, and fail to read text
 files properly.

Well, is it any different from today? That's an innocent question: I
don't know if there's a difference between C locale and empty
locale.

--
title: locale.setlocale() doesn't change I/O codec, os.environ - 
locale.setlocale() doesn't change I/O codec, os.environ

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



[issue10990] tests mutating sys.gettrace() w/o re-instating previous state

2011-01-27 Thread Kristian Vlaardingerbroek

Kristian Vlaardingerbroek kristian.vlaardingerbr...@gmail.com added the 
comment:

Cleaned up patch file. Removed non-related diffs and redundant updates.

refcount_test decorator is still in there.

--
Added file: http://bugs.python.org/file20561/issue10990.diff

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



[issue11032] _string: formatter_field_name_split() and formatter_parser doesn't check input type

2011-01-27 Thread STINNER Victor

New submission from STINNER Victor victor.stin...@haypocalc.com:

$ ./python 
Python 3.2rc1+ (unknown, Jan 18 2011, 00:55:20) 
 import _string
 _string.formatter_field_name_split(1)
python: Objects/stringlib/string_format.h:1347: formatter_field_name_split: 
Assertion `((PyObject*)(self))-ob_type))-tp_flags  ((1L28))) != 0)' 
failed.
Abandon

$ ./python 
Python 3.2rc1+ (unknown, Jan 18 2011, 00:55:20) 
 import _string
 _string.formatter_parser(1)
python: Objects/stringlib/string_format.h:1206: formatter_parser: Assertion 
`((PyObject*)(self))-ob_type))-tp_flags  ((1L28))) != 0)' failed.
Abandon

Attached patch fixes both crashes and add tests on the _string module (which 
has only these two functions).

--
components: Library (Lib)
files: _string.patch
keywords: patch
messages: 127236
nosy: haypo
priority: normal
severity: normal
status: open
title: _string: formatter_field_name_split() and formatter_parser doesn't check 
input type
versions: Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file20562/_string.patch

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



[issue10989] ssl.SSLContext(True).load_verify_locations(None, True) segfault

2011-01-27 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Here is a patch including a test.

The test pass on regrtest with -R 3:3: (no reference leak).

--
keywords: +patch
Added file: http://bugs.python.org/file20563/ssl.patch

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



[issue10989] ssl.SSLContext(True).load_verify_locations(None, True) segfault

2011-01-27 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Looks good to me.

--
resolution:  - accepted
stage: needs patch - commit review

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



[issue11033] ElementTree.fromstring doesn't work with Unicode

2011-01-27 Thread Peter Cai

New submission from Peter Cai newpt...@gmail.com:

xml.etree.ElementTree.fromstring doesn't work with Unicode string.  See the 
code below:

 from xml.etree import ElementTree
 t = ElementTree.fromstring(u'doc诗/doc')
Traceback (most recent call last):
  File stdin, line 1, in module
  File D:\Python26\lib\xml\etree\ElementTree.py, line 963, in XML
parser.feed(text)
  File D:\Python26\lib\xml\etree\ElementTree.py, line 1245, in feed
self._parser.Parse(data, 0)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u8bd7' in position 5
: ordinal not in range(128)

--
components: XML
messages: 127239
nosy: Peter.Cai
priority: normal
severity: normal
status: open
title: ElementTree.fromstring doesn't work with Unicode
type: crash
versions: Python 2.6

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



[issue11032] _string: formatter_field_name_split() and formatter_parser doesn't check input type

2011-01-27 Thread Eric Smith

Eric Smith e...@trueblade.com added the comment:

I'll review this tomorrow.

--
nosy: +eric.smith

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



[issue7175] Define a standard location and API for configuration files

2011-01-27 Thread Glyph Lefkowitz

Glyph Lefkowitz gl...@twistedmatrix.com added the comment:

I agree with Michael Foord; my comment on issue 8404 
http://bugs.python.org/issue8084#msg122935 may be of interest to anyone 
looking at this as well.

--

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



[issue11015] Bring test.support docs up to date

2011-01-27 Thread Eli Bendersky

Changes by Eli Bendersky eli...@gmail.com:


--
nosy: +eli.bendersky

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



[issue11015] Bring test.support docs up to date

2011-01-27 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

I don't know if it matters much, but there's a slight mismatch in the 
description of test.support.verbose. The documentation says it's a boolean, 
while it's 0 or 1 in reality. 

Can it just be changed to True/False in the code of test.support and 
test.regrtest? It appears that all the other flags are True/False and there's 
no reason to keep this 0/1 (which is probably a relic from a distant past)

--

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



[issue11029] Crash, 2.7.1, Tkinter and threads and line drawing

2011-01-27 Thread Christoph Gohlke

Christoph Gohlke cgoh...@uci.edu added the comment:

Tkinter is not thread safe. You are changing UI elements from a thread that is 
not the main thread. Use a Queue as described at 
http://effbot.org/zone/tkinter-threads.htm.

--
nosy: +cgohlke

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



[issue11015] Bring test.support docs up to date

2011-01-27 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

Here's a patch fixing the 0/1 to True/False in a couple of places in 
test.support and test.regrtest

I ran the test suite and it passes.

A review is needed to commit. I'll keep working on the documentation itself in 
the meantime.

--
keywords: +patch
Added file: http://bugs.python.org/file20564/issue11015.py3k.1.patch

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



[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-27 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Attached is a patch that builds on Victor's patch, but takes the approach I 
discussed of maintaining backward compatibility (for the most part; see below). 
 The test suite in this version is substantially unchanged.  The major changes 
are adding tests for the bytes input and the new method (get_bytes).  The 
changes to existing test methods are to methods that test internal interfaces 
(because those now handle bytes, not string).

I've included doc changes, which are mostly adding notes about where bytes are 
accepted (add, __setitem__), and for the new get_bytes method.

get_string is now implemented by calling get_bytes, passing the result to 
email.message.Message, and then calling as_string.  This defeats the efficiency 
purpose of using get_string, but in that use case code should really be using 
get_bytes.

I kept the change to get_file: it returns a binary file, as currently 
documented.  I think this is less likely to cause backward compatibility issues 
(assuming any 3.x code exists that uses mailbox!) than get_string returning 
bytes (or dissapearing) would.

As with email.message.Message's get_unixfrom method, get_from returns a string, 
and set_from takes a string.  Although there are no real standards for this 
header, I believe that it is restricted to ASCII, and have written the code 
accordingly.  This is my answer to Victor's question about maybe_date and the 
from line: I think we should use ascii as the encoding.  That is certainly true 
for the date; asctime does not use the locale, and English date fields are 
definitely the de-facto standard for From lines.

I haven't looked at the mh_sequences question yet.  I don't think there are any 
formal restrictions on what characters can be used in a sequence name, but I 
haven't looked to see if there are any standards documents for mh.  I'll test 
to see if my nmh installation accepts non-ascci chars for sequence names 
tomorrow.  I'm also going to try to go over Victor's changes section by 
section, but everything I've looked at other than the mh_sequences issue he 
raised looks good to me so far.

I note that we still don't have an RM call on whether or not this can go in if 
it passes review.

Oh, also note that neither Victor's patch nor my patch have any tests for 
non-ASCII characters.  Some should be added :)

--
Added file: http://bugs.python.org/file20565/mailbox3.patch

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



[issue10992] tests failing when run under coverage

2011-01-27 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

Attached is a patch against test_gc that shows what I think should be done for 
the tests failing because of refcounts. Basically I added a refcount_test 
decorator to test.support that skips a decorated test if it is not being run 
under CPython and otherwise unsets the trace function.

This should work for all tests that are discovered to fail because of refcounts.

--
keywords: +patch
Added file: http://bugs.python.org/file20566/test_gc.diff

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



[issue11015] Bring test.support docs up to date

2011-01-27 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

Here's a patch to Doc/library/test.rst with additional several exported 
functions documented. These are the ones I found most important and clear. 
fcmp() is currently not documented (pending discussion in pydev).

--
stage: needs patch - patch review
Added file: http://bugs.python.org/file20567/issue11015.py3k.testdoc.1.patch

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



[issue10992] tests failing when run under coverage

2011-01-27 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

Attached is a patch for test_descr. I suspect the __locals__ failures will all 
be the same; simply skip the test when a trace function is set.

And thanks for identifying the cause of the failures, Kristian; helps me make 
sure I am not misdiagnosing the problem.

--
Added file: http://bugs.python.org/file20568/test_descr.diff

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



[issue11034] Build problem on Windows with MSVC++ Express 2008

2011-01-27 Thread Eli Bendersky

New submission from Eli Bendersky eli...@gmail.com:

On a clean checkout of py3k, I try to open PCBuild/pcbuild.sln with my MSVC++ 
Express 2008. When opening, a message box pops saying:

  Solution folders are not supported in this version of the application.
  Solution folder Solution Items will be displayed as unavailable.

I go on building following instructions (F7, leaving the default Debug win32 
configuration). I get a bunch of LNK1181 errors:

  27 LINK : fatal error LNK1181: cannot open input file '.\python32_d.lib'

When I try to build the pythoncore project only, I get:

  1c1 : fatal error C1083: Cannot open source file: 
'D:\eli\python-py3k-trunk\PCbuild\Win32-temp-Debug\pythoncore\\getbuildinfo2.c':
 No such file or directory

Maybe there's some problem with the make_buildinfo call in the pre-build event?

--
components: Build
messages: 127249
nosy: eli.bendersky, loewis
priority: normal
severity: normal
status: open
title: Build problem on Windows with MSVC++ Express 2008
type: compile error
versions: Python 3.2

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



[issue11034] Build problem on Windows with MSVC++ Express 2008

2011-01-27 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

I tried running make_buildinfo.exe manually from a VC command prompt, and I get 
an error for invoking subwcrev.exe:

D:\eli\python-py3k-trunk\PCbuildmake_buildinfo.exe Debug Win32-temp-Debug
C:\Program Files\TortoiseSVN\bin\subwcrev.exe .. ..\Modules\getbuildinfo.c 
Win32-temp-Debug\getbuildinfo2.c
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

--
nosy: +georg.brandl

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



[issue11027] Allow spaces around section header in ConfigParser

2011-01-27 Thread Kunjesh Kaushik

Kunjesh Kaushik kunjesh.kaus...@gmail.com added the comment:

I think we are dealing with two separate issues: a feature request for 
sectionxform kind of functionality desirable in a future release (3.3 maybe) 
and a behaviour issue in current releases (2.x and 3.x both). I suggest we 
split the two issues and solve them as such. Deferring the latter may be 
undesirable.

Also, I found that a non-greedy pattern will work with the original patch:

 import re
 r = re.compile(r'\[\s*(?Pheader[^]]+?)\s*\]') # note +? instead of +
 r.match('[ section header ]').group('header')   # works as expected
'section header'

Attaching a new patch file as well.

--
keywords: +patch
Added file: 
http://bugs.python.org/file20569/allow_spaces_around_section_header.diff

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