[issue9017] doctest option flag to enable/disable some chunk of doctests?

2010-12-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo stage: unit test needed - needs patch versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9017 ___

[issue10755] Add posix.fdlistdir

2010-12-22 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: What's the use case for this function? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10755 ___

[issue9085] Version number inconsistency in email package

2010-12-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: If there is no further discussion, I’d say the original bug is fixed anc this report should be closed. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9085

[issue8847] crash appending list and namedtuple

2010-12-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8847 ___ ___ Python-bugs-list

[issue10755] Add posix.fdlistdir

2010-12-22 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: When maintaining an fd to implement a per thread current directory, you can use it to get a list of files in the directory. For security reasons, instead of a named path, you can keep an fd to a directory so that if the path is changed

[issue8885] markupbase declaration errors aren't recoverable

2010-12-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo resolution: invalid - stage: - needs patch title: markerbase declaration errors aren't recoverable - markupbase declaration errors aren't recoverable versions: +Python 2.7 -Python 2.6

[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2010-12-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Do you want to work on a patch? -- nosy: +eric.araujo stage: - needs patch title: Method _sys_version() module Lib\platform.py does not parse correctly IronPython 2.x version - platform._sys_version does not parse correctly

[issue9074] subprocess closes standard file descriptors when it should not

2010-12-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- keywords: +needs review nosy: +astrand stage: - patch review title: [includes patch] subprocess module closes standard file descriptors when it should not - subprocess closes standard file descriptors when it should not versions: +Python

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2010-12-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo stage: - needs patch versions: +Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4489 ___

[issue9399] Provide a 'print' action for argparse

2010-12-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thinking again about that, what’s wrong with argparse replacing \n with spaces and doing its own line wrapping? -- versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org

[issue8754] ImportError: quote bad module name in message

2010-12-22 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I suppose it's not a good test, since your non-ascii name presumably was encoded in UTF-8, which is the encoding that PyUnicode_FromString uses. -- ___ Python tracker rep...@bugs.python.org

[issue4761] create Python wrappers for openat() and others

2010-12-22 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Reference counting is not always correct. For example, in unlinkat if (res 0) return posix_error(); Py_DECREF(opath); (return None) the DECREF should be before the error check. (Note that you can use the Py_RETURN_NONE

[issue4761] create Python wrappers for openat() and others

2010-12-22 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: New patch *should* have fixed up reference counting and version tags. I standardized all the error calls to posix_error. -- Added file: http://bugs.python.org/file20137/i4761_v4.patch ___

[issue10757] zipfile.write, arcname should be bytestring

2010-12-22 Thread Jacek Jabłoński
New submission from Jacek Jabłoński conexion2...@gmail.com: file = 'somefile.dat' filename = ółśąśółąś.dat zip = zipfile.ZipFile('archive.zip', 'w', zipfile.ZIP_DEFLATED) zip.write(file, filename) above produces very nasty filename in zip archive.

[issue10758] posix_access swallows all errors

2010-12-22 Thread Georg Brandl
New submission from Georg Brandl ge...@python.org: access(2) can return errnos that correspond to input errors or general system faults, such as EINVAL, EIO or ENOMEM. In this case, an exception should be raised instead of returning False. It is probably best to whitelist those errnos that

[issue4761] create Python wrappers for openat() and others

2010-12-22 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks for the update! Three more comments: * the new constants doc should also get a versionadded * faccessat should check for EBADF, EINVAL and ENOTDIR and raise an error if they are returned, since these are input errors Or, alternately,

[issue9990] PyMemoryView_FromObject alters the Py_buffer after calling PyObject_GetBuffer when ndim 1

2010-12-22 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Antoine, a couple of questions: (1) Is there documentation for the 'smalltable' field of the Py_buffer struct anywhere? What are the requirements for the exporter here? E.g., is it / should it be a requirement that shape, strides and

[issue4761] create Python wrappers for openat() and others

2010-12-22 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: This new patch has proper octal mode strings and another doc update. I'll leave faccessat until #10758 has been resolved. -- Added file: http://bugs.python.org/file20138/i4761_v5.patch ___

[issue9990] PyMemoryView_FromObject alters the Py_buffer after calling PyObject_GetBuffer when ndim 1

2010-12-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: (1) Is there documentation for the 'smalltable' field of the Py_buffer struct anywhere? What are the requirements for the exporter here? No, and no particular requirements AFAIR. It is a piece of internal storage aimed at avoiding the nagging

[issue9085] Version number inconsistency in email package

2010-12-22 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: It's too late to make any further changes in version numbers for 2.x. Sorry this slipped by me. -- status: open - closed ___ Python tracker rep...@bugs.python.org

[issue10759] HTMLParser.unescape() cannot handle HTML entities with incorrect syntax (e.g. #hearts; )

2010-12-22 Thread Martin Potthast
New submission from Martin Potthast martin.potth...@googlemail.com: The title says it all; try the minimal example. -- components: Library (Lib) files: parser-fail.py messages: 124506 nosy: Martin.Potthast priority: normal severity: normal status: open title: HTMLParser.unescape()

[issue10759] HTMLParser.unescape() fails on HTML entities with incorrect syntax (e.g. #hearts; )

2010-12-22 Thread Martin Potthast
Changes by Martin Potthast martin.potth...@googlemail.com: -- title: HTMLParser.unescape() cannot handle HTML entities with incorrect syntax (e.g. #hearts;) - HTMLParser.unescape() fails on HTML entities with incorrect syntax (e.g. #hearts;) ___

[issue10759] HTMLParser.unescape() fails on HTML entities with incorrect syntax (e.g. #hearts; )

2010-12-22 Thread Martin Potthast
Martin Potthast martin.potth...@googlemail.com added the comment: I'd suggest to better verify the input and return such strings unchanged. -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10759

[issue10576] Add a progress callback to gcmodule

2010-12-22 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Uh oh. I forgot about this and there now we have passed beta 2. Didn't anyone want to review the patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10576

[issue9399] Provide a 'print' action for argparse

2010-12-22 Thread Dennis Malcorps
Dennis Malcorps dennis.malco...@googlemail.com added the comment: I totally forgot about this patch, sorry... Due to university and another python project I am working on I didn't find the time to look at the test suite. I would really appreciate it if someone else could do this ;-) Anyway, I

[issue10758] posix_access swallows all errors

2010-12-22 Thread Ross Lagerwall
Changes by Ross Lagerwall rosslagerw...@gmail.com: -- nosy: +rosslagerwall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10758 ___ ___

[issue10759] HTMLParser.unescape() fails on HTML entities with incorrect syntax (e.g. #hearts; )

2010-12-22 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Leaving the input unchanged does seem to be what browsers do. (Issue 7626 has some info on browser behaviour with invalid entity refs.) Rather than pre-validating the input, I think the exception can be caught and the putative entity

[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2010-12-22 Thread Frederic Torres
Frederic Torres fredericaltor...@gmail.com added the comment: Eric, Yes I like to. But I am not familiar how to submit a patch. The file that need to be patched is C:\Program Files (x86)\IronPython 2.6\Lib\platform.py for IronPython 2.6. I thought this file was maintained by Marc-Andre Lemburg

[issue10759] HTMLParser.unescape() fails on HTML entities with incorrect syntax (e.g. #hearts; )

2010-12-22 Thread Martin Potthast
Martin Potthast martin.potth...@googlemail.com added the comment: Agreed. Here's a patch for HTMLParser. That was easy enough. With regard to tests, there seems to be already one called test_malformatted_charref in test_htmlparser.py. However, the test tests the whole parser and not only

[issue10759] HTMLParser.unescape() fails on HTML entities with incorrect syntax (e.g. #hearts; )

2010-12-22 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Ah, as an undocumented internal interface it may in fact not be appropriate to make this change. Or it may be. I'll have to look at the code in more detail to figure that out, or perhaps Senthil will. (It may even be time to document

[issue10760] tarfile doesn't handle sysfs well

2010-12-22 Thread Yoni Tsafir
New submission from Yoni Tsafir yonix85+pyt...@gmail.com: When I try to add a special file from sys, e.g.: /sys/class/scsi_host/host0/cmd_per_lun (which is reported of size 4096 but actually reading it will return only several bytes of a result), I get the following exception: Traceback (most

[issue9090] Error code 10035 calling socket.recv() on a socket with a timeout (WSAEWOULDBLOCK - A non-blocking socket operation could not be completed immediately)

2010-12-22 Thread Eric Hohenstein
Eric Hohenstein ehohenst...@imvu.com added the comment: I have ported the changes related to this problem from the 3.2 branch to the 2.6 version of socketmodule.c. The changes are attached as a diff from Python 2.6.2. The changes apply to all platforms but I've only tested them on Windows.

[issue10759] HTMLParser.unescape() fails on HTML entities with incorrect syntax (e.g. #hearts; )

2010-12-22 Thread Martin Potthast
Martin Potthast martin.potth...@googlemail.com added the comment: Why not simply remove the additional check in line 168 and leave the responsibility to check the validity of its input to the unescape function (be it explicitly or, like now, lazily). That way, the code changes are minimal,

[issue10758] posix_access swallows all errors

2010-12-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The list of errnos indicating missing access seems open-ended. Things such as: [ENAMETOOLONG] The length of a component of a pathname is longer than {NAME_MAX}. [ENOENT] A component of path does not name an existing file or path is an

[issue10737] test_concurrent_futures failure on Windows

2010-12-22 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10737 ___ ___ Python-bugs-list

[issue10757] zipfile.write, arcname should be bytestring

2010-12-22 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This is not a bug. Your code that produces very nasty filename is the right one - the file name is actually the one you asked for. The second code is also behaving correctly: filename already *is* a bytestring, calling .encode for it is

[issue10757] zipfile.write, arcname should be bytestring

2010-12-22 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Oops, I take this back - I didn't notice you were using Python 3.1. In any case, your first code is correct. What you get is the best you can ask for. That the second case fails is indeed a bug. -- resolution: invalid - status:

[issue10758] posix_access swallows all errors

2010-12-22 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I don't think we can change this for the maintenance branches. The code behaves according to the documentation: access(path, mode) - True if granted, False otherwise False otherwise is really meant that way: otherwise. The specific

[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2010-12-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: This is the tracker for CPython, not IronPython, but I assume they synchronize their standard modules with ours, so I think this bug should be fixed here (not in 2.6 though, this old version only gets security fixes). Guidelines for patches:

[issue10296] ctypes catches BreakPoint error on windows 32

2010-12-22 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10296 ___ ___ Python-bugs-list mailing

Re: [issue10587] Document the meaning of str methods

2010-12-22 Thread Senthil Kumaran
On Tue, Dec 14, 2010 at 03:42:17PM +, Alexander Belopolsky wrote: I am attaching a patch that expands the documentation of isalnum, isalpha, isdecimal, isdigit, isnumeric, islower, isupper, and isspace. I did not change isidentifier or isprintable because their ... redundant checks for

[issue10761] tarfile.extractall fails to overwrite symlinks

2010-12-22 Thread Sridhar Ratnakumar
New submission from Sridhar Ratnakumar sridh...@activestate.com: tarfile.extractall overwrites normal files and directories, yet it fails to overwrite symlinks: [..] tf.extractall() File /opt/ActivePython-2.7/lib/python2.7/tarfile.py, line 2046, in extractall self.extract(tarinfo,

[issue10730] add .svgz to mimetypes.suffix_map and .svg to types_map

2010-12-22 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Patch attached. The instructions, after editing the url, are # Before adding new types, make sure they are either registered with IANA, # at http://www.iana.org/assignments/media-types # or extensions, i.e. using the x- prefix

[issue10730] add .svgz to mimetypes.suffix_map and .svg to types_map

2010-12-22 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10730 ___ ___

[issue8885] markupbase declaration errors aren't recoverable

2010-12-22 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I verified the looping behavior of the testcase in both 2.7.1 and, with minor mods, 3.1.3 and 3.2b1, so this is a valid issue. The HTMLParcer docs (2.7, 3.2) do not mention the .error method. The default is def error(self, message):

[issue7511] msvc9compiler.py: ValueError: [u'path']

2010-12-22 Thread Thorsten Behrens
Thorsten Behrens sbehr...@gmx.li added the comment: I can test this for 3.1, as all I have is the Express version of VC++. If you could point me towards a library that will work with 3.1 and has C components, that'll make the testing a lot easier. pycrypto and setuptools, the two libs

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Version 11 of my patch: - Disable the fault handler (and displaying the backtrace on a fatal error) by default - The fault handle can be enabled by setting the PYTHONFAULTHANDLER environment variable or using -X faulthandler

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file20102/segfault_handler-9.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8863 ___

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file20113/segfault_handler-10.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8863 ___

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8863 ___ ___

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Stephen, I wonder if you would have comments on this. As far as I know emacs installs SEGV handlers similar to the ones proposed here. How well do they work? Does it really help users to produce meaningful bug

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: On 12/22/2010 8:52 PM, STINNER Victor wrote: Amaury asked for a sys.setsegfaultenabled() option: I think that the command line option and the environment variable are enough. I really think you should think of it as a choice the developer of

[issue10254] unicodedata.normalize('NFC', s) regression

2010-12-22 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Committed to py3k in revision 87442. -- versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10254

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Wed, Dec 22, 2010 at 9:27 PM, Scott Dial rep...@bugs.python.org wrote: Scott Dial sc...@scottdial.com added the comment: On 12/22/2010 8:52 PM, STINNER Victor wrote: Amaury asked for a sys.setsegfaultenabled()

[issue10587] Document the meaning of str methods

2010-12-22 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Committed r87443 (3.2) and r87444 (3.1). -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Does the latest patch address the GIL/multithreading issues? Yes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8863 ___

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Le jeudi 23 décembre 2010 à 02:27 +, Scott Dial a écrit : Scott Dial sc...@scottdial.com added the comment: On 12/22/2010 8:52 PM, STINNER Victor wrote: Amaury asked for a sys.setsegfaultenabled() option: I think that the

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Le jeudi 23 décembre 2010 à 02:27 +, Scott Dial a écrit : Scott Dial sc...@scottdial.com added the comment: On 12/22/2010 8:52 PM, STINNER Victor wrote: Amaury asked for a sys.setsegfaultenabled() option: I think that the

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Le jeudi 23 décembre 2010 à 02:45 +, Alexander Belopolsky a écrit : As I suggested on python-dev, I also think this belongs to a separate module rather than core or sys. Why do you want to move it outside Python core? It is

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-22 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: On 12/22/2010 10:35 PM, STINNER Victor wrote: Why do you think so? Can you give me an use case of sys.setsegfaultenabled()? To feed back your own argument on python-dev: How do you know that you application will crash? The idea is to give

[issue10755] Add posix.fdlistdir

2010-12-22 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Hi, Attached is a slightly updated patch that improves doc and changes fdlistdir to always return strings, not bytes. -- Added file: http://bugs.python.org/file20145/i10755.patch ___ Python