[issue1191] bsddb does not build with bsddb lib v3.1.

2008-01-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: BerkeleyDB 3.3 through 4.5 are supported. 4.6 support has been checked in and 4.7 (not yet released) support is supposedly on its way from someone at oracle. Versions older than 3.3 are too difficult (and too buggy) to support. You're on your own if you

[issue730938] Python bsddb docs need update

2008-01-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: ReST format docs that cover what is actually implemented and wrapped in python would be good. We need a volunteer willing to go through and do it. -- assignee: gregory.p.smith - nosy: +jcea title: Python 2.3 bsddb docs need update - Python bsddb

[issue1913] test_pep263 fails

2008-01-23 Thread Christian Heimes
New submission from Christian Heimes: $ ./python Lib/test/regrtest.py -v test_pep263 test_pep263 test_compilestring (test.test_pep263.PEP263Test) ... FAIL test_pep263 (test.test_pep263.PEP263Test) ... ok == FAIL:

[issue1202] zlib.crc32() and adler32() return value

2008-01-23 Thread Gregory P. Smith
Changes by Gregory P. Smith: -- assignee: - gregory.p.smith keywords: +64bit, easy nosy: +gregory.p.smith priority: - normal versions: +Python 2.6, Python 3.0 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1202

[issue1223] httplib does not handle ssl end of file properly

2008-01-23 Thread Gregory P. Smith
Changes by Gregory P. Smith: -- assignee: - janssen __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1223 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1789] incorrect assumption about unsigned long byte size

2008-01-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: the docs I see in the URL you give are correct as it states 'two and four byte unsigned integer respectively' for H and L. However the example is missing the for little-endian; I'll add that. Also, I notice that the struct module documentation itself

[issue1223] httplib does not handle ssl end of file properly

2008-01-23 Thread Christian Heimes
Christian Heimes added the comment: I've set version to 2.6 and priority to high so we don't forget it. -- nosy: +tiran priority: - high versions: +Python 2.6 -Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1223

[issue1789] incorrect assumption about unsigned long byte size

2008-01-23 Thread Christopher Yeleighton
Christopher Yeleighton added the comment: Python 2.5.1 (r251:54863, Oct 5 2007, 13:50:07) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type help, copyright, credits or license for more information. import struct g_f = open('/dev/null') struct.unpack('L',

[issue1910] Document that with is slower than try/finally

2008-01-23 Thread Christian Heimes
Christian Heimes added the comment: Oh, I didn't know that with is slower than try/finally. It should get documented that try/finally is better suited than with for performance critical code. -- assignee: - georg.brandl components: +Documentation -Library (Lib) keywords: -patch nosy:

[issue1915] Python 2.5.1 compile failed with configure option --enable-unicode=no

2008-01-23 Thread Song Ma
New submission from Song Ma: In my platform I have to disable Unicode support in Python 2.5.1. The configure file provided a option --enable-unicode=no to allow me to do so. However, If I ran the configure with that option and then make, the following error showed: Python/ast.c:3168: undefined

[issue1910] Document that with is slower than try/finally

2008-01-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Raymond, does your comment also apply to change at r60189 ? It is exactly the same thing, in threading.py... OTOH, _threading_local.py is not used by the standard library, except by the dummy_threading module; threading.local normally comes from

[issue1910] Document that with is slower than try/finally

2008-01-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: In ceval.c, the case WITH_CLEANUP contains the following lines: /* XXX Not the fastest way to call it... */ x = PyObject_CallFunctionObjArgs(x, u, v, w, NULL); Maybe this is something not too difficult to improve? __

[issue1915] Python 2.5.1 compile failed with configure option --enable-unicode=no

2008-01-23 Thread Christian Heimes
Christian Heimes added the comment: Python/ast.c has been fixed but more code needs to be fixed: gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Parser/tokenizer.o Parser/tokenizer.c Parser/tokenizer.c: In

[issue1916] Add inspect.isgenerator

2008-01-23 Thread Christian Heimes
New submission from Christian Heimes: The inspect module has no function isgenerator. -- components: Documentation, Library (Lib) keywords: easy messages: 61577 nosy: tiran priority: low severity: normal status: open title: Add inspect.isgenerator type: rfe versions: Python 2.6, Python

[issue1767511] SocketServer.DatagramRequestHandler

2008-01-23 Thread Ben Bass
Ben Bass added the comment: I've just bumped into this issue. In my opinion the finish() method should only do anything if wfile is not empty, i.e: temp = self.wfile.getvalue() if temp: self.socket.sendto(temp, self.client_address) -- nosy: +bpb

[issue1767511] SocketServer.DatagramRequestHandler

2008-01-23 Thread Christian Heimes
Christian Heimes added the comment: Can you provide a working patch with a unit test and doc updates? -- nosy: +tiran type: - behavior versions: +Python 2.6 _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1767511

[issue1754489] Non-portable address length calculation for AF_UNIX sockets

2008-01-23 Thread Armin Rigo
Armin Rigo added the comment: Checked in as r60214. -- resolution: - accepted status: open - closed _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1754489 _ ___

[issue1736] Three bugs of FCICreate (PC/_msi.c)

2008-01-23 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Umm, please forget previous comment. msilib.FCICreate(a * 256 + / + b * 255, []) crashed on debug build. (CB_MAX_CAB_PATH == 256) -- title: Two bugs of FCICreate (PC/_msi.c) - Three bugs of FCICreate (PC/_msi.c) __

[issue1767511] SocketServer.DatagramRequestHandler

2008-01-23 Thread Ben Bass
Ben Bass added the comment: Main issue here (as I see it) is that StreamRequestHandler and DatagramRequestHandler should behave in the same way. This is not the case in Python 2.5.1 for the case where the handle method does not respond to the request socket (e.g. in my case it is forwarding

[issue1577] shutil.move() does not use os.rename() if dst is a directory

2008-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Before tackling this, I'd like a precision on os.rename(src, dst) semantics. The documentation says If dst is a directory, OSError will be raised. However, under Linux, if src is a directory and dst is an empty directory, dst is overwritten with src: $ mkdir

[issue1915] Python 2.5.1 compile failed with configure option --enable-unicode=no

2008-01-23 Thread Christian Heimes
Christian Heimes added the comment: I fixed it for Python 2.5 and 2.6. However several extensions and modules don't work w/o unicode support. Please contribute fixes if you need more support. r60215 r60216 -- priority: high - normal resolution: - fixed status: open - closed

[issue1577] shutil.move() does not use os.rename() if dst is a directory

2008-01-23 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: Before tackling this, I'd like a precision on os.rename(src, dst) semantics. The documentation says If dst is a directory, OSError will be raised. However, under Linux, if src is a directory and dst is an empty directory, dst is overwritten with src:

[issue1577] shutil.move() does not use os.rename() if dst is a directory

2008-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Does this mean we should preserve this behaviour for shutil.move() as well? Right now, shutil.move(src_dir, dst_dir) replaces dst_dir with src_dir if dst_dir is empty, but moves src_dir inside dst_dir otherwise. __ Tracker [EMAIL

[issue1577] shutil.move() does not use os.rename() if dst is a directory

2008-01-23 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: Does this mean we should preserve this behaviour for shutil.move() as well? I don't think so. The key is to remember that shutil.move() is os.rename() with some additional benefits (as stated by Guido in an earlier comment). Also, changing the behaviour

[issue1180193] broken pyc files

2008-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: If code objects grew a __module__ attribute (which functions already have), wouldn't it be just a matter of falling back on sys.modules[my_code_object.__module__].__file__ when my_code_object.co_filename points to a non-existent file? -- nosy: +pitrou

[issue1917] init_types() in Parser/asdl_c.py conflicts with init_types() in Modules/_typesmodule.c

2008-01-23 Thread Graeme Smecher
New submission from Graeme Smecher: On a BFLT (microblaze-uclinux) build of vanilla Python 2.5.1, startup -v produces the following: # python -v Could not find platform dependent libraries exec_prefix Consider setting $PYTHONHOME to prefix[:exec_prefix] # installing zipimport hook

[issue1913] test_pep263 fails

2008-01-23 Thread Georg Brandl
Georg Brandl added the comment: Fixed in r60220. -- nosy: +georg.brandl resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1913 __

[issue1069410] import on Windows: please call SetErrorMode first

2008-01-23 Thread Christian Heimes
Christian Heimes added the comment: Applied in 60221 -- resolution: - fixed status: open - closed _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1069410 _ ___

[issue1789] incorrect assumption about unsigned long byte size

2008-01-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: eew, so the struct module does map as documented to the C types listed in the docs. yuck. regardless, changing the Ls to Is will fix the tutorial document code. I'll do that. I believe there are also other instances of wrong uses of L in struct in the code

[issue618633] sys.execpthook not used in threads

2008-01-23 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: This is a duplicate of a more recently opened #1230540. -- nosy: +draghuram resolution: - duplicate status: open - closed Tracker [EMAIL PROTECTED] http://bugs.python.org/issue618633

[issue1722225] Build on QNX 6

2008-01-23 Thread Matt Kraai
Matt Kraai added the comment: If they're defined, TCGETA, TCSETA, TCSETAW, and TCSETAF are used on lines 702, 714, 717, and 720 of Modules/termios.c as of r60219. They are defined by sys/ioctl.h as #define TCGETA _IOR('T', 1, struct termio) #define TCSETA _IOW('T', 2,

[issue1568] PATCH: Armin's attribute lookup caching for 3.0

2008-01-23 Thread Neil Toronto
Neil Toronto added the comment: There's nothing it tests that standard unit tests don't, so it shouldn't stick around as a unit test. I used it to time different types of attribute lookups and left it in as an optimization aid. The main test groups are '.' access, successful hasattr (returns

[issue1917] init_types() in Parser/asdl_c.py conflicts with init_types() in Modules/_typesmodule.c

2008-01-23 Thread Christian Heimes
Christian Heimes added the comment: The compiler should not pick up the init_types function in Python/Python-ast.c. It's declared as static. The init_types function in Modules/_typesmodule.c is declared as extern so that's the real deal. It sounds more like a compiler or linker bug in the tool

[issue1918] weak references are removed before __del__ is called.

2008-01-23 Thread Jeff Foran
New submission from Jeff Foran: Not sure where to put example code, but here it goes: import weakref class MyObj(object): def __init__(self): self.ref = weakref.ref(self) def __del__(self): print HERE123, self.ref() o = MyObj() o = None

[issue1917] init_types() in Parser/asdl_c.py conflicts with init_types() in Modules/_typesmodule.c

2008-01-23 Thread Graeme Smecher
Graeme Smecher added the comment: Hm, sorry for the static -- you're absolutely correct, this has to be a compiler/linker/elf2flt bug. I'll patch my build instead of whining here. Thanks -- Feel free to close the report. __ Tracker [EMAIL PROTECTED]

[issue1917] init_types() in Parser/asdl_c.py conflicts with init_types() in Modules/_typesmodule.c

2008-01-23 Thread Brett Cannon
Changes by Brett Cannon: -- resolution: - invalid status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1917 __ ___ Python-bugs-list mailing list

[issue1745035] DoS smtpd vulnerability

2008-01-23 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I update this bug as GvR requested here: http://groups.google.it/group/python-dev2/browse_thread/thread/33cad7b7c1cdb19f?hl=it The patch in attachment fixes what discussed before. In addition it sets a smaller timeout for asyncore.loop() for permitting to

[issue1736190] asyncore/asynchat patches

2008-01-23 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola': -- severity: normal - urgent type: - security versions: +Python 2.5 _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1736190 _ ___

[issue1736190] asyncore/asynchat patches

2008-01-23 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola': -- severity: urgent - normal type: security - versions: +Python 2.6 -Python 2.5 _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1736190 _

[issue1918] weak references are removed before __del__ is called.

2008-01-23 Thread Christian Heimes
Christian Heimes added the comment: The behavior is documented in the C code. I don't know how it is described in the docs. Objects/typeobject.c around line 820 says: /* If we added a weaklist, we clear it. Do this *before* calling the finalizer (__del__), clearing slots, or clearing the

[issue1789] incorrect assumption about unsigned long byte size

2008-01-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: The documentation for the struct module says: short is 2 bytes; int and long are 4 bytes; long long (__int64 on Windows) is 8 bytes and lists 'l' and 'L' as the pack code for a C long. As it is implemented today, the documentation is incorrect. On an LP64

[issue1303614] Bypassing __dict__ readonlyness

2008-01-23 Thread Guido van Rossum
Guido van Rossum added the comment: Reopening, since test67.py still causes a segfault in the trunk. It is represented as Lib/test/crashers/loosing_dict_ref.py [sic]. -- nosy: +gvanrossum priority: normal - urgent status: closed - open _ Tracker

[issue1918] weak references are removed before __del__ is called.

2008-01-23 Thread Guido van Rossum
Guido van Rossum added the comment: Georg, can you update the docs? Weak references *to* an object are cleared before the object's __del__ is called, to ensure that the weak reference callback (if any) finds the object healthy. -- assignee: - georg.brandl nosy: +georg.brandl,

[issue1722225] Build on QNX 6

2008-01-23 Thread Matt Kraai
Matt Kraai added the comment: This patch contains two improvements over the previous version: * it uses configure to check whether sys/termio.h is available and uses the result to determine whether to include it and * it makes malloc_closure.c use _SC_PAGESIZE instead of getpagesize if it's

[issue1577] shutil.move() does not use os.rename() if dst is a directory

2008-01-23 Thread Guido van Rossum
Guido van Rossum added the comment: Before tackling this, I'd like a precision on os.rename(src, dst) semantics. The documentation says If dst is a directory, OSError will be raised. However, under Linux, if src is a directory and dst is an empty directory, dst is overwritten with src: $

[issue1917] init_types() in Parser/asdl_c.py conflicts with init_types() in Modules/_typesmodule.c

2008-01-23 Thread Guido van Rossum
Guido van Rossum added the comment: The comment in config.c is wrong. If you still have a Python/_typesmodule.c file, something's wrong on your end! -- nosy: +gvanrossum __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1917

[issue1917] init_types() in Parser/asdl_c.py conflicts with init_types() in Modules/_typesmodule.c

2008-01-23 Thread Graeme Smecher
Graeme Smecher added the comment: Hi Guido, Yup! From the tarball (Python-2.5.1.tgz), the actual comment (in Modules/config.c.in) reads: /* This lives in Python/_types.c */ {_types, init_types}, ...which is different from the snippet I posted here (I hand-reverted my

[issue1303614] Bypassing __dict__ readonlyness

2008-01-23 Thread Guido van Rossum
Guido van Rossum added the comment: Here's a better fix, which also fixes the similar code path in GenericSetAttr(). As a bonus, I reviewed all uses of _PyObject_GetDictPtr() and found one questionable place where the dict at *dictptr was DECREF'ed before that location was set to NULL. I think

[issue1303614] Bypassing __dict__ readonlyness

2008-01-23 Thread Guido van Rossum
Changes by Guido van Rossum: Added file: http://bugs.python.org/file9275/deldict.diff _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1303614 _ ___ Python-bugs-list

[issue1303614] Bypassing __dict__ readonlyness

2008-01-23 Thread Guido van Rossum
Changes by Guido van Rossum: Removed file: http://bugs.python.org/file9274/deldict.diff _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1303614 _ ___ Python-bugs-list

[issue1789] assumption about unsigned long byte size in struct module usage

2008-01-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: A significant portion of the python standard library is broken due to incorrect use of the struct module on LP64 platforms. I'm attaching a patch that should clean it up. I need Mac OS X people to confirm that the Mac changes are sane. Its possible that the

[issue1303614] Bypassing __dict__ readonlyness

2008-01-23 Thread Neal Norwitz
Changes by Neal Norwitz: -- nosy: +nnorwitz _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1303614 _ ___ Python-bugs-list mailing list Unsubscribe:

[issue1743] IDLE fails to launch

2008-01-23 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: Thanks for the fix. r60225. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1743 __ ___

[issue1862] Error on Save As in IDLE (Vista 32-bit)

2008-01-23 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: r60225. Dup of Issue 1743. -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1862 __ ___

[issue1789] assumption about unsigned long byte size in struct module usage

2008-01-23 Thread Georg Brandl
Changes by Georg Brandl: -- priority: high - urgent __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1789 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1794] Hot keys must work in any keyboard layout

2008-01-23 Thread Kurt B. Kaiser
Changes by Kurt B. Kaiser: __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1794 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1794] Hot keys must work in any keyboard layout

2008-01-23 Thread Kurt B. Kaiser
Changes by Kurt B. Kaiser: -- components: -IDLE __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1794 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1599] IDLE hangs if os.spwanv command is given

2008-01-23 Thread Kurt B. Kaiser
Changes by Kurt B. Kaiser: Removed file: http://bugs.python.org/file9032/unnamed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1599 __ ___ Python-bugs-list mailing list

[issue1599] IDLE hangs if os.spwanv command is given

2008-01-23 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: Does it fail for foo.py: def foo(): pass import os os.spawnv(os.P_NOWAIT, 'foo.py', '') 5026 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1599 __

[issue1647] IDLE messes around with sys.exitfunc

2008-01-23 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: And yet some people were seeing this error. I was not, on Linux, and I don't know why. Fixed at r60227. -- resolution: works for me - fixed versions: -Python 3.0 __ Tracker [EMAIL PROTECTED]

[issue1303614] Bypassing __dict__ readonlyness

2008-01-23 Thread Guido van Rossum
Guido van Rossum added the comment: The more i think about it, I don't think the issue in typeobject.c can ever occur, so I'm skipping that part of the fix. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1303614 _

[issue1303614] Bypassing __dict__ readonlyness

2008-01-23 Thread Adam Olsen
Changes by Adam Olsen: -- nosy: +Rhamphoryncus _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1303614 _ ___ Python-bugs-list mailing list Unsubscribe:

[issue1910] Document that with is slower than try/finally

2008-01-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: Most platforms use the faster thread.LockType. Correct? Perhaps, since this module is more a reference implementation and it is pointed to by the threading docs (http://docs.python.org/lib/module-threading.html), we should elect to take the more pythonic

[issue1910] Document that with is slower than try/finally

2008-01-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Generally we don't document the speed differences between various alternatives. One reason is that relative performance varies across releases and platforms. Another reason is that the rule in this case is somewhat generic (inlined code is typically

[issue1910] Document that with is slower than try/finally

2008-01-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Amaury, please do revert 60189. There is no reason to destabalize this code, slow it down, and introduce new dependencies. Use of the with-statement is not in and of itself a best practice. Where it really shines is in factoring-away repeated

[issue1303614] Bypassing __dict__ readonlyness

2008-01-23 Thread Neal Norwitz
Neal Norwitz added the comment: I looked at Guido's latest deldict.diff patch--the one to Objects/object.c only. It seems good. I can't convince myself either way about the change to Objects/typeobject.c. I can't think of a way to cause a problem. It seems safer to use Py_CLEAR in this case

[issue1617] Rare exception in test_urllib2net

2008-01-23 Thread Neal Norwitz
Neal Norwitz added the comment: This started happening consistently on my box and I was able to reproduce it. Revision 60233 should fix this problem. I forwarded the checkin to Greg. Hopefully he can comment if there is a problem. (Also cc'd him on this bug report that I'm now closing.)