[issue12969] Command 'open(0, "wb").close()' cause crash of Python interpreter [interactive mode]

2011-09-12 Thread Jiří Kučera
New submission from Jiří Kučera : Invoking the `close' method of `_io.BufferedWriter' instance created by `open(0,"wb")' command cause the Python interpreter crash. Python interpreter info: mode: interactive version info: Python 3.2.1 (default, Jul 10 2011, 21:51:15) [MSC v.1500 32 bit (In

[issue12967] AttributeError distutils\log.py

2011-09-12 Thread ben
New submission from ben : AttributeErrors on log.py in the distutils directory import sys stream = sys.stdout if stream.errors == 'strict': pass'=> this will raise an AttributeError' -- assignee: tarek components: Distutils files: log.py messages: 143949 nosy: Ben.thelen, eric.araujo, t

[issue12961] unlabelled balls in boxes

2011-09-12 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue1172711] long long support for array module

2011-09-12 Thread Meador Inge
Meador Inge added the comment: import array, struct a = array.array('L', [1,2,3]) class T(object): > ...     def __init__(self, value): > ...         self.value = value > ...     def __int__(self): > ...          return self.value > ... a = array.array('L', [1,2,3]) stru

[issue6560] socket sendmsg(), recvmsg() methods

2011-09-12 Thread Nick Coghlan
Nick Coghlan added the comment: The feature patch for sendmsg/recvmsg support came with a swathe of new tests, and the failures are in those new tests rather than anything breaking in the old ones. As Charles-François noted though, it doesn't look like the feature implementation itself is do

[issue12913] Add a debugging howto

2011-09-12 Thread Ezio Melotti
Ezio Melotti added the comment: > Hadn’t though about coverage. Will mention it and add a link > to the devguide part that talks about it. Is devguide/coverage.html#using-coverage-py generic enough? We don't have to duplicate the coverage documentation though, mentioning the tool and what it

[issue12938] html.escape docstring does not mention single quotes (')

2011-09-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset bc5b96c92770 by Senthil Kumaran in branch '3.2': Fix issue12938 - Update the docstring of html.escape. Include the information on single quote. http://hg.python.org/cpython/rev/bc5b96c92770 -- nosy: +python-dev ___

[issue12938] html.escape docstring does not mention single quotes (')

2011-09-12 Thread Senthil Kumaran
Senthil Kumaran added the comment: The single quote escape was added due to Issue9061 and Issue2830. Since it was included deliberately due to above raised issues, it is best to document it, instead of removing it. -- ___ Python tracker

[issue12938] html.escape docstring does not mention single quotes (')

2011-09-12 Thread Senthil Kumaran
Senthil Kumaran added the comment: Yes, single quotes should not escaped in the CGI escape. We should remove that from the table. -- nosy: +orsenthil ___ Python tracker ___ ___

[issue12924] Missing call to quote_plus() in test_urllib.test_default_quoting()

2011-09-12 Thread Senthil Kumaran
Senthil Kumaran added the comment: jon, thanks for the bug report. Fixed and closed in all the branches. -- ___ Python tracker ___ __

[issue12924] Missing call to quote_plus() in test_urllib.test_default_quoting()

2011-09-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset e25526865339 by Senthil Kumaran in branch 'default': merge from 3.2 - Add the missing quote_plus call. Fix closes Issue12924 http://hg.python.org/cpython/rev/e25526865339 New changeset e8d8eb9e05fd by Senthil Kumaran in branch '2.7': Port the fix f

[issue12946] PyModule_GetDict() claims it can never fail, but it can

2011-09-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The path with PyDict_New() is never taken, because PyModule_New already fills md_dict. -- nosy: +amaury.forgeotdarc ___ Python tracker _

[issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced

2011-09-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Sep 12, 2011 at 4:36 PM, anatoly techtonik wrote: .. > 5. Mention the fact: By default all objects are "naive", by definition, > because they don't have any > TZ information, and there are no classes in stdlib that provide this info > (tzclass i

[issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced

2011-09-12 Thread anatoly techtonik
anatoly techtonik added the comment: The point was: 1. Create an anchor to definition of "naive" object 2. Create an anchor to definition of "aware" object 3. Make definitions stand out from the inline text 4. Create cross-references for "naive" and "aware" keywords in text that lead directly t

[issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced

2011-09-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Sep 12, 2011 at 4:30 PM, Jakob Malm wrote: .. > I created a patch with the revised wording. Your patch seems to reflow the entire paragraph which makes it hard to review and if applied will appear as a bigger change than it is. Can you regenerat

[issue12958] test_socket failures on Mac OS X

2011-09-12 Thread David Watson
Changes by David Watson : -- nosy: +baikie ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced

2011-09-12 Thread Jakob Malm
Jakob Malm added the comment: I created a patch with the revised wording. -- keywords: +patch Added file: http://bugs.python.org/file23135/datetime_doc.patch ___ Python tracker _

[issue12961] unlabelled balls in boxes

2011-09-12 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: Here's an example of a problem from an entirely different domain: An error control coding scheme can correct up to 3 errors in the header of a packet and up to one error in the body of a packet. A given message is divided into four consecutive packets. Find

[issue1172711] long long support for array module

2011-09-12 Thread Stefan Krah
Stefan Krah added the comment: I made the observation on Rietveld that the following code is never executed by the test suite. The same applies to similar existing passages in arraymodule.c: http://bugs.python.org/review/1172711/diff/3310/10310#newcode394 Meador correctly pointed out that the

[issue6560] socket sendmsg(), recvmsg() methods

2011-09-12 Thread Bill Janssen
Bill Janssen added the comment: I'm guessing these things are due to interaction with some Apple security update, as the buildbots were working well 8 months ago. Bill On Wed, Sep 7, 2011 at 4:01 PM, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > If Bill gets a chance to investi

[issue12483] CThunkObject_dealloc should call PyObject_GC_UnTrack?

2011-09-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Thanks for your help! I fear they are many other places like this one in CPython code. -- ___ Python tracker ___ ___

[issue12483] CThunkObject_dealloc should call PyObject_GC_UnTrack?

2011-09-12 Thread Meador Inge
Meador Inge added the comment: Heh, I was just about to upload another patch with your test case. Thanks for committing this Amaury. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced

2011-09-12 Thread Jakob Malm
Jakob Malm added the comment: I agree with Alexander -- I think the current documentation is sufficient to describe 'naive' and 'aware' date and time objects. The sentence "There are two kinds of date and time objects: “naive” and “aware”." is perhaps a bit unfortunate, however. It appears th

[issue12483] CThunkObject_dealloc should call PyObject_GC_UnTrack?

2011-09-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset eb9f566fd8db by Amaury Forgeot d'Arc in branch '2.7': Issue #12483: ctypes: Fix a crash when the destruction of a callback http://hg.python.org/cpython/rev/eb9f566fd8db New changeset eae8e4ab0455 by Amaury Forgeot d'Arc in branch '3.2': Issue #1248

[issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

2011-09-12 Thread Paulie Pena
New submission from Paulie Pena : Even though RFC 6265's cookie-value's cookie-octet definition says that whitespace characters are not allowed (see http://tools.ietf.org/html/rfc6265), there are non-compliant web sites that send cookie values with newlines. cookielib.LWPCookieJar will save t

[issue12963] PyLong_AsSize_t returns (unsigned long)-1

2011-09-12 Thread Stefan Krah
Stefan Krah added the comment: > Yep, clearly a bug. Please fix! Done, thanks for reviewing. Victor, I don't think we need a unit test for this. I plan to go over some modules with gcov in the future, and I'll include longobject.c. -- resolution: -> fixed status: open -> closed __

[issue12939] Add new io.FileIO using the native Windows API

2011-09-12 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- nosy: +santa4nt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue12301] Use :role:`sys.thing` instead of ``sys.thing`` throughout

2011-09-12 Thread Georg Brandl
Georg Brandl added the comment: I agree. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue12913] Add a debugging howto

2011-09-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: More time: read outline, good start. On syntax errors, IDLE put up message box and OK returns to window with apparent error hi-lited and cursor just after. -- ___ Python tracker

[issue7201] double Endian problem and more on arm

2011-09-12 Thread Meador Inge
Meador Inge added the comment: On Mon, Sep 12, 2011 at 7:10 AM, Mark Dickinson wrote: > Mark Dickinson added the comment: > > I believe the problem is specific to machines still using the old ABI > ('OABI').  Which ABI was being used on your test machine? I tested the new ABI (armel). I wi

[issue12301] Use :role:`sys.thing` instead of ``sys.thing`` throughout

2011-09-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: It would be best to think about each of the new links individually rather than making blanket changes. The new links need to have relevance and add value to the topic; otherwise, they are just distractions from the more relevant links that had been plac

[issue12965] longobject: documentation improvements

2011-09-12 Thread Stefan Krah
Changes by Stefan Krah : -- assignee: docs@python -> mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue12965] longobject: documentation improvements

2011-09-12 Thread Stefan Krah
New submission from Stefan Krah : I think the integer objects documentation could be clearer on a couple of points: - Despite being listed under "Concrete Objects Layer", some functions implicitly accept anything with an __int__() method. Currently only the PyLong_AsLong() documentatio

[issue12913] Add a debugging howto

2011-09-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Binary search with print is done manually. If error not obvious from quick read, in a 20 line function, add print around line 10. If ok there, look down and add print later in function. If not, look up and add print earlier in function. This is not exact at a

[issue12961] unlabelled balls in boxes

2011-09-12 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: Hello Mark, This is a fair question. Suppose that I have three boxes with capacity limits of 3, 2, and 1, and that there are three balls in total. Two of the possible distributions are the following: 2, 0, 1 2, 1, 0 Capacity limits of the individual box

[issue9322] Don’t fail silently if ext_modules use absolute paths

2011-09-12 Thread Éric Araujo
Éric Araujo added the comment: I started to work on a simple patch but it makes one of our tests fail. It uses absolute paths because it needs to change directory and check that get_outputs works. -- dependencies: +distutils build_ext.get_outputs returns wrong result keywords: +patch

[issue5977] distutils build_ext.get_outputs returns wrong result

2011-09-12 Thread Éric Araujo
Éric Araujo added the comment: The fix you committed uses an absolute path for the C sources, which is invalid: sources should contain relative paths only. -- versions: -Python 3.1 ___ Python tracker

[issue8933] Invalid detection of metadata version

2011-09-12 Thread Éric Araujo
Éric Araujo added the comment: It was very easy to verify your patch: PEP 314 lists the new fields. For packaging (distutils2), I thought the fix would be less easy: I believed that all fields in _314_MARKERS would cause i conflict if used together with 345 fields, but as it turns out they do

[issue12483] CThunkObject_dealloc should call PyObject_GC_UnTrack?

2011-09-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I was going to say that the patch has no visible effect, since PyObject_GC_Del() calls something which has the same effect as PyObject_GC_Untrack... But the following code crashes the interpreter! And of course the patch fixes it... import ctypes, gc

[issue12918] New module for terminal utilities

2011-09-12 Thread Éric Araujo
Éric Araujo added the comment: Copied from msg143857 (Raymond Hettinger): > Resist the urge to fatten APIs until you're sure that: > * they are needed > * they are well developed (many internal utils fail this test) > * they are worth the extra time it takes to learn what is in a module (adding

[issue12917] Make visiblename and allmethods functions public

2011-09-12 Thread Éric Araujo
Éric Araujo added the comment: A precision: > I think generic functions would be a nice way to do this. I meant: a nice way to experiment this *outside of the stdlib*. We don’t have official generic function yet, so I’ll wait to see if pprint gets rewritten and/or if we get a generic functio

[issue12917] Make visiblename and allmethods functions public

2011-09-12 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12917] Make visiblename and allmethods functions public

2011-09-12 Thread Éric Araujo
Éric Araujo added the comment: Copied from msg143857: > There are a lot of little internal routines in the standard library > that aren't sufficiently fit to be exposed (perhaps a little too > ad-hoc or special purpose, perhaps the API isn't sufficiently > general, perhaps the routines rely on

[issue12299] Stop documenting functions added by site as builtins

2011-09-12 Thread Éric Araujo
Éric Araujo added the comment: Agreed. -- resolution: -> works for me stage: -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue12915] Add inspect.locate and inspect.resolve

2011-09-12 Thread Éric Araujo
Éric Araujo added the comment: Sorry if I was unclear; the functions work with a dotted name as a string and resolve it to an object. __import__ works with module, whereas this kind of functions work with mod.name, pkg.mod.name.attr, etc., that is, they combine import and getattr. -

[issue12841] Incorrect tarfile.py extraction

2011-09-12 Thread Éric Araujo
Éric Araujo added the comment: I understand. Unit tests can work with file permissions, ownership and links, but they can’t create different filesystems or ask for superuser rights. test_shutil contains a few tests that purport to test cross-filesystems usage but may or may not actually do

[issue8933] Invalid detection of metadata version

2011-09-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4b72d56cf42f by Éric Araujo in branch '2.7': Fix determination of Metadata version (#8933). Patch by Filip Gruszczyński. http://hg.python.org/cpython/rev/4b72d56cf42f -- ___ Python tracker

[issue12913] Add a debugging howto

2011-09-12 Thread Éric Araujo
Éric Araujo added the comment: [Terry] > If you write 'How to debug Python code' rather than just "How to use pdb", That is my intention. > I would start with the use of print statements You, Ezio and I concur :) > and binary search. I’m not familiar with that term. Is it hg bisect? > Have s

[issue8933] Invalid detection of metadata version

2011-09-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset e5c1de856828 by Éric Araujo in branch '3.2': Fix determination of Metadata version (#8933). Patch by Filip Gruszczyński. http://hg.python.org/cpython/rev/e5c1de856828 New changeset 70298cdc48cd by Éric Araujo in branch 'default': Merge fix for #89

[issue11715] Building Python on multiarch Debian and Ubuntu

2011-09-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 12, 2011, at 12:34 PM, Nick Coghlan wrote: >It wouldn't surprise me at all if the laptop's links were a little off - I >started with a Kubuntu image off VMWare's site quite some time ago, then >dist-upgraded it through a couple of releases as they came

[issue12301] Use :role:`sys.thing` instead of ``sys.thing`` throughout

2011-09-12 Thread Éric Araujo
Éric Araujo added the comment: Thanks Bryce, I will start from your patch. (BTW, you used func instead of data for sys.stdout.) -- stage: needs patch -> patch review title: Use :data:`sys.thing` instead of ``sys.thing`` throughout -> Use :role:`sys.thing` instead of ``sys.thing`` thr

[issue12914] Add cram function to textwrap

2011-09-12 Thread Éric Araujo
Éric Araujo added the comment: > if the API were to be expanded, perhaps it should be as a part of a > focuse[d], thoughtful effort to provide a more generic set of text > formatting transformations perhaps modeled on deep experiences with > similar modules in other languages. (as opposed to pie

[issue12963] PyLong_AsSize_t returns (unsigned long)-1

2011-09-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset d14f717b5e3d by Stefan Krah in branch '3.2': Issue #12963: PyLong_AsSize_t() now returns (size_t)-1 in all error cases. http://hg.python.org/cpython/rev/d14f717b5e3d New changeset c91900e4e805 by Stefan Krah in branch 'default': Merge fix for issue

[issue12964] Two improvements for the locale aliasing engine

2011-09-12 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo, lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue12964] Two improvements for the locale aliasing engine

2011-09-12 Thread Sinisa Segvic
New submission from Sinisa Segvic : Hi, There appears to be some space for improvement regarding the stable implementation of the Python locale aliasing engine. Sometimes, one wishes to be able to override the default system locale. For instance, it would be nice that a program supposed to sort

[issue12963] PyLong_AsSize_t returns (unsigned long)-1

2011-09-12 Thread STINNER Victor
STINNER Victor added the comment: I suppose that you can test if the bug is tested on Windows 64 bits, where sizeof(long)=32 bits, whereas sizeof(size_t) is 64 bits. -- nosy: +haypo ___ Python tracker ___

[issue12963] PyLong_AsSize_t returns (unsigned long)-1

2011-09-12 Thread Mark Dickinson
Mark Dickinson added the comment: Yep, clearly a bug. Please fix! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue11715] Building Python on multiarch Debian and Ubuntu

2011-09-12 Thread Nick Coghlan
Nick Coghlan added the comment: It wouldn't surprise me at all if the laptop's links were a little off - I started with a Kubuntu image off VMWare's site quite some time ago, then dist-upgraded it through a couple of releases as they came out. -- _

[issue11457] Expose nanosecond precision from system calls

2011-09-12 Thread Mark Dickinson
Mark Dickinson added the comment: > I propose adding the Decimal fields "ctime", "atime", and "mtime" to the > > named tuple returned by os.stat(). That would be an interesting precedent: I don't think there are many (any?) other places outside the 'decimal' module that deal with Decimal obj

[issue12961] unlabelled balls in boxes

2011-09-12 Thread Mark Dickinson
Mark Dickinson added the comment: > "unlabelled balls in labelled boxes with capacity limits" Out of curiosity, what was the application that you needed this for? This one feels a bit too specialized to me to be worth adding to the itertools library; I see itertools more as providing a colle

[issue12963] PyLong_AsSize_t returns (unsigned long)-1

2011-09-12 Thread Stefan Krah
New submission from Stefan Krah : In one of the error branches PyLong_AsSize_t() returns (unsigned long)-1 instead of (size_t)-1. -- components: Interpreter Core files: pylong_as_size_t.diff keywords: patch messages: 143896 nosy: mark.dickinson, skrah priority: normal severity: normal st

[issue12961] unlabelled balls in boxes

2011-09-12 Thread Mark Dickinson
Mark Dickinson added the comment: > "unlabelled balls in unlabelled boxes with capacity limits" What does this mean? If the boxes are unlabelled, how can they have individual capacity limits? Or do you mean just a single limit that applies to all boxes? -- nosy: +mark.dickinson ___

[issue7201] double Endian problem and more on arm

2011-09-12 Thread Mark Dickinson
Mark Dickinson added the comment: > I ran the ctypes tests on Debian GNU/Linux 5.0.8 (lenny) on an ARMv5tejl > Versatile kernel and everything passed. I believe the problem is specific to machines still using the old ABI ('OABI'). Which ABI was being used on your test machine? (Not sure how

[issue11715] Building Python on multiarch Debian and Ubuntu

2011-09-12 Thread Christian Heimes
Christian Heimes added the comment: Update: It turns out that zlib1g-dev adds a symlink from /usr/lib/x86_64-linux-gnu/libz.so to /lib/x86_64-linux-gnu/libz.so.1 . $ locate libz. /lib/x86_64-linux-gnu/libz.so.1 /lib/x86_64-linux-gnu/libz.so.1.2.3.4 /usr/lib/x86_64-linux-gnu/libz.a /usr/lib/x8

[issue11715] Building Python on multiarch Debian and Ubuntu

2011-09-12 Thread Christian Heimes
Christian Heimes added the comment: Hey Nick and Barry, the fix in http://hg.python.org/cpython/rev/bd0f73a9538e isn't sufficient. You have added /usr/lib/MULTIARCH and /usr/include/MULTIARCH but you forgot to add /lib/MULTIARCH. On my system zlib is installed at /lib/x86_64-linux-gnu/libz.so

[issue12945] ctypes works incorrectly with _swappedbytes_ = 1

2011-09-12 Thread Pavel Boldin
Pavel Boldin added the comment: We have raw data packages from some tools. These packages contains bitfields, arrays, simple data and so on. We want to parse them into Python objects (structures) for analysis and storage. I tried to use ctypes, but now I wrote myself implementation of raw pa

[issue12936] armv5tejl: random segfaults in getaddrinfo()

2011-09-12 Thread Stefan Krah
Stefan Krah added the comment: STINNER Victor wrote: > > Traceback with faulthandler disabled: ... > > How did you disabled faulthandler? That was a run with all faulthandler references removed from regrtest.py. But as I said in my previous mail, I also did a run using e91ad9669c08 but witho

[issue10898] posixmodule.c redefines FSTAT

2011-09-12 Thread Alan Hourihane
Changes by Alan Hourihane : -- resolution: accepted -> remind ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue12881] ctypes: segfault with large structure field names

2011-09-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Note that there is at least one other place where alloca() is used with potentially large values: the POINTER() function in callproc.c. Also, PyUnicode_FromFormat could be used instead of sprintf. -- ___ Pytho

[issue12962] TitledHelpFormatter and IndentedHelpFormatter are not documented

2011-09-12 Thread anatoly techtonik
New submission from anatoly techtonik : In optparse module doc this two classes are referenced, but not documented: http://docs.python.org/library/optparse.html -- components: Library (Lib) messages: 143888 nosy: techtonik priority: normal severity: normal status: open title: TitledHelp

[issue12936] armv5tejl: random segfaults in getaddrinfo()

2011-09-12 Thread Charles-François Natali
Charles-François Natali added the comment: Oh, and BTW, for the "Backtrace stopped: frame did not save the PC", you might want to install the libc-dbg package. This might help in finding precisely where it's crashing. -- ___ Python tracker

[issue12800] 'tarfile.StreamError: seeking backwards is not allowed' when extract symlink

2011-09-12 Thread Lars Gustäbel
Changes by Lars Gustäbel : -- assignee: -> lars.gustaebel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http