[issue3264] Use -lcrypto instead of -lcrypt on Solaris 2.6 when available

2008-07-03 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Why didn't it link with /usr/lib/libcrypt.so? That has always worked on Solaris, including Solaris 2.6. In addition, even if it did decide to use libcrypt.a for some strange reason, it should still link successfully, since libcrypt.a should

[issue3265] Python-2.5.2/Modules/_ctypes/malloc_closure.c:70: error: `MAP_ANONYMOUS' undeclared

2008-07-03 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Can you please report from the mmap man page how anonymous mappings can be achieved on Solaris 2.6? -- assignee: - theller nosy: +loewis, theller ___ Python tracker [EMAIL PROTECTED]

[issue3266] Python-2.5.2/Modules/mmapmodule.c:915: error: `O_RDWR' undeclared

2008-07-03 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Why do you think there is a typo? O_RDWR is a valid constant that should be provided on all Unix-like systems. Can you please find out from the open(2) man page: a) whether Solaris 2.6 supports the O_RDWR constant, b) what header files to

[issue3264] Use -lcrypto instead of -lcrypt on Solaris 2.6 when available

2008-07-03 Thread Martin Mokrejs
Martin Mokrejs [EMAIL PROTECTED] added the comment: # ar tv /usr/lib/libcrypt.a rw-rw-r-- 0/1 1296 Jul 16 05:57 1997 crypt.o rw-rw-r-- 0/1 4996 Jul 16 05:57 1997 cryptio.o rw-rw-r-- 0/1 1508 Jul 16 05:57 1997 des_encrypt.o rw-rw-r-- 0/1 5356 Jul 16 05:58 1997 des_crypt.o # ls -la

[issue3267] yield in list comprehensions possibly broken in 3.0

2008-07-03 Thread Erick Tryzelaar
New submission from Erick Tryzelaar [EMAIL PROTECTED]: This may be a known consequence of python 3.0, but I couldn't find any reference to it, nor a test case that covers it. Here's a valid use of yield in 2.5.1: def foo(): ... x=[(yield x) for x in 1,2,3] ... yield 5 ... yield x

[issue3268] Cleanup of tp_basicsize inheritance

2008-07-03 Thread Adam Olsen
New submission from Adam Olsen [EMAIL PROTECTED]: inherit_special contains logic to inherit the base type's tp_basicsize if the new type doesn't have it set. The logic was spread over several lines, but actually does almost nothing (presumably an artifact of previous versions), so here's a

[issue3265] Python-2.5.2/Modules/_ctypes/malloc_closure.c:70: error: `MAP_ANONYMOUS' undeclared

2008-07-03 Thread Martin Mokrejs
Martin Mokrejs [EMAIL PROTECTED] added the comment: A Goggle search gives between many others: http://gcc.gnu.org/ml/gcc/2000-09/msg00054.html http://www.ravenbrook.com/project/mps/master/design/vmso/ http://developers.sun.com/solaris/articles/read_mmap.html Added file:

[issue3265] Python-2.5.2/Modules/_ctypes/malloc_closure.c:70: error: `MAP_ANONYMOUS' undeclared

2008-07-03 Thread Martin Mokrejs
Martin Mokrejs [EMAIL PROTECTED] added the comment: http://unix.derkeiler.com/Newsgroups/comp.unix.solaris/2004-07/0256.html http://source.winehq.org/source/libs/wine/mmap.c I will stop posting URLs. ;-) ___ Python tracker [EMAIL PROTECTED]

[issue3264] Use -lcrypto instead of -lcrypt on Solaris 2.6 when available

2008-07-03 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Something must be broken with your system installation. des_crypt.o should define the function _des_crypt (ar x /usr/lib/libcrypt.a;nm -g des_crypt.o). What linker are you using? It seems that the shared version of libcrypt was only added in

[issue3264] Use -lcrypto instead of -lcrypt on Solaris 2.6 when available

2008-07-03 Thread Martin Mokrejs
Martin Mokrejs [EMAIL PROTECTED] added the comment: # ar x /usr/lib/libcrypt.a;nm -g des_crypt.o U ___errno 033c T _des_crypt 0274 T _des_encrypt U _des_encrypt1 01b0 T _des_setkey U _mutex_lock U _mutex_unlock U _thr_getspecific

[issue3265] Python-2.5.2/Modules/_ctypes/malloc_closure.c:70: error: `MAP_ANONYMOUS' undeclared

2008-07-03 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: I will stop posting URLs. ;-) Thanks. None of the URLs seem to be helpful, anyway. Please avoid posting URLs without any indication as to what specific conclusion you like to see drawn from the page. It seems that Solaris 2.6 just doesn't

[issue3266] Python-2.5.2/Modules/mmapmodule.c:915: error: `O_RDWR' undeclared

2008-07-03 Thread Martin Mokrejs
Martin Mokrejs [EMAIL PROTECTED] added the comment: So adding these two lines helped: # diff /usr/scratch/Python-2.5.2/Modules/mmapmodule.c.ori /usr/scratch/Python-2.5.2/Modules/mmapmodule.c 36a37 #include sys/types.h 38a40 #include fcntl.h # ___ Python

[issue3265] Python-2.5.2/Modules/_ctypes/malloc_closure.c:70: error: `MAP_ANONYMOUS' undeclared

2008-07-03 Thread Martin Mokrejs
Martin Mokrejs [EMAIL PROTECTED] added the comment: Thanks, but I can only help with testing. :( ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3265 ___ ___

[issue3264] Use -lcrypto instead of -lcrypt on Solaris 2.6 when available

2008-07-03 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Ok. I have no further ideas on what the problem might be, but I'm confident that linking with a different library is not the right thing to do. Linking with -lcrypt did always work on Solaris 2.6, so I'm not going to change that. --

[issue3264] Use -lcrypto instead of -lcrypt on Solaris 2.6 when available

2008-07-03 Thread Martin Mokrejs
Martin Mokrejs [EMAIL PROTECTED] added the comment: Could it be the name clashing problem between -lcrypt and -lcrypto? bash-3.00# ar x /usr/lib/libcrypt.a;nm -g des_crypt.o U ___errno 033c T _des_crypt 0274 T _des_encrypt U _des_encrypt1 01b0 T _des_setkey

[issue3264] Use -lcrypto instead of -lcrypt on Solaris 2.6 when available

2008-07-03 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: No. We are not linking with libcrypto at all, so there can't be clashes. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3264 ___

[issue3264] Use -lcrypto instead of -lcrypt on Solaris 2.6 when available

2008-07-03 Thread Martin Mokrejs
Martin Mokrejs [EMAIL PROTECTED] added the comment: You say did always work? http://mail.python.org/pipermail/python-list/2002-December/177479.html Maybe the reason why in ruby they forced to -shared flag because it was possible to link only with the shared library? I do not know from which

[issue3088] test_multiprocessing hangs on OS X 10.5.3

2008-07-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: The two tracebacks provided by Mark seem to correspond to the following python stack (innermost last): Lib/test/test_multiprocessing.py, line 1005, in _test_map_unordered self.assertEqual(sorted(it), map(sqr, range(1000)))

[issue3088] test_multiprocessing hangs on OS X 10.5.3

2008-07-03 Thread Ismail Donmez
Ismail Donmez [EMAIL PROTECTED] added the comment: The test hanged for me at first try but worked fine on the second test, weird. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3088 ___

[issue3264] Use -lcrypto instead of -lcrypt on Solaris 2.6 when available

2008-07-03 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Ah, ok. I completely missed the point of the error message (i.e. relocations remain), and misinterpreted it as missing symbols. So I still recommend doing what I recommended back then: Uncomment the line in Modules/Setup to build the crypt

[issue3264] Use -lcrypto instead of -lcrypt on Solaris 2.6 when available

2008-07-03 Thread Martin Mokrejs
Martin Mokrejs [EMAIL PROTECTED] added the comment: Confirming the enabling line 216 like below helped. Thanks. Maybe change Resolution? 204 # Socket module helper for SSL support; you must comment out the other 205 # socket line above, and possibly edit the SSL variable: 206

[issue3088] test_multiprocessing hangs on OS X 10.5.3

2008-07-03 Thread Paul Melis
Paul Melis [EMAIL PROTECTED] added the comment: On a Linux system (FC4) with r64686 of the Py3k branch I also still get occassional hangs (with ./python -E -bb ./Lib/test/regrtest.py -v test_multiprocessing). Mostly this seems to occur with the very first test executed, i.e. before any of the

[issue1322] platform.dist() has unpredictable result under Linux

2008-07-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg [EMAIL PROTECTED] added the comment: Please see the top of platform.py: #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

[issue1322] platform.dist() has unpredictable result under Linux

2008-07-03 Thread Marc-Andre Lemburg
Marc-Andre Lemburg [EMAIL PROTECTED] added the comment: Also note that linux_distribution() will use the parsed distro name from the release file per default (full_distribution_name=1), so the problem described in the original ticket description should no longer be relevant: all release files

[issue3088] test_multiprocessing hangs on OS X 10.5.3

2008-07-03 Thread Mark Dickinson
Mark Dickinson [EMAIL PROTECTED] added the comment: Are you sure that's right? That traceback has no mention of PyObject_Malloc or obmalloc.c. So now I think that the traceback was right. There was no mention of PyObject_Malloc or obmalloc.c because the traceback only showed 1 of the 9

[issue3249] bug adding datetime.timedelta to datetime.date

2008-07-03 Thread Chris Withers
Chris Withers [EMAIL PROTECTED] added the comment: This may be as documented but it's *extremely* counter intuitive and seems to go against the grain of where python is headed. (remember that whole struggle to get 3/2 = 1.5 rather 3/2=1? ;-) ) I've changed the type to feature request, what's

[issue2235] __eq__ / __hash__ check doesn't take inheritance into account

2008-07-03 Thread Nick Coghlan
Nick Coghlan [EMAIL PROTECTED] added the comment: As far as deque goes, the following behaviour on the trunk is the problem I am trying to fix: Python 2.6b1+ (trunk:64655, Jul 2 2008, 22:48:24) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type help, copyright, credits

[issue3249] bug adding datetime.timedelta to datetime.date

2008-07-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: To be valid, your analogy between dates and numbers suggests that a date should be convertible to the datetime with the same date, at midnight. And both objects compare equal, just like 42==42.0 But today this is not the case: it's hard

[issue3269] strptime() makes an error concerning second in arg

2008-07-03 Thread Neven Goršić
New submission from Neven Goršić [EMAIL PROTECTED]: strptime() allows 60 and 61 sec, but not 62 sec in arg. string s='02/28/2000 12:33:61 AM' time.strptime(s,'%m/%d/%Y %I:%M:%S %p') (2000, 2, 28, 0, 33, 61, 0, 59, -1) s='02/28/2000 12:33:62 AM' time.strptime(s,'%m/%d/%Y %I:%M:%S %p')

[issue1622] zipfile hangs on certain zip files

2008-07-03 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Thanks for the patch. This is now committed as r64688 -- resolution: - accepted status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1622

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

2008-07-03 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: The patch for issue1622 was committed as r64688; closing this patch as outdated. -- nosy: +loewis resolution: - out of date status: open - closed ___ Python tracker [EMAIL PROTECTED]

[issue3267] yield in list comprehensions possibly broken in 3.0

2008-07-03 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: This is because list comprehensions are implemented as functions in 3.0 so their scope is not leaked out to the rest of the function. Here is the bytecode for 2.6: dis.dis(f) 2 0 BUILD_LIST 0 3

[issue1746] ZIP files with archive comments longer than 4k not recognized as valid by zipfile module

2008-07-03 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: The patch in #1622 was committed as r64688. -- nosy: +loewis resolution: duplicate - fixed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1746

[issue3270] test_multiprocessing: test_listener_client flakiness

2008-07-03 Thread Jesse Noller
New submission from Jesse Noller [EMAIL PROTECTED]: Per mail thread: http://mail.python.org/pipermail/python-dev/2008-June/080497.html Attached is the patch to connection.py to drop the fqdn call. Final suggestion from Trent: This is a common problem. Binding to '127.0.0.1' will bind to

[issue3269] strptime() makes an error concerning second in arg

2008-07-03 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: Minutes with 61 (0..60) and 62 (0..61) seconds are used to adjust the theoretical calendar because of small differences with real world rotation... Are you aware of any case where a minute with 63 seconds (0..62) should be used? --

[issue3122] sys.getsizeof() gives an AttributeError for _sre objects.

2008-07-03 Thread Robert Schuppenies
Robert Schuppenies [EMAIL PROTECTED] added the comment: Amaury, I was testing your patch and it turns out, that it will ignore any __sizeof__ attribute which may be available through getattr. I adapted it a bit, so now getsizeof will try to call the method on the passed object first, and if it

[issue3258] ctypes assertion failure in trunk

2008-07-03 Thread Kevin Watters
Changes by Kevin Watters [EMAIL PROTECTED]: -- nosy: +kevinwatters ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3258 ___ ___ Python-bugs-list mailing

[issue3269] strptime() makes an error concerning second in arg

2008-07-03 Thread Neven Goršić
Neven Goršić [EMAIL PROTECTED] added the comment: Thank you for your reply, although is not helpful for me. I use strptime() for datedate transformation and datatime boundaries checking and therefore I am not conserned in Reltivity theory. When someone in datetime table enter 02:61:38 it is

[issue3269] strptime() makes an error concerning second in arg

2008-07-03 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: Closing as invalid, two reasons: - Your original issue was that time.strptime() didn't allow 62 seconds, not that it allowed 60 or 61. - If you use it to validate input... how do you actually know that 03/25/2012 17:13:61 AM' is an invalid

[issue3271] iter.next() or iter.__next__() ?

2008-07-03 Thread vizcayno
New submission from vizcayno [EMAIL PROTECTED]: For Win XP SP3 I do next in py30.b1: a=[9,8,1,2] it=iter(a) it.next() Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'list_iterator' object has no attribute 'next' but doing: it.__next__() 9 it.__next__() 8 it

[issue3273] multiprocessing and meaningful errors

2008-07-03 Thread Andrii V. Mishkovskyi
New submission from Andrii V. Mishkovskyi [EMAIL PROTECTED]: multiprocessing uses a lot of `assert` statements all over the code. I propose to change this way to a more readable and understandable. For example: Lib/multiprocessing/managers.py, line 136: assert isinstance(authkey, bytes) From my

[issue1675455] Use getaddrinfo() in urllib2.py for IPv6 support

2008-07-03 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: What I don't understand here is... if gethostbyname() lacks of IPv6 support, instead of creating a new function why not to add the functionality to that same function? Right now gethostbyname() is implemented in C, which would be the drawback

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2008-07-03 Thread Facundo Batista
Changes by Facundo Batista [EMAIL PROTECTED]: ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2008-07-03 Thread Facundo Batista
Changes by Facundo Batista [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10632/unnamed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___

[issue3267] yield in list comprehensions possibly broken in 3.0

2008-07-03 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: Yes, this change in semantics is expected. Closing as won't fix. -- nosy: +brett.cannon resolution: - wont fix status: open - closed ___ Python tracker [EMAIL PROTECTED]

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2008-07-03 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: I see that you're working on a final solution, this is great! What we would need also to incorporate this to the trunk is a patch for the test suite. Senthil, could you handle this? -- assignee: - facundobatista nosy:

[issue2916] urlgrabber.grabber calls setdefaulttimeout

2008-07-03 Thread Facundo Batista
Changes by Facundo Batista [EMAIL PROTECTED]: -- assignee: - facundobatista nosy: +facundobatista, orsenthil ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2916 ___

[issue2756] urllib2 add_header fails with existing unredirected_header

2008-07-03 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: BitTorment, what would increase the possibility of accepting this is a patch also for the test suite (test_urllib2.py), checking this behaviour, for us to be sure that does not break again in the future. Could you please submit also this?

[issue2776] urllib2.urlopen() gets confused with path with // in it

2008-07-03 Thread Facundo Batista
Changes by Facundo Batista [EMAIL PROTECTED]: -- assignee: - facundobatista nosy: +facundobatista, orsenthil ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2776 ___

[issue3274] Py_CLEAR(tmp) seg faults

2008-07-03 Thread Daniel Stutzbach
New submission from Daniel Stutzbach [EMAIL PROTECTED]: I'm writing a C extension module and discovered that Py_CLEAR() causes a crash if the programmer happened to name their variable tmp. The Py_CLEAR() macro internally uses the name tmp in a new scope, hiding the callers tmp, and calling

[issue1063924] asyncore should handle ECONNRESET in send

2008-07-03 Thread Josiah Carlson
Josiah Carlson [EMAIL PROTECTED] added the comment: We are actually closing the socket before returning in the latest version of asyncore. Closing as fixed. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED]

[issue1736101] asyncore should handle also ECONNABORTED in recv

2008-07-03 Thread Josiah Carlson
Josiah Carlson [EMAIL PROTECTED] added the comment: Fixed in trunk, will be fixed in 3.0 this weekend. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1736101 ___

[issue889153] asyncore.dispactcher: incorrect connect

2008-07-03 Thread Josiah Carlson
Josiah Carlson [EMAIL PROTECTED] added the comment: Fixed in trunk, will be fixed in 3.0 this weekend. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue889153

[issue1740572] asynchat should call handle_close

2008-07-03 Thread Josiah Carlson
Josiah Carlson [EMAIL PROTECTED] added the comment: Fixed in trunk, will be fixed in 3.0 this weekend. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1740572

[issue909005] asyncore fixes and improvements

2008-07-03 Thread Josiah Carlson
Josiah Carlson [EMAIL PROTECTED] added the comment: I have applied my variant patch to trunk, which will be in 3.0 this weekend. -- resolution: - out of date status: open - closed ___ Python tracker [EMAIL PROTECTED]

[issue1025525] asyncore.file_dispatcher should not take fd as argument

2008-07-03 Thread Josiah Carlson
Josiah Carlson [EMAIL PROTECTED] added the comment: Fixed in trunk, will be fixed in 3.0 this weekend. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1025525

[issue1736190] asyncore/asynchat patches

2008-07-03 Thread Josiah Carlson
Josiah Carlson [EMAIL PROTECTED] added the comment: Committed to trunk a bit ago, will be in 3.0 this weekend. -- resolution: - accepted status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1736190

[issue2464] urllib2 can't handle http://www.wikispaces.com

2008-07-03 Thread Facundo Batista
Changes by Facundo Batista [EMAIL PROTECTED]: -- assignee: - facundobatista nosy: +facundobatista ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2464 ___

[issue3250] datetime.time does not support arithmetic

2008-07-03 Thread George Boutsioukis
George Boutsioukis [EMAIL PROTECTED] added the comment: I have also come across this in the past. Although I sense that some obscure reason might prevent time arithmetic from being included, here's a patch to add time/timedelta addition and subtraction. It closely follows the datetime arithmetic

[issue2808] asynchat forgets packets when push is called from a thread

2008-07-03 Thread Josiah Carlson
Changes by Josiah Carlson [EMAIL PROTECTED]: -- status: pending - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2808 ___ ___ Python-bugs-list

[issue2275] urllib2 header capitalization

2008-07-03 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: Senthil: We would need some tests to assure this will keep working ok in the future Also as this is (somehow) a new functionality, we'd need to modify the NEWS file and maybe even the docs (a comment about this case insensitivity? Could you

[issue3271] iter.next() or iter.__next__() ?

2008-07-03 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Where in the 3.0 docs do you see it.next() used? It should be changed. -- nosy: +benjamin.peterson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3271

[issue1462525] URI parsing library

2008-07-03 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: Senthil, we should incorporate the tests from RFC 3986 to the test suite, what do you think? Coul we integrate the effort from Paul Jimenez and the current urlparse and achieve a RFC compliant library? Should we handle this compliance in this

[issue3271] iter.next() or iter.__next__() ?

2008-07-03 Thread vizcayno
vizcayno [EMAIL PROTECTED] added the comment: Please, go to python 3.0 - python manuals and search with word: iter then select first line of found titles, i.e. Functional Programming HOWTO. Into this title you will find some samples. Regards, ___ Python

[issue3271] iter.next() or iter.__next__() ?

2008-07-03 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: fixed in r64696. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3271 ___ ___ Python-bugs-list mailing list

[issue3271] iter.next() or iter.__next__() ?

2008-07-03 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3271 ___

[issue3275] Control flow not optimized

2008-07-03 Thread Daniel Colascione
New submission from Daniel Colascione [EMAIL PROTECTED]: Consider: import dis def foo(): if 0 and 1: return hi dis.dis(foo) What I get is 2 0 LOAD_CONST 1 (0) 3 JUMP_IF_FALSE 15 (to 21) 6 POP_TOP 7

[issue3275] Control flow not optimized

2008-07-03 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: A patch for this was just recently rejected. See #1394. -- nosy: +benjamin.peterson resolution: - rejected status: open - closed ___ Python tracker [EMAIL PROTECTED]

[issue1580] Use shorter float repr when possible

2008-07-03 Thread Guido van Rossum
Guido van Rossum [EMAIL PROTECTED] added the comment: I'd like to reopen this. I'm still in favor of something like to this algorithm: def float_repr(x): s = %.16g % x if float(s) != x: s = %.17g % x s1 = s if s1.startswith('-'): s1 = s[1:] if s1.isdigit(): s += '.0' #

[issue3008] Let bin/oct/hex show floats

2008-07-03 Thread Guido van Rossum
Guido van Rossum [EMAIL PROTECTED] added the comment: Raymond, Mark? Is a new patch with tests and docs forthcoming? Have you decided on the API yet? I'm willing to approve this for beta 2, which will be around July 15. -- assignee: gvanrossum - rhettinger

[issue3276] httplib.HTTPConnection._send_request should not blindly assume dicts for headers

2008-07-03 Thread toxik
New submission from toxik [EMAIL PROTECTED]: Presently it's impossible to use httplib.HTTPConnection.request and send the several headers with the same name. This is because _send_request assumes a dict is passed in, or a dict-like interface. Obviously one could make a list subclass or some

[issue1580] Use shorter float repr when possible

2008-07-03 Thread Tim Peters
Tim Peters [EMAIL PROTECTED] added the comment: If you think using 16 (when possible) will stop complaints, think again ;-) For example, for x in 0.07, 0.56: ... putatively_improved_repr = %.16g % x ... assert float(putatively_improved_repr) == x ... print putatively_improved_repr

[issue3277] socket's OOB data management is broken on FreeBSD

2008-07-03 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' [EMAIL PROTECTED]: -- components: +Library (Lib) type: - behavior ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3277 ___

[issue3278] socket's SO_REUSEADDR option does not work on FreeBSD

2008-07-03 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' [EMAIL PROTECTED]: When the SO_OOBINLINE option is used against a socket, out-of-band data should be placed in the normal data input stream as it is received. In fact this is what happens on Windows and Linux by using the script below. On FreeBSD this does

[issue3278] socket's SO_REUSEADDR option does not work on FreeBSD

2008-07-03 Thread Giampaolo Rodola'
Giampaolo Rodola' [EMAIL PROTECTED] added the comment: This bug should be strictly related with issue 3277: http://bugs.python.org/issue3277 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3278 ___

[issue3277] socket's OOB data management is broken on FreeBSD

2008-07-03 Thread Giampaolo Rodola'
Giampaolo Rodola' [EMAIL PROTECTED] added the comment: This bug should be strictly related with issue 3278: http://bugs.python.org/issue3278 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3277 ___

[issue1580] Use shorter float repr when possible

2008-07-03 Thread Guido van Rossum
Guido van Rossum [EMAIL PROTECTED] added the comment: That is truly maddening! :-( I guess Noam's proposal to return str(x) if float(str(x)) == x makes more sense then. I don't really care as much about 1.234567890123 vs. 1.234567890122 as I care about 1.2345 vs. 1.2344. (This

[issue3277] socket's OOB data management is broken on FreeBSD

2008-07-03 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Why do you think this is a bug in Python, and not in FreeBSD? -- nosy: +loewis ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3277 ___