[issue1414] Fix for refleak tests

2007-11-30 Thread Guido van Rossum
Guido van Rossum added the comment: ping? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1414 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1528] Add os.fchmod

2007-11-30 Thread Guido van Rossum
Changes by Guido van Rossum: -- priority: - normal __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1528 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1528] Add os.fchmod

2007-11-30 Thread Guido van Rossum
New submission from Guido van Rossum: Modern Unix systems have a fchmod() system call, which is like chmod() but takes a file descriptor instead of a filename. Python's os module (via the posix module) should support this if it exists on the target platform. -- messages: 57997 nosy:

[issue1529] Error when passing a file object to tarfile.open()

2007-11-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This problem was fixed in r57617. Can you check with a more recent build? -- nosy: +amaury.forgeotdarc resolution: - works for me __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1529

[issue1504] Add 2to3 fixer for (un)bound methods

2007-11-30 Thread Guido van Rossum
Guido van Rossum added the comment: Exactly. I'm proposing that we don't bother with people who call types.MethodType(), but we *do* bother converting code that calls new.method(). __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1504

[issue1528] Add os.fchmod

2007-11-30 Thread Christian Heimes
Christian Heimes added the comment: I've applied the combined patch in r59242. I've tested Georg's fchmod/fchown on my Linux system. They functions are working as expected. However lchmod is not available on my system although it is in the header files. It should be available on Mac and some

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

2007-11-30 Thread Robert Bradshaw
New submission from Robert Bradshaw: Range accepts arguments coerce-able into ints via __int__, but rejects arguments coerce-able into longs but to large to fit into an int. The problem is in handle_range_longs in bltinmodule.c:1527-1541. If they type is not an int or long, it should try to

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

2007-11-30 Thread Robert Bradshaw
Robert Bradshaw added the comment: Yes, that is a workaround, but range(MyInt(n), MyInt(n+10)) should work for any valid value of n, not just some of them. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1533 __

[issue1514] missing constants in socket module

2007-11-30 Thread Christian Heimes
Christian Heimes added the comment: Marc-Andre Lemburg wrote: Marc-Andre Lemburg added the comment: Interesting. It appears as if r57142 caused this change. Good work, Marc-Andre! I've restored the old semantic in r57142. Christian __ Tracker [EMAIL

[issue1534] sys.maxfloat patch

2007-11-30 Thread Christian Heimes
New submission from Christian Heimes: Currently Python has no information about the maximum and minimum value of a float. The patch adds a dict with all important information to sys: pprint.pprint(sys.maxfloat) {'dig': 15, 'epsilon': 2.2204460492503131e-16, 'mant_dig': 53, 'max':

[issue1514] missing constants in socket module

2007-11-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Interesting. It appears as if r57142 caused this change. Before: # if !(defined(__BEOS__) || defined(__CYGWIN__) || (defined(PYOS_OS2) defined(PYCC_VACPP))) After: # if defined(__CYGWIN__) || (defined(PYOS_OS2) defined(PYCC_VACPP)) That change

[issue1514] missing constants in socket module

2007-11-30 Thread Christian Heimes
Christian Heimes added the comment: On my system (Ubuntu 7.10, i386, Kernel 2.6.20) the _socket modules of Python 2.5 and trunk have the TCP_ constants. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1514 __

[issue1514] missing constants in socket module

2007-11-30 Thread Martin v. Löwis
Martin v. Löwis added the comment: I disagree. h2py is much too unreliable, and should be phased out over time. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1514 __ ___

[issue1414] Fix for refleak tests

2007-11-30 Thread Guido van Rossum
Guido van Rossum added the comment: Can you open a separate item for the Tkinter leak so you can close this one? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1414 __ ___

[issue1529] Error when passing a file object to tarfile.open()

2007-11-30 Thread George Notaras
George Notaras added the comment: Indeed, I have downloaded the latest tarfile module from svn and it works as expected. I should have done this in the first place. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1529 __

[issue1414] Fix for refleak tests

2007-11-30 Thread Christian Heimes
Christian Heimes added the comment: I don't know how to fix the problem. You have to assign the bug to somebody who has experience with Tcl/Tk. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1414 __

[issue1528] Add os.fchmod

2007-11-30 Thread Christian Heimes
Changes by Christian Heimes: -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1528 __ ___ Python-bugs-list mailing list

[issue1673409] datetime module missing some important methods

2007-11-30 Thread Skip Montanaro
Skip Montanaro added the comment: Chris I keep needing to know the number of seconds that a timedelta Chris represents, so I implemented the following patch. I can sympathize, but if we accept this patch, for symmetry reasons shouldn't we also add .todays, .tomicroseconds and maybe even

[issue1673409] datetime module missing some important methods

2007-11-30 Thread Chris AtLee
Chris AtLee added the comment: I keep needing to know the number of seconds that a timedelta represents, so I implemented the following patch. This returns only the integer portion, but could be modified to return a floating point value. -- nosy: +catlee Added file:

[issue1528] Add os.fchmod

2007-11-30 Thread Guido van Rossum
Guido van Rossum added the comment: Just check these into the trunk, guys! Great! __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1528 __ ___ Python-bugs-list mailing list

[issue1504] Add 2to3 fixer for (un)bound methods

2007-11-30 Thread Guido van Rossum
Guido van Rossum added the comment: Aren't there equivalent ways to spell those with the new module? How about a fixer for that code (which may be easier to write)? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1504 __

[issue1528] Add os.fchmod

2007-11-30 Thread Christian Heimes
Christian Heimes added the comment: I'm adding lchmod, too. -- nosy: +tiran __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1528 __ ___ Python-bugs-list mailing list

[issue1487] PEP 366 implementation

2007-11-30 Thread Guido van Rossum
Guido van Rossum added the comment: I think the implementation is fine too (others will have to check it more carefully) but I noticed that the promised functionality of -m doesn't work yet: I created a file Lib/test/foo.py whose sole contents was from . import test_support. Then I tried to

[issue1497] Patch to remove API to create new unbound methods

2007-11-30 Thread Guido van Rossum
Guido van Rossum added the comment: Reducing priority and changing assignee since this is now just waiting for a doc update. -- assignee: gvanrossum - tiran priority: high - low __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1497

[issue1487] PEP 366 implementation

2007-11-30 Thread Guido van Rossum
Changes by Guido van Rossum: -- assignee: - gvanrossum nosy: +gvanrossum __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1487 __ ___ Python-bugs-list mailing list

[issue1504] Add 2to3 fixer for (un)bound methods

2007-11-30 Thread Guido van Rossum
Guido van Rossum added the comment: Does this still need to remain open? -- priority: - normal __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1504 __ ___

[issue1521] string.decode() fails on long strings

2007-11-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: What else needs to be done to make sure your patch finds it's way to the Python core? Nothing I suppose. It appears like an inconsistency in the source code, and it happens to correct a real problem. I will commit it in a few hours.

[issue1521] string.decode() fails on long strings

2007-11-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: @bigmemtest(minsize=_2G*2+2, memuse=3) minsize=_2G + 2 should trigger your second problem (where the size wraps to a negative number). Then 7G is enough for the test to run. __ Tracker [EMAIL PROTECTED]

[issue1521] string.decode() fails on long strings

2007-11-30 Thread Andreas Eisele
Andreas Eisele added the comment: How do you run the test? Do you specify a maximum available size? I naively assumed that running make test from the toplevel would be clever about finding plausible parameters. However, it runs the bigmem tests in a minimalistic way, skipping essentially all

[issue1527] Problem with static libs on Windows

2007-11-30 Thread Christian Heimes
New submission from Christian Heimes: patrickkidd (IRC nick) has reported a problem with creating a static libraries on Windows. He suggested the appended patch. -- assignee: loewis components: Windows files: trunk_staticlib.patch keywords: patch, py3k messages: 57991 nosy: loewis,

[issue1504] Add 2to3 fixer for (un)bound methods

2007-11-30 Thread Guido van Rossum
Guido van Rossum added the comment: You are right about the rest. Can you start a discussion on the list? Well the only question is where to put these symbols, right? I guess I still like putting them in sys best, for the ones that don't fit in collections. The last time I tried to kick off

[issue1504] Add 2to3 fixer for (un)bound methods

2007-11-30 Thread Christian Heimes
Christian Heimes added the comment: The deprecation warning in 'new' is a -3 warning. I've added a new method warning.warnpy3k for the job. You are right about the rest. Can you start a discussion on the list? The last time I tried to kick off a poll it ended up a lots of bad jokes. :(

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

2007-11-30 Thread George Notaras
New submission from George Notaras: Assume the following situation: - a healthy and uncompressed tar file: a.tar - the metadata of the 1st and second files within the archive start at positions 0 and 756 (realistic example values) I partially damage 200 bytes of metadata (byte range 0-500) of

[issue1514] missing constants in socket module

2007-11-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Doesn't this bug report also refer to Python 2.5 and 2.6 ? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1514 __ ___ Python-bugs-list

[issue1504] Add 2to3 fixer for (un)bound methods

2007-11-30 Thread Christian Heimes
Christian Heimes added the comment: Whatever you say. But shouldn't we make people to use types.MethodType() or whatever we use as the new module for PyMethod_Type()? People are going to use types.MethodType() when they see the deprecation warning. By the way I've updated the docs in r59248.

[issue1530] doctest should return error if not all tests passed

2007-11-30 Thread Miki Tebeka
New submission from Miki Tebeka: python -mdoctest mymodule should return an error to the OS when a test fails. See patch. -- components: Library (Lib) files: doctest.py.diff messages: 58020 nosy: tebeka severity: normal status: open title: doctest should return error if not all tests

[issue1529] Error when passing a file object to tarfile.open()

2007-11-30 Thread George Notaras
New submission from George Notaras: Assume a healthy uncompressed tar file: a.tar When trying to open the tarfile using a fileobject, there is always an exception: f_raw = open(a.tar, rb) import tarfile f_tar = tarfile.open(mode=r:, fileobj=f_raw) Traceback (most recent call last): File

[issue1109] Warning required when calling register() on an ABCMeta subclass

2007-11-30 Thread Guido van Rossum
Guido van Rossum added the comment: Please roll this back. The error message you added is inappropriate when the parameter to a legitimate register() call is omitted, e.g. collections.Sequence.register() Since we got rid of unbound methods, the infinite recursion is gone; that's a good enough

[issue1138] Fixer needed for __future__ imports

2007-11-30 Thread Christian Heimes
Christian Heimes added the comment: Fixed in r59235 It was easier to add a new fixer for the problem. -- nosy: +tiran resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1138

[issue1519] async_chat.__init__() parameters

2007-11-30 Thread billiejoex
billiejoex added the comment: +1. Another inconsistency are the argument names used in __init__ methods, one called sock and the other called conn: asyncore: def __init__(self, sock=None, map=None): asynchat: def __init__ (self, conn=None): -- nosy: +billiejoex

[issue1526] DeprecationWarning in zipfile.py while zipping 113000 files

2007-11-30 Thread Alexander Belchenko
Changes by Alexander Belchenko: -- nosy: bialix severity: normal status: open title: DeprecationWarning in zipfile.py while zipping 113000 files type: behavior versions: Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1526

[issue1526] DeprecationWarning in zipfile.py while zipping 113000 files

2007-11-30 Thread Alexander Belchenko
New submission from Alexander Belchenko: C:\Python\2.5.1\lib\zipfile.py:719: DeprecationWarning: 'H' format requires 0 = number = 65535 0, 0, count, count, pos2 - pos1, pos1, 0) -- components: +Library (Lib) __ Tracker [EMAIL PROTECTED]

[issue1514] missing constants in socket module

2007-11-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: While the patch looks right (can't say for sure whether netinet/tcp.h is always available), I think the approach itself of adding these constants to the socket module is wrong. Instead of adding these constants to the socket module, they should go into a

[issue1514] missing constants in socket module

2007-11-30 Thread Christian Heimes
Christian Heimes added the comment: I've added Lemburg, Löwis and Skip to the nosy list. svn ann shows their names frequently. -- nosy: +loewis, skip.montanaro __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1514

[issue1525] Executing Python script using subprocess.Popen twice interactively fails without error the second time

2007-11-30 Thread canhuth
canhuth added the comment: Bah, silly me, I apologize, and thank you for the quick feedback. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1525 __ ___ Python-bugs-list mailing

[issue1514] missing constants in socket module

2007-11-30 Thread Christian Heimes
Christian Heimes added the comment: On my Linux box (Ubuntu 7.10, i386, 2.6.22) the TCP_* constants are also missing. This patch solves the bug. Index: Modules/socketmodule.h === --- Modules/socketmodule.h (revision 59228) +++

[issue1525] Executing Python script using subprocess.Popen twice interactively fails without error the second time

2007-11-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Top-level statements are executed only the first time the module is imported: http://docs.python.org/tut/node8.html#moreModules To execute a script from python, you should consider the execfile() function instead. -- nosy: +amaury.forgeotdarc

[issue1521] string.decode() fails on long strings

2007-11-30 Thread Andreas Eisele
Andreas Eisele added the comment: Tried @bigmemtest(minsize=_2G*2+2, memuse=3) but no change; the test is done only once with a small size (5147). Apparently something does not work as expected here. I'm trying this with 2.6 (Revision 59231). __ Tracker

[issue1525] Executing Python script using subprocess.Popen twice interactively fails without error the second time

2007-11-30 Thread canhuth
New submission from canhuth: Executing script using subprocess.Popen twice interactively fails without error the second time. File a.py: print start import subprocess print first call process = subprocess.Popen( args = cmd.exe /c echo 1, stdout = subprocess.PIPE) for line in

[issue1534] sys.maxfloat patch

2007-11-30 Thread Guido van Rossum
Guido van Rossum added the comment: I'd suggest giving it a different name, maybe float_info. sys.maxfloat suggests the value is a float, like sys.maxint and sys.maxunicode. -- nosy: +gvanrossum __ Tracker [EMAIL PROTECTED]

[issue1532] Refleak run of test_tcl fails

2007-11-30 Thread Christian Heimes
New submission from Christian Heimes: $ ./python Lib/test/regrtest.py -R:: test_tcl test_tcl beginning 9 repetitions 123456789 test test_tcl failed -- Traceback (most recent call last): File Lib/test/test_tcl.py, line 125, in testLoadTk tcl.loadtk() File Lib/lib-tk/Tkinter.py, line 1641,

[issue1529] Error when passing a file object to tarfile.open()

2007-11-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The fix is already included in the future 2.5.2 release. -- status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1529 __

[issue1521] string.decode() fails on long strings

2007-11-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Committed revision 59244 in release25-maint. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1521 __

[issue1521] string.decode() fails on long strings

2007-11-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Committed revision 59241. Will backport after the buildbots run the test. -- assignee: - amaury.forgeotdarc __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1521 __

[issue1520] 'without make' documentation build anomaly

2007-11-30 Thread Guido van Rossum
Changes by Guido van Rossum: -- assignee: - georg.brandl nosy: +georg.brandl priority: - low __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1520 __ ___

[issue467924] Improve the ZipFile Interface

2007-11-30 Thread Alan McIntyre
Alan McIntyre added the comment: There was another issue that also asked for an extract feature, and if I recall correctly I said I'd try to work on it (I think I have some code somewhere for it but I'll have to look). Tonight or tomorrow I will see if I can find that other issue and let you

[issue1519] async_chat.__init__() parameters

2007-11-30 Thread Nadeem Vawda
Nadeem Vawda added the comment: Thanks for pointing that out; I've uploaded a second patch that changes async_chat.__init__() to use 'sock' instead of 'conn'. This change shouldn't affect anything either, since the argument is simply passed to asyncore.dispatcher.__init__(). Added file:

[issue1109] Warning required when calling register() on an ABCMeta subclass

2007-11-30 Thread Christian Heimes
Christian Heimes added the comment: Fixed in r59233. Please adjust the error message if you don't like it. TypeError: register() cannot be called on an ABCMeta subclass, use class Example(metaclass=abc.ABCMeta) instead. -- resolution: - fixed status: open - closed

[issue1521] string.decode() fails on long strings

2007-11-30 Thread Andreas Eisele
Andreas Eisele added the comment: Thanks a lot for the patch, which indeed seems to solve the issue. Alas, the extended test code still does not catch the problem, at least in my installation. Someone with a better understanding of how these tests work and with access to a 64bit machine should

[issue467924] Improve the ZipFile Interface

2007-11-30 Thread Georg Brandl
Georg Brandl added the comment: Alan's patch has since been committed. Is there any more work on this item? -- nosy: +georg.brandl Tracker [EMAIL PROTECTED] http://bugs.python.org/issue467924

[issue469773] Write 'Using Python on Platform X' documents

2007-11-30 Thread Georg Brandl
Georg Brandl added the comment: This will hopefully be done in GHOP. -- assignee: - georg.brandl status: open - pending Tracker [EMAIL PROTECTED] http://bugs.python.org/issue469773

[issue1109] Warning required when calling register() on an ABCMeta subclass

2007-11-30 Thread Christian Heimes
Christian Heimes added the comment: I've reverted the changes. -- status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1109 __ ___ Python-bugs-list

[issue1526] DeprecationWarning in zipfile.py while zipping 113000 files

2007-11-30 Thread Guido van Rossum
Guido van Rossum added the comment: Hmm... Seems there's a 16-bit-wide field somewhere. How do other ZIP implementation deal with this? -- nosy: +gvanrossum __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1526 __

[issue1521] string.decode() fails on long strings

2007-11-30 Thread Andreas Eisele
Andreas Eisele added the comment: Then 7G is enough for the test to run. yes, indeed, thanks for pointing this out. It runs and detects an ERROR, and after applying your patch it succeeds. What else needs to be done to make sure your patch finds it's way to the Python core?

[issue1504] Add 2to3 fixer for (un)bound methods

2007-11-30 Thread Christian Heimes
Christian Heimes added the comment: Some cases aren't covered by the fixer. I'm not sure if we need fixers for two cases: Python 2.x: Cls.method = types.MethodType(function, None, Cls) Python 3.0: Cls.method = function Python 2.x: instance.method = types.MethodType(function, instance,

[issue1504] Add 2to3 fixer for (un)bound methods

2007-11-30 Thread Guido van Rossum
Guido van Rossum added the comment: Whatever you say. But shouldn't we make people to use types.MethodType() or whatever we use as the new module for PyMethod_Type()? People are going to use types.MethodType() when they see the deprecation warning. Well, if new.method is deprecated, then

[issue1514] missing constants in socket module

2007-11-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: If you think we need a better tool, that's a different story, but not an argument for cluttering up the socket module with a more or less complete list of C constants. It's much easier to maintain this outside the socket module in a separate, platform