[issue8130] except-as in Py3 eats variables

2010-03-12 Thread Stefan Behnel
Stefan Behnel added the comment: I knew that the variable was supposed to go out of scope when leaving the except block, but I wasn't aware that this was supposed to be done using (the equivalent of) a 'del'. Were the side-effects of deleting variables defined outside of the try-except consid

[issue8130] except-as in Py3 eats variables

2010-03-12 Thread Ezio Melotti
Ezio Melotti added the comment: This is a not a bug and it's documented: http://docs.python.org/py3k/reference/compound_stmts.html#the-try-statement The solution is to assign the value to another variable: >>> try: raise ValueError ... except ValueError as e: exc = e ... >>> exc ValueError() >

[issue8130] except-as in Py3 eats variables

2010-03-12 Thread Stefan Behnel
New submission from Stefan Behnel : Python 3.2a0 (py3k:78205M, Feb 16 2010, 17:32:08) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> e = None [50279 refs] >>> e [50279 refs] >>> try: raise ValueError ... except ValueError as e: pass ... [50277 ref

[issue1616] compiler warnings

2010-03-12 Thread Ezio Melotti
Ezio Melotti added the comment: There are also a few issues related to compiler warnings: #7225: about other warnings in object.c, marshal.c, signalmodule.c; #4500: about other warnings in object.c, marshal.c, main.c; #4370: about "unknown conversion type character `z' in format" (with patch); #

[issue8128] String interpolation with unicode subclass fails to call __str__

2010-03-12 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Interpreter Core nosy: +ezio.melotti priority: -> normal stage: -> test needed type: -> behavior versions: +Python 2.7, Python 3.2 -Python 2.5 ___ Python tracker

[issue4498] Compiler warning "signed/unsigned comparion in mmapmodule"

2010-03-12 Thread Ezio Melotti
Ezio Melotti added the comment: That line has been changed in #6344 (see the last message for the revision numbers). Raymond, do you still have that warning? -- nosy: +ezio.melotti ___ Python tracker _

[issue1616] compiler warnings

2010-03-12 Thread Ezio Melotti
Ezio Melotti added the comment: And this is the list for 3.x: http://www.python.org/dev/buildbot/builders/x86%20XP-4%203.x http://www.python.org/dev/buildbot/builders/x86%20XP-5%203.x http://www.python.org/dev/buildbot/builders/x86%20Windows7%203.x 7>..\Modules\zlib\gzio.c(131) : warning C4996:

[issue1616] compiler warnings

2010-03-12 Thread Ezio Melotti
Ezio Melotti added the comment: After fixing some warning on _cursesmodule.c in r78900 I found this issue and generated an updated list of all the warnings on trunk on the buildbots. When two or more buildbots had the same warnings I grouped them together, showing the url of the buildbot firs

[issue6351] Compiler warning in _cursesmodule.c

2010-03-12 Thread Ezio Melotti
Ezio Melotti added the comment: This has been fixed in r74051 on trunk and r74054 on py3k. -- nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.2 ___ Python tracker

[issue8129] Wrong arguments in sqlite3.connect() documentation

2010-03-12 Thread STINNER Victor
New submission from STINNER Victor : Python documentation has the prototype: sqlite3.connect(database[, timeout, isolation_level, detect_types, factory]) http://docs.python.org/library/sqlite3.html#sqlite3.connect Source code: - sqlite.rst: .. function:: connect(database[, timeout, isolation

[issue8102] test_distutils fails on 2.6.5rc1: "No module named setuptools_build_ext"

2010-03-12 Thread Ned Deily
Ned Deily added the comment: You are correct: setuptools_build_ext.py should have been there. It turns out the file was missing in my installer builds due to a combination of issues summarized below. The bottom line is that this is not a problem for 2.6.5 and my apologies for causing extra

[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I posted on openssl-users mailing list. The author of patch (change > SSL_shutdown() behaviour for non blocking socket) replied! > http://marc.info/?l=openssl-users&m=126838806919896&w=2 Interesting read, thank you. AFAICT, his proposed "quick fix" snippet sh

[issue8128] String interpolation with unicode subclass fails to call __str__

2010-03-12 Thread Steven D'Aprano
New submission from Steven D'Aprano : String interpolation % operates on unicode strings directly without calling the __str__ method. In Python 2.5 and 2.6: >>> class K(unicode): ... def __str__(self): return "Surprise!" ... >>> u"%s" % K("some text") u'some text' but subclasses of str do

[issue8011] traceback tb_lineno example needs correction for Python3

2010-03-12 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed in r77895 (trunk), r77896 (py3k) and r77897 (release31-maint), thanks for the report! -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker

[issue7818] Improve set().test_c_api(): don't expect a set("abc"), modify the content

2010-03-12 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue7818] Improve set().test_c_api(): don't expect a set("abc"), modify the content

2010-03-12 Thread STINNER Victor
STINNER Victor added the comment: Commited: r78886 (trunk), r7 (py3k). -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue8125] shutil.copytree behavior is inconsistent with copyfile

2010-03-12 Thread joseph.h.garvin
joseph.h.garvin added the comment: Sorry I wasn't terribly clear explaining the problem with mkdtemp. Say you create your temporary folder, /tmp/foo. Now you have a regular folder bar laid out like so: bar/ blarg1.ext blarg2.ext subdir/ blarg3.ext blarg4.ext I'd like this to be

[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread STINNER Victor
STINNER Victor added the comment: I posted on openssl-users mailing list. The author of patch (change SSL_shutdown() behaviour for non blocking socket) replied! http://marc.info/?l=openssl-users&m=126838806919896&w=2 -- ___ Python tracker

[issue8057] Impreciseness in bz2 module documentation?

2010-03-12 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed in r78884 (py3k) and r78885 (release31-maint), thanks for the report! -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker

[issue8110] subprocess.py doesn't correctly detect Windows machines

2010-03-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: What does the patch achieve? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > I'd really love to understand what the state of the TCP connection > is here. I'm presuming that it's still open, because otherwise you'd > get a different error from OpenSSL. So what's the error that's > triggering this call? Is it simply that the sen

[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Andrew McNabb
Andrew McNabb added the comment: Thanks for your advice. I just signed up for the python-porting list, and I'll start a discussion there. I'm trying to improve the wiki page to address your concerns. There are multiple valid approaches to take, and I'm trying to make the page show this. I

[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Martin v . Löwis
Martin v. Löwis added the comment: Andrew McNabb wrote: > Andrew McNabb added the comment: > > By the way, I just noticed your notes on the wiki page and added a > response/question. It seems that the advice that you consider bad is > the official porting story (upgrade to 2.6 and use 2to3).

[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Martin v . Löwis
Martin v. Löwis added the comment: > What advice in particular do you consider bad? I would be happy to > submit some changes to the wiki page for anything that's wrong. See my comments on the page. The first headline is IMO fairly counter-productive, as it (essentially) suggests that you can'

[issue8118] PYTHON_API_VERSION needs to be bumped?

2010-03-12 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Is PYTHON_API_VERSION actually useful right now? It seems to me that > we need Martin's ABI stability PEP to be implemented before extension > modules can be safely shared between several non-bugfix releases. Today, PYTHON_API_VERSION primarily serves as a c

[issue8102] test_distutils fails on 2.6.5rc1: "No module named setuptools_build_ext"

2010-03-12 Thread Tarek Ziadé
Tarek Ziadé added the comment: Ok so, this file is lost during the installation process only for the Mac OS X install it seems. I need to dig into the Mac OS X build process. If I "./configure && make && make install" with the 2.6.5rc+ tarball, the files are properly copied. Btw, how do you

[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Andrew McNabb
Andrew McNabb added the comment: By the way, I just noticed your notes on the wiki page and added a response/question. It seems that the advice that you consider bad is the official porting story (upgrade to 2.6 and use 2to3). I agree that it's easier and better to not drop support for 2.4

[issue8126] Python 3.1.2rc1 doesn't compile using the 10.4 sdk on a 10.6 Mac

2010-03-12 Thread Ned Deily
Ned Deily added the comment: Note: "Python.framework/Versions/3.2/Python". You appear to be building from py3k (which will become 3.2), and not Python 3.1.2rc2. There are pending fixes for py3k for OS X framework targeted builds and there is at least one as yet unmerged fix for 3.1.2. At the

[issue8126] Python 3.1.2rc1 doesn't compile using the 10.4 sdk on a 10.6 Mac

2010-03-12 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> ronaldoussoren components: +Macintosh -Build nosy: +ronaldoussoren priority: -> normal stage: -> needs patch ___ Python tracker ___ __

[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Andrew McNabb
Andrew McNabb added the comment: What advice in particular do you consider bad? I would be happy to submit some changes to the wiki page for anything that's wrong. I think it would be great to have a reviewed version in the documentation directly, but I think the world needs a little more ex

[issue8114] python 2.6.4 installation is not working for the single user mode in vista.

2010-03-12 Thread Ezio Melotti
New submission from Ezio Melotti : Can you provide more information about what exactly is not working and how to reproduce the problem? -- nosy: +brian.curtin, ezio.melotti priority: -> normal ___ Python tracker _

[issue8118] PYTHON_API_VERSION needs to be bumped?

2010-03-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Is PYTHON_API_VERSION actually useful right now? It seems to me that we need Martin's ABI stability PEP to be implemented before extension modules can be safely shared between several non-bugfix releases. -- nosy: +loewis, pitrou

[issue8123] TypeError in urllib when trying to use HTTP authentication

2010-03-12 Thread Ezio Melotti
Ezio Melotti added the comment: Could you provide a script (or even better a unittest) to reproduce the problem? -- nosy: +ezio.melotti priority: -> normal stage: -> test needed type: -> behavior versions: +Python 3.2 ___ Python tracker

[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti priority: -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread Bill Janssen
Bill Janssen added the comment: And it would be interesting to know why all the SSL module tests don't fail in the same way. -- ___ Python tracker ___ __

[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread Bill Janssen
Bill Janssen added the comment: I think Giampaolo is right about this not being an ssl.py issue. Could the exception handling in ftp.py perhaps also be made more sophisticated? I'd really love to understand what the state of the TCP connection is here. I'm presuming that it's still open, b

[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread Bill Janssen
Bill Janssen added the comment: Looking at this further, what we're seeing is the trace of an ineffective attempt to handle an exception presumably raised from the FTP code. Can we see that exception? What's the actual state of the TCP connection at this point? -- _

[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I'm not sure this should be handled in ssl.py. ssl.py correctly raises ERROR_WANT_READ/WRITE if the shutdown operation didn't complete and that's ok. It should be up to the upper application (in our case asyncore) to deal with that. Moreover, the patch tri

[issue7997] http://www.python.org/dev/faq/ doesn't seem to explain how to regenerate "configure"

2010-03-12 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: georg.brandl -> brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread Bill Janssen
Bill Janssen added the comment: What's happening is that the new state returns from SSL_shutdown() are saying, "the shutdown you asked for didn't happen this time, but call me again when you get a chance. And here is a hint about why it didn't happen, so that if you are sophisticated enough,

[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Martin v . Löwis
Martin v. Löwis added the comment: -1. The page contains bad advice, and shouldn't be recommended in its current form. That probably could be fixed, but points to the core problem: in the wiki, anybody can add text, even if it's not properly reviewed. It would IMO be better if a reviewed an

[issue8102] test_distutils fails on 2.6.5rc1: "No module named setuptools_build_ext"

2010-03-12 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- priority: high -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8107] test_distutils fails on Windows in 2.6.5rc2

2010-03-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Hi Martin, Can you just double check that the addition of xxmodule.c won't cause problems with the Windows installer. If it's okay (no problems), please close this bug and we'll keep the fix. Thanks. -- assignee: tarek -> loewis _

[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-12 Thread Bill Janssen
Bill Janssen added the comment: Victor, I'll take a look. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue4473] POP3 missing support for starttls

2010-03-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +janssen priority: -> normal stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.2 ___ Python tracker ___ _

[issue8110] subprocess.py doesn't correctly detect Windows machines

2010-03-12 Thread Michael Foord
Changes by Michael Foord : -- nosy: -michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue8110] subprocess.py doesn't correctly detect Windows machines

2010-03-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Florent's patch makes sense to me. -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mail

[issue8127] Add link to PortingPythonToPy3k to What's New documentation

2010-03-12 Thread Andrew McNabb
New submission from Andrew McNabb : The What's New documentation for Python 3.0 and 3.1 have sections called "Porting to Python 3.0". It would be great to add a link to the Python wiki page about porting Python to Python 3: http://wiki.python.org/moin/PortingPythonToPy3k -- assignee:

[issue8107] test_distutils fails on Windows in 2.6.5rc2

2010-03-12 Thread Tarek Ziadé
Tarek Ziadé added the comment: This will skip the whole test class if srcdir is not found, removing all tests run in test_build_ext. Are you sure you want to skip the whole test class if the srcdir is not there for 2.6.5 final ? (we have important tests in there, related to options like inpl

[issue5099] subprocess.POpen.__del__() AttributeError (os module == None!)

2010-03-12 Thread tormen
tormen added the comment: I ran into the same problem today :( The patch resolved it :) BUT: Could anyone comment on when this patch will or will not live?! ... As the bug is fairly old and already has duplicates and everyone seems to agree on the issue. ... Plus it seems easy enough to edit

[issue8104] socket.recv_into doesn't support a memoryview as an argument

2010-03-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. -- keywords: +patch priority: -> normal stage: -> patch review type: -> feature request Added file: http://bugs.python.org/file16529/recvinto.patch ___ Python tracker

[issue8107] test_distutils fails on Windows in 2.6.5rc2

2010-03-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Tarek, r78877 is not the fix I recommended in http://bugs.python.org/issue8107#msg100858 Are you sure you're more comfortable with the one you committed than the one I suggested? -- ___ Python tracker

[issue8107] test_distutils fails on Windows in 2.6.5rc2

2010-03-12 Thread Tarek Ziadé
Tarek Ziadé added the comment: done in r78877 -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue7997] http://www.python.org/dev/faq/ doesn't seem to explain how to regenerate "configure"

2010-03-12 Thread Dave Malcolm
Dave Malcolm added the comment: > Nitpick: Various occurrences of 2.6.1 in the above should probably be 2.61. Good catch - I think my brain or fingers are too used to Python's versioning scheme, rather than autoconf's. Here's a revised set of commands, hopefully fixing that: $ wget http://ft

[issue8126] Python 3.1.2rc1 doesn't compile using the 10.4 sdk on a 10.6 Mac

2010-03-12 Thread Palluat de Besset
New submission from Palluat de Besset : /usr/bin/gcc-4.0 -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -DPYTHONFRAMEWORK='"Python"' -o pythonw ./Tools/pythonw.c -I.. -I./../Include ../Python.framework/Versions/3.2/Python ./Tools/pythonw.c:22:19:./Tools/pythonw.c:22:19: error:

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-03-12 Thread STINNER Victor
STINNER Victor added the comment: object_pyunicode_asstring-py3k.patch commited as r78876. -- ___ Python tracker ___ ___ Python-bugs-l

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-03-12 Thread STINNER Victor
STINNER Victor added the comment: Oh, my ssl_rand_egd_unicode-py3k.patch is complelty broken! It writes a pointer to an object into the "char* path" variable :-/ -- ___ Python tracker _

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-03-12 Thread STINNER Victor
STINNER Victor added the comment: I commited unicode_fromformat_U.patch as r78875. -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue8125] shutil.copytree behavior is inconsistent with copyfile

2010-03-12 Thread Brian Curtin
Brian Curtin added the comment: Also, keep in mind that shutil.copytree is more of an example than the be-all-end-all directory copy function, as stated in both the documentation and source code. -- nosy: +brian.curtin ___ Python tracker

[issue8125] shutil.copytree behavior is inconsistent with copyfile

2010-03-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > 1. It's inconsistent with copyfile I think it's ok. When using copyfile you can easily check that the destination file doesn't exist, while with copytree it's harder to do the same for *all* destination files. Therefore it makes sense for copytree to raise

[issue8125] shutil.copytree behavior is inconsistent with copyfile

2010-03-12 Thread joseph.h.garvin
Changes by joseph.h.garvin : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue8125] shutil.copytree behavior is inconsistent with copyfile

2010-03-12 Thread joseph.h.garvin
New submission from joseph.h.garvin : shutil.copyfile's behavior is to replace the dst file if it already exists. shutil.copytree requires that the destination not already exist, and throws an OSError if it does. I see 3 problems with this behavior: 1. It's inconsistent with copyfile 2. It's

[issue8124] mywrite() ignores PyFile_WriteString() errors

2010-03-12 Thread STINNER Victor
STINNER Victor added the comment: This bug is related to #3137. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue3137] Python doesn't handle SIGINT well if it arrives during interpreter startup

2010-03-12 Thread STINNER Victor
STINNER Victor added the comment: Bug related to this issue: #8124, PySys_WriteStdout() and PySys_WriteStderr() ignore signal handlers errors. -- ___ Python tracker ___

[issue8104] socket.recv_into doesn't support a memoryview as an argument

2010-03-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: I suppose recvfrom_into() should also be converted. -- ___ Python tracker ___ ___ Python-bugs-list m

[issue8124] mywrite() ignores PyFile_WriteString() errors

2010-03-12 Thread STINNER Victor
New submission from STINNER Victor : PyFile_WriteString() calls PyObject_Str() which calls PyErr_CheckSignals(). If a signal was catched, the signal handler is called. If the signal handler raises an error, PyObject_Str() and then PyFile_WriteString() return NULL. mywrite() ignores all PyFile_

[issue8123] TypeError in urllib when trying to use HTTP authentication

2010-03-12 Thread Dmitry Jemerov
New submission from Dmitry Jemerov : I'm trying to download a file from a site using HTTP authentication. I'm subclassing FancyURLOpener, returning my credentials from the prompt_user_passwd() method, and using opener.retrieve() to download the file. I get the following error: File "C:/JetB

[issue8122] re.sub doesn't handle properly matches with yes-pattern no-pattern

2010-03-12 Thread Guido van Rossum
Guido van Rossum added the comment: You can't use (...) syntax in substitution strings, only \N references. -- nosy: +gvanrossum resolution: -> invalid status: open -> closed ___ Python tracker ___

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Guido van Rossum
Guido van Rossum added the comment: I propose that we continue to see Fredrik as elementtree's "BDFL". If Fredrik wants the API in 3.2 to be changed to be backwards compatible with 2.x, we should do that, and damn the torpedoes (um, 3.1 compatibility). I would do this ASAP; if you can, fix it

[issue8122] re.sub doesn't handle properly matches with yes-pattern no-pattern

2010-03-12 Thread Brian Curtin
Changes by Brian Curtin : -- components: +Library (Lib) -Build priority: -> normal stage: -> test needed type: -> behavior ___ Python tracker ___ __

[issue3137] Python doesn't handle SIGINT well if it arrives during interpreter startup

2010-03-12 Thread STINNER Victor
STINNER Victor added the comment: > Commited to trunk: r78826 Backported to py3k as r78872. But py3k will require extra work: there are some PyErr_Clear() somewhere, eating the errors. -- ___ Python tracker _

[issue7774] sys.executable: wrong location if zeroth command argument is modified.

2010-03-12 Thread STINNER Victor
STINNER Victor added the comment: > r78835 (trunk) fixes getpath and includes also a fix for sysconfig which > should fix test_executable_with_cwd() of test_subprocess. Backported as r78868 to the py3k branch. -- ___ Python tracker

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-03-12 Thread Russell Keith-Magee
Russell Keith-Magee added the comment: As an extra data point: we just hit this problem in Django ticket #13093 (http://code.djangoproject.com/ticket/13093). In our case, a decorator was using wraps(); however, that decorator was breaking when it was used on a class with a __call__ method, be

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Fredrik Lundh
Fredrik Lundh added the comment: Oops :) Yeah, that was pretty lousy way to show what encoding I was using for that test: >>> import locale >>> locale.getpreferredencoding() 'cp1252' >>> (Somewhat related, it would be nice if Python actually normalized defaultencoding/preferredencoding to s

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Florent Xicluna
Florent Xicluna added the comment: >>> tree = parse("out.xml") Actually the test in my previous message does not prove anything. locale.getpreferredencoding() returns "UTF-8" != "utf-8". :) -- ___ Python tracker

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Fredrik Lundh
Fredrik Lundh added the comment: Interesting. But isn't the problem with 3.1 that it relies on the standard encoding, which results in code that may or may not work depending on a global platform setting? Who's doing the encoding in the new version? And what ends up in the file? -

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Florent Xicluna
Florent Xicluna added the comment: I plan to merge ET 1.3 in the 3.x branch tomorrow (See #6472) Currently, the patch is consistent with 3.1 behaviour. It could be changed later, depending on the pronouncement on this compatibility issue. > Previously, in ElementTree, serialising without an e

[issue6472] Update ElementTree with upstream changes

2010-03-12 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16244/issue6472_etree_upstream_v5a.diff ___ Python tracker ___ ___ Python

[issue6472] Update ElementTree with upstream changes

2010-03-12 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16192/issue6472_etree_upstream_py3k_v2.diff ___ Python tracker ___ ___ P

[issue6472] Update ElementTree with upstream changes

2010-03-12 Thread Florent Xicluna
Florent Xicluna added the comment: Patch to merge ElementTree 1.3 in 3.x. -- Added file: http://bugs.python.org/file16528/issue6472_upstream_py3k_v3.diff ___ Python tracker ___ _

[issue8121] Typo in cStringIO

2010-03-12 Thread Jean-Michel Fauth
Jean-Michel Fauth added the comment: Wow! I never been aware of this (documentation, dir(), __doc__) Indeed: >>> cStringIO.StringIO() >>> cStringIO.StringIO('abc') Sorry for the noise. -- ___ Python tracker ___

[issue8122] re.sub doesn't handle properly matches with yes-pattern no-pattern

2010-03-12 Thread oliv
New submission from oliv : Using python 2.6.4 on Arch Linux The regular expression syntax in python indicate: (?(id/name)yes-pattern|no-pattern) Will try to match with yes-pattern if the group with given id or name exists, and with no-pattern if it doesn’t. I used that functionnality but t

[issue8117] TimedRotatingFileHandler doesn't rotate log file at startup.

2010-03-12 Thread Vinay Sajip
Vinay Sajip added the comment: > From: Yuriy Taraday > Can this change be included in the 2.6 release? > It's small enough but necessary for our current > development. I'm sorry, Yuriy, I don't think it can be, as it's an enhancement rather than a bug fix. It does change existing behaviour,

[issue8120] Py_Initialize: Can't initialize system standard streams

2010-03-12 Thread Hamed J.I
Hamed J.I added the comment: Thank you very much Worked well -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Fredrik Lundh
Fredrik Lundh added the comment: "I wouldn't raise much opposition against tobytes() as an alias for tostring(), although that sounds more like duplicating an otherwise simple API." Adding an alias would be a way address the 2.X/3.X terminology overlap; string traditionally implies 8-bit in 2

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Fredrik Lundh
Changes by Fredrik Lundh : -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/opt

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Fredrik Lundh
Fredrik Lundh added the comment: "I wouldn't raise much opposition against tobytes() as an alias for tostring(), although that sounds more like duplicating an otherwise simple API." Adding an alias would be a way address the 2.X/3.X terminology overlap; string traditionally implies 8-bit in 2

[issue8121] Typo in cStringIO

2010-03-12 Thread Georg Brandl
Georg Brandl added the comment: That name is actually correct. cStringIO features two different types, depending on whether you call cStringIO.StringIO() with or without an argument. One is called "StringI", the other "StringO". -- nosy: +georg.brandl resolution: -> invalid status:

[issue8121] Typo in cStringIO

2010-03-12 Thread Jean-Michel Fauth
New submission from Jean-Michel Fauth : There is a malformed string in the module cStringIO. StringI <--> StringIO >>> sys.version 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] >>> StringIO.StringIO('123') >>> cStringIO.StringIO('123') >>> -- components: None

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Fredrik Lundh
Fredrik Lundh added the comment: "Yes, the feature has been implemented deep down in the _encode() helper function, so it impacts the entire serialiser, not only its API" Ouch. >>> import locale >>> locale.getpreferredencoding() == "utf-8" False >>> from xml.etree.ElementTree import * >>> e =

[issue8120] Py_Initialize: Can't initialize system standard streams

2010-03-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: cp720.py was added a few months ago, and will be available with 3.2. for the impatient, it's here: http://svn.python.org/view/python/branches/py3k/Lib/encodings/cp720.py?view=markup -- resolution: -> out of date status: open -> closed __

[issue8117] TimedRotatingFileHandler doesn't rotate log file at startup.

2010-03-12 Thread Yuriy Taraday
Yuriy Taraday added the comment: Can this change be included in the 2.6 release? It's small enough but necessary for our current development. -- ___ Python tracker ___ __

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Stefan Behnel
Stefan Behnel added the comment: "'None' has always been the documented default for the encoding parameter" What I meant here was that "help(ET.tostring)" will show you that as the default. Also, in the docs, the signature is "tostring(tree, encoding=None)", so None is the documented default

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Fredrik Lundh
Fredrik Lundh added the comment: (what's the Python 3 replacement for the array module, btw?) -- ___ Python tracker ___ ___ Python-bug

[issue8111] docs.python.org/download.html unhelpful.

2010-03-12 Thread Thomas Wouters
Thomas Wouters added the comment: Nevermind the 2.7a4 comments, I think I'm just not all awake yet. The complaints I got were about it being 2.6.5c2, my browser showing me 2.7a4 may have been stupid autocompletion or something. (Still, please fix :) -- ___

[issue8111] docs.python.org/download.html unhelpful.

2010-03-12 Thread Thomas Wouters
Changes by Thomas Wouters : -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/op

[issue8111] docs.python.org/download.html unhelpful.

2010-03-12 Thread Thomas Wouters
Changes by Thomas Wouters : -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/op

[issue8111] docs.python.org/download.html unhelpful.

2010-03-12 Thread Georg Brandl
Georg Brandl added the comment: Oh, just now saw your second message. At least it's back to semi-broken now :) -- ___ Python tracker ___

[issue8111] docs.python.org/download.html unhelpful.

2010-03-12 Thread Georg Brandl
Georg Brandl added the comment: Uh oh. Definitely. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue8120] Py_Initialize: Can't initialize system standard streams

2010-03-12 Thread Hamed J.I
Hamed J.I added the comment: in fact i'm not sure it is compatible with python 3.1 i have download it from http://blog.oneortheother.info/tip/python-fix-cp720-encoding/ -- ___ Python tracker _

  1   2   >