[issue1965] Move trunc() to math module

2008-01-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: It would be nice in the docstring the definition of "truncate" wasn't assumed. It would be more specific to say that it rounds towards zero or that it is ceil(x) for negatives and floor(x) for positives. Alternatively, state that it returns the integer po

[issue1965] Move trunc() to math module

2008-01-31 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: Moved in r60486. I tried to improve the docstring too. -- resolution: accepted -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __

[issue1983] Return from fork() is pid_t, not int

2008-01-31 Thread Ryan Stutsman
Ryan Stutsman added the comment: > IIUC, HiStar is available in a 32-bit version, > too, yet it may still use a 64-bit pid_t (Ryan, can > you confirm whether that's the case?). Great point. pid_t is always 64-bit on HiStar. __ Tracker <[EMAIL PROTECTED]>

[issue1983] Return from fork() is pid_t, not int

2008-01-31 Thread Martin v. Löwis
Martin v. Löwis added the comment: > Do you want to port the fix to 2.5? I'm not quite sure that the patch actually fixes the problem. IIUC, HiStar is available in a 32-bit version, too, yet it may still use a 64-bit pid_t (Ryan, can you confirm whether that's the case?). If so, Python would no

[issue1941] 2.6 stdlib using with statement

2008-01-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Am unassigning because I don't have time for a detailed review. For the most part, I'm not excited about this patch which targets modules that aren't being actively supervised by their original contributor. -- assignee: rhettinger ->

[issue1482] IMAP4 SSL isn't working

2008-01-31 Thread Bill Janssen
Changes by Bill Janssen: __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python

[issue1482] IMAP4 SSL isn't working

2008-01-31 Thread Bill Janssen
Bill Janssen added the comment: I guess I'll check it in. There's no effective test case for the imaplib module, though. So if it's broken, we won't know. When I try connecting to my local IMAP server, I get >>> c = imaplib.IMAP4("127.0.0.1") Traceback (most recent call last): File "", line

[issue1941] 2.6 stdlib using with statement

2008-01-31 Thread Benjamin Peterson
Benjamin Peterson added the comment: This new patch removes changes to the platform module. Added file: http://bugs.python.org/file9342/stdlib-with-stmt2-no-platform.diff __ Tracker <[EMAIL PROTECTED]> __

[issue1482] IMAP4 SSL isn't working

2008-01-31 Thread Bill Janssen
Bill Janssen added the comment: I've committed the patch. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue1482] IMAP4 SSL isn't working

2008-01-31 Thread Bill Janssen
Bill Janssen added the comment: I guess I'll check it in. There's no effective test case for the imaplib module, though. So if it's broken, we won't know. When I try connecting to my local IMAP server, I get >>> c = imaplib.IMAP4("127.0.0.1") Traceback (most recent call last): File "", line

[issue1515] deepcopy doesn't copy instance methods

2008-01-31 Thread Guido van Rossum
Guido van Rossum added the comment: On Jan 31, 2008 2:54 PM, Michael Van Biesbrouck wrote: > Why do people want to use copy and deepcopy? I think that the issue is > that Python is an imperative language that passes and copies references. > If a library function doesn't treat its arguments as c

[issue1984] The raw string r'\' fails

2008-01-31 Thread Georg Brandl
Georg Brandl added the comment: This is not easily fixable -- it has been discussed several times on python-dev and won't change. -- nosy: +georg.brandl resolution: -> wont fix status: open -> closed __ Tracker <[EMAIL PROTECTED]>

[issue1983] Return from fork() is pid_t, not int

2008-01-31 Thread Christian Heimes
Christian Heimes added the comment: I fixed the bug in r60484. Python was already using pid_t on several occasions like getpid(). I added a test to verify that PyInt_FromLong() can always handle pid_t. Do you want to port the fix to 2.5? -- resolution: -> fixed status: open -> pending

[issue1515] deepcopy doesn't copy instance methods

2008-01-31 Thread Michael Van Biesbrouck
Michael Van Biesbrouck added the comment: Dmitrey: You can't call _deepcopy_method() on anything other than something with type types.MethodType. It is a function in a type-dispatch table, so it will always be called safely. copy._deepcopy_dispatch is that table; if you assign _deepcopy_method

[issue1985] Bug/Patch: Problem with xml/__init__.py when using freeze.py

2008-01-31 Thread Toni Brkic
New submission from Toni Brkic: Hi, I tried to do freeze.py for my script that uses ElementTree. But got the this error: File "/usr/lib/python2.5/xml/__init__.py", line 45, in _xmlplus.__path__.extend(__path__) AttributeError: 'str' object has no attribute 'extend' The reason seems th

[issue1984] The raw string r'\' fails

2008-01-31 Thread Neil Roques
New submission from Neil Roques: Python's raw strings are supposed to prevent characters being interpreted as special. However entering the raw string r'\' into an interactive session will result in: Traceback ( File "", line 1 r'\' ^ SyntaxError: EOL while scanning single-quoted st

[issue1678380] 0.0 and -0.0 identified, with surprising results

2008-01-31 Thread Mark Dickinson
Mark Dickinson added the comment: Bug identifying 0j and -0j fixed for Python 2.6 in revision 60483. Martin, can this be backported to 2.5.2? I'll assume not, unless I hear otherwise from you. -- status: open -> pending _ Tracker <[EMAIL PROTECTED]>

[issue1864] test_locale doesn't use unittest

2008-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: An improved version of this patch is now included in the proposed patch for #1222 :) __ Tracker <[EMAIL PROTECTED]> __

[issue1864] test_locale doesn't use unittest

2008-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: An improved version of this patch is now included in the proposed patch for #1222 :) __ Tracker <[EMAIL PROTECTED]> __

[issue1983] Return from fork() is pid_t, not int

2008-01-31 Thread Martin v. Löwis
Martin v. Löwis added the comment: Don't use long long literally; not all systems have such a type, and even if they do, they might not call it "long long". __ Tracker <[EMAIL PROTECTED]> __ __

[issue1983] Return from fork() is pid_t, not int

2008-01-31 Thread Christian Heimes
Christian Heimes added the comment: It's probably better to use pid_t through the code and add a typedef int pid_t for system's without pid_t. Or better typedef long pid_t? On my Linux, pid_t is defined as __PID_T_TYPE, which is defines as __S32_TYPE which ends up as int. -- nosy: +tira

[issue1982] Feature: extend strftime to accept milliseconds

2008-01-31 Thread Christian Heimes
Christian Heimes added the comment: Your chances are going to increase if you can come up with a decent patch. It's going to be harder than you might think. Python uses the system's strftime function. You'd have to implement a strftime replacement which supports miliseconds. Can't you use anothe

[issue1222] locale.format bug if thousand separator is space (french separator as example)

2008-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. It is fairly big and I'm sorry about it, here is why: 1. it reworks the test suite using unittest, and makes it more comprehensive 2. it adds a feature in locale.py which allows overriding the localeconv dictionary (this is necessary for proper t

[issue1983] Return from fork() is pid_t, not int

2008-01-31 Thread Ryan Stutsman
Ryan Stutsman added the comment: Yeah; I shuold be able to provide one. I just hacked 2.4.4 to work so I think I could provide a fix easily. The version I put together here is rough, so I'll try to create a cleaner solution tonight or this weekend. HiStar does (http://www.scs.stanford.edu/hist

[issue1983] Return from fork() is pid_t, not int

2008-01-31 Thread Martin v. Löwis
Martin v. Löwis added the comment: Can you provide a patch? It would be good if it still worked on systems that don't have pid_t (although we could also require pid_t and then see what systems that breaks for). Also, what systems use 64-bit pids? -- nosy: +loewis __

[issue1983] Return from fork() is pid_t, not int

2008-01-31 Thread Ryan Stutsman
New submission from Ryan Stutsman: In current trunk (60097). Return from fork is not int but pid_t. Treating this as an int causes total breakage on systems with 64-bit pids. -- components: Library (Lib) messages: 61926 nosy: stutsman severity: normal status: open title: Return from fo

[issue846388] Check for signals during regular expression matches

2008-01-31 Thread Guido van Rossum
Guido van Rossum added the comment: I think this is worth backporting to 2.5.2. This and r60054 are the *only* differences between _sre.c in 2.5.2 and 2.6. Tracker <[EMAIL PROTECTED]>

[issue1982] Feature: extend strftime to accept milliseconds

2008-01-31 Thread Brett Cannon
Changes by Brett Cannon: -- type: -> rfe __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue1982] Feature: extend strftime to accept milliseconds

2008-01-31 Thread Andreas Balogh
New submission from Andreas Balogh: Currently serializing datetime objects into isoformat string is well possible. The reverse process - parsing an isoformat string into a datetime object - doesn't work due to the missing %-tag for the strftime format string. Proposal: Add new tag to strftime li

[issue1482] IMAP4 SSL isn't working

2008-01-31 Thread David Binger
David Binger added the comment: On Jan 31, 2008, at 12:42 PM, Bill Janssen wrote: > > Bill Janssen added the comment: > > But that's issue 1210, which is still open. David, do you want to > submit a patch for 1210? I see that you are correct that 1210 is the bytes/str issue. I regret it, but I

[issue1515] deepcopy doesn't copy instance methods

2008-01-31 Thread Dmitrey
Dmitrey added the comment: I don't know did you mean it to me (as I've noticed from address) or no. I can hardly provide any help for fixing the bug, I'm not skilled enough in Python core files. Here's results of the proposition mentioned: import copy import types def _deepcopy_method(x, memo

[issue1410739] Add notes to the manual about `is` and methods

2008-01-31 Thread Christian Heimes
Changes by Christian Heimes: -- assignee: fdrake -> keywords: +easy type: -> rfe versions: +Python 2.6 -Python 2.4 _ Tracker <[EMAIL PROTECTED]> _

[issue1515] deepcopy doesn't copy instance methods

2008-01-31 Thread Christian Heimes
Christian Heimes added the comment: Since Guido accepted the proposal can you please provide a patch with at least one unit test? -- resolution: -> accepted __ Tracker <[EMAIL PROTECTED]> ___

[issue1976] pybsddb leak in using cursors

2008-01-31 Thread Martin v. Löwis
Martin v. Löwis added the comment: jcea, can you please attach the actual patch to be reviewed to this report? What is commit 293 in SourceForge? __ Tracker <[EMAIL PROTECTED]> __ _

[issue1976] pybsddb leak in using cursors

2008-01-31 Thread Martin v. Löwis
Martin v. Löwis added the comment: Greg, can you take a look? -- assignee: -> gregory.p.smith nosy: +gregory.p.smith, loewis __ Tracker <[EMAIL PROTECTED]> __

[issue1210] imaplib does not run under Python 3

2008-01-31 Thread Bill Janssen
Bill Janssen added the comment: IMAP doesn't really support multiple charsets (just looked at RFC 3501). There are two places where character sets other than ASCII is used. One is in the SEARCH command; there's an optional parameter which can indicate that the search strings are in a non-ASCII

[issue1941] 2.6 stdlib using with statement

2008-01-31 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Please remove the platform.py part of the patch. You can apply that to Py3k, but not to the 2.x series. -- nosy: +lemburg __ Tracker <[EMAIL PROTECTED]> _

[issue1968] Unused number magic methods leaked into Py2.6

2008-01-31 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: Done in r60480. -- resolution: accepted -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1941] 2.6 stdlib using with statement

2008-01-31 Thread Thomas Heller
Thomas Heller added the comment: Lib/platform.py contains this notice at the top: #This module is maintained by Marc-Andre Lemburg <[EMAIL PROTECTED]>. #If you find problems, please submit bug reports/patches via the #Python SourceForge Project Page and assign them to "lemburg". # #

[issue1979] Make Decimal comparisons with NaN less arbitrary

2008-01-31 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch (richcmp_signal.patch) that gives an alternative way of doing things: all <, <=, > and >= comparisons involving a NaN raise the InvalidOperation flag (using exactly the same semantics as those specified for compare_signal). == and != comparis

[issue1482] IMAP4 SSL isn't working

2008-01-31 Thread Bill Janssen
Bill Janssen added the comment: But that's issue 1210, which is still open. David, do you want to submit a patch for 1210? Meanwhile, do we still need this issue to be open? __ Tracker <[EMAIL PROTECTED]> __

[issue1941] 2.6 stdlib using with statement

2008-01-31 Thread Benjamin Peterson
Benjamin Peterson added the comment: Comments? __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue1410739] Add notes to the manual about `is` and methods

2008-01-31 Thread Christian Heimes
Christian Heimes added the comment: The example sure is surprising for somebody without intimate knowledge about Python's memory management. Although the is operator is implemented as id(a) == id(b) reference counting, free lists and arenas can cause some surprising effects. -- nosy: +ti

[issue1410739] Add notes to the manual about `is` and methods

2008-01-31 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: An even more surprising example: >>> id([1]) == id([2]) True -- nosy: +amaury.forgeotdarc _ Tracker <[EMAIL PROTECTED]> _ __

[issue1515] deepcopy doesn't copy instance methods

2008-01-31 Thread Guido van Rossum
Guido van Rossum added the comment: I'm fine with applying Michael's suggestion to 2.6. I're reverting the priority change though; using deepcopy is not OO and IMO usually indicates that there's something wrong with your app. -- severity: major -> normal ___

[issue1981] operator "is"

2008-01-31 Thread Alexander Shigin
Alexander Shigin added the comment: I think it's good idea to make a note in Comparisons section or make some reference to data model section. """ The operators is and is not test for object identity: x is y is true if and only if x and y are the same object. x is not y yields the inverse tru

[issue1981] operator "is"

2008-01-31 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: It's actually documented in http://docs.python.org/dev/reference/datamodel.html """ Note that the transformation from function object to (unbound or bound) method object happens each time the attribute is retrieved from the class or instance """ -

[issue1981] operator "is"

2008-01-31 Thread Georg Brandl
Georg Brandl added the comment: Yes, it is expected since the descriptor access to methods creates a new bound method object every time. The "is" operator does not work special with methods. There is another issue about documenting this, so closing as a duplicate. -- nosy: +georg.brandl

[issue1981] operator "is"

2008-01-31 Thread Alexander Shigin
New submission from Alexander Shigin: Hello, The operator "is" works strange with methods, i.e.: >>> a = 1 >>> a.__abs__ is a.__abs__ False If this is the preferred behavior by some reasons, I think documentation should explain it. It was tested on python 2.4.4, 2.5.1 and trunk r60477.

[issue1977] Python reinitialization test

2008-01-31 Thread Christian Heimes
Christian Heimes added the comment: If fixed the problem with multiple reinitialization in r60477. It took me quite some time to find the right spot. __ Tracker <[EMAIL PROTECTED]> __ _

[issue800929] Module-specific PDFs

2008-01-31 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: Yet another one. -- nosy: +draghuram, georg.brandl Tracker <[EMAIL PROTECTED]> ___ Python-bu

[issue800926] Python version numbers in headers/footers PDF documentation

2008-01-31 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: Not really sure if this applies to new docs. I will let Georg close this one :-). -- nosy: +draghuram, georg.brandl Tracker <[EMAIL PROTECTED]> _

[issue799088] distutils ignored LDFLAGS in Makefile

2008-01-31 Thread Raghuram Devarakonda
Changes by Raghuram Devarakonda: -- resolution: -> wont fix status: open -> closed Tracker <[EMAIL PROTECTED]> ___ Python-bugs-list

[issue1515] deepcopy doesn't copy instance methods

2008-01-31 Thread Christian Heimes
Christian Heimes added the comment: I'm bumping up the version number to 2.6. Python 2.5 is in maintenance mode and the behavior of deepcopy for instance methods won't be changed. -- components: +Library (Lib) priority: -> normal versions: +Python 2.6 -Python 2.5 __

[issue1515] deepcopy doesn't copy instance methods

2008-01-31 Thread Christian Heimes
Christian Heimes added the comment: I've read your blog. You don't have to modify the Python core: import copy import types def _deepcopy_method(x, memo): return type(x)(x.im_func, deepcopy(x.im_self, memo), x.im_class) copy._deepcopy_dispatch[types.MethodType] = _deepcopy_method I still w

[issue1977] Python reinitialization test

2008-01-31 Thread Christian Heimes
Christian Heimes added the comment: I like to keep the test as simple as possible. Here is a new file that shows Python crashes in the third Py_Finalize(). Added file: http://bugs.python.org/file9339/test_reinit.c __ Tracker <[EMAIL PROTECTED]>

[issue1979] Make Decimal comparisons with NaN less arbitrary

2008-01-31 Thread Christian Heimes
Changes by Christian Heimes: -- nosy: +tiran priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscri

[issue1980] pdb losing __file__

2008-01-31 Thread Christian Heimes
Christian Heimes added the comment: The issue is already fixed in the 2.5 and 2.6. 2.5.2 is going to be released in a couple of weeks. $ python2.5 test.py > /home/heimes/dev/python/trunk/test.py(4)() -> print __file__ (Pdb) n test.py --Return-- > /home/heimes/dev/python/trunk/test.py(4)()->None

[issue1482] IMAP4 SSL isn't working

2008-01-31 Thread David Binger
David Binger added the comment: Bill's patch does appear to fix the ssl-related problem. imaplib is still broken in py3k, though, due to bytes/str issues. -- nosy: +dbinger __ Tracker <[EMAIL PROTECTED]> ___

[issue1980] pdb losing __file__

2008-01-31 Thread Erno Kuusela
New submission from Erno Kuusela: under pdb, __file__ is not defined when executing a source code file directly. for example, if myprogram.py contains "print __file__", a NameError will be raised when run with python -m pdb myprogram.py. -- components: Library (Lib) messages: 61896 nosy

[issue1977] Python reinitialization test

2008-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Perhaps ROUNDS, CAUSE_SEGFAULT and VERBOSE could be command-line rather than compile-time options? -- nosy: +pitrou __ Tracker <[EMAIL PROTECTED]> __

[issue1979] Make Decimal comparisons with NaN less arbitrary

2008-01-31 Thread Mark Dickinson
Mark Dickinson added the comment: Yes, I think it's necessary. Speaking of standards, it's the current behavior which isn't backed by any standard or rationale other than the historical one involving now-defunct 3- way comparisons. The proposed behavior is much closer to that specified by C99

[issue1515] deepcopy doesn't copy instance methods

2008-01-31 Thread Dmitrey
Dmitrey added the comment: Hallo, I' developer of the OpenOpt, free Python-based numerical optimization framework. Please don't you mind me to increase Severity of the bug to major. This bug is driving me mad, as well as some of OO users, and makes OO usage much less convenient and obvious. ht

[issue1976] pybsddb leak in using cursors

2008-01-31 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Memory leak solved. Commit 293 in Sourceforge __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Uns

[issue1976] pybsddb leak in using cursors

2008-01-31 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Seems to be a leak when a cursor is used in a database without an environment. Working on this... __ Tracker <[EMAIL PROTECTED]> __ __

[issue1014230] optparse: parser.remove_option("-h") inconsistency

2008-01-31 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc: -- resolution: -> out of date status: open -> closed _ Tracker <[EMAIL PROTECTED]> _ ___ Python-bug

[issue870807] optparse int, long types support binary, octal and hex forma

2008-01-31 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc: -- status: open -> closed Tracker <[EMAIL PROTECTED]> ___ Python-bugs-list mailing list Unsubscrib

[issue1545463] New-style classes fail to cleanup attributes

2008-01-31 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: In PyImport_Cleanup(), sys and __builtin__ are the last ones deleted. What if PyGC_Collect() is called just before? -- nosy: +amaury.forgeotdarc _ Tracker <[EMAIL PROTECTED]>

[issue870807] optparse int, long types support binary, octal and hex forma

2008-01-31 Thread Ralf Schmitt
Ralf Schmitt added the comment: python trunk supports this. please close. -- nosy: +schmir Tracker <[EMAIL PROTECTED]> ___ Python-bu