[issue11027] Allow spaces around section header in ConfigParser

2011-01-27 Thread Kunjesh Kaushik
Kunjesh Kaushik 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

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

2011-01-27 Thread Eli Bendersky
Eli Bendersky 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\PCbuild>make_buildinfo.exe Debug Win32-temp-Debug "C:\Program Files\TortoiseSVN\bin\subwcrev.exe" .. ..\Modules\getbuild

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

2011-01-27 Thread Eli Bendersky
New submission from Eli Bendersky : 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

[issue10992] tests failing when run under coverage

2011-01-27 Thread Brett Cannon
Brett Cannon 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.

[issue11015] Bring test.support docs up to date

2011-01-27 Thread Eli Bendersky
Eli Bendersky 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 A

[issue10992] tests failing when run under coverage

2011-01-27 Thread Brett Cannon
Brett Cannon 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 uns

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

2011-01-27 Thread R. David Murray
R. David Murray 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 th

[issue11015] Bring test.support docs up to date

2011-01-27 Thread Eli Bendersky
Eli Bendersky 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 A

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

2011-01-27 Thread Christoph Gohlke
Christoph Gohlke 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

[issue11015] Bring test.support docs up to date

2011-01-27 Thread Eli Bendersky
Eli Bendersky 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

[issue11015] Bring test.support docs up to date

2011-01-27 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: +eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

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

2011-01-27 Thread Glyph Lefkowitz
Glyph Lefkowitz added the comment: I agree with Michael Foord; my comment on issue 8404 may be of interest to anyone looking at this as well. -- ___ Python tracker ___

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

2011-01-27 Thread Eric Smith
Eric Smith added the comment: I'll review this tomorrow. -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing lis

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

2011-01-27 Thread Peter Cai
New submission from Peter Cai : xml.etree.ElementTree.fromstring doesn't work with Unicode string. See the code below: >>> from xml.etree import ElementTree >>> t = ElementTree.fromstring(u'诗') Traceback (most recent call last): File "", line 1, in File "D:\Python26\lib\xml\etree\ElementT

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

2011-01-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks good to me. -- resolution: -> accepted stage: needs patch -> commit review ___ Python tracker ___ __

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

2011-01-27 Thread STINNER Victor
STINNER Victor 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

[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 : $ ./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 & ((1

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

2011-01-27 Thread Kristian Vlaardingerbroek
Kristian Vlaardingerbroek 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

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

2011-01-27 Thread Antoine Pitrou
Antoine Pitrou 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 > > get

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

2011-01-27 Thread STINNER Victor
STINNER Victor 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 libr

[issue10848] Move test.regrtest from getopt to argparse

2011-01-27 Thread R. David Murray
R. David Murray 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

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

2011-01-27 Thread STINNER Victor
STINNER Victor 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 __

[issue11027] Allow spaces around section header in ConfigParser

2011-01-27 Thread Raymond Hettinger
Raymond Hettinger 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'[\*(?P[^]]+)\s*]' or: RawConfigParser.SECTRE = re.compile(r'[\*(?P[^]]+)\s*]' -

[issue10848] Move test.regrtest from getopt to argparse

2011-01-27 Thread Sandro Tosi
Sandro Tosi 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 (disabl

[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue10848] Move test.regrtest from getopt to argparse

2011-01-27 Thread Sandro Tosi
Changes by Sandro Tosi : Removed file: http://bugs.python.org/file20541/issue10848-testdir-py3k.patch ___ Python tracker ___ ___ Python-bugs-l

[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Geoge R. Goffe
Geoge R. Goffe 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 wrote:

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

2011-01-27 Thread Sandro Tosi
New submission from Sandro Tosi : 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 STDT

[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Geoge R. Goffe
Geoge R. Goffe 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

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Joe Peterson
Changes by Joe Peterson : Added file: http://bugs.python.org/file20557/imaplib_Time2Internaldate_locale_fix.patch ___ Python tracker ___ ___

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Joe Peterson
Changes by Joe Peterson : Removed file: http://bugs.python.org/file20556/imaplib_Time2Internaldate_locale_fix.patch ___ Python tracker ___ __

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Joe Peterson
Joe Peterson 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 retur

[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 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-fla

[issue11027] Allow spaces around section header in ConfigParser

2011-01-27 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. 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

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

2011-01-27 Thread Scott M
Scott M 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 ha

[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Martin v . Löwis
Martin v. Löwis 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? -- __

[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Geoge R. Goffe
Geoge R. Goffe 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

[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Martin v . Löwis
Martin v. Löwis 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 __

[issue11027] Allow spaces around section header in ConfigParser

2011-01-27 Thread R. David Murray
R. David Murray 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 ___ Pyt

[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Geoge R. Goffe
Geoge R. Goffe 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 2

[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Martin v . Löwis
Martin v. Löwis 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

[issue11027] Allow spaces around section header in ConfigParser

2011-01-27 Thread Kunjesh Kaushik
Kunjesh Kaushik 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*(?P[^]]+)\s*\]') # as in the patch >>> r.match('[ section header ]').group('header') # still has issues 'sec

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

2011-01-27 Thread Martin v . Löwis
Martin v. Löwis 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 > getpreferreden

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

2011-01-27 Thread Vinay Sajip
Vinay Sajip added the comment: Fix checked into py3k and release27-maint (r88214). -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Brett Cannon
Brett Cannon added the comment: Martin actually asked for the file and deserves the thanks. -- ___ Python tracker ___ ___ Python-bugs

[issue11027] Allow spaces around section header in ConfigParser

2011-01-27 Thread Raymond Hettinger
Raymond Hettinger 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 configpa

[issue3982] support .format for bytes

2011-01-27 Thread Uoti Urpala
Uoti Urpala 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 no

[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 : -- nosy: +godfryd ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

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

2011-01-27 Thread Antoine Pitrou
Antoine Pitrou 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(Fal

[issue11013] Build of 2.7 svn fails in readline

2011-01-27 Thread Geoge R. Goffe
Geoge R. Goffe 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 _

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

2011-01-27 Thread Sandro Tosi
New submission from Sandro Tosi : 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

[issue11027] Allow spaces around section header in ConfigParser

2011-01-27 Thread R. David Murray
R. David Murray 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 __

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 -3rd party ___ Python tracker ___ _

[issue8914] Run clang's static analyzer

2011-01-27 Thread Antoine Pitrou
Antoine Pitrou 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 ___

[issue11017] optparse: error: invalid integer value

2011-01-27 Thread R. David Murray
R. David Murray 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 _

[issue8914] Run clang's static analyzer

2011-01-27 Thread Brett Cannon
Brett Cannon 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/fi

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

2011-01-27 Thread Georg Brandl
Georg Brandl added the comment: Yes, please go ahead. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

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

2011-01-27 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: +brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

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

2011-01-27 Thread Scott M
New submission from Scott M : 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

[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 : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[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 : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Joe Peterson
Joe Peterson 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

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Sebastian Spaeth
Sebastian Spaeth 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 hand

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

2011-01-27 Thread Martin von Gagern
Martin von Gagern 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/file205

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

2011-01-27 Thread alain tty
New submission from alain tty : 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

[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 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 ___ ___

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Joe Peterson
Joe Peterson 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 h

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

2011-01-27 Thread Boris FELD
Boris FELD added the comment: The new command for installation is install_dist, sorry. -- resolution: -> invalid status: open -> closed ___ Python tracker ___ _

[issue11027] Allow spaces around section header in ConfigParser

2011-01-27 Thread Kunjesh Kaushik
New submission from Kunjesh Kaushik : 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 fol

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

2011-01-27 Thread Boris FELD
Changes by Boris FELD : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

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

2011-01-27 Thread Boris FELD
New submission from Boris FELD : 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

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

2011-01-27 Thread Thorsten Simons
Thorsten Simons 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 __

[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 : 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: t

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Sebastian Spaeth
Sebastian Spaeth 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 ___ _

[issue1191964] asynchronous Subprocess

2011-01-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- versions: +Python 3.3 -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

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

2011-01-27 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso 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 ha

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Sebastian Spaeth
Sebastian Spaeth 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') -- ___

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-27 Thread Sebastian Spaeth
New submission from Sebastian Spaeth : 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: ht

[issue5097] asyncore.dispatcher_with_send undocumented

2011-01-27 Thread Giampaolo Rodola'
Giampaolo Rodola' 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.

[issue11023] pep 227 missing text

2011-01-27 Thread Alan Isaac
New submission from Alan Isaac : 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 sugge

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

2011-01-27 Thread STINNER Victor
STINNER Victor 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 ___

[issue4177] Crash in MIMEText on FreeBSD

2011-01-27 Thread STINNER Victor
STINNER Victor 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 m

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

2011-01-27 Thread Vinay Sajip
Vinay Sajip 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 <

[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 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 th

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

2011-01-27 Thread STINNER Victor
STINNER Victor 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_C

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

2011-01-27 Thread STINNER Victor
STINNER Victor 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 l

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

2011-01-27 Thread Steffen Daode Nurpmeso
Changes by Steffen Daode Nurpmeso : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[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 : 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 cause

[issue5305] imaplib should support international mailbox names

2011-01-27 Thread Hiroaki Kawai
Hiroaki Kawai 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

[issue11017] optparse: error: invalid integer value

2011-01-27 Thread Éric Araujo
Éric Araujo 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 ___ ___