[issue11692] subprocess demo functions

2011-03-27 Thread Ross Lagerwall
New submission from Ross Lagerwall rosslagerw...@gmail.com: Running subprocess as a module invokes some demo functions. On posix, one of these doesn't work: $ ./python -m subprocess Process list: b' PID TTY TIME CMD\n 9003 pts/600:00:00 python\n 9004 pts/6 00:00:00 ps\n23760

[issue7639] bdist_msi fails on files with long names

2011-03-27 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: Added file: http://bugs.python.org/file21423/msilib2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7639 ___

[issue7639] bdist_msi fails on files with long names

2011-03-27 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset e51366a05b84 by Martin v. Löwis in branch '2.7': Fix short file name generation in bdist_msi. http://hg.python.org/cpython/rev/e51366a05b84 New changeset fd8336947f90 by Martin v. Löwis in branch '3.1': Fix short file name

[issue11685] possible SQL injection into db APIs via table names... sqlite3

2011-03-27 Thread Rene Dudfield
Rene Dudfield ill...@users.sourceforge.net added the comment: Hi, aaah, ok. It seems to require the use of a quote function. See http://www.sqlite.org/c3ref/mprintf.html However python does not seem to expose the function? I don't see how you can write safe queries using python without

[issue1128] msilib.Directory.make_short only handles file names with a single dot in them

2011-03-27 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This is now fixed with Christoph Gohlke's patch in issue 7639. If anything remains to be done, please submit a new issue (rather than posting to this one). -- resolution: - fixed status: open - closed

[issue11693] memory leak in email.generator.Generator().flatten() method

2011-03-27 Thread Kaushik Kannan
Changes by Kaushik Kannan kaushik1...@gmail.com: -- components: IO, Library (Lib) files: debug_as_string.py nosy: Kaushik.Kannan, barry, r.david.murray priority: normal severity: normal status: open title: memory leak in email.generator.Generator().flatten() method type: resource usage

[issue9929] subprocess.Popen unbuffered not work

2011-03-27 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Unbuffered subprocess was fixed in 1dc52ecb8949 Closing this as a duplicate of #11459. -- nosy: +rosslagerwall resolution: - duplicate status: open - closed ___ Python tracker

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-27 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Closing this as a duplicate of #8052 -- nosy: +rosslagerwall resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11284

[issue8052] subprocess close_fds behavior should only close open fds

2011-03-27 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: See #11284 (a duplicate) for more discussion about this issue. -- nosy: +haypo, loewis, neologix, s7v7nislands ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8052

[issue8006] os.popen in Python 3.1

2011-03-27 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Closing as invalid - believed to be a buffering issue. -- nosy: +rosslagerwall resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org

[issue11393] Integrate faulthandler module into Python 3.3

2011-03-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I updated the (Hg repo and the) patch to fix all Antoine's remarks. Can you make the suggested changes to the tests? Thank you. -- ___ Python tracker rep...@bugs.python.org

[issue11681] -b option undocumented

2011-03-27 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Even from __future__ import unicode_literals doesn't make it do anything. Perhaps Christian merged it by mistake in [5341b30b1812]? -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org

[issue7639] bdist_msi fails on files with long names

2011-03-27 Thread Mark Mc Mahon
Mark Mc Mahon mtnbikingm...@gmail.com added the comment: Following up from my comment in issue1128, please find the patch msilib.make_id_fix_and_tests.patch This improves the make_id() function in the following way: - ensures that NO invalid identifier characters make it through (it does this

[issue9696] xdrlib's pack_int generates DeprecationWarnings for negative in-range values

2011-03-27 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Here is a test and a patch. -- keywords: +patch nosy: +gruszczy Added file: http://bugs.python.org/file21426/9696.patch ___ Python tracker rep...@bugs.python.org

[issue8052] subprocess close_fds behavior should only close open fds

2011-03-27 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Can we use FD_CLOEXEC to archive this goal? Example: open all files with FD_CLOEXEC set and don't close explicitly files on fork. preexec_fn will get access to the files, but the problem is exec(), not preexec_fn. I suppose that

[issue11393] Integrate faulthandler module into Python 3.3

2011-03-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I have pushed a new branch faulthandler-thread in http://hg.python.org/features/faulthandler/. It contains an implementation of dump_tracebacks_later() using a watchdog thread, instead of alarm(). It has two advantages: - it works under Windows

[issue7639] bdist_msi fails on files with long names

2011-03-27 Thread Mark Mc Mahon
Mark Mc Mahon mtnbikingm...@gmail.com added the comment: For Directory.make_short() the only things which are left could be considered splitting hairs. 1. Do we need to remove '\/:' from the file name - if these characters are there then the file name is not valid in the first place. 2.

[issue9544] xdrlib.Packer().pack_fstring throws a TypeError when called with a str()

2011-03-27 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: Here is a simple patch with a test. Depending o bytes in this library seems strange, maybe it should be changed somehow? Anyway, this simple patch should be a quick fix to the problem. -- keywords: +patch nosy: +gruszczy Added

[issue8052] subprocess close_fds behavior should only close open fds

2011-03-27 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: If you're suggesting to set FDs CLOEXEC by default, I think it's neither possible nor reasonable: - you have to take into account not only files, but also pipes, sockets, etc - there's no portable way to e.g. open a file and set it

[issue8052] subprocess close_fds behavior should only close open fds

2011-03-27 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: Ooops, it's of course not going to break code containing accept + fork or pipe + fork, you obviously also need an execve ;-) But the point is that you can't change the semantics of FDs being inheritable across an execve (think about

[issue11694] xdrlib raises ConversionError in inconsistent way

2011-03-27 Thread Filip Gruszczyński
New submission from Filip Gruszczyński grusz...@gmail.com: xdrlib defines ConversionError, but very seldom uses it. For example: def pack_float(self, x): try: self.__buf.write(struct.pack('f', x)) except struct.error as msg: raise ConversionError(msg) But it

[issue11549] Rewrite peephole to work on AST

2011-03-27 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Finally got around to reviewing this (just a visual scan at this stage) - thanks for the effort. These are mostly big picture type comments, so I'm keeping them here rather than burying them amongst all the details in the code review tool.

[issue11677] make test has horrendous performance on an ecryptfs

2011-03-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: One strong reason for having the test files in the build directory is ease of cleanup, especially on the buildbots where crashes or hangs can lead to progressive disk fillup (and some tests create very large files, e.g. 2GB). See also

[issue887237] Machine integers

2011-03-27 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue887237 ___ ___ Python-bugs-list

[issue11549] Rewrite peephole to work on AST

2011-03-27 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: I think the biggest thing to take out of my review is that I strongly encourage deferring the changes for 5(b) and 5(c). I like the basic idea of using a template-based approach to try to get rid of a lot of the boilerplate code currently

[issue11549] Rewrite peephole to work on AST

2011-03-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: As a more general policy question... where do we stand in regards to backwards compatibility of the AST? The ast module docs don't have any caveats to say that it may change between versions, but it obviously *can* change due to new language

[issue11549] Rewrite peephole to work on AST

2011-03-27 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I would provide this via another compile flag a la PyCF_ONLY_AST. If you give only this flag, you get the original AST. If you give (e.g.) PyCF_OPTIMIZED_AST, you get the resulting AST after the optimization stage (or the same, if optimization

[issue9026] argparse subcommands not printed in the same order they were added

2011-03-27 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 74f9ed48ae5d by Steven Bethard in branch '3.2': Issue #9026: Fix order of argparse sub-commands in help messages. http://hg.python.org/cpython/rev/74f9ed48ae5d New changeset de29472c6a84 by Steven Bethard in branch 'default': Issue

[issue9026] argparse subcommands not printed in the same order they were added

2011-03-27 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 75ec20b4c50e by Steven Bethard in branch '2.7': Issue #9026: Fix order of argparse sub-commands in help messages. (Merged from 3.2.) http://hg.python.org/cpython/rev/75ec20b4c50e -- ___

[issue9026] argparse subcommands not printed in the same order they were added

2011-03-27 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: Sorry for letting this bug sit around for so long. I committed a slight variant of your patch to 2.7, 3.2 and 3.3. Thanks! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: +Python

[issue8052] subprocess close_fds behavior should only close open fds

2011-03-27 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: I don't think setting the cloexec flag is a viable solution, especially since fds can be opened in custom c modules. For what its worth, an strace of Java's Process class appears to cheat by opening /proc/self/fd inbetween fork exec.

[issue1446619] extended slice behavior inconsistent with docs

2011-03-27 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: The problem still exists in current trunk: The slicing semantics have been removed from the expressions reference: http://docs.python.org/py3k/reference/expressions.html#slicings The datamodel and types sections still have the same

[issue1446619] extended slice behavior inconsistent with docs

2011-03-27 Thread Steven Bethard
Changes by Steven Bethard steven.beth...@gmail.com: -- stage: test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1446619 ___

[issue1446619] extended slice behavior inconsistent with docs

2011-03-27 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1446619 ___ ___

[issue1690608] email.utils.formataddr() should be rfc2047 aware

2011-03-27 Thread Torsten Becker
Torsten Becker torsten.bec...@gmail.com added the comment: I implemented a basic test for the issue and an attempt for a fix. I am not entirely sure with my implementation, specifically I would like to get comments concerning the following points: - Is is OK that formataddr() will now check

[issue7311] Bug on regexp of HTMLParser

2011-03-27 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The HTML 4.01 specifications says[0]: In certain cases, authors may specify the value of an attribute without any quotation marks. The attribute value may only contain letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45),

[issue11695] Improve argparse usage/help customization

2011-03-27 Thread Steven Bethard
New submission from Steven Bethard steven.beth...@gmail.com: I'm going to try to merge several closely related issues here. Basically, people would like better control over the usage message formatting so that you could: * Put program name and version information at the top of the message *

[issue11692] subprocess demo functions

2011-03-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I think these demo functions should be either be removed or incorporated into the docs. +1 for either of that. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue7284] argparse - display version in usage by default

2011-03-27 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: I'm moving this over to Issue 11695, which proposes support for a usage/help message template. -- resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - Improve argparse usage/help

[issue9652] Enhance argparse help output customizability

2011-03-27 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: I'm moving this over to Issue 11695, which proposes support for a usage/help message template. To customize the argument group names, the recommended approach is to create your own argument groups, and only put arguments there, e.g.:

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

2011-03-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: FWIW, Mercurial uses the following dance: http://selenic.com/repo/hg/file/463aca32a937/mercurial/windows.py#l296 (Mercurial is under the GPL, so we can't copy that code verbatim; but it can serve as an inspiration) -- nosy: +pitrou

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2011-03-27 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: So it strikes me that there already exists an officially supported way to rename your option groups. Just only create your own option groups (never use the default ones) and only put arguments there, e.g.: -

[issue11692] subprocess demo functions

2011-03-27 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Yeah, +1. I can't think of anything useful for python -m subprocess to do, so let's just get rid of the demos. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org

[issue9653] New default argparse output to be added

2011-03-27 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: I'm moving this over to Issue 11695, which proposes support for a usage/help message template. -- resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - Improve argparse usage/help

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

2011-03-27 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: For clarity, while making unlink more robust is no bad thing, the error occurs when the unlink *succeeds* but a subsequent create of the same name fails. This happens when an indexer, Virus scanner or TortoiseSvn etc. has opened the file with

[issue1690608] email.utils.formataddr() should be rfc2047 aware

2011-03-27 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The general approach of the patch looks good to me. Since formataddr is designed to be called from user code that is constructing a message, having it raise for non-ascii in the address is probably OK. However, there should be a test

[issue11688] SQLite trace callback

2011-03-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Thanks for the patch. A couple of comments: - this is a new feature, so can only go in in 3.x: no need to post a 2.7 patch (unless this helps Gerhard for his standalone project) - you need to document the new API in Doc/library/sqlite3.rst

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

2011-03-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I did start to undertake a conversion of TESTFN to a named temporary, but it started to sprawl all over the place and came up against a number of corner cases (eg where tests deliberately wanted two filenames to be the same) so I gave up. How

[issue9696] xdrlib's pack_int generates DeprecationWarnings for negative in-range values

2011-03-27 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Patch looks good to me. Thanks! -- assignee: - mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9696 ___

[issue9696] xdrlib's pack_int generates DeprecationWarnings for negative in-range values

2011-03-27 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset d3f9a6d7f6e4 by Mark Dickinson in branch '2.7': Issue #9696: Fix exception incorrectly raised by xdrlib.Packer.pack_int when trying to pack a negative (in-range) integer. http://hg.python.org/cpython/rev/d3f9a6d7f6e4 --

[issue11696] msilib.make_id() is not safe for non ASCII characters.

2011-03-27 Thread Mark Mc Mahon
New submission from Mark Mc Mahon mtnbikingm...@gmail.com: msilib.make_id() currently ensure that any of the following characters are not in the resulting ID: -+~; Per the Microsoft documentation the following list of characters are allowed.

[issue9696] xdrlib's pack_int generates DeprecationWarnings for negative in-range values

2011-03-27 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: I believe this should be applied also against 3.3. I was working on this using 3.3 code base, so it is not working there too. -- ___ Python tracker rep...@bugs.python.org

[issue11677] make test has horrendous performance on an ecryptfs

2011-03-27 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: Makes sense. So, what do you think about adding a --usetmp/-p flag to regrtest to honor mkdtemp's defaults even in a build dir? I'd add an atexit handler to clean it up but of course if it crashes and you've used the flag, you should know

[issue11692] subprocess demo functions

2011-03-27 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset cae30f34bd16 by Ross Lagerwall in branch 'default': Issue #11692: Remove unnecessary demo functions in subprocess module. http://hg.python.org/cpython/rev/cae30f34bd16 -- nosy: +python-dev

[issue9696] xdrlib's pack_int generates DeprecationWarnings for negative in-range values

2011-03-27 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Patience! I'm getting there... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9696 ___ ___

[issue11692] subprocess demo functions

2011-03-27 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: OK, I simply removed the functions. -- assignee: - rosslagerwall resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue9696] xdrlib's pack_int generates DeprecationWarnings for negative in-range values

2011-03-27 Thread Filip Gruszczyński
Filip Gruszczyński grusz...@gmail.com added the comment: I'm sorry, I wasn't hurrying you. Just wanted to make sure you know. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9696 ___

[issue11677] make test has horrendous performance on an ecryptfs

2011-03-27 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Makes sense. So, what do you think about adding a --usetmp/-p flag to regrtest to honor mkdtemp's defaults even in a build dir? I'd add an atexit handler to clean it up but of course if it crashes and you've used the flag, you should know

[issue9696] xdrlib's pack_int generates DeprecationWarnings for negative in-range values

2011-03-27 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset bd5e821f201c by Mark Dickinson in branch '3.1': Issue #9696: Fix exception incorrectly raised by xdrlib.Packer.pack_int when trying to pack a negative (in-range) integer. http://hg.python.org/cpython/rev/bd5e821f201c New changeset

[issue9696] xdrlib's pack_int generates DeprecationWarnings for negative in-range values

2011-03-27 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I'm sorry, I wasn't hurrying you. Just wanted to make sure you know. No problem :-). Thanks for the fix! -- resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 3.3

[issue11549] Rewrite peephole to work on AST

2011-03-27 Thread Eugene Toder
Eugene Toder elto...@gmail.com added the comment: Thanks. string concatenation will now work, and errors like 'hello' - 'world' should give a more informative TypeError Yes, 'x'*5 works too. Bikeshed: We use Attribute rather than Attr for that node type, perhaps the full Literal name would

[issue8976] subprocess module causes segmentation fault

2011-03-27 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Without more information and a way of reproducing on a recent version of Python, this can't progress. Closing as works for me. -- nosy: +rosslagerwall resolution: - works for me status: open - closed

[issue11696] msilib.make_id() is not safe for non ASCII characters.

2011-03-27 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11696 ___ ___ Python-bugs-list mailing

[issue11549] Rewrite peephole to work on AST

2011-03-27 Thread Eugene Toder
Eugene Toder elto...@gmail.com added the comment: and with __future__ it should work on 2.5 as well. Actually, seems that at least str.format is not in 2.5 as well. Still the question is should I make it run on 2.5 or 2.4 or is 2.6 OK (then __future__ can be removed). --

[issue11549] Rewrite peephole to work on AST

2011-03-27 Thread Daniel Urban
Daniel Urban urban.dani...@gmail.com added the comment: not x == 2 can be theoretically optimized to x != 2, ... I don't think it can: class X: ... def __eq__(self, other): ... return True ... def __ne__(self, other): ... return True ... x = X() not x ==

[issue11549] Rewrite peephole to work on AST

2011-03-27 Thread Eugene Toder
Eugene Toder elto...@gmail.com added the comment: I don't think it can: That already doesn't work in dict and set (eq not consistent with hash), I don't think it's a big problem if that stops working in some other cases. Anyway, I said theoretically -- maybe after some conservative type

[issue1690608] email.utils.formataddr() should be rfc2047 aware

2011-03-27 Thread Torsten Becker
Torsten Becker torsten.bec...@gmail.com added the comment: However, there should be a test for that, and I'm curious to know what happens if you use such an address in an address field in the unmodified email package. I added a test to check if the exceptions get thrown when a address is

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

2011-03-27 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Well http://bugs.python.org/issue7443#msg102833 outlines the problems I encountered while trying to do essentially that. Nothing insurmountable, but definitely bigger than simply adding one line of code. Looks to me like there are two avenues

[issue11688] SQLite trace callback

2011-03-27 Thread Torsten Landschoff
Torsten Landschoff t.landsch...@gmx.net added the comment: A couple of comments: - this is a new feature, so can only go in in 3.x: no need to post a 2.7 patch (unless this helps Gerhard for his standalone project) The motivation for the 2.7er patch is mostly that we are still using Python

[issue11681] -b option undocumented

2011-03-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Nick Coghlan wrote: Nick Coghlan ncogh...@gmail.com added the comment: Even from __future__ import unicode_literals doesn't make it do anything. Perhaps Christian merged it by mistake in [5341b30b1812]? It looks more like some parts

[issue8052] subprocess close_fds behavior should only close open fds

2011-03-27 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Can we use FD_CLOEXEC to archive this goal? I think we should use FD_CLOEXEC in all places where it's reasonable. As others have pointed out, we shouldn't set FD_CLOEXEC for file descriptors where the application hasn't explicitly

[issue1690608] email.utils.formataddr() should be rfc2047 aware

2011-03-27 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: You should check if 'charset' is a string, and call Charset on it only if it is (a Charset may be passed directly in other email package interfaces, and so should be supported here as well. The test doesn't need to cater for the fact

[issue11696] msilib.make_id() is not safe for non ASCII characters.

2011-03-27 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset ec84bd4c5ac4 by Martin v. Löwis in branch '2.7': Closes #11696: Fix ID generation in msilib. http://hg.python.org/cpython/rev/ec84bd4c5ac4 New changeset df66ce66834b by Martin v. Löwis in branch '2.7': Add missing file from #11696.

[issue11696] msilib.make_id() is not safe for non ASCII characters.

2011-03-27 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Thanks for the patch. Please submit a contributor form if you haven't done so: http://www.python.org/psf/contrib/contrib-form/ -- ___ Python tracker rep...@bugs.python.org

[issue1673007] urllib2 requests history + HEAD support

2011-03-27 Thread Denver Coneybeare
Denver Coneybeare denver.coneybe...@gmail.com added the comment: I decided to take a look at this old, forgotten issue and propose an updated patch. I like the submitter's idea that urllib.Request.__init__() should take a method parameter to override the return value of get_method(). I've

[issue8150] urllib needs ability to set METHOD for HTTP requests

2011-03-27 Thread Denver Coneybeare
Denver Coneybeare denver.coneybe...@gmail.com added the comment: Can this issue be closed as a duplicate of #1673007? This specific request for a method parameter to the Request constructor is dealt with there. -- nosy: +denversc ___ Python tracker

[issue11549] Rewrite peephole to work on AST

2011-03-27 Thread Eugene Toder
Eugene Toder elto...@gmail.com added the comment: Also, to avoid any confusion -- currently my patch only runs AST optimizations before code generation, so compile() with ast.PyCF_ONLY_AST returns non-optimized AST. -- ___ Python tracker

[issue11549] Rewrite peephole to work on AST

2011-03-27 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: While I would not be happy to use class X above, the 3.2 manual explicitly says There are no implied relationships among the comparison operators. The truth of x==y does not imply that x!=y is false. . --

[issue7796] No way to find out if an object is an instance of a namedtuple

2011-03-27 Thread Jan Kaliszewski
Jan Kaliszewski z...@chopin.edu.pl added the comment: On python-ideas I have proposed an ABC being also a kind of a mix-in, potentially making namedtuple subclassing (with custom methods etc.) more convenient, e.g.: class MyRecord(namedtuple.abc): _fields = 'x y z' def

[issue11697] Unsigned type in mmap_move_method

2011-03-27 Thread rmib
New submission from rmib rmib.em...@gmail.com: In mmapmodule.c a function mmap_move_method, use unsigned variables dest, src, cnt, as signed: unsigned long dest, src, cnt; ... if (cnt 0 | | (cnt + dest) cnt | | (cnt + src) cnt | | src 0 | | src self- size | | (src + cnt) self- size

[issue1673007] urllib2 requests history + HEAD support

2011-03-27 Thread Santoso Wijaya
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1673007 ___

[issue7796] No way to find out if an object is an instance of a namedtuple

2011-03-27 Thread Jan Kaliszewski
Jan Kaliszewski z...@chopin.edu.pl added the comment: PS. Newer, shorter version: http://dpaste.org/2aiQ/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7796 ___

[issue11474] url2pathname() handling of '/C|/' on Windows

2011-03-27 Thread Santoso Wijaya
Changes by Santoso Wijaya santoso.wij...@gmail.com: Removed file: http://bugs.python.org/file21105/nturl2path.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11474 ___

[issue11474] url2pathname() handling of '/C|/' on Windows

2011-03-27 Thread Santoso Wijaya
Santoso Wijaya santoso.wij...@gmail.com added the comment: Fixing patch... -- Added file: http://bugs.python.org/file21433/nt2urlpath.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11474

[issue1690608] email.utils.formataddr() should be rfc2047 aware

2011-03-27 Thread Torsten Becker
Torsten Becker torsten.bec...@gmail.com added the comment: I incorporated the changes as you suggested and added the text to the docs. Just out of curiosity, why are the docs repeated in email.util.rst when they are already in the docstrings? -- Added file:

[issue11632] difflib.unified_diff loses context

2011-03-27 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: 2.6 only gets security fixes now. -- nosy: +terry.reedy versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11632 ___

[issue10772] Several actions for argparse arguments missing from docs

2011-03-27 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- keywords: +easy nosy: +eric.araujo stage: - needs patch versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10772 ___

[issue11370] Fix distutils to carry configure's LIBS through to extension modules.

2011-03-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: This looks like a real bug that could affect other projects than US, so it would be nice to get a test and fix IMO. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11370

[issue11614] import __hello__ is broken in Python 3

2011-03-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I can see the message (“Hello world...”) in 2.4 to 2.7, but actually not in 3.x. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11614 ___

[issue11655] map() must not swallow exceptions from PyObject_GetIter

2011-03-27 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I agree with Ray. This is essentially a feature request which you say has already been implemented in Py 3 but which cannot go into Py2.7. Only fixes for bugs (discrepancies between doc and behavior) can go into 2.7. I suspect 2.6 and before

[issue11698] Improve repr for structseq objects to show named, but unindexed fields

2011-03-27 Thread Raymond Hettinger
New submission from Raymond Hettinger raymond.hettin...@gmail.com: The current __repr__ for structseq only shows the name/value pairs for the positional part and it ignores the other named fields. For example, os.stat(somefile) returns: posix.stat_result(st_mode=33277, st_ino=8468407,

[issue11690] Add communication FAQ to devguide

2011-03-27 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +brett.cannon, eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11690 ___ ___

[issue11687] distutils register does not work from the command line

2011-03-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for reporting the bug. Could you attach a text file containing a full transcript? If possible, create a small, new setup.py and run that (it will enable me to try to reproduce the problem). Could you give me the links you used? To

[issue11687] distutils register does not work from the command line

2011-03-27 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11687 ___ ___ Python-bugs-list mailing

[issue11685] possible SQL injection into db APIs via table names... sqlite3

2011-03-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Aren’t you supposed to use the DB API to get safe queries? http://docs.python.org/dev/library/sqlite3 -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11685

[issue6498] Py_Main() does not return on SystemExit

2011-03-27 Thread Mark Hammond
Mark Hammond skippy.hamm...@gmail.com added the comment: Isn't the only problem here that the docs refer to SystemError instead of SystemExit - eg 'raise SystemError(foo)' in an interactive session doesn't terminate the process at all (and I don't believe it should) whereas SystemExit

[issue11643] Use |version| instead of X.Y in the doc

2011-03-27 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: If the docs literally use X.Y, so that that can be grepped, then attaching a grep result would make this even easier for someone on Windows without grep. -- nosy: +terry.reedy ___ Python tracker

[issue7796] No way to find out if an object is an instance of a namedtuple

2011-03-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for working on this. I have some remarks: 1) Please post diff files here instead of using external sites. See http://docs.python.org/devguide/patch#preparation 2) The license you chose doesn’t allow the PSF to include it into Python,

[issue11643] Use |version| instead of X.Y in the doc

2011-03-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Yes, this was literal. grep result on 3.1: c-api/intro.rst:73:path and then use ``#include pythonX.Y/Python.h``; this will break on c-api/intro.rst:534:directory named :file:`lib/python{X.Y}` relative to the parent directory

[issue9694] argparse: Default Help Message Lists Required Args As Optional

2011-03-27 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- versions: +Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9694 ___ ___

  1   2   >