[issue1534] sys.maxfloat patch

2007-12-01 Thread Christian Heimes
Christian Heimes added the comment: Applied in r59254. I've moved the code to floatobject.c/h and added PyFloat_GetMax() and PyFloat_GetMin(), too. The intobject.c file has a similar function. -- resolution: - fixed status: open - closed __ Tracker

[issue1205] urllib fail to read URL contents, urllib2 crash Python

2007-12-01 Thread jos
jos added the comment: included torriem's fix. IMHO, there is no clear solution for this because this is due to HTTP server's bug and a bug is the one that you can't predict accurately... Added file: http://bugs.python.org/file8841/httplib.py.diff __ Tracker

[issue1706039] Added clearerr() to clear EOF state

2007-12-01 Thread jos
jos added the comment: Any chance to get this fix commmited in? -- type: - behavior _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1706039 _ ___

[issue1533] Bug in range() function for large values

2007-12-01 Thread Raymond Hettinger
Changes by Raymond Hettinger: -- assignee: - rhettinger nosy: +rhettinger __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1533 __ ___ Python-bugs-list mailing list

[issue1438] Calling base class methods is slow due to __instancecheck__ override in abc.py

2007-12-01 Thread Christian Heimes
Christian Heimes added the comment: Unbound methods are gone and so is the isinstance check in method_call(). -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1438 __

[issue1535] Rename __builtin__ to builtins

2007-12-01 Thread Christian Heimes
Christian Heimes added the comment: Here is a fixer for the new name. Added file: http://bugs.python.org/file8843/2to3_builtins.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1535 __Index: tests/test_fixers.py

[issue1535] Rename __builtin__ to builtins

2007-12-01 Thread Christian Heimes
Christian Heimes added the comment: I had to copy the __builtin__.rst prior to patch. svn cp Doc/library/__builtin__.rst Doc/library/builtins.rst svn patch -p0 builtins.diff svn del --force Doc/library/__builtin__.rst -- keywords: +patch, py3k nosy: +tiran priority: - high

[issue1535] Rename __builtin__ to builtins

2007-12-01 Thread Georg Brandl
Changes by Georg Brandl: Removed file: http://bugs.python.org/file8842/builtins.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1535 __ ___ Python-bugs-list mailing list

[issue1358] Compile error on OS X 10.5

2007-12-01 Thread Ronald Oussoren
Ronald Oussoren added the comment: This issue is fixed in the trunk and python2.5 branch. To work around this issue with the 2.5.1 source tree you have to set MACOSX_DEPLOYMENT_TARGET when configuring python: ../configure insert-args-here MACOSX_DEPLOYMENT_TARGET=10.3 (the value 10.3 is

[issue1534] sys.maxfloat patch

2007-12-01 Thread Mark Dickinson
Mark Dickinson added the comment: A (probably stupid) question: what's supposed to happen on platforms that don't define things like DBL_MAX_10_EXP, which isn't part of ANSI C89? Or are there no such platforms? -- nosy: +marketdickinson __ Tracker

[issue1284316] Win32: Security problem with default installation directory

2007-12-01 Thread Carl Karsten
Carl Karsten added the comment: Another reason to fix: perception. installing to the root looks like a hack. Installing to the proper place* looks professional. As for it being hard to type, either add it to PATH or put a .bat file in the path. I think vista even supports some sort of

[issue1534] sys.maxfloat patch

2007-12-01 Thread Christian Heimes
Christian Heimes added the comment: I've checked all major platforms before committing the patch. They all have a float.h with the information available. Do you know of a platform where this information isn't available? I could add a lot of #ifdef but I don't feel like bloating the code unless

[issue1534] sys.maxfloat patch

2007-12-01 Thread Mark Dickinson
Mark Dickinson added the comment: And it looks as though DBL_MAX_10_EXP *is* part of ANSI C anyway... I shouldn't have assumed that just because it's not in Kernighan and Ritchie (2nd edition) it doesn't exist... Apologies. __ Tracker [EMAIL PROTECTED]

[issue1534] sys.maxfloat patch

2007-12-01 Thread Mark Dickinson
Mark Dickinson added the comment: No, I don't know of any platforms that don't define these constants. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1534 __ ___

[issue1338] pickling bytes?

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Please assign this to me. I am planning to fix this, along a few other bugs, with my new revision of the pickle protocol. -- nosy: +alexandre.vassalotti __ Tracker [EMAIL PROTECTED]

[issue892902] problem with pickling newstyle class instances

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Please assign this bug to me. Note that neither cPickle or pickle is able to load the stream generated by cPickle correctly: g = group(None) subitem(g) g[0].parent is g True gp = cPickle.loads(cPickle.dumps(g)) gp[0].parent is gp

[issue939395] cPickle.Pickler: in list mode, no way to set protocol

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Please mark this bug as Won't Fix. As Tim said, the list-based interface of cPickle is unsupported and pending removal. Please use the pickle.dumps and pickle.loads functions if you want string interface to pickle. -- nosy: +alexandre.vassalotti

[issue1338] pickling bytes?

2007-12-01 Thread Georg Brandl
Georg Brandl added the comment: I added the Developer role to your roundup account, so you can now assign bugs to yourself. :) -- assignee: - alexandre.vassalotti __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1338

[issue1761028] pickle - cannot unpickle circular deps with custom __hash__

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Please assign this bug to me. This certainly doesn't look easy to fix. I will look into it, but I can promise that I can fix it. -- nosy: +alexandre.vassalotti type: - behavior versions: +Python 2.6, Python 3.0

[issue1338] pickling bytes?

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Thank you, Georg! __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1338 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue892902] problem with pickling newstyle class instances

2007-12-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- assignee: - alexandre.vassalotti Tracker [EMAIL PROTECTED] http://bugs.python.org/issue892902 ___ Python-bugs-list mailing list

[issue1761028] pickle - cannot unpickle circular deps with custom __hash__

2007-12-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- assignee: - alexandre.vassalotti _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1761028 _ ___ Python-bugs-list mailing list

[issue1534] sys.maxfloat patch

2007-12-01 Thread Christian Heimes
Christian Heimes added the comment: Thanks for checking it out for me! Do you have a reliable online source for the ANSI C89 standard? I'm usually using the GNU C Library docs but the site doesn't list what's available in C89. __ Tracker [EMAIL PROTECTED]

[issue939395] cPickle.Pickler: in list mode, no way to set protocol

2007-12-01 Thread Georg Brandl
Changes by Georg Brandl: -- resolution: - wont fix status: open - closed Tracker [EMAIL PROTECTED] http://bugs.python.org/issue939395 ___ Python-bugs-list mailing list

[issue1536] pickle's documentation is severely outdated

2007-12-01 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: The current documentation for the pickle module (and related modules) is outdated and should be updated. For example, the section Pickling and unpickling extension types [1] is not only confusing, but outright wrong. For Python 2.6, the documentation of

[issue956303] Update pickle docs to describe format of persistent IDs

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: This should be fixed along issue1536. -- assignee: - alexandre.vassalotti dependencies: +pickle's documentation is severely outdated nosy: +alexandre.vassalotti Tracker [EMAIL PROTECTED]

[issue1469] SSL tests leak memory

2007-12-01 Thread Christian Heimes
Christian Heimes added the comment: Are you sure that the SSL tests are still leaking memory? The tests aren't leaking references on Windows nor on Linux. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1469 __

[issue655802] cPickle not always same as pickle

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: This should be fixed along with issue1536. I am assigning this to me, instead of Fred Drake. (Is that okay with you, Fred?) -- assignee: fdrake - alexandre.vassalotti dependencies: +pickle's documentation is severely outdated nosy:

[issue1536] pickle's documentation is severely outdated

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: [I just realized that dependencies in the tracker should go the other way around.] -- dependencies: +Update pickle docs to describe format of persistent IDs, cPickle not always same as pickle __ Tracker [EMAIL

[issue655802] cPickle not always same as pickle

2007-12-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- dependencies: -pickle's documentation is severely outdated Tracker [EMAIL PROTECTED] http://bugs.python.org/issue655802 ___

[issue1673409] datetime module missing some important methods

2007-12-01 Thread Chris AtLee
Chris AtLee added the comment: timedelta.todays() could be useful in general I suppose. I think timedelta.toweeks() could be omitted since it's simple division by an easy to recognize constant...also the timedelta docs say that it stores data in terms of microseconds, seconds, and days. OTOH

[issue1531] tarfile.open(fileobj=f) and bad metadata of the first file within the archive

2007-12-01 Thread Lars Gustäbel
Lars Gustäbel added the comment: I fixed this in the trunk (r59260) and release25-maint branch (r59261). Thanks for the report. If you cannot wait for the next release, I recommend you use mode r| as a workaround. BTW, 756 is absolutely no realistic example value for the position of the second

[issue1469] SSL tests leak memory

2007-12-01 Thread Bill Janssen
Bill Janssen added the comment: I'm seeing the leaks on my Leopard machine. I haven't had a chance to look into it yet. On Dec 1, 2007 11:20 AM, Christian Heimes [EMAIL PROTECTED] wrote: Christian Heimes added the comment: Are you sure that the SSL tests are still leaking memory? The

[issue1283] PyBytes (buffer) .extend method needs to accept any iterable of ints

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Here a patch that adds support for any iterable (or sequence) of integers to bytearray.extend(). -- assignee: - alexandre.vassalotti keywords: +patch nosy: +alexandre.vassalotti resolution: accepted - Added file:

[issue1283] PyBytes (buffer) .extend method needs to accept any iterable of ints

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Made 2 minor enhancements to the patch: + Added the proper type-cast to PyMem_Realloc call. + Changed (len 1) to (len 1) + 1, just to be sure that the buffer doesn't overflow if __length_hint__ return 0 or 1 erroneously. Added file:

[issue1283] PyBytes (buffer) .extend method needs to accept any iterable of ints

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: There is a reference leak in my previous patches. So, I updated (again) the patch. There is still another possible leak if the PyMem_Realloc return NULL (i.e., the system is out of memory), but I don't think it worth fixing. Added file:

[issue1534] sys.maxfloat patch

2007-12-01 Thread Mark Dickinson
Mark Dickinson added the comment: The site that persuaded me about DBL_MAX_10_EXP was http://www.schweikhardt.net/identifiers.html Googling 'C89 draft' also turns up some potentially useful stuff. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1534

[issue1531] tarfile.open(fileobj=f) and bad metadata of the first file within the archive

2007-12-01 Thread George Notaras
George Notaras added the comment: Thanks for the quick fix and the workaround. You are right about position 756. I hadn't spent enough time studying the ''ustar'' format. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1531

[issue1535] Rename __builtin__ to builtins

2007-12-01 Thread Guido van Rossum
Guido van Rossum added the comment: OK Georg, take 'er away! -- assignee: gvanrossum - georg.brandl resolution: - accepted __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1535 __

[issue1535] Rename __builtin__ to builtins

2007-12-01 Thread Guido van Rossum
Guido van Rossum added the comment: PS. A note on backporting this to 2.6: I think it's sufficient if builtins exists in sys.modules as an alias of __builtin__ in 2.6. Crys: go ahead and check in the fixer as well. __ Tracker [EMAIL PROTECTED]

[issue1537] Change GeneratorExit's base class from Exception to BaseException

2007-12-01 Thread Chad Austin
New submission from Chad Austin: Per discussion at http://mail.python.org/pipermail/python-dev/2007- December/075498.html, this patch changes GeneratorExit's base class from Exception to BaseException. I updated the tests and documentation, but I may have missed any other discussion of

[issue1487] PEP 366 implementation

2007-12-01 Thread Nick Coghlan
Nick Coghlan added the comment: I forgot to update the special _run_module_as_main variant when I modified run_module. I'll modify the patch to fix that and to test '-m' explicitly in test_cmd_line_script. __ Tracker [EMAIL PROTECTED]

[issue1538] Avoid string copy when split char doesn't match

2007-12-01 Thread Skip Montanaro
New submission from Skip Montanaro: The topic of avoiding string copies in certain string methods came up in the ChiPy list: http://mail.python.org/pipermail/chicago/2007-December/002975.html. The attached patch modifies the split and rsplit implementations to avoid making a copy of self