[issue11717] conflicting definition of ssize_t in pyconfig.h

2011-04-02 Thread Mark Hammond
Mark Hammond skippy.hamm...@gmail.com added the comment: As Tim Roberts says on the python-win32 list: Actually, on closer examination, it may be a bit difficult to sell this. The Microsoft compilers do not define this symbol at all. The SDK defines SSIZE_T (as a long). Nothing defines

[issue11730] Setting Invalid sys.stdin in interactive mode = loop forever.

2011-04-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I think that it is a duplicate of #8070. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11730

[issue8070] Infinite loop in PyRun_InteractiveLoopFlags() if PyRun_InteractiveOneFlags() raises an error

2011-04-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Issue #11730 has been marked as duplicate. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8070 ___

[issue8070] Infinite loop in PyRun_InteractiveLoopFlags() if PyRun_InteractiveOneFlags() raises an error

2011-04-02 Thread ysj.ray
ysj.ray ysj@gmail.com added the comment: I'd prefer not exit program but try to use Py_FileSystemDefaultEncoding as enc when sys.stdin is invalid. On most cases, setting sys.stdin to some other invalid value does means the program could not continue running. --

[issue8070] Infinite loop in PyRun_InteractiveLoopFlags() if PyRun_InteractiveOneFlags() raises an error

2011-04-02 Thread ysj.ray
ysj.ray ysj@gmail.com added the comment: On most cases, setting sys.stdin to some other invalid value does means the program could not continue running. Sorry, it should be: On most cases, setting sys.stdin to some other invalid value does not mean the program could not continue

[issue7443] test.support.unlink issue on Windows platform

2011-04-02 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: FYI: implementation of unlink already has multiple calls for unicode version to process symlinks. Ansi version is the simple DeleteFileA call. Now we have different behavior for unicode and ansi variants as I can see. Now I'm working

[issue10791] Wrapping TextIOWrapper around gzip files

2011-04-02 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nvawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10791 ___ ___ Python-bugs-list

[issue11740] difflib html diff takes extremely long

2011-04-02 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: The culprit seems to be Differ._fancy_replace. There is a nasty quadratic loop there, that has pretty complex internal code. I have done a quick a fix, that makes example run below a second at the expense of not calling _fancy_replace

[issue5863] bz2.BZ2File should accept other file-like objects. (issue4274045)

2011-04-02 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: Here is an updated patch that adds read1() to BZ2File. This should fix things for issue10791 from the bz2 side. I also took the opportunity to clean up _read_block() to be more readable. As per Martin's suggestion on python-dev, I put the

[issue5863] bz2.BZ2File should accept other file-like objects. (issue4274045)

2011-04-02 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: Updated documentation. -- Added file: http://bugs.python.org/file21503/bz2-v5-doc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5863

[issue8905] difflib should accept arbitrary line iterators

2011-04-02 Thread Filip Gruszczyński
Changes by Filip Gruszczyński grusz...@gmail.com: -- nosy: +gruszczy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8905 ___ ___ Python-bugs-list

[issue6931] dreadful performance in difflib: ndiff and HtmlDiff

2011-04-02 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Check also this: http://bugs.python.org/issue11740 -- nosy: +gruszczy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6931 ___

[issue4709] Mingw-w64 and python on windows x64

2011-04-02 Thread cournapeau david
cournapeau david courn...@gmail.com added the comment: Hi Martin, It was nice meeting you at Pycon. I finally took the time to set up a windows 64 bits environment, and here are the exact steps I needed to do to reproduce the issue, and fix it by hand: - Start fresh from windows 7 64 bits

[issue11741] shutil2.copy fails with destination filenames

2011-04-02 Thread Adam Matan
New submission from Adam Matan a...@matan.name: shutil.copy2(file, dest) fails when dest has unicode characters: [2011-04-02 17:19:54 adam@adam-laptop ~/personal :) ]$ python Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3] on linux2 Type help, copyright, credits or license for

[issue11741] shutil2.copy fails with destination filenames

2011-04-02 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Library (Lib) -Extension Modules nosy: +ezio.melotti stage: - test needed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11741

[issue11741] shutil2.copy fails with destination filenames

2011-04-02 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The problem here is that you are mixing byte strings and unicode. glob.glob('*.ods') returns a list of strings, so in shutil.copy2(file, 'א') you are passing two byte strings and everything works fine. In shutil.copy2(file, u'א') instead,

[issue11741] shutil2.copy fails with destination filenames

2011-04-02 Thread Adam Matan
Adam Matan a...@matan.name added the comment: Don't you think that shutil should be able to handle mixed data types, for example byte string as file name and unicode destination directory? This is, in my opinion, a very common scenario. Would you consider converting all arguments to Unicode?

[issue11741] shutil2.copy fails with destination filenames

2011-04-02 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I should have added that both 'א' and u'א' work as long as the file names in the list returned by glob() are ASCII: if u'א' is used they are simply coerced to unicode. If there are non-ASCII file names in the glob() list, the copy fails

[issue11742] Possible bug in Python/import.c

2011-04-02 Thread Andrew Sommerville
New submission from Andrew Sommerville aksommervi...@gmail.com: Around line 1509 in Python/import.c, function find_module, the importer is trying to fail with No module named It is possible for fp to be NULL and fdp (the return value) to be non-NULL, which callers would see as success.

[issue8631] subprocess.Popen.communicate(...) hangs on Windows

2011-04-02 Thread Patrick Gansterer
Patrick Gansterer par...@paroga.com added the comment: I can reproduce this on WinXP with 2.5, 2.7 and 3.2. On my other box (Win7 64bit) the same code works without problems. This problem happens only when I make a subprocess.call() to executables from my msysgit installation (e.g. echo, git).

[issue11678] Add support for Arch Linux to platform.linux_distributions()

2011-04-02 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: And we all laughed :) -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11678 ___

[issue10963] subprocess can raise OSError (EPIPE) when communicating with short-lived processes

2011-04-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I think it's best to remove all this inconsistency and fix it so that EPIPE is never generated and then backport it to 2.7, 3.1, 3.2. Attached is a patch which fixes it for poll, select, windows and adds two tests. The patch looks good to

[issue5863] bz2.BZ2File should accept other file-like objects. (issue4274045)

2011-04-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is an updated patch that adds read1() to BZ2File. This should fix things for issue10791 from the bz2 side. I also took the opportunity to clean up _read_block() to be more readable. As per Martin's suggestion on python-dev, I put the

[issue11741] shutil2.copy fails with destination filenames

2011-04-02 Thread Adam Matan
Adam Matan a...@matan.name added the comment: Don't you think it should be changed in Python 2.x, so that the ASCII filename will be automatically converted to to Unicode? -- ___ Python tracker rep...@bugs.python.org

[issue11741] shutil2.copy fails with destination filenames

2011-04-02 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The ASCII filename is already converted to unicode, but in your case the program was most likely failing with some non-ASCII filename. -- ___ Python tracker rep...@bugs.python.org

[issue11741] shutil2.copy fails with destination filenames

2011-04-02 Thread Adam Matan
Adam Matan a...@matan.name added the comment: Do you think it should be fixed at the module level? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11741 ___

[issue11707] Create C version of functools.cmp_to_key()

2011-04-02 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Here is a patch that passes functools tests. I'll be happy to work on it further. -- keywords: +patch Added file: http://bugs.python.org/file21504/11707.patch ___ Python tracker

[issue11741] shutil2.copy fails with destination filenames

2011-04-02 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Mixing byte and unicode strings should always be avoided, because the implicit coercion to unicode works only if the byte strings contains only ASCII, and fails otherwise. Several modules -- including shutil, glob, and os.path -- have API

[issue11282] 3.3 unittest document not kept consist with code

2011-04-02 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Guido decided to leave the fail* methods and assertDictContainsSubset in 3.3 (and possibly even in the following versions), so that people moving from 2.7 to 3.3 don't have to change their code because these methods are missing. Since

[issue11707] Create C version of functools.cmp_to_key()

2011-04-02 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I haven't had time to look at this in detail, but the concept appears sound. I'll try to devote some time to it, but hopefully someone else on core-mentorship with more familiarity with this code will also be able to review it. One thing: You

[issue11707] Create C version of functools.cmp_to_key()

2011-04-02 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Ok, here is patch that keep python implementation of cmp_to_key if C version can't be imported. Thanks again for you help :-) -- Added file: http://bugs.python.org/file21505/11707_2.patch ___

[issue11743] Rewrite PipeConnection and Connection in pure Python

2011-04-02 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: Here is a rewrite of multiprocessing.{PipeConnection,Connection} in pure Python, for ease of maintenance and improvement. -- components: Library (Lib) files: mpconn.patch keywords: patch messages: 132816 nosy: asksol, brian.curtin,

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2011-04-02 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- dependencies: +Rewrite PipeConnection and Connection in pure Python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9205 ___

[issue11707] Create C version of functools.cmp_to_key()

2011-04-02 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: Nice work. There are a few nits (dealloc and traverse need to address both python objects in the struct). I will look at the patch in detail when I get a chance (in the next week or so). It would be great if more tests were

[issue2736] datetime needs an epoch method

2011-04-02 Thread Ka-Ping Yee
Ka-Ping Yee pyt...@zesty.ca added the comment: no one has come up with a satisfactory solution Plenty have proposed a satisfactory solution. No one has come up with a solution that is satisfactory to *you*, because you have overconstrained the problem. The reason we still have no

[issue5863] bz2.BZ2File should accept other file-like objects. (issue4274045)

2011-04-02 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: Thanks for the review. I've made most of the changes you suggested, but there's one thing I wanted to check about: - instead of int(size), use size = size.__index__() so as to forbid floats The tests for readline() and readlines() expect

[issue5863] bz2.BZ2File should accept other file-like objects. (issue4274045)

2011-04-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The tests for readline() and readlines() expect a TypeError if size is None. Calling size.__index__() in this case raises an AttributeError instead. Should I change the tests to expect an AttributeError? Alternatively, something like this

[issue10712] 2to3 fixer for deprecated unittest method names

2011-04-02 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10712 ___ ___

[issue5863] bz2.BZ2File should accept other file-like objects. (issue4274045)

2011-04-02 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: Here's the updated patch. -- Added file: http://bugs.python.org/file21507/bz2-v6.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5863

[issue5863] bz2.BZ2File should accept other file-like objects. (issue4274045)

2011-04-02 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: ... and the corresponding updated documentation patch. -- Added file: http://bugs.python.org/file21508/bz2-v6-doc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5863

[issue10762] strftime('%f') segfault

2011-04-02 Thread Santoso Wijaya
Santoso Wijaya santoso.wij...@gmail.com added the comment: There does not seem to be any mention of what an ANSI behavior should be upon encountering a non-supported format string. Hence, perhaps, the discrepancy among different platforms. -- ___

[issue10762] strftime('%f') segfault

2011-04-02 Thread Santoso Wijaya
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10762 ___ ___

[issue10762] strftime('%f') segfault

2011-04-02 Thread Santoso Wijaya
Santoso Wijaya santoso.wij...@gmail.com added the comment: I don't think this is a Windows bug per se, because the behavior is undefined in the standards. The burden is up to us to validate the format string inputted [w]strftime and currently, our code mistakenly clears %f as valid. I'm

[issue10762] strftime('%f') segfault

2011-04-02 Thread Santoso Wijaya
Changes by Santoso Wijaya santoso.wij...@gmail.com: Removed file: http://bugs.python.org/file21509/issue11703.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10762 ___

[issue10762] strftime('%f') segfault

2011-04-02 Thread Santoso Wijaya
Santoso Wijaya santoso.wij...@gmail.com added the comment: Wrong filename. Attaching again: against 2.7 and 3.1 branches. -- Added file: http://bugs.python.org/file21510/issue10762_py27.patch ___ Python tracker rep...@bugs.python.org

[issue10762] strftime('%f') segfault

2011-04-02 Thread Santoso Wijaya
Changes by Santoso Wijaya santoso.wij...@gmail.com: Added file: http://bugs.python.org/file21511/issue10762_py31.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10762 ___

[issue11744] re.LOCALE doesn't reflect locale.setlocale(...)

2011-04-02 Thread Vlastimil Brom
New submission from Vlastimil Brom vlastimil.b...@gmail.com: Hi, I just noticed a behaviour of the re.LOCALE flag I can't understand; I first reported this to the new regex implementation, which, however, only mimics the standard lib re in this case:

[issue11744] re.LOCALE doesn't reflect locale.setlocale(...)

2011-04-02 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, mrabarnett ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11744 ___ ___

[issue1647489] zero-length match confuses re.finditer()

2011-04-02 Thread Denver Coneybeare
Denver Coneybeare denver.coneybe...@gmail.com added the comment: I just re-tested this issue in trunk at changeset 053bc5ca199b and the issue is still exactly reproducible as originally reported. That is, the match to the empty string skips a character of the match: import re [m.groups()

[issue11745] idlelib/PyShell.py: incorrect module name reported in error message: Tkinter should be tkinter

2011-04-02 Thread Denver Coneybeare
New submission from Denver Coneybeare denver.coneybe...@gmail.com: Just a very minor bug. The error message in idlelib/PyShell.py that is printed when importing tkinter fails says that it failed to import Tkinter, but the actual module name is tkinter (with a lowercase t). try: from

[issue11745] idlelib/PyShell.py: incorrect module name reported in error message: Tkinter should be tkinter

2011-04-02 Thread Denver Coneybeare
Changes by Denver Coneybeare denver.coneybe...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file21512/patch_idle_tkinter_import_v1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11745

[issue11745] idlelib/PyShell.py: incorrect module name reported in error message: Tkinter should be tkinter

2011-04-02 Thread Denver Coneybeare
Changes by Denver Coneybeare denver.coneybe...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11745 ___ ___

[issue11745] idlelib/PyShell.py: incorrect module name reported in error message: Tkinter should be tkinter

2011-04-02 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I think in this case Tkinter refers to the Tkinter library, rather than the tkinter module. -- nosy: +ezio.melotti type: behavior - ___ Python tracker rep...@bugs.python.org

[issue11707] Create C version of functools.cmp_to_key()

2011-04-02 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11707 ___ ___ Python-bugs-list

[issue11746] ssl library load_cert_chain cannot use elliptic curve type private key

2011-04-02 Thread umedoblock
New submission from umedoblock umedobl...@gmail.com: ssl library load_cert_chain cannot use elliptic curve type private key. I resolved the problem, I attached patch file -- components: Library (Lib) files: _ssl.c.diff keywords: patch messages: 132830 nosy: umedoblock priority: normal

[issue6501] Fatal error on startup with invalid PYTHONIOENCODING

2011-04-02 Thread Daniel Goertzen
Daniel Goertzen daniel.goert...@gmail.com added the comment: It turns out that cx-freeze deliberately sets Py_IgnoreEnvironmentFlag to ensure that the final executable is really an isolated, standalone executable (ie, it can't be subverted by setting PYTHONPATH.) Therefore the

[issue11747] unified_diff function product incorrect range information

2011-04-02 Thread Jan Koprowski
New submission from Jan Koprowski jan.koprow...@gmail.com: Python: --- import difflib dl = difflib.unified_diff([], ['a\n', 'b\n']) print ''.join(dl), --- +++ @@ -1,0 +1,2 @@ +a +b Gnu diff: --- $diff -uN a b --- a 1970-01-01

[issue11707] Create C version of functools.cmp_to_key()

2011-04-02 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: Filip, can you please submit a contributor agreement? http://docs.python.org/devguide/coredev.html#sign-a-contributor-agreement -- ___ Python tracker rep...@bugs.python.org