[issue5127] UnicodeEncodeError - I can't even see license

2009-10-05 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: We might keep the old public API for compatibility, but it should be clearly marked as broken for non-BMP scalar values. That has always been the case. UCS2 doesn't support surrogates. However, we have been slowly moving

[issue7066] archive_util.make_archive doesn't restore the cwd if an error is raised

2009-10-05 Thread Ezio Melotti
New submission from Ezio Melotti ezio.melo...@gmail.com: archive_util.make_archive() changes the value of the cwd, but if an error is raised in filename = func(base_name, base_dir, **kwargs), the cwd is not restored. This may happen if zlib is not available and causes other ~60 tests to fail

[issue7066] archive_util.make_archive doesn't restore the cwd if an error is raised

2009-10-05 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: == ERROR: test_make_archive_owner_group (distutils.tests.test_archive_util.ArchiveUtilTestCase

[issue6670] Printing the 'The Python Tutorial'

2009-10-06 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: To fix this problem is enough to add an !important to the margin: 0; rule in the @media print {} at the end of basic.css (line 408). I'll try to explain why the !important is necessary. In default.css @import url(basic.css); (correctly

[issue7073] Python 2.6.3 final windows installer installs a release candidate

2009-10-06 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This is a known issue, 2.6.4 will be out soon. See http://mail.python.org/pipermail/python-committers/2009-October/000648.html -- nosy: +ezio.melotti resolution: - later stage: - committed/rejected status: open - closed

[issue6773] subprocess issue on Win 7 x64

2009-10-07 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I cannot reproduce it on Win7 32bit (OS Name: Microsoft Windows 7 Enterprise; OS Version: 6.1.7600 N/A Build 7600) with Python 2.6.3rc1. Attached there's the file I used (a slightly different version of what you posted, your version worked

[issue6670] Printing the 'The Python Tutorial'

2009-10-07 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I'm not sure what happens now. Will somebody fix it? Now that the problem and the solution are known, Georg will probably fix it at some point. The !important could be used as a temporary workaround (e.g. for 2.6.4 and for the online doc

[issue7058] Add some test execution environment protection to regrtest

2009-10-07 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The cwd should also be checked/restored to avoid problems like #7066. -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7058

[issue6962] traceback.format_exception_only does not return SyntaxError carot correctly

2009-10-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti resolution: - duplicate ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6962

[issue5511] zipfile - add __exit__ attribute to make ZipFile object compatible with with_statement

2009-10-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: -needs review, patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5511

[issue6962] traceback.format_exception_only does not return SyntaxError carot correctly

2009-10-08 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: duplicate - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6962 ___ ___ Python-bugs

[issue7090] encoding uncode objects greater than FFFF

2009-10-09 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: If you want to specify codepoints greater than U+ you have to use u'\U': x = u'\u10380' x.encode('utf-8') '\xe1\x80\xb80' x[0] u'\u1038' x[1] u'0' y = u'\U00010380' y.encode('utf-8') '\xf0\x90\x8e\x80' -- nosy

[issue6027] test_xmlrpc_net fails when the ISP returns 302 Found

2009-10-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +krisvale, loewis priority: - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6027

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2009-10-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7092 ___ ___ Python-bugs-list

[issue6896] Intermittent failures in test_mailbox

2009-10-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +akuchling ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6896 ___ ___ Python-bugs-list

[issue2100] unit test UnicodeWarning

2009-10-11 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: That try/except no longer exists on trunk. This issue can probably be closed. -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2100

[issue1729305] test_doctest fails when run in verbose mode

2009-10-11 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This test still fail on Win7 with Py2.6.3rc1 in verbose mode, it works fine in normal mode. I attached a file with the traceback. -- nosy: +ezio.melotti versions: +Python 2.6 -Python 2.5 Added file: http://bugs.python.org/file15102

[issue7103] Error in config parser example (w/ Patch)

2009-10-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: georg.brandl - ezio.melotti nosy: +ezio.melotti priority: - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7103

[issue7110] Output test failures on stderr in regrtest.py

2009-10-12 Thread Ezio Melotti
New submission from Ezio Melotti ezio.melo...@gmail.com: regrtest.py should output all the names of the tests that fail and their tracebacks on stderr. This will provide an easy way to filter out the relevant information (errors and tracebacks) from all the other outputs. The current behavior

[issue7112] unicodetype_db.h warning: integer constant is too large for 'long'

2009-10-12 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7112 ___ ___ Python-bugs-list

[issue4972] let's equip ftplib.FTP with __enter__ and __exit__

2009-10-12 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: There's a patch for zipfile in #5511. -- nosy: +ezio.melotti priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4972

[issue7121] ImportError of urllib.request http.client under PYTHONHOME/Lib

2009-10-13 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Your file is named 'http.py'. When urllib.request tries to import http.client your file (D:\program\python\http.py) is picked up first instead of the right one ('C:\Program Files\Python311\lib\http\client.py'). Your file is then executed

[issue7110] Output test failures on stderr in regrtest.py

2009-10-14 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7110 ___ ___ Python-bugs

[issue7132] Regexp: capturing groups in repetitions

2009-10-14 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7132

[issue7132] Regexp: capturing groups in repetitions

2009-10-14 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I'm skeptical about what you are proposing for the following reasons: 1) it doesn't exist in any other implementation that I know; 2) if implemented as default behavior: * it won't be backward-compatible; * it will increase

[issue7132] Regexp: capturing groups in repetitions

2009-10-14 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: You're wrong, it WILL be compatible, because it is only conditioned by a FLAG. Sorry, I missed that you mentioned the flag already in the first message, but what I said in 1), 3) and 4) is still valid. There are plenty of other more

[issue7134] Add looping capability to regrtest

2009-10-14 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7134 ___ ___ Python-bugs-list

[issue7057] tkinter doc: more 3.x updates

2009-10-14 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Here is an incomplete patch. I fixed all the markup errors, typos and similar issues you mentioned and a few more that I noticed. Someone that knows Tkinter better than me should take care of the remaining issues, i.e.: * is Xlib still

[issue7138] elementtree segfaults on invalid xml declaration

2009-10-15 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Confirmed on 3.1 on Windows too. -- assignee: - effbot nosy: +effbot, ezio.melotti priority: - high versions: +Python 3.1 -Python 2.5 ___ Python tracker rep...@bugs.python.org http

[issue7139] ElementTree: Incorrect serialization of end-of-line characters in attribute values

2009-10-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - effbot nosy: +effbot priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7139

[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2009-10-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6973

[issue7156] curses can't find _curses

2009-10-16 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I tried with several versions of Python and Windows and I got the same error on all, so I think it's normal. The documentation is not clear about that though, so it should be added a paragraph that explain why it doesn't work and if/how it's

[issue7157] Fix Download Current Documentation link

2009-10-16 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7157

[issue6975] symlinks incorrectly resolved on Linux

2009-10-16 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6975

[issue7145] UTF-16 BOM is not written by socket.makefile (but is expected by read)

2009-10-16 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7145 ___ ___ Python-bugs-list

[issue7127] regrtest -j fails when tests write to stderr

2009-10-16 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7127 ___ ___ Python-bugs-list

[issue7158] os.path.basename/split fails

2009-10-17 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7158

[issue1646838] os.path, %HOME% set: realpath contradicts expanduser on '~'

2009-10-18 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1646838 ___ ___ Python-bugs

[issue1646838] os.path, %HOME% set: realpath contradicts expanduser on '~'

2009-10-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: realpath is only supposed to return an absolute pathname, resolving '.', '..' and symlinks. It's not its duty to expand '~', therefore in your example In [3]: path.realpath('~') Out[3]: 'C:\\Dokumente und Einstellungen\\wrstl

[issue7166] IDLE (python 3.1.1) syntax coloring for b'bytestring' and u'unicode' string literal

2009-10-18 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy nosy: +ezio.melotti priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7166

[issue1160] Medium size regexp crashes python

2009-10-18 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti type: crash - behavior versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1160

[issue1673007] urllib2 requests history + HEAD support

2009-10-18 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1673007 ___ ___ Python-bugs

[issue7057] tkinter doc: more 3.x updates

2009-10-19 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Tkinter nosy: +gpolo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7057

[issue7176] sum() doesn't work for lists.

2009-10-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7176 ___ ___ Python-bugs-list

[issue7232] Support of 'with' statement fo TarFile class

2009-10-29 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal stage: - patch review versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7232

[issue6748] test_debuglevel from test_telnetlib.py fails

2009-10-31 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6748

[issue6492] xml.etree does not escape CR, LF and TAB characters within attribute values

2009-11-02 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Closing as duplicate of #7139. -- nosy: +ezio.melotti resolution: - duplicate stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue7139] ElementTree: Incorrect serialization of end-of-line characters in attribute values

2009-11-02 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: If I understood correctly, the correct behavior while reading is: * literal newlines (\n or \r) and tabs (\t) should be collapsed and converted to a space * newlines (#xA; or #xD;) and tabs (#x9;) as entities should be converted

[issue7255] Default word boundaries for Unicode data?

2009-11-03 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7255

[issue7260] SyntaxError with a not-existing offset for unicode code

2009-11-03 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Apparently the position of the caret is based on the number of bytes in the line, not on the characters: [aaa for x in] File stdin, line 1 [aaa for x in] ^ SyntaxError: invalid syntax [äää for x in] File stdin

[issue7260] SyntaxError with a not-existing offset for unicode code

2009-11-03 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This is actually a duplicate of #2382, so I'm closing it. #2382 also has some patch. -- resolution: - duplicate stage: - committed/rejected status: open - closed ___ Python tracker rep

[issue1752919] Exception in HTMLParser for special JavaScript code

2009-11-09 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1752919 ___ ___ Python-bugs

[issue7297] Releasing FamousFoodFinder.com

2009-11-09 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7297

[issue6108] unicode(exception) and str(exception) should return the same message on Py2.6

2009-11-11 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I added the output of unicode_exceptions.py on Py2.6 and a testcase (against the trunk) that fails for 5 different exceptions, including the IOError mentioned in #6890 (also added to unicode_exceptions.py). The problem has been introduced

[issue6108] unicode(exception) and str(exception) should return the same message on Py2.6

2009-11-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: Removed file: http://bugs.python.org/file14071/unicode_exceptions.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6108

[issue6108] unicode(exception) and str(exception) should return the same message on Py2.6

2009-11-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: -patch Added file: http://bugs.python.org/file15315/output_on_py26.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6108

[issue6108] unicode(exception) and str(exception) should return the same message on Py2.6

2009-11-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: Added file: http://bugs.python.org/file15316/unicode_exceptions.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6108

[issue1160] Medium size regexp crashes python

2009-11-13 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Michael, can you provide the regex or even better a testcase that shows the problem? -- stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1160

[issue6450] normpath() sometimes maps unicode to str

2009-11-13 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Closing this as duplicate of #5827. -- resolution: - duplicate stage: test needed - committed/rejected status: open - closed superseder: - os.path.normpath doesn't preserve unicode ___ Python

[issue5827] os.path.normpath doesn't preserve unicode

2009-11-13 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Thanks for the patch, I tried it on Linux and it seems to solve the problem. A few comments about it: 1) I'd change all the self.assertEqual(type(posixpath.normpath(u)), unicode) to self.assertTrue(isinstance(posixpath.normpath(u), unicode

[issue7311] Bug on regexp of HTMLParser

2009-11-13 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal stage: - test needed versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7311

[issue7310] Unhelpful __repr__() in os.environ

2009-11-13 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Here is a patch against py3k. -- assignee: - ezio.melotti keywords: +easy, patch nosy: +ezio.melotti priority: - normal stage: - patch review versions: +Python 3.2 Added file: http://bugs.python.org/file15327/issue7310.diff

[issue7309] crasher in str(Exception())

2009-11-13 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I don't know if this is a real problem. If someone who want to crash someone else program is able to do something like 'u.reason = somethingweird' there are already more serious problems to solve. I don't see why someone would want to do

[issue7300] Unicode arguments in str.format()

2009-11-13 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- priority: - high stage: - test needed versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7300

[issue7310] Unhelpful __repr__() in os.environ

2009-11-13 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +needs review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7310 ___ ___ Python-bugs

[issue7309] crasher in str(Exception())

2009-11-13 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: After further investigations I found out that PyString_AS_STRING() is the macro form of PyString_AsString() but without error checking (so there's nothing to fix there, possibly just replace that call with PyString_AsString if it turns out

[issue7309] crasher in str(Exception())

2009-11-14 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Note that on Py2.6, when, for example, a string is assigned to u.start and u.end a TypeError is raised, and the value is then set to -1: u=UnicodeTranslateError(u'x', 1, 5, 'bah') u.start = 'foo' Traceback (most recent call last): File

[issue7309] crasher in str(Exception())

2009-11-14 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The same problem (u.start and u.end) also affects the other UnicodeError exceptions (namely UnicodeEncodeError and UnicodeDecodeError). Py2.4 and 2.5 don't seem to segfault with the example I provided

[issue7309] crasher in str(Exception())

2009-11-15 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I'm not sure what the functions should do when start and end are out of range. I think the best approach would be to prevent these values to be out of range in the first place. All the args should be checked when the instance is created

[issue7326] SOLUTION pls? /usr/lib/python2.6/dist-packages/visual/__init__.py, line 59, in module import cvisual AttributeError: 'Boost.Python.StaticProperty' object attribute '__doc__' is read-onl

2009-11-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - duplicate stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7326

[issue7329] global statements outside functions/methods should raise SyntaxError

2009-11-15 Thread Ezio Melotti
New submission from Ezio Melotti ezio.melo...@gmail.com: Python currently accepts global statements at the top level: global foo Beside being a meaningless operation, this might lead unexperienced user to make mistakes like: foo = 5 global foo # make foo global def func(): ... print foo

[issue1087] py3k os.popen result is not iterable, patch attached

2009-11-16 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: While I was working on EnvironTests I found 'test_os_popen_iter' (added in r58912) and I don't see why it is there. Christian, did you put it in the wrong place by mistake or is it somehow related to os.environ? (the test should also use

[issue7310] Unhelpful __repr__() in os.environ

2009-11-16 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: Removed file: http://bugs.python.org/file15327/issue7310.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7310

[issue7310] Unhelpful __repr__() in os.environ

2009-11-16 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: New patch that includes a unittest. I was also considering to replace the repr() with something that looks like _Environ({dict-here}). That will still contain all the information and also clarify that os.environ is not just a simple dict

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2009-11-17 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I have the same failure on trunk (narrow build). -- priority: - normal stage: - needs patch versions: +Python 3.2 -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue5640] Wrong print() result when unicode error handler is not 'strict'

2009-11-17 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- priority: - normal stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5640

[issue7342] str(datetime_obj) doesn't include microseconds if their value is 0

2009-11-17 Thread Ezio Melotti
New submission from Ezio Melotti ezio.melo...@gmail.com: Last night, test_strptime failed on one of the buildbots [1] with the following error: test test_strptime failed -- Traceback (most recent call last): File C:\buildslave\3.x.moore-windows\build\lib\test\test_strptime.py, line 279

[issue7351] Documentation typos found in zipfile — Work with ZIP archives

2009-11-19 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The old name could be deprecated and replaced by the right one, but as Eric Smith mentioned on #python-dev, the class with the old name can't be removed because - even if unlikely - the object might exist in a pickle. So we can either live

[issue7351] Documentation typos found in zipfile — Work with ZIP archives

2009-11-19 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: It might be doable for Python and its stdlib, but all the programs and modules that are using the old name will start raising errors if they don't find the old name anymore. If the old name is deprecated for at least one Python version (e.g

[issue5827] os.path.normpath doesn't preserve unicode

2009-11-19 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: assertTrue() also accepts a 'msg' argument where to explain what went wrong in case of failure [1]. [1]: http://docs.python.org/library/unittest.html#unittest.TestCase.assertTrue -- ___ Python

[issue5827] os.path.normpath doesn't preserve unicode

2009-11-19 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: failUnless is deprecated in Python3.1 [1]. The assert* methods are preferred over the fail* ones that are now deprecated. [1]: http://docs.python.org/3.1/library/unittest.html#unittest.TestCase.failUnless

[issue5080] PyArg_Parse* should raise TypeError for float parsed with integer format

2009-11-19 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5080 ___ ___ Python-bugs-list

[issue7342] str(datetime_obj) doesn't include microseconds if their value is 0

2009-11-19 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: If __str__ is supposed to produce nice output, the microsecond shouldn't be visible at all imho (special cases are not special enough to break the rules). If the date/time object is read by a human he probably doesn't care

[issue7342] str(datetime_obj) doesn't include microseconds if their value is 0

2009-11-20 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Yes, I wrote the previous message from a cellphone and I wasn't able to check the doc. It is indeed already documented in datetime.__str__ -- sorry for the noise. I also noticed that the microseconds are not the only thing that can change

[issue7342] str(datetime_obj) doesn't include microseconds if their value is 0

2009-12-07 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Simple patch that fixes the test using a datetime object with a specific number of microseconds instead of using datetime.now(). The test only checks that _strptime._strptime returns the correct value for the microseconds, in test_datetime

[issue7450] document that os.chmod accepts an octal digit mode

2009-12-07 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: If using octal digits instead of the stat.S_I constants is acceptable, I'd be +1 to add a note to the documentation (something like mode could be a number (possibly expressed in octal form, such as 0755), one of the following values

[issue7447] Sum() doc and behavior mismatch

2009-12-07 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: There are also a couple more things that could be improved in the documentation of sum(): 1) add a note about the performance trap mentioned by Alex [1] 2) remove the reduce() example because, even if it's true for that particular example

[issue7432] Py3k doc: from __future__ import division not necessary

2009-12-07 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7432

[issue4380] Deepcopy of functools.partial gives wierd exception

2009-12-07 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4380 ___ ___ Python-bugs-list

[issue7482] Improve ZeroDivisionError message for float and complex object

2009-12-11 Thread Ezio Melotti
New submission from Ezio Melotti ezio.melo...@gmail.com: The current error messages for divisions by 0 of float and complex object say float/complex division, whereas for int and long is integer/long division by zero: 5/0 ZeroDivisionError: integer division or modulo by zero 5.0/0

[issue1967] Backport dictviews to 2.7

2009-12-11 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The patch (backport_dictviews.diff) doesn't seem to work for me. I applied it on trunk after a svn up, did ./configure make and when I tried d.view{items|keys|values} Python segfaulted: Python 2.7a1+ (trunk:76759M, Dec 12 2009, 00:28:52

[issue5716] Overzealous deprecation of BaseException.message

2009-12-11 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Closing this as a duplicate of #6844. -- nosy: +ezio.melotti resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - BaseException DeprecationError raises inappropriately

[issue6108] unicode(exception) and str(exception) should return the same message on Py2.6

2009-12-11 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: In r64791, BaseException gained a new __unicode__ method that does the equivalent of the following things: * if the number of args is 0, returns u'' * if it's 1 returns unicode(self.args[0]) * if it's 1 returns unicode(self.args) Before

[issue7483] str.format behaviour changed from Python 2.6

2009-12-11 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The problem seems to be in Objects/stringlib/formatter.h at line 472: if (format-fill_char == '0') spec-n_min_width = format-width - n_non_digit_non_padding; else spec-n_min_width = 0; I tried to comment out

[issue1615158] POSIX capabilities support

2009-12-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +needs review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1615158 ___ ___ Python

[issue7402] reduce() is an anti-example in Idioms and Anti-Idioms

2009-12-12 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The example alone can't be fixed, because half of the section talks about how useful reduce() is. The whole document should IMHO be rewritten, possibly using some of the examples in http://python.net/~goodger/projects/pycon/2007/idiomatic

[issue7396] regrtest single: iterator not subscriptable

2009-12-12 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +michael.foord, ncoghlan, pitrou, r.david.murray priority: - normal versions: -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7396

[issue6108] unicode(exception) and str(exception) should return the same message on Py2.6

2009-12-12 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: IMO __unicode__ should have the same behaviour as __str__. There's no reason to implement two different formatting algorithms. If BaseException has both the methods they have to be both overridden by derived exceptions in order to have

[issue6108] unicode(exception) and str(exception) should return the same message on Py2.6

2009-12-12 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: What you said is only a special case, and I agree that the solution introduced with r64791 is correct for that. However, that fix has the side effect of breaking the code in other situations. To summarize the possible cases

[issue6108] unicode(exception) and str(exception) should return the same message on Py2.6

2009-12-12 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Assume the case of e = MyException() (note: 0 args) with a __str__ that returns a default message. Now, if the message is ascii, str(e) works and the user see the default message but unicode(e) returns a not-so-useful empty string

<    5   6   7   8   9   10   11   12   13   14   >