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

2010-12-22 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo stage: unit test needed -> needs patch versions: +Python 3.3 -Python 3.2 ___ Python tracker ___

[issue10755] Add posix.fdlistdir

2010-12-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: What's the use case for this function? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue9085] Version number inconsistency in email package

2010-12-22 Thread Éric Araujo
Éric Araujo 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 __

[issue8847] crash appending list and namedtuple

2010-12-22 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue10755] Add posix.fdlistdir

2010-12-22 Thread Ross Lagerwall
Ross Lagerwall 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 externally while perfor

[issue8885] markupbase declaration errors aren't recoverable

2010-12-22 Thread Éric Araujo
Changes by Éric Araujo : -- 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 ___ Python tra

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

2010-12-22 Thread Éric Araujo
Éric Araujo 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 IronPython 2.x version

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

2010-12-22 Thread Éric Araujo
Changes by Éric Araujo : -- 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 2.7, Python 3.1, P

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

2010-12-22 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo stage: -> needs patch versions: +Python 2.5 ___ Python tracker ___ ___ Python-bugs-list

[issue9399] Provide a 'print' action for argparse

2010-12-22 Thread Éric Araujo
Éric Araujo 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 __

[issue8754] ImportError: quote bad module name in message

2010-12-22 Thread Georg Brandl
Georg Brandl 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 __

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

2010-12-22 Thread Georg Brandl
Georg Brandl 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 macro to save INCR

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

2010-12-22 Thread Ross Lagerwall
Ross Lagerwall 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 ___ Python tracker

[issue10757] zipfile.write, arcname should be bytestring

2010-12-22 Thread Jacek Jabłoński
New submission from Jacek Jabłoński : 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. * file =

[issue10758] posix_access swallows all errors

2010-12-22 Thread Georg Brandl
New submission from Georg Brandl : 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 indicate missing a

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

2010-12-22 Thread Georg Brandl
Georg Brandl 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, a range of errno

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

2010-12-22 Thread Mark Dickinson
Mark Dickinson 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 suboffsets are all NULL

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

2010-12-22 Thread Ross Lagerwall
Ross Lagerwall 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 ___ Python tracker

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

2010-12-22 Thread Antoine Pitrou
Antoine Pitrou 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 allocation an

[issue9085] Version number inconsistency in email package

2010-12-22 Thread R. David Murray
R. David Murray 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

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

2010-12-22 Thread Martin Potthast
New submission from Martin Potthast : 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() cannot handle HTML entities with inc

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

2010-12-22 Thread Martin Potthast
Changes by Martin Potthast : -- 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;) ___ Python tracker

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

2010-12-22 Thread Martin Potthast
Martin Potthast added the comment: I'd suggest to better verify the input and return such strings unchanged. -- type: -> behavior ___ Python tracker ___ ___

[issue10576] Add a progress callback to gcmodule

2010-12-22 Thread Kristján Valur Jónsson
Kristján Valur Jónsson 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 ___

[issue9399] Provide a 'print' action for argparse

2010-12-22 Thread Dennis Malcorps
Dennis Malcorps 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 added the changes proposed by

[issue10758] posix_access swallows all errors

2010-12-22 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +rosslagerwall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

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

2010-12-22 Thread R. David Murray
R. David Murray 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 returned unchanged, sim

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

2010-12-22 Thread Frederic Torres
Frederic Torres 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 wrote: > > Éric Araujo

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

2010-12-22 Thread Martin Potthast
Martin Potthast 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 HTMLParser.unescape(). At the same

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

2010-12-22 Thread R. David Murray
R. David Murray 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 the function, we'll s

[issue10760] tarfile doesn't handle sysfs well

2010-12-22 Thread Yoni Tsafir
New submission from Yoni Tsafir : 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 recent call last): Fil

[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 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. The _PyTime_gettimeofda

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

2010-12-22 Thread Martin Potthast
Martin Potthast 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, the existing test covers the curr

[issue10758] posix_access swallows all errors

2010-12-22 Thread Antoine Pitrou
Antoine Pitrou 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 empty string. [EN

[issue10737] test_concurrent_futures failure on Windows

2010-12-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue10757] zipfile.write, arcname should be bytestring

2010-12-22 Thread Martin v . Löwis
Martin v. Löwis 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 meaningless. -

[issue10757] zipfile.write, arcname should be bytestring

2010-12-22 Thread Martin v . Löwis
Martin v. Löwis 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: closed -> open ___

[issue10758] posix_access swallows all errors

2010-12-22 Thread Martin v . Löwis
Martin v. Löwis 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 condition is indee

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

2010-12-22 Thread Éric Araujo
Éric Araujo 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: http://www.python.or

[issue10296] ctypes catches BreakPoint error on windows 32

2010-12-22 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +theller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

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 : 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, path) File "/opt/Act

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

2010-12-22 Thread Terry J. Reedy
Terry J. Reedy 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 Since there is no reg

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

2010-12-22 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue8885] markupbase declaration errors aren't recoverable

2010-12-22 Thread Terry J. Reedy
Terry J. Reedy 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): raise HTMLParse

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

2010-12-22 Thread Thorsten Behrens
Thorsten Behrens 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 mentioned in this issue

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

2010-12-22 Thread STINNER Victor
STINNER Victor 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" command line option (instead of

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

2010-12-22 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file20102/segfault_handler-9.patch ___ Python tracker ___ ___ Python-bugs-list

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

2010-12-22 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file20113/segfault_handler-10.patch ___ Python tracker ___ ___ Python-bugs-lis

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

2010-12-22 Thread STINNER Victor
Changes by STINNER Victor : -- versions: +Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

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

2010-12-22 Thread Alexander Belopolsky
Alexander Belopolsky 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 reports? -- nosy: +belopolsky,

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

2010-12-22 Thread Scott Dial
Scott Dial 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 an application mak

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

2010-12-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed to py3k in revision 87442. -- versions: -Python 3.2 ___ Python tracker ___ ___ Pyt

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

2010-12-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Dec 22, 2010 at 9:27 PM, Scott Dial wrote: > > Scott Dial 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 va

[issue10587] Document the meaning of str methods

2010-12-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed r87443 (3.2) and r87444 (3.1). -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker __

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

2010-12-22 Thread STINNER Victor
STINNER Victor added the comment: > Does the latest patch address the GIL/multithreading issues? Yes. -- ___ Python tracker ___ ___ P

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

2010-12-22 Thread STINNER Victor
STINNER Victor added the comment: Le jeudi 23 décembre 2010 à 02:27 +, Scott Dial a écrit : > Scott Dial 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

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

2010-12-22 Thread STINNER Victor
STINNER Victor added the comment: Le jeudi 23 décembre 2010 à 02:27 +, Scott Dial a écrit : > Scott Dial 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

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

2010-12-22 Thread STINNER Victor
STINNER Victor 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 very dependent of Python inte

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

2010-12-22 Thread Scott Dial
Scott Dial 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 > informations to t

[issue10755] Add posix.fdlistdir

2010-12-22 Thread Ross Lagerwall
Ross Lagerwall 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 tracker