[issue10278] add time.wallclock() method

2011-07-07 Thread Matt Joiner
Matt Joiner added the comment: What's the status of this bug? This is a very useful feature, I've had to use and add bindings to monotonic times for numerous applications. Can it make it into 3.3? -- ___ Python tracker

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2011-07-07 Thread Saul Spatz
Changes by Saul Spatz : -- nosy: +spatz123 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue12511] class/instance xyz has no attribute '_abc'

2011-07-07 Thread Andreas Hasenkopf
New submission from Andreas Hasenkopf : I'm using 64bit Arch Linux and Python 2.7.2 compiled with GCC 4.6.1. I have noticed in several ocassions that the interpreter is complaining about AttributeError: XMLGenerator instance has no attribute '_write' (in case of module xml.sax.saxutils.XMLGene

[issue9242] unicodeobject.c: use of uninitialized values

2011-07-07 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue5505] sys.stdin.read() doesn't return after first EOF on Windows

2011-07-07 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: > Leaving open to discuss whether anything can/should be done > for the case when reindent acts as an stdin sys.stdin.buffer and sys.stdout.buffer should be used with tokenize.detect_encoding(). We may read first stdin and write it into a BytesIO object to be

[issue10284] NNTP should accept bytestrings for username and password

2011-07-07 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Unicode nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: Can't you only work with Unicode and avoid the MBCS encoding? -- nosy: +haypo ___ Python tracker ___ __

[issue10872] Add mode to TextIOWrapper repr

2011-07-07 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue12512] codecs: StreamWriter issue with stateful codecs after a seek

2011-07-07 Thread STINNER Victor
New submission from STINNER Victor : The following code fails with an AssertionError('###\ufeffdef'): import codecs _open = codecs.open #_open = open filename = "test" with _open(filename, 'w', encoding='utf_16') as f: f.write('abc') pos = f.tell() with _open(filename, 'w', encoding='utf

[issue12512] codecs: StreamWriter issues with stateful codecs after a seek or with append mode

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: There is a similar bug for append mode: import codecs _open = codecs.open #_open = open filename = "test" with _open(filename, 'w', encoding='utf_16') as f: f.write('abc') with _open(filename, 'a', encoding='utf_16') as f: f.write('def') with _open(file

[issue12391] packaging install fails to clean up temp files

2011-07-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset a4405b799e1b by Vinay Sajip in branch 'default': Closes #12391: temporary files are now cleaned up. http://hg.python.org/cpython/rev/a4405b799e1b -- nosy: +python-dev resolution: -> fixed stage: commit review -> committed/rejected status:

[issue10647] scrollbar crash in non-US locale format settings

2011-07-07 Thread Hans Bering
Hans Bering added the comment: Ok, _now_ I have run into the same problem. I have attached a small script similar to the original entry (but shorter) which will reliably crash with Python 3.1.4 on Windows 7 (64bit) when using a locale with a comma decimal fraction marker (e.g., German). The s

[issue10647] scrollbar crash in non-US locale format settings

2011-07-07 Thread Hans Bering
Changes by Hans Bering : Removed file: http://bugs.python.org/file22535/tkinterCrash.py ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue12167] test_packaging reference leak

2011-07-07 Thread Andreas Stührk
Andreas Stührk added the comment: Attached is a patch that replaces `lib2to3.fixer_Base.BaseFix.set_filename()` during tests. With the patch applied, I don't get any refleaks for packaging. Another approach would be to simply remove the logging attribute of lib2to3 fixers, as it isn't used an

[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows

2011-07-07 Thread Ralf Schlatterbeck
Ralf Schlatterbeck added the comment: On Thu, Jul 07, 2011 at 10:52:51AM +, STINNER Victor wrote: > > Can't you only work with Unicode and avoid the MBCS encoding? I'm trying to build a windows binary package on Linux. This usually works fine -- as long as the package description doesn't c

[issue12513] codec.StreamReaderWriter: issues with interlaced read-write

2011-07-07 Thread STINNER Victor
New submission from STINNER Victor : The following test fails with an AssertionError('a' != 'b') on the first read. import codecs FILENAME = 'test' with open(FILENAME, 'wb') as f: f.write('abcd'.encode('utf-8')) with codecs.open(FILENAME, 'r+', encoding='utf-8') as f: f.write("1")

[issue12511] class/instance xyz has no attribute '_abc'

2011-07-07 Thread Andreas Hasenkopf
Andreas Hasenkopf added the comment: I'd like to mention that Python 2.6.7 does not show this erroneous behavior. In Python 2.6.7 I can call the _write method of xml.sax.saxutils.XMLGenerator... Is this a bug or a feature in 2.7?? -- components: -XML

[issue12511] class/instance xyz has no attribute '_abc'

2011-07-07 Thread Andreas Hasenkopf
Andreas Hasenkopf added the comment: The problem appeared to be the package from the Arch Linux repo. Compiling the source codes myselfes gave me a Python interpreter not showing this bug... -- resolution: -> accepted status: open -> closed ___ Pyt

[issue12506] NIS module cant handle multiple NIS map entries for the same GID

2011-07-07 Thread bjorn lofdahl
Changes by bjorn lofdahl : -- versions: +Python 3.1, Python 3.2, Python 3.3, Python 3.4 -Python 2.6, Python 2.7 ___ Python tracker ___ __

[issue12506] NIS module cant handle multiple NIS map entries for the same GID

2011-07-07 Thread bjorn lofdahl
Changes by bjorn lofdahl : -- versions: +Python 2.6, Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12511] class/instance xyz has no attribute '_abc'

2011-07-07 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: accepted -> invalid ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue12514] timeit disables garbage collection if timed code raises an exception

2011-07-07 Thread Gareth Rees
New submission from Gareth Rees : If you call timeit.timeit and the timed code raises an exception, then garbage collection is disabled. I have verified this in Python 2.7 and 3.2. Here's an interaction with Python 3.2: Python 3.2 (r32:88445, Jul 7 2011, 15:52:49) [GCC 4.2.1 (Apple I

[issue10403] Use "member" consistently

2011-07-07 Thread Éric Araujo
Éric Araujo added the comment: Senthil, I’m not sure you read Alexander’s reply on Rietveld before committing. -- ___ Python tracker ___

[issue12514] timeit disables garbage collection if timed code raises an exception

2011-07-07 Thread Gareth Rees
Gareth Rees added the comment: Patch attached. -- keywords: +patch Added file: http://bugs.python.org/file22605/issue12514.patch ___ Python tracker ___ _

[issue12514] timeit disables garbage collection if timed code raises an exception

2011-07-07 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue12514] timeit disables garbage collection if timed code raises an exception

2011-07-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank you. The patch looks correct. I will apply it as soon as I get a chance. -- ___ Python tracker ___ _

[issue12515] The email package modifies the message structure (when the parsed email is invalid)

2011-07-07 Thread xavierd
New submission from xavierd : the function 'email.message_from_file' modifies the message structure when the parsed is invalid (for example, when a closed boudary is missing). The attribute defects is also empty In the attachment (sample.tgz) you will find: - orig.eml : an email with an inv

[issue12504] packaging: fix uninstall and stop skipping its tests

2011-07-07 Thread Éric Araujo
Éric Araujo added the comment: Thanks for that! I agree that it’s a fake optimization to work with generators instead of lists when the list is small or when we depend on other resources like file handles. There are a few methods we could change in the database module. The patch looks good

[issue12167] test_packaging reference leak

2011-07-07 Thread Éric Araujo
Éric Araujo added the comment: Thanks a lot for the diagnosis. To fix it, I don’t find the monkey-patching approach very good, I’d prefer properly using the logging API to remove handlers upon cleanup. Would you like to look into that? -- ___ Pyt

[issue12167] test_packaging reference leak

2011-07-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > To fix it, I don’t find the monkey-patching approach very good, I’d > prefer properly using the logging API to remove handlers upon cleanup. I don't think such stuff exists. -- ___ Python tracker

[issue12167] test_packaging reference leak

2011-07-07 Thread Éric Araujo
Éric Araujo added the comment: See http://hg.python.org/cpython/file/tip/Lib/packaging/tests/support.py#l81 -- ___ Python tracker ___ ___

[issue12167] test_packaging reference leak

2011-07-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > See http://hg.python.org/cpython/file/tip/Lib/packaging/tests/support.py#l81 AFAIU, the problem is that 2to3 creates a whole new logger for each different file. So it's not about cleaning the handlers, but cleaning up the loggers as well. And logging (deliber

[issue12167] test_packaging reference leak

2011-07-07 Thread Éric Araujo
Éric Araujo added the comment: Thanks for clarifying, I had misread. IMO, using one logger per file is a lib2to3 bug. -- ___ Python tracker ___ ___

[issue12504] packaging: fix uninstall and stop skipping its tests

2011-07-07 Thread Thomas Holmes
Thomas Holmes added the comment: The output in my initial message is the output of the tests with them enabled but pre database.py patch. Once the patch is applied all packaging tests that run on my system pass. I was 50/50 on whether or not to use the internal function and I just sort of en

[issue12504] packaging: fix uninstall and stop skipping its tests

2011-07-07 Thread Thomas Holmes
Thomas Holmes added the comment: Oh and thank you very much for your input. My apologies for the initial 9 e-mail spam when I created the issue, I bumbled the remote HG repository patch generation :) -- ___ Python tracker

[issue12183] Document behaviour of shutil.copy2 and copystat with symlinks

2011-07-07 Thread Petri Lehtinen
Petri Lehtinen added the comment: Shouldn't at least shutil.copytree() use lutimes in Python 3.3 to copy symlink metadata if symlinks=True? -- versions: -Python 3.1, Python 3.2 ___ Python tracker ___

[issue12183] Document behaviour of shutil.copy2 and copystat with symlinks

2011-07-07 Thread Petri Lehtinen
Petri Lehtinen added the comment: Attached a patch that documents the behavior of copy2() and copytree() for symlinks. -- keywords: +needs review, patch stage: -> patch review Added file: http://bugs.python.org/file22607/copy2_copytree_symlinks_2.7.patch _

[issue12183] Document behaviour of shutil.copy2 and copystat with symlinks

2011-07-07 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- nosy: +tarek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue12516] imghdr.what should take one argument

2011-07-07 Thread Jeffrey Finkelstein
New submission from Jeffrey Finkelstein : Currently imghdr.what() accepts two parameters. The first is a file or filename and the second is a byte stream. If the second is not None, the first is ignored. This is clunky. It would be simpler to accept just one argument, which can be either an op

[issue5505] sys.stdin.read() doesn't return after first EOF on Windows

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: I am still able to reproduce the problem with Python 3.2.1RC1 (64 bits) on Windows Seven, but not on Python 3.3 (alpha) compiled myself (using Visual C++ Express 2008). I don't know if something changed in Python 3.3, or it is related to how I compiled Pytho

[issue5505] sys.stdin.read() doesn't return after first EOF on Windows

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: > I don't know if something changed in Python 3.3, or ... Yes, something changed in Python 3.3. I fixed this issue "by mistake" :-) The fix is the following commit: New changeset 3c7792ec4547 by Victor Stinner in branch 'default': Issue #12175: BufferedReader

[issue10883] urllib: socket is not closed explicitly

2011-07-07 Thread Nadeem Vawda
Nadeem Vawda added the comment: Updated patch with fixed refcounting mechanism. Also fixes clear_cache() in CacheFTPWrapper to leave the cache in a consistent state for subsequent use. -- Added file: http://bugs.python.org/file22609/issue10883-v2.patch _

[issue12517] Large file support on Windows: sizeof(off_t) is 32 bits

2011-07-07 Thread STINNER Victor
New submission from STINNER Victor : FileIO.readall() and _parse_off_t() help of the posix module use the off_t type. This type is only 32 bits long and so don't support files bigger than 4 GB (or maybe just 2 GB?). The Py_off_t type should be used instead. -- components: Windows messa

[issue12517] Large file support on Windows: sizeof(off_t) is 32 bits

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: fileio_py_off_t.patch: Fix for FileIO.readall(). The consequence of the integer overflow in new_buffersize() looks to be that the buffer can be too small in some cases (and so readall() can be very slow?). -- keywords: +patch Added file: http://bugs.p

[issue12517] Large file support on Windows: sizeof(off_t) is 32 bits

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: _parse_off_t() is used by the following functions: - lockf - pread, pwrite - sendfile - truncate, ftruncate - posix_advice, posix_fallocate Windows has none of these functions. _parse_off_t() may be surrounded by #ifndef MS_WINDOWS with a comment explaining th

[issue9566] Compilation warnings under x64 Windows

2011-07-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 43fd627cc060 by Victor Stinner in branch 'default': Issue #9566: cast unsigned int to Py_ssize_t in md5 and sha1 modules http://hg.python.org/cpython/rev/43fd627cc060 -- nosy: +python-dev ___ Python trac

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: reindent_coding.py: patch fixing reindent.py when using pipes (stdin and stdout). -- versions: +Python 3.3 Added file: http://bugs.python.org/file22611/reindent_coding.py ___ Python tracker

[issue12178] csv writer doesn't escape escapechar

2011-07-07 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the patch. The tests look good at first glance. I can’t comment on the C code, I don’t know C. Hopefully someone will do it, otherwise if you don’t get feedback in say four weeks you can ask for a review on python-dev. -- keywords: +needs r

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2011-07-07 Thread Éric Araujo
Éric Araujo added the comment: This is a lot more code than what I’d have expected. What is your opinion on my previous message? -- ___ Python tracker ___ _

[issue12016] Wrong behavior for '\xff\n'.decode('gb2312', 'ignore')

2011-07-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 16cbd84de848 by Victor Stinner in branch 'default': Issue #12016: Multibyte CJK decoders now resynchronize faster http://hg.python.org/cpython/rev/16cbd84de848 -- ___ Python tracker

[issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: > When working as a filter, reindent should use sys.{stdin,stdout}.encoding > (defaulting to sys.getdefaultencoding()) for reading and writing, > respectively. It just doesn't work: you cannot read a ISO-8859-1 file from UTF-8 (if your locale encoding is UTF-8

[issue12016] Wrong behavior for '\xff\n'.decode('gb2312', 'ignore')

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: > Because I consider this issue as a bug, I would like > to apply this patch to 2.7, 3.2 and 3.3. It is maybe a bug but it is also an important change on Python behaviour, so finally I prefer to only change (fix) Python 3.3. Thanks for reporting the bug zy (c

[issue12501] callable(): remove/amend the deprecation warning in Python 2.7

2011-07-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1f814faaf54d by Victor Stinner in branch '2.7': Close #12501: Adjust callable() warning: callable() is only not supported in http://hg.python.org/cpython/rev/1f814faaf54d -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejec

[issue12423] signal handler doesn't handle SIGABRT from os.abort

2011-07-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1ac21a715c5d by Victor Stinner in branch '2.7': Issue #12423: Fix os.abort() documentation http://hg.python.org/cpython/rev/1ac21a715c5d New changeset 4e83d8f6d496 by Victor Stinner in branch '3.2': Issue #12423: Fix os.abort() documentation http:/

[issue12423] signal handler doesn't handle SIGABRT from os.abort

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: > Here's my proposed patch for the documentation, against > the head of the 2.7 branch. Thanks, I applied your pach to 2.7, 3.2 and 3.3 doc. -- resolution: -> fixed status: open -> closed versions: +Python 3.2, Python 3.3 -Python 2.6

[issue12429] test_io.check_interrupted_write() sporadic failures on FreeBSD 6 on Python 2.7/3.2

2011-07-07 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue12518] In string.Template it's impossible to transform delimiter in the derived class

2011-07-07 Thread py.user
New submission from py.user : >>> import string >>> class MyTemplate(string.Template): ... delimiter = '.' ... >>> MyTemplate.delimiter = 'x' >>> mt = MyTemplate('.field xfield') >>> mt.substitute(field=None) 'None xfield' >>> mt.delimiter 'x' >>> If I want to change the pattern string by an

[issue11230] "Full unicode import system" not in 3.2

2011-07-07 Thread Ned Deily
Changes by Ned Deily : -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue12504] packaging: fix uninstall and stop skipping its tests

2011-07-07 Thread Thomas Holmes
Thomas Holmes added the comment: I have made the change you suggested, creating a new list and simply amending to minimize the diff. This new patch has been attached. I looked through the rest of database.py and did not see any other generators that appeared to erroneously hold a file handle

[issue12504] packaging: fix uninstall and stop skipping its tests

2011-07-07 Thread Thomas Holmes
Changes by Thomas Holmes : Added file: http://bugs.python.org/file22612/6e15ba060803.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: @neologix: I don't understand why do you want to hurry, this issue will not be fixed in the next release (3.2.1, it's too late), and I don't think that the next release (3.3? or is it something before?) will come before few months. -- I don't think that repl

[issue12181] SIGBUS error on OpenBSD (sparc64)

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: @neologix: New try. Why did you remove your patch? -- ___ Python tracker ___ ___ Python-bugs-list m

[issue1195571] simple callback system for Py_FatalError

2011-07-07 Thread STINNER Victor
STINNER Victor added the comment: > Sorry, the documentation in the patch is wrong Can you update your patch please? -- ___ Python tracker ___ ___