[issue10278] add time.wallclock() method

2011-07-07 Thread Matt Joiner
Matt Joiner anacro...@gmail.com 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 saul.sp...@gmail.com: -- nosy: +spatz123 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing

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

2011-07-07 Thread Andreas Hasenkopf
New submission from Andreas Hasenkopf webmas...@hasenkopf2000.net: 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

[issue9242] unicodeobject.c: use of uninitialized values

2011-07-07 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9242 ___ ___

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

2011-07-07 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5505 ___ ___

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

2011-07-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

[issue10284] NNTP should accept bytestrings for username and password

2011-07-07 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- components: +Unicode nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10284 ___

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

2011-07-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Can't you only work with Unicode and avoid the MBCS encoding? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10945

[issue10872] Add mode to TextIOWrapper repr

2011-07-07 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10872 ___ ___

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

2011-07-07 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: 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

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

2011-07-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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:

[issue12391] packaging install fails to clean up temp files

2011-07-07 Thread Roundup Robot
Roundup Robot devnull@devnull 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 -

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

2011-07-07 Thread Hans Bering
Hans Bering hans.ber...@arcor.de 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

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

2011-07-07 Thread Hans Bering
Changes by Hans Bering hans.ber...@arcor.de: Removed file: http://bugs.python.org/file22535/tkinterCrash.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10647 ___

[issue12167] test_packaging reference leak

2011-07-07 Thread Andreas Stührk
Andreas Stührk andy-pyt...@hammerhartes.de 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

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

2011-07-07 Thread Ralf Schlatterbeck
Ralf Schlatterbeck r...@runtux.com 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

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

2011-07-07 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: 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+',

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

2011-07-07 Thread Andreas Hasenkopf
Andreas Hasenkopf webmas...@hasenkopf2000.net 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 webmas...@hasenkopf2000.net 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

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

2011-07-07 Thread bjorn lofdahl
Changes by bjorn lofdahl bjorn.lofd...@gmail.com: -- versions: +Python 3.1, Python 3.2, Python 3.3, Python 3.4 -Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12506

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

2011-07-07 Thread bjorn lofdahl
Changes by bjorn lofdahl bjorn.lofd...@gmail.com: -- versions: +Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12506 ___ ___

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

2011-07-07 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: accepted - invalid ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12511 ___ ___

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

2011-07-07 Thread Gareth Rees
New submission from Gareth Rees g...@garethrees.org: 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)

[issue10403] Use member consistently

2011-07-07 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Senthil, I’m not sure you read Alexander’s reply on Rietveld before committing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10403 ___

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

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

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

2011-07-07 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12514 ___

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

2011-07-07 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: Thank you. The patch looks correct. I will apply it as soon as I get a chance. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12514

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

2011-07-07 Thread xavierd
New submission from xavierd xdelan...@cloudmark.com: 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: -

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

2011-07-07 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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.

[issue12167] test_packaging reference leak

2011-07-07 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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? --

[issue12167] test_packaging reference leak

2011-07-07 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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 mer...@netwok.org added the comment: See http://hg.python.org/cpython/file/tip/Lib/packaging/tests/support.py#l81 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12167 ___

[issue12167] test_packaging reference leak

2011-07-07 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue12167] test_packaging reference leak

2011-07-07 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for clarifying, I had misread. IMO, using one logger per file is a lib2to3 bug. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12167

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

2011-07-07 Thread Thomas Holmes
Thomas Holmes tho...@devminded.com 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

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

2011-07-07 Thread Thomas Holmes
Thomas Holmes tho...@devminded.com 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 pe...@digip.org 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 rep...@bugs.python.org

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

2011-07-07 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org 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 pe...@digip.org: -- nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12183 ___ ___ Python-bugs-list mailing

[issue12516] imghdr.what should take one argument

2011-07-07 Thread Jeffrey Finkelstein
New submission from Jeffrey Finkelstein jeffrey.finkelst...@gmail.com: 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

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

2011-07-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

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

2011-07-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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':

[issue10883] urllib: socket is not closed explicitly

2011-07-07 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com 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 victor.stin...@haypocalc.com: 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.

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

2011-07-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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:

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

2011-07-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

[issue9566] Compilation warnings under x64 Windows

2011-07-07 Thread Roundup Robot
Roundup Robot devnull@devnull 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

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

2011-07-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

[issue12178] csv writer doesn't escape escapechar

2011-07-07 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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. --

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

2011-07-07 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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 rep...@bugs.python.org http://bugs.python.org/issue10117

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

2011-07-07 Thread Roundup Robot
Roundup Robot devnull@devnull 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 victor.stin...@haypocalc.com 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

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

2011-07-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

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

2011-07-07 Thread Roundup Robot
Roundup Robot devnull@devnull 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: -

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

2011-07-07 Thread Roundup Robot
Roundup Robot devnull@devnull 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()

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

2011-07-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

[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 victor.stin...@haypocalc.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12429 ___

[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 port...@yandex.ru: 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 any

[issue11230] Full unicode import system not in 3.2

2011-07-07 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11230 ___ ___ Python-bugs-list mailing

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

2011-07-07 Thread Thomas Holmes
Thomas Holmes tho...@devminded.com 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

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

2011-07-07 Thread Thomas Holmes
Changes by Thomas Holmes tho...@devminded.com: Added file: http://bugs.python.org/file22612/6e15ba060803.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12504 ___

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

2011-07-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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.

[issue12181] SIGBUS error on OpenBSD (sparc64)

2011-07-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: @neologix: New try. Why did you remove your patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12181 ___

[issue1195571] simple callback system for Py_FatalError

2011-07-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Sorry, the documentation in the patch is wrong Can you update your patch please? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1195571