[issue1559298] test_popen fails on Windows if installed to "Program Files"

2010-01-15 Thread Florent Xicluna
Florent Xicluna added the comment: It is on Python 2.7a2 >>> os.popen('"C:\\Python27\\python.exe" -c "import sys; print sys.argv" >>> 42').read() '' >>> os.popen('""C:\\Python27\\python.exe" -c "import sys; print sys.argv" >>> 42"').read() "['-c', '42']\n" >>> os.popen3('"C:\\Python27\\pyth

[issue7693] tarfile.extractall can't have unicode extraction path

2010-01-15 Thread Lars Gustäbel
Lars Gustäbel added the comment: In the 2.x branch tarfile is not prepared to deal with unicode pathnames at all. This changed in Python 3. The fact that it works anyway (in the majority of cases) to add filenames as unicode objects is pure coincidence - I suppose you have a utf-8 system enco

[issue7693] tarfile.extractall can't have unicode extraction path

2010-01-15 Thread Peter Bienstman
Peter Bienstman added the comment: So what do suggest then as the best approach if I want to use unicode paths in tar files in Python 2.x in a way that is portable across different systems? -- ___ Python tracker _

[issue7693] tarfile.extractall can't have unicode extraction path

2010-01-15 Thread Lars Gustäbel
Lars Gustäbel added the comment: First, use a string pathname for extractall(). Most likely, your script is going to work. Convert all pathnames to strings using sys.getfilesystemencoding() before you add() them. Ensure that all systems you are going to use the archives on have the same files

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: abspath is basically dead code in macpath, the module is used to manipulate classic MacOS9-style paths and is no longer used as os.path on any supported platform (it used to be os.path on MacOS9). BTW. the module itself is not dead, OSX still uses OS9-style

[issue6352] Compiler warning in unicodeobject.c

2010-01-15 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Interpreter Core nosy: +ezio.melotti priority: -> normal stage: -> patch review type: -> compile error ___ Python tracker ___

[issue5905] strptime fails in non-UTF locale

2010-01-15 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, lemburg versions: -Python 3.0 ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue5587] vars() no longer has a useful __repr__

2010-01-15 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti priority: -> normal stage: -> test needed type: -> behavior versions: +Python 3.2 -Python 3.0 ___ Python tracker ___ __

[issue5825] Patch to add "remove" method to tempfile.NamedTemporaryFile

2010-01-15 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +needs review nosy: +ezio.melotti priority: -> normal stage: -> patch review ___ Python tracker ___ __

[issue5684] test_zipfile writes in its test directory

2010-01-15 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> needs patch versions: -Python 3.0 ___ Python tracker ___ ___ Python-bugs-l

[issue7693] tarfile.extractall can't have unicode extraction path

2010-01-15 Thread Peter Bienstman
Peter Bienstman added the comment: On Friday 15 January 2010 11:51:24 am Lars Gustäbel wrote: > Lars Gustäbel added the comment: > > First, use a string pathname for extractall(). Most likely, your script is > going to work. Convert all pathnames to strings using > sys.getfilesystemencoding(

[issue5609] Create Unit Tests for nturl2path module

2010-01-15 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti priority: -> normal stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue5905] strptime fails in non-UTF locale

2010-01-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The reason for this is that the strftime() C lib API is used to build localized month names. With your setting, you'll get French Latin-1 month names and those cannot be coerced to UTF-8 due to the accented characters in them. This works in Python 2.x sin

[issue7706] Missing #include guards

2010-01-15 Thread Andrej Krpic
New submission from Andrej Krpic : Patch provides consistency with include guards already present in core. This issue is somehow next step to #1495999 and #1492356. These headers are missing from MSVC when targeting MS Windows CE . HAVE_PROCESS_H already used in: Modules/posixmodule.c, Python/th

[issue7693] tarfile.extractall can't have unicode extraction path

2010-01-15 Thread Lars Gustäbel
Lars Gustäbel added the comment: I suppose you do not have a real problem here. I thought your problem was that you want to use unicode pathnames as input and output to tarfile. You don't need that. You want to transfer an archive from one system to another. You can do that with tarfile alre

[issue7693] tarfile.extractall can't have unicode extraction path

2010-01-15 Thread Peter Bienstman
Peter Bienstman added the comment: On Friday 15 January 2010 02:14:30 pm Lars Gustäbel wrote: > Lars Gustäbel added the comment: > > I suppose you do not have a real problem here. I thought your problem was > that you want to use unicode pathnames as input and output to tarfile. You > don't

[issue2775] Implement PEP 3108

2010-01-15 Thread Florent Xicluna
Florent Xicluna added the comment: Modules "hotshot" and "xmllib" give deprecation warnings. But they are not part of PEP 3108 or PEP 4. -- nosy: +flox ___ Python tracker ___ __

[issue5825] Patch to add "remove" method to tempfile.NamedTemporaryFile

2010-01-15 Thread Brian Curtin
Brian Curtin added the comment: You should use assertFalse in your test, as failIf is deprecated starting in 2.7. -- nosy: +brian.curtin ___ Python tracker ___ _

[issue7705] libpython2.6.so is not linked correctly on FreeBSD when threads are enabled

2010-01-15 Thread Brian Curtin
Changes by Brian Curtin : -- keywords: +needs review priority: -> normal stage: -> patch review ___ Python tracker ___ ___ Python-bug

[issue7632] dtoa.c: oversize b in quorem

2010-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: I was considering downgrading this to 'normal'. Then I found Bug 8, and it's a biggie: >>> 10.900012345678912345678912345 10.0 Now I'm thinking it should be upgraded to release blocker instead. The cause is in the _Py_strtod block that starts: '

[issue7632] dtoa.c: oversize b in quorem

2010-01-15 Thread Tim Peters
Tim Peters added the comment: Mark, I agree that last one should be a release blocker -- it's truly dreadful. BTW, did you guess in advance just how many bugs there could be in this kind of code? I did ;-) -- ___ Python tracker

[issue7632] dtoa.c: oversize b in quorem

2010-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: Upgrading to release blocker. It'll almost certainly be fixed before the weekend is out. (And I will, of course, report it upstream.) -- priority: high -> release blocker ___ Python tracker

[issue5825] Patch to add "remove" method to tempfile.NamedTemporaryFile

2010-01-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: What is the point besides to "reduce the need to import os.unlink", which sounds a bit futile to me? -- nosy: +pitrou ___ Python tracker ___ __

[issue7689] Pickling of classes with a metaclass and copy_reg

2010-01-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +alexandre.vassalotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue1634034] Show "expected" token on syntax error

2010-01-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson versions: +Python 3.2 -Python 3.1 ___ Python tracker ___ ___ Python-bugs-lis

[issue7691] test_bsddb3 files are not always removed when test fails

2010-01-15 Thread Florent Xicluna
Changes by Florent Xicluna : -- resolution: -> duplicate stage: test needed -> status: open -> closed superseder: -> Windows buildbot occasional DBFileExistsError failures in test_bsddb3 ___ Python tracker _

[issue7269] Windows buildbot occasional DBFileExistsError failures in test_bsddb3

2010-01-15 Thread Florent Xicluna
Florent Xicluna added the comment: #7691 marked duplicate of this bug. I've set the current directory read-only to track this bug. There's a single TestCase which creates the file in the current directory instead of /tmp. All other bsddb tests use either "get_new_environment_path" or "get_ne

[issue1559298] test_popen fails on Windows if installed to "Program Files"

2010-01-15 Thread Florent Xicluna
Changes by Florent Xicluna : -- keywords: +buildbot ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue1670765] email.Generator: no header wrapping for multipart/signed

2010-01-15 Thread Martin von Gagern
Martin von Gagern added the comment: Let's get some traction here, please! Attached is a test case which will demonstrate the issue. It includes the content of test5.eml as a string so that it won't require additional files. It produces both human-readable output and a suitable exit status. T

[issue7668] test_httpservers fails with non-ascii path

2010-01-15 Thread Florent Xicluna
Changes by Florent Xicluna : -- keywords: +buildbot stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue7667] test_doctest fails with non-ascii path

2010-01-15 Thread Florent Xicluna
Changes by Florent Xicluna : -- keywords: +buildbot priority: -> normal stage: -> test needed ___ Python tracker ___ ___ Python-bugs-

[issue1670765] email.Generator: no header wrapping for multipart/signed

2010-01-15 Thread Brian Curtin
Changes by Brian Curtin : -- keywords: +needs review stage: test needed -> patch review versions: +Python 3.1 -Python 3.0 ___ Python tracker ___ ___

[issue7707] multiprocess.Queue operations during import can lead to deadlocks

2010-01-15 Thread Alon Zakai
New submission from Alon Zakai : Creating a multiprocessing.Queue and operating on it while being imported can lead to a deadlock. The attached file will work if run directly (python test.py) but will hang if imported from the interpreter (import test). Additional comments are in the file. -

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-15 Thread Florent Xicluna
Changes by Florent Xicluna : -- keywords: +buildbot ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue5207] extend strftime/strptime format for RFC3339 and RFC2822

2010-01-15 Thread R. David Murray
R. David Murray added the comment: See also issue 655194. -- nosy: +r.david.murray priority: -> normal stage: -> test needed versions: +Python 3.2 ___ Python tracker ___ __

[issue1670765] email.Generator: no header wrapping for multipart/signed

2010-01-15 Thread Brian Curtin
Brian Curtin added the comment: Martin, can you provide a true unit test? Lib\email\test\test_email.py has many examples, and something like this would fit in there. -- nosy: +brian.curtin stage: patch review -> test needed ___ Python tracker

[issue5207] extend strftime/strptime format for RFC3339 and RFC2822

2010-01-15 Thread R. David Murray
R. David Murray added the comment: I mean issue 665194. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue6961] test_distutils failure

2010-01-15 Thread Florent Xicluna
Florent Xicluna added the comment: There's still similar failures on 3.1 branch only. Some buildbots which have reported the error: AMD64 Ubuntu ia64 Ubuntu alpha Debian AMD64 Gentoo http://www.python.org/dev/buildbot/all/builders/AMD64%20Ubuntu%203.1/builds/194 http://www.python.org/de

[issue6961] test_distutils failure

2010-01-15 Thread Florent Xicluna
Florent Xicluna added the comment: whoops... I missed #7591 which is a report for the same issue. -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___

[issue7591] test_distutils: test_get_platform fails on 3.1

2010-01-15 Thread Florent Xicluna
Florent Xicluna added the comment: Some buildbots which have reported the error: AMD64 Ubuntu ia64 Ubuntu alpha Debian AMD64 Gentoo -- nosy: +flox title: test_get_platform fails on 3.1 -> test_distutils: test_get_platform fails on 3.1 ___ Py

[issue7708] test_xmlrpc fails with non-ascii path

2010-01-15 Thread Florent Xicluna
New submission from Florent Xicluna : Another buildbot failure (repeated on AMD64 Ubuntu wide). test_xmlrpc Exception happened during processing of request from ('127.0.0.1', 59299) Traceback (most recent call last): File "/home/buildbot/cpython-ucs4-

[issue7707] multiprocess.Queue operations during import can lead to deadlocks

2010-01-15 Thread R. David Murray
Changes by R. David Murray : -- nosy: +brett.cannon, jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue6252] logging midnight rotation

2010-01-15 Thread Peter Hansen
Peter Hansen added the comment: In the NEWS file, this was recorded as fixed using the wrong issue number. The entry reads "Issue #5262: Fixed bug in next rollover time computation in TimedRotatingFileHandler." rather than "Issue #6252". -- nosy: +peter9477 _

[issue4111] Add Systemtap/DTrace probes

2010-01-15 Thread Wilfredo Sanchez
Changes by Wilfredo Sanchez : -- nosy: +wsanchez ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-01-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch should come with an unit test (in Lib/test/test_functools.py). -- ___ Python tracker ___ _

[issue4111] Add Systemtap/DTrace probes

2010-01-15 Thread Glyph Lefkowitz
Changes by Glyph Lefkowitz : -- nosy: +glyph ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue6897] imaplib fails during login

2010-01-15 Thread R. David Murray
Changes by R. David Murray : -- priority: -> normal resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Imap lib implicit conversion from bytes to string type: -> behavior ___ Python tracker

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The documentation of io.BufferedIOBase.read() reads "multiple raw > reads may be issued to satisfy the byte count". I understood this > language to mean satisfying read size is optional. Isn't it? It's the reverse actually. It means that `BufferedIOBase.read`

[issue1670765] email.Generator: no header wrapping for multipart/signed

2010-01-15 Thread Martin von Gagern
Martin von Gagern added the comment: OK, here is a patch providing both two test cases and the fix for current trunk. Will probably hack something for python 3 as well, although there the Message.as_string approach works due to the new headerlength argument defaulting to 0. So there I'd adjus

[issue6963] Add worker process lifetime to multiprocessing.Pool - patch included

2010-01-15 Thread Charles Cazabon
Charles Cazabon added the comment: Ping... two alphas into 2.7. Have you had a chance to review this functionality? Thanks. -- ___ Python tracker ___ _

[issue7709] the msg parameters of PyUnit assertions, such as assertEqual, should not obscure the automated diagnostics, such as '%s != %s'

2010-01-15 Thread Phlip
New submission from Phlip : The various assertions are not DRY when they force you to repeat any automatic diagnostic in a message string, if you provide it. Here's an example: def assertEqual(self, first, second, msg=None): self.assert_((first == second), msg or '%s != %s' % (fir

[issue6963] Add worker process lifetime to multiprocessing.Pool - patch included

2010-01-15 Thread Brian Curtin
Changes by Brian Curtin : -- keywords: +needs review priority: -> normal stage: -> patch review versions: +Python 3.2 -Python 3.1 ___ Python tracker ___

[issue6939] shadows around the io truncate() semantics

2010-01-15 Thread Pascal Chambon
Pascal Chambon added the comment: Is there anything I can do to help this patch making its way to the trunk ? I guess it'd be better if Python2.7 benefited from it, so that users don't run anymore the risk of relying of this undocumented and non-canonical "truncate" behaviour. Regards, Pasca

[issue6939] shadows around the io truncate() semantics

2010-01-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file15763/Buggy patch - to be forgotten ___ Python tracker ___ ___ Python-bugs

[issue6963] Add worker process lifetime to multiprocessing.Pool - patch included

2010-01-15 Thread Jesse Noller
Jesse Noller added the comment: I'm fine with the functionality; I'm going to test it out and look at committing it by mid-week next week. I apologize, I've been pretty maxed out. -- ___ Python tracker ___

[issue6939] shadows around the io truncate() semantics

2010-01-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looking at the patches: - if you want to remove code, please remove it; don't comment it out - please don't use C++-style comments (it will break on some compilers, produce warnings on others) - code lines should generally not be wider than 80 chars (although t

[issue843590] 'macintosh' encoding alias for 'mac_roman'

2010-01-15 Thread Martin von Gagern
Martin von Gagern added the comment: Find attached (issue843590_rfc.patch) an implementation of the macintosh encoding as the RFC defines it. I don't suggest its inclusion; I would prefer the alias of this implementation, but either one is better than no 'macintosh' encoding at all. So if you

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-15 Thread Nir Aides
Nir Aides added the comment: May be a good idea to clear this up in the documentation. http://en.wiktionary.org/wiki/may#Verb "(modal auxiliary verb, defective) To have permission to. Used in granting permission and in questions to make polite requests." -- __

[issue7710] Inconsistent Exception for int() conversion

2010-01-15 Thread Florent Xicluna
New submission from Florent Xicluna : On Python 3: >>> int('\0') Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'decimal' codec can't encode character '\x00' in position 0: invalid decimal Unicode string >>> int('\01') Traceback (most recent call last): File ""

[issue843590] 'macintosh' encoding alias for 'mac_roman'

2010-01-15 Thread Martin von Gagern
Martin von Gagern added the comment: And this patch (issue84359_alias.patch) is the alternative, 'macintosh' as an alias to 'mac_roman' as originally requested, along with a bunch of aliases registered with IANA. I'd prefer this approach over the preceding one, and hope someone will maybe rev

[issue7710] Inconsistent Exception for int() conversion

2010-01-15 Thread Florent Xicluna
Florent Xicluna added the comment: The null byte gives UnicodeEncodeError for other conversions too. Python 3: int('\0'), float('\0'), complex('\0') Python 2: int(u'\0'), long(u'\0'), float(u'\0'), complex(u'0') Traceback (most recent call last): File "", line 1, in UnicodeEncodeError:

[issue7710] Inconsistent Exception for int() conversion

2010-01-15 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Loosely related to issue4221. -- nosy: +exarkun ___ Python tracker ___ ___ Python-bugs-list mai

[issue2927] expose html.parser.unescape

2010-01-15 Thread Brian Curtin
Changes by Brian Curtin : -- keywords: +needs review priority: -> normal stage: -> patch review versions: +Python 2.7 -Python 2.6 ___ Python tracker ___

[issue4221] inconsistent exception from int is confusing

2010-01-15 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker ___ ___ Python

[issue4221] inconsistent exception from int is confusing

2010-01-15 Thread Florent Xicluna
Florent Xicluna added the comment: Python 3 gives same confusing error: >>> int(b'\0', 999) Traceback (most recent call last): File "", line 1, in ValueError: invalid literal for int() with base 999: b'\x00' >>> int(b'x', 999) Traceback (most recent call last): File "", line 1, in ValueE

[issue7639] bdist_msi fails on files with long names

2010-01-15 Thread Christoph Gohlke
Christoph Gohlke added the comment: I can confirm this issue. It prevents building a IPython msi installer on Python 2.6 for Windows. A patch to the Directory.make_short function in msilib\__init__.py is attached. It falls back to generating prefix~pos filenames when a short name is already

[issue7709] the msg parameters of PyUnit assertions, such as assertEqual, should not obscure the automated diagnostics, such as '%s != %s'

2010-01-15 Thread R. David Murray
R. David Murray added the comment: You are looking for this: http://docs.python.org/dev/py3k/library/unittest.html#unittest.TestCase.longMessage I wish it were the default, but at least it exists in 2.7 and 3.x. (It can't be the default for backward compatibility reasons.) -- nosy: +

[issue7639] bdist_msi fails on files with long names

2010-01-15 Thread Brian Curtin
Changes by Brian Curtin : -- keywords: +needs review priority: -> normal stage: -> test needed type: crash -> behavior ___ Python tracker ___ ___

[issue1670765] email.Generator: no header wrapping for multipart/signed

2010-01-15 Thread R. David Murray
Changes by R. David Murray : -- assignee: barry -> r.david.murray nosy: +r.david.murray stage: test needed -> patch review versions: +Python 2.7, Python 3.2 ___ Python tracker

[issue7707] multiprocess.Queue operations during import can lead to deadlocks

2010-01-15 Thread Brett Cannon
Brett Cannon added the comment: Without looking at the multiprocessing code I am willing to guess that some code in that run() function is launching some code that runs in a thread that is performing an import, deadlocking on the import lock. Jesse, is that what could be happening? If so we s

[issue2775] Implement PEP 3108

2010-01-15 Thread Brett Cannon
Brett Cannon added the comment: I don't know why hotshot was deprecated specifically for Python 3 as that was never directly part of the discussion for PEP 3108. As for xmllib, that is most likely an oversight. Either way they should get added to the relevant PEPs. -- ___

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-15 Thread R. David Murray
R. David Murray added the comment: I do not find the existing phrasing in the IO docs ambiguous, but since it is obviously possible to misinterpret it it would be good to clarify it. Can you suggest an alternate phrasing that would be clearer? -- nosy: +r.david.murray __

[issue7709] the msg parameters of PyUnit assertions, such as assertEqual, should not obscure the automated diagnostics, such as '%s != %s'

2010-01-15 Thread Brett Cannon
Changes by Brett Cannon : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue6939] shadows around the io truncate() semantics

2010-01-15 Thread Pascal Chambon
Pascal Chambon added the comment: Allright, I shall fix all this asap. But it seems the C code for truncate is actually buggy in the current 2.6 _fileio.c, around line 680. CF code below : posobj = portable_lseek(fd, posobj, 0); -> don't we lose the reference to the old "posobj" there, doing

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch for the release blocker. Eric, would you be interested in double checking the logic for this patch? Tim: No, I have to admit I didn't forsee quite this number of bugs. :) -- title: dtoa.c: oversize b in quorem -> dtoa.c: oversize b i

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-15 Thread Mark Dickinson
Mark Dickinson added the comment: issue7632_bug8.patch uploaded to Rietveld: http://codereview.appspot.com/186168 -- ___ Python tracker ___ _

[issue1722] Undocumented urllib functions

2010-01-15 Thread Brian Curtin
Changes by Brian Curtin : -- keywords: +easy stage: -> needs patch type: -> feature request versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-15 Thread Eric Smith
Eric Smith added the comment: It looks correct to me, assuming this comment is correct: /* scan back until we hit a nonzero digit. significant digit 'i' is s0[i] if i < nd0, s0[i+1] if i >= nd0. */ I didn't verify the comment itself. -- _

[issue6939] shadows around the io truncate() semantics

2010-01-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > posobj = portable_lseek(fd, posobj, 0); -> don't we lose the reference > to the old "posobj" there, doing a memory leak ? It's a bit more subtle. Here, the first reference to "posobj" that you get is through the function arguments. You don't own that referenc

[issue6939] shadows around the io truncate() semantics

2010-01-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: He, roundup ate part of the code I pasted. Here it is again: >>> import io [39516 refs] >>> f = io.open("foo", "wb", buffering=0) [39542 refs] >>> f.truncate() 0L [39544 refs] >>> f.truncate() 0L [39544 refs] >>> f.truncate(2) 2 [39543 refs] >>> f.truncate(2) 2

[issue6939] shadows around the io truncate() semantics

2010-01-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: By the way, you witness the issue (less clearly though) by running the tests in debug mode, too: $ ./python -m test.regrtest -v test_io test_io test_BufferedIOBase_destructor (test.test_io.CIOTest) ... ok test_IOBase_destructor (test.test_io.CIOTest) ... ok te

[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2010-01-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: No, you can't rely on the repr of a frozenset with multiple items. You should find another way of testing (if you are brave you could match the "frozenset(...)" with a regex and eval() it). Some comments on the patch: - there's a line or two in peephole.c whi

[issue7632] dtoa.c: oversize b in quorem, and a menagerie of other bugs

2010-01-15 Thread Eric Smith
Eric Smith added the comment: I have a few minor comments posted on Rietveld, but nothing that would keep you from checking this in. -- ___ Python tracker ___ __

[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2010-01-15 Thread Dave Malcolm
Dave Malcolm added the comment: Thanks for the suggestions. Attached is a revised version of the patch. - I believe I've fixed all tab/space issues in this version of the patch, though I may have missed some (http://www.python.org/dev/tools/ doesn't recommend an automated way of checking t

[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2010-01-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: Nice looking patch. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-15 Thread Ezio Melotti
Ezio Melotti added the comment: For consistency I updated all 4 the modules. If the tests pass on both Windows and Mac the patch should be ready to go in. -- Added file: http://bugs.python.org/file15902/issue3426-3.diff ___ Python tracker

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-01-15 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100116.zip is a new version of the regex module. I've given up on the breadth-wise matching - it was too difficult finding a pattern structure that would work well for both depth-first and breadth-wise. It probably still needs some tweaks and tid

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-01-15 Thread Evan Klitzke
Evan Klitzke added the comment: New patch included, with a test case. I had wanted to check the classmethod __module__ thing directly, but that proved to be elusive, since the classmethod gets the __module__ attribute if the module is '__main__', and you can't delete that attribute. My test j

[issue5063] python-2.6.spec doesn't build properly

2010-01-15 Thread Sean Reifschneider
Sean Reifschneider added the comment: Committed to release26-maint as 77514. Committed to trunk as 77515. Committed to 3k as 77516. -- resolution: -> accepted stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue7711] csv error name incorrect

2010-01-15 Thread Scott Kitterman
New submission from Scott Kitterman : Using the csv module I encountered an ASCII NUL in a file and got this error: "_csv.Error: line contains NULL byte" According to the documentation ( http://docs.python.org/library/csv.html#module-contents ) it should be csv.Error:. Attempting to trap the

[issue7712] Add a context manager to change cwd in test.test_support

2010-01-15 Thread Ezio Melotti
New submission from Ezio Melotti : To simplify the tests that require a different CWD I wrote a context manager that allows to change the working directory. I used it on #3426 to test os.path.abspath() with ASCII and non-ASCII CWDs and realized that it can also be used to fix #5684 where a zip

[issue5684] test_zipfile writes in its test directory

2010-01-15 Thread Ezio Melotti
Changes by Ezio Melotti : -- dependencies: +Add a context manager to change cwd in test.test_support ___ Python tracker ___ ___ Python-

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-01-15 Thread Ezio Melotti
Changes by Ezio Melotti : -- dependencies: +Add a context manager to change cwd in test.test_support ___ Python tracker ___ ___ Python-