[issue11081] from struct import * misses pack_into

2011-01-31 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: -> commit review ___ Python tracker <http://bugs.python.org/issue11081> ___ ___ Python-bugs-list mailing list Un

[issue8176] Interpreter crash with "double free or corruption" message

2011-01-31 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file16584/unnamed ___ Python tracker <http://bugs.python.org/issue8176> ___ ___ Python-bugs-list m

[issue8176] Interpreter crash with "double free or corruption" message

2011-01-31 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file16615/unnamed ___ Python tracker <http://bugs.python.org/issue8176> ___ ___ Python-bugs-list m

[issue8176] Interpreter crash with "double free or corruption" message

2011-01-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like the bug cannot be reproduced anymore. Since it was discovered using a python instance with third-party extension modules, it may not even be a python bug to begin with. -- assignee: -> belopolsky nosy: +belopol

[issue7358] cPickle crash on failed assertion

2011-01-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Ryan, Do you still have the setup that can reproduce this error? If so, can you try running it with pickle rather than cPickle? If it works with pickle, please see if you can reproduce the error by unpickling the result of pickle and repickling it

[issue9197] Crash when importer an extension after Py_Initialize, Py_Finalize and Py_Initialize

2011-01-31 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17899/unnamed ___ Python tracker <http://bugs.python.org/issue9197> ___ ___ Python-bugs-list m

[issue9197] Crash when importing an extension after Py_Initialize, Py_Finalize and Py_Initialize

2011-01-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Amaury, Can you post your Linux code reproducing the issue? I would like to take a look, but don't want to dig through an XCode project. -- assignee: -> belopolsky nosy: +belopolsky title: Crash when importer an extension after Py_In

[issue8176] Interpreter crash with "double free or corruption" message

2011-01-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Victor, I was thinking about pointing the OP to your faulthandler module, but decided not to because in the failing thread python has already finished execution and most of finalization. It is very unlikely that faulthandler will be helpful in this

[issue11077] Tkinter is not thread safe

2011-01-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Hmm, either my hand is too slow or my laptop is too fast, but I cannot reproduce the crash. Can you create a non-interactive script? Maybe start a separate thread generating "launch" events? What do you mean by "crash"? Do you ge

[issue11077] Tkinter is not thread safe

2011-01-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I converted TkinterCrash2.py to 3.x using 2to3 (result attached as TkinterCrash3.py) and it works with 3.2rc2 just fine. -- Added file: http://bugs.python.org/file20632/TkinterCrash3.py ___ Python tracker

[issue11081] from struct import * misses pack_into

2011-01-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in revision 88280. -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue11086] add lib2to3/__main__.py

2011-01-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It is unfortunate that the cute name for the tool is not valid as a module name. How about renaming "lib2to3" to "to3". The offending leading digit is strictly redundant (there is no 1to3 after all).

[issue1215] Python hang when catching a segfault

2011-01-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The consensus is that this is not a crash (and not even a bug). I am not sure what is the proper type for doc enhancement, but is certainly should not show up in a search for crashers. -- components: -Interpreter Core nosy: +belopolsky type

[issue886488] popen2 on Windows does not check _fdopen return value

2011-01-31 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: unit test needed -> needs patch title: WinPython 2.3.3 crashes using popen2 to spawn lots of child -> popen2 on Windows does not check _fdopen return value ___ Python tracker <http://bugs.p

[issue7074] Turtle module crashes python

2011-01-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I can reproduce the crash on OSX. After ~ 100 keystrokes, I get the following diagnostics: Exception in Tkinter callback Traceback (most recent call last): File "/Users/sasha/Work/python-svn/py3k-commit/Lib/tkinter/__init__.py", line

[issue7074] Turtle module crashes python

2011-01-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This looks like a duplicate of issue11029. It is not safe to call graphic primitives in event callbacks. A workaround is described at <http://effbot.org/zone/tkinter-threads.htm>. -- resolution: -> duplicate stage: -> commit

[issue7330] PyUnicode_FromFormat segfault

2011-01-31 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- components: +Unicode nosy: +haypo ___ Python tracker <http://bugs.python.org/issue7330> ___ ___ Python-bugs-list mailin

[issue7574] PyUnicode_FromFormat broken and not documented for 2.x

2011-01-31 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Documentation part of this issue will be addressed in #10435. -- nosy: +belopolsky resolution: -> duplicate stage: needs patch -> committed/rejected superseder: -> PyUnicode_FromFormat segfault _

[issue11033] ElementTree.fromstring doesn't work with Unicode

2011-02-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This works in 3.x: Python 3.2rc2+ (py3k:88279:88280, Feb 1 2011, 00:01:52) .. >>> from xml.etree import ElementTree >>> ElementTree.fromstring('诗') In 2.x you need to encode unicode strings before passing them to El

[issue11033] ElementTree.fromstring doesn't work with Unicode

2011-02-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Feb 2, 2011 at 11:10 AM, STINNER Victor wrote: .. > We can explain in ElementTree documentation how to pass non-ASCII unicode > strings: using > explicit encoding to UTF-8. ElementTree.fromstring() ultimately calls ElementTree.XMLPa

[issue2733] mmap resize fails on anonymous memory

2011-02-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't see an actual crash reported. An unexpected exception is not a crash. Changing the type to "behavior". -- nosy: +belopolsky type: crash -> behavior ___ Python tracker <h

[issue10762] strftime('%f') segfault

2011-02-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- components: +Extension Modules, Windows -Library (Lib) ___ Python tracker <http://bugs.python.org/issue10762> ___ ___ Pytho

[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

2011-02-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Unexpected exception is not a crash. Changing the type to "behavior." -- nosy: +belopolsky type: crash -> behavior ___ Python tracker <http://bugs.pytho

[issue4724] setting f_exc_traceback aborts in debug builds

2011-02-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Not applicable to 3.x because the frame object does not have f_exc_traceback attribute anymore: >>> import sys;sys._getframe(0).f_exc_traceback = 23 Traceback (most recent call last): File "", line 1, in AttributeError: &#

[issue6501] Fatal error on startup with invalid PYTHONIOENCODING

2011-02-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The issue is not Windows specific, so I am changing the title to reflect that. On OSX, for example, I get $ PYTHONIOENCODING=xyz ./python.exe Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding

[issue7111] abort when stderr is moved

2011-02-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > If we want to allow for closed {stdin, stdout, stderr}, I'm not sure > what the semantics should be. Should sys.std{in, out, err} be None? Or a > file object which always throws an error? I would say it should be a *pseudo*-file objec

[issue7111] abort when stderr is closed

2011-02-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On the second thought, as long as python used fd 2 as the "message stream of last resort", we should probably not allow it to run with fd 2 closed. The problem is that in this case fd 2 may become associated with a very important file content

[issue9592] Limitations in objects returned by multiprocessing Pool

2011-02-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- type: crash -> behavior ___ Python tracker <http://bugs.python.org/issue9592> ___ ___ Python-bugs-list mailing list Un

[issue11105] Compiling evil ast crashes interpreter

2011-02-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Looks like a stack overflow caused by an infinite recursion. I am not sure if it is possible to add cycle detection code without sacrificing performance or setting some arbitrary limits. I wonder: Why ast nodes need to be mutable? -- nosy

[issue11105] Compiling evil ast crashes interpreter

2011-02-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Feb 3, 2011 at 12:08 PM, Benjamin Peterson wrote: .. >> I wonder: Why ast nodes need to be mutable? > > So people can change them. Well, they are hashable, so this needs to be done carefully. Is this necessary for AST-based optimiza

[issue11107] Cache constant "slice" instances

2011-02-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Similar idea has been rejected in issue2268 because the win was too small to justify the number of changes that had to be made. -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue11

[issue7111] abort when stderr is closed

2011-02-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Feb 3, 2011 at 2:44 PM, Antoine Pitrou wrote: .. >> Do you know of places where we use fd 2 instead of sys.stderr? > > We normally don't. One reason is that buffering inside sys.stderr can > make ordering of output incor

[issue7111] abort when stderr is closed

2011-02-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > On Thu, Feb 3, 2011 at 2:44 PM, Antoine Pitrou wrote: > .. >> Do you know of places where we use fd 2 instead of sys.stderr? > > We normally don't. Hmm, grep "fprintf(stderr," returned 122 hits in the py3k branch.

[issue9045] 2.7rc1: 64-bit OSX installer is not built with 64-bit tkinter

2011-02-03 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- components: +Build type: crash -> behavior ___ Python tracker <http://bugs.python.org/issue9045> ___ ___ Python-bugs-lis

[issue8637] pydoc should respect MANPAGER over PAGER.

2011-02-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Feb 3, 2011 at 7:09 PM, Éric Araujo wrote: > > Éric Araujo added the comment: > > Is there a standard documenting MANPAGER somewhere? > Not really a standard, but man page for man on my OSX laptop says: "

[issue3367] Uninitialized value read in parsetok.c

2011-02-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't have a working valgrind or purify, but I was able to reproduce the problem using a poor man's solution of adding assert(0xcbcbcbcbcbcbcbcb != tok->line_start); before if (a >= tok->line_start) With th

[issue3367] Uninitialized value read in parsetok.c

2011-02-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: George, This is not really important enough to get into the 3.2 release, but uninitialized variable bugs tend to be nasty when they bite you, so I'll ask your opinion before bumping the version. -- assignee: -> georg.bra

[issue8637] Add PYDOCPAGER envvar to specify pager for pydoc

2011-02-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Feb 3, 2011 at 7:39 PM, Éric Araujo wrote: .. > Justin: what exactly is a pager that does not support man pages? I may know the answer to this one. A common PAGER setting is "less -rs" which makes less skip whitespace lines and p

[issue11111] See "Gmail" on your Google homepage

2011-02-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Spam. -- nosy: +belopolsky -renben status: open -> closed ___ Python tracker <http://bugs.python.org/issue1> ___ _

[issue11110] Py_DECREF->Py_XDECREF in Module/_sqlite/module.c

2011-02-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It may be clearer and match Python coding style better to fix it as follows: Index: Modules/_sqlite/module.c === --- Modules/_sqlite/module.c(revision 88320) +++ Modules/_sqlite

[issue10419] distutils command build_scripts fails with UnicodeDecodeError

2011-02-03 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- type: crash -> behavior ___ Python tracker <http://bugs.python.org/issue10419> ___ ___ Python-bugs-list mailing list Un

[issue2437] Distutils runtime_library_dirs broken on Windows

2011-02-03 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- type: crash -> behavior ___ Python tracker <http://bugs.python.org/issue2437> ___ ___ Python-bugs-list mailing list Un

[issue7100] test_xmlrpc: global name 'stop_serving' is not defined

2011-02-03 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- type: crash -> behavior ___ Python tracker <http://bugs.python.org/issue7100> ___ ___ Python-bugs-list mailing list Un

[issue9756] Crash with custom __getattribute__

2011-02-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Here is a somewhat more straightforward way to reproduce the problem: >>> class X: ...__class__ = int ... [55910 refs] >>> isinstance(X(), int) True [55914 refs] >>> int.bit_length(X()) Assertion failed: (PyLong_Check(v)

[issue10042] total_ordering stack overflow

2011-02-03 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- type: crash -> behavior versions: -Python 3.2 ___ Python tracker <http://bugs.python.org/issue10042> ___ ___ Python-

[issue3367] Uninitialized value read in parsetok.c

2011-02-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Feb 4, 2011 at 11:35 AM, Georg Brandl wrote: >.. But seeing the history of this case, I don't want to play around here >before 3.2 final. Here is my understanding of the history of this case: tmp1.patch was applied in r65539 and

[issue3367] Uninitialized value read in parsetok.c

2011-02-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: georg.brandl -> belopolsky ___ Python tracker <http://bugs.python.org/issue3367> ___ ___ Python-bugs-list mai

[issue11188] test_time error on AIX

2011-02-11 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue11188> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11188] test_time error on AIX

2011-02-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I have come across the following post: http://code.google.com/p/y2038/wiki/AmazingDiscoveries I think some of the findings there may be relevant as we push the boundaries of supported time values

[issue11188] test_time error on AIX

2011-02-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Sébastien, Can you tell us what time.localtime(t) produces for t in (-2, -1, 0, 1)? Apparently time.mktime() fails on values produced by time.localtime() and this sounds like a platform bug. It is OK to restrict time_t to positive values, but in

[issue11188] test_time error on AIX

2011-02-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like different standards have different requirements for localtime() error handling compare: http://pubs.opengroup.org/onlinepubs/009695399/functions/localtime.html and http://pubs.opengroup.org/onlinepubs/7990989775/xsh/localtime.html The

[issue11188] test_time error on AIX

2011-02-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: 2011/2/15 Sébastien Sablé : .. >>>> for t in (-2, -1, 0, 1): > ...     print(time.localtime(t)) > ... > time.struct_time(tm_year=1970, tm_mon=1, tm_mday=1, tm_hour=0, tm_min=59, > tm_sec=58, tm_wday=3, tm_yday=1, tm_isdst=0) ..

[issue1726687] Bug found in datetime for Epoch time = -1

2011-02-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Backported in r88425 (3.1) and r88427 (2.7). -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue1

[issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms

2011-02-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Victor, I don't see your patch. Did you remove it? -- type: -> behavior ___ Python tracker <http://bugs.python.or

[issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms

2011-02-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: While it is unlikely that a purely numeric format such as "%Y-%m-%d %H:%M:%S" will be locale dependent, it is possible that some pre-C99 systems would format dates using exotic digits is some locales. Given that format is so simple, I woul

[issue5537] LWPCookieJar cannot handle cookies with expirations of 2038 or greater on 32-bit platforms

2011-02-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Feb 18, 2011 at 11:04 AM, STINNER Victor wrote: .. > If datetime.strftime() is not reliable, we should maybe fix it instead of > using a workaround? The real fix would be to rewrite strftime so that it does not call system strftime

[issue2844] int() lies about base parameter

2008-05-13 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: The same issue is present in long_new: >>> long('42', -909) 42L I don't see why any magic value is needed, 10 would do the trick. -- nosy: +belopolsky __ Tra

[issue2844] int() lies about base parameter

2008-05-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky <[EMAIL PROTECTED]>: -- keywords: +patch Added file: http://bugs.python.org/file10316/issue2844.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2844] int() lies about base parameter

2008-05-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky <[EMAIL PROTECTED]>: -- versions: +Python 2.6, Python 3.0 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2844> __ _

[issue2844] int() lies about base parameter

2008-05-13 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: > 10 would *not* do the trick: You are right. I guess something like issue2844-1.diff will be necessary. I am not sure it is worth the trouble, though. Maybe just change -909 to -MAX_INT? Jakub, how did you discover th

[issue2844] int() lies about base parameter

2008-05-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10317/issue2844-1.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2844] int() lies about base parameter

2008-05-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10318/issue2844-1.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2844] int() lies about base parameter

2008-05-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10319/issue2844-1.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2844] int() lies about base parameter

2008-05-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10318/issue2844-1.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2845] shutil.copy2() copies permission bits

2008-05-14 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: This seems to be a documentation issue. """ shutil.copy2(src, dst) Similar to copy(), but last access time and last modification time are copied as well. This is similar to the Unix command cp -p. ""

[issue2845] shutil.copy2() copies permission bits

2008-05-14 Thread Alexander Belopolsky
Changes by Alexander Belopolsky <[EMAIL PROTECTED]>: -- assignee: -> georg.brandl components: +Documentation -Windows nosy: +georg.brandl type: behavior -> feature request versions: +Python 2.5, Python 2.6, Python 3.0 __ Tracker <[

[issue2863] Generator __name__ and better repr()

2008-05-15 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: Any reason why generator object repr is formed differently from function and code? >>> def f(): yield 1 ... >>> f() >>> f >>> f.__code__ ", line 1> -- nosy: +belopolsky

[issue2869] Wrong doc for `calendar.Calendar.iterweekdays`

2008-05-15 Thread Alexander Belopolsky
Changes by Alexander Belopolsky <[EMAIL PROTECTED]>: -- keywords: +patch Added file: http://bugs.python.org/file10335/issue2869.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2897] include structmember.h in Python.h

2008-05-19 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: Note that structmember.h pollutes global namespace with macros that do not have conventional Py_ or PY_ prefix. READONLY and RESTRICTED macros seem to be most likely to conflict with other code. I would be -0 on inc

[issue2944] asyncore doesn't handle connection refused correctly

2008-05-22 Thread Alexander Shigin
Alexander Shigin <[EMAIL PROTECTED]> added the comment: Patch against r63534 fix the issue. -- keywords: +patch Added file: http://bugs.python.org/file10401/asyncore-connect-patch.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2944] asyncore doesn't handle connection refused correctly

2008-05-22 Thread Alexander Shigin
New submission from Alexander Shigin <[EMAIL PROTECTED]>: Unix select returns socket in read fd set and write fd set if nonblocking socket attempts to connect to unaviable address. asyncore should check this case by calling getsockopt with SO_ERROR optname. If return value is 0 it

[issue2944] asyncore doesn't handle connection refused correctly

2008-05-22 Thread Alexander Shigin
Alexander Shigin <[EMAIL PROTECTED]> added the comment: Oh, I've just realised that FreeBSD is too fast. test_async_connect.py works fine on linux box, but on FreeBSD i need to change localhost to another host :( I haven't got any idea how to make a test case which work

[issue2944] asyncore doesn't handle connection refused correctly

2008-05-24 Thread Alexander Shigin
Alexander Shigin <[EMAIL PROTECTED]> added the comment: Oh, fine. May be handle_error should have been called, but anyway not handle_connect. But in my mind, handle_expt is better. __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2973] _ssl compiler warnings

2008-05-28 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: It looks like this comes from r59493 which purports to fix a warning: r59493 | christian.heimes | 2007-12-13 23:38:13 -0500 (Thu, 13 Dec 2007) | 1 line

[issue3008] Let bin() show floats

2008-05-30 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: I like the idea in general. It is way too common for people to be confused by decimal representation of floats, so an obvious mechanism to display the true value will be helpful. I don't think a promiscuous bin() w

[issue3008] Let bin() show floats

2008-05-30 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: On Fri, May 30, 2008 at 10:52 AM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: > > Antoine Pitrou <[EMAIL PROTECTED]> added the comment: > > Well it's quite simple. Imagine you have a function f() which t

[issue3008] Let bin() show floats

2008-05-30 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: While writing my previous comments I did not realize that '%x' % accepts floats: >>> "%x" % 3.1415 '3' Float support has been even improved somewhat since 2.5: Python 2.5 (r25:51908, Nov

[issue3008] Let bin() show floats

2008-05-30 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: On Fri, May 30, 2008 at 1:47 PM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: .. > 2. if two numbers (one integer and one float) are equal, it sounds > expectable that calling a function on them will produce similar

[issue3008] Let bin() show floats

2008-05-30 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: On Fri, May 30, 2008 at 1:47 PM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: .. > 1. while taking the binary representation of an integer has a real > meaning, taking the binary representation of a float only exposes a

[issue3008] Let bin() show floats

2008-05-30 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: What would you say to adding float-capable bin/oct/hex (+ maybe tobase) to the math module? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3008] Let bin() show floats

2008-05-30 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: Another problem with bin() on floats is that it will be a one-way street because as far as I know, there is no function to convert a binary string back to a float. My last thought on this issue is that it will be helpful to add

[issue3008] Let bin() show floats

2008-05-30 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: On Fri, May 30, 2008 at 2:32 PM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: > then why not make it a method of float? .. because you rarely want to make your functions accept 1.0, but reject 1 and using f.bin() in you

[issue3081] Py_(X)SETREF macros

2008-06-13 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: A comment on the patch: Since object.h may be included from C++ extensions, you should not use a C++ keyword "new" as a variable name. -- nosy: +belopolsky ___ Python

[issue2944] asyncore doesn't handle connection refused correctly

2008-07-08 Thread Alexander Shigin
Alexander Shigin <[EMAIL PROTECTED]> added the comment: Here is a new patch against r64768 The new patch raise an exception if asynchronous connect fails. Added file: http://bugs.python.org/file10856/asyncore-connect-patch.diff ___ Python tracker &

[issue2944] asyncore doesn't handle connection refused correctly

2008-07-08 Thread Alexander Shigin
Changes by Alexander Shigin <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10401/asyncore-connect-patch.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-07-23 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: It looks like e-mail submission did not work. Uploading updated patch as issue2417b.diff . Added file: http://bugs.python.org/file10962/issue2417b.diff ___ Python tracker <[EMAIL PROTECTE

[issue2944] asyncore doesn't handle connection refused correctly

2008-10-01 Thread Alexander Shigin
Alexander Shigin <[EMAIL PROTECTED]> added the comment: I've got the same error in r64768. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2944> ___ ___

[issue4331] Can't use _functools.partial() created function as method

2010-01-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Christophe, It looks like your patch goes out of its way to avoid creating nested partials. This is a worthwhile goal and I think it should be done in partial_new so that partial(partial(f, x), y) returns partial(f, x, y). If fact, I was surprised to

[issue7830] Flatten nested functools.partial

2010-02-01 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Currently applying functools.partial to a callable that is already functools.partial object results in a nested object: >>> from functools import partial >>> def f(a,b,c): pass ... >>> p = partial(partial(f, 1),

[issue4331] Can't use _functools.partial() created function as method

2010-02-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Please see issue7830 for a related patch. -- ___ Python tracker <http://bugs.python.org/issue4331> ___ ___ Python-bug

[issue7830] Flatten nested functools.partial

2010-02-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Antoine> Flattening should only happen for instances of the exact type. I am attaching a variant of the patch that will only flatten if both nested and wrapping partial is of the exact type. Other possibilities would include flattening partial_subt

[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2010-02-08 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +Alexander.Belopolsky ___ Python tracker <http://bugs.python.org/issue6877> ___ ___ Python-bugs-list mailing list Unsub

[issue1726687] Bug found in datetime for Epoch time = -1

2010-02-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I wonder: with year bounds being checked in gettmarg() and mktime accepting arbitrary values for the rest of the tm structure members (at least it appears to on my Mac), is it possible trigger "mktime argument out of range"? If it is possib

[issue2736] datetime needs an "epoch" method

2010-02-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Victor, As you explain in your own documentation, the proposed method is equivalent to ``(time.mktime(self.timetuple()), self.microsecond)``, so all it does is replacing a less than a one-liner. Moreover, I am not sure time.mktime(self.timetuple

[issue7963] Misleading error message from object(arg)

2010-02-18 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : >>> object(1) Traceback (most recent call last): File "", line 1, in TypeError: object.__new__() takes no parameters This is misleading because object.__new__() takes one parameter: >>> object.__new__(object) I sugg

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Michael, Can you post the output of "groups" and "id" command from your Mac? It looks like posix_getgroups cannot handle more than NGROUPS_MAX groups and NGROUPS_MAX is 16 on Mac OS. -- nosy: +

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I was able to reproduce the error. First, add your user name to multiple test groups as follows: $ sudo dscl . -create /Groups/testN GroupMembership username (repeat 16 times with different Ns) $ ./python.exe Python 2.7a3+ (trunk:78265M, Feb 20 2010

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am submitting a fix. I am using the following feature documented in getgroups(2): """ If _DARWIN_C_SOURCE is defined, getgroups() can return more than {NGROUPS_MAX} groups. """ It appears that _DARWIN_C_SOURCE is

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like the current implementation is not POSIX compliant because it assumes that NGROUPS_MAX is compile time constant. However, according to <http://www.opengroup.org/onlinepubs/95399/functions/getgroups.html>, "Application wri

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like the current implementation is not POSIX compliant because it assumes that NGROUPS_MAX is compile time constant. However, according to <http://www.opengroup.org/onlinepubs/95399/functions/getgroups.html>, "Application wri

<    6   7   8   9   10   11   12   13   14   15   >