[issue4267] sqlite3 documentation

2008-11-05 Thread Gabriel Genellina
New submission from Gabriel Genellina <[EMAIL PROTECTED]>: Three small changes to sqlite3 documentation: 1) (mostly cosmetic) In the second example, changed what was "a tuple of tuples" to "a list of tuples" to follow common practice. 2) "DEFERRED", "IMMEDIATE" and "EXLUSIVE" (possible values

[issue4264] Patch: optimize code to use LIST_APPEND instead of calling list.append

2008-11-05 Thread Neal Norwitz
Neal Norwitz <[EMAIL PROTECTED]> added the comment: Interesting approach. I was surprised to see the change to the AST, but I understand why you did it. I think if the AST optimization approach works out well, we will want to have some more general mechanism to communicate these optimization (o

[issue4266] Python 3.0 docs are broken.

2008-11-05 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: The issue is not as "easy" as it seems (or at least that's what I believe). Barry, if you install the xetex package, the build should run fine. ___ Python tracker <[EMAIL PROTECTED]>

[issue4266] Python 3.0 docs are broken.

2008-11-05 Thread Winfried Plappert
Winfried Plappert <[EMAIL PROTECTED]> added the comment: This is a simple one to fix: remove the second \fi on the incriminated line in sphinx.sty, line 62. I just checked out Sphinx version 67115 and retested. With my fix = removal of the second \fi, the make process works. The issue also app

[issue4266] Python 3.0 docs are broken.

2008-11-05 Thread Barry A. Warsaw
New submission from Barry A. Warsaw <[EMAIL PROTECTED]>: The Python 3.0 documentation is broken. This is blocking the 3.0rc2 release. I'm too tired right now to figure out what the base problem is. This was during the ".../release.py --export 3.0rc2" build phase. pdflatex 'c-api.tex' This is p

[issue3799] Byte/string inconsistencies between different dbm modules

2008-11-05 Thread Skip Montanaro
Changes by Skip Montanaro <[EMAIL PROTECTED]>: -- nosy: -skip.montanaro ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list

[issue3775] Update RELNOTES file

2008-11-05 Thread Barry A. Warsaw
Barry A. Warsaw <[EMAIL PROTECTED]> added the comment: This is really done, so closing. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue2744] Fix test_cProfile

2008-11-05 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- priority: critical -> high ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bu

[issue4236] Crash when importing builtin module during interpreter shutdown

2008-11-05 Thread Barry A. Warsaw
Barry A. Warsaw <[EMAIL PROTECTED]> added the comment: This seems like a corner case to me. We should fix it before the final release, but I don't think it's worth holding up 3.0rc2 for it. Deferring. -- priority: release blocker -> deferred blocker ___

[issue3799] Byte/string inconsistencies between different dbm modules

2008-11-05 Thread Barry A. Warsaw
Barry A. Warsaw <[EMAIL PROTECTED]> added the comment: I don't see enough progress on this issue, and I'm not going to hold up 3.0rc2 for it, so I'm deferring. -- nosy: +barry priority: release blocker -> deferred blocker ___ Python tracker <[EMAIL PR

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2008-11-05 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: PyLong_FromLong() doesn't go into the 1 digit special case for negative number. You should use: /* Fast path for single-digits ints */ if (!(abs_ival>>PyLong_SHIFT)) { v = _PyLong_New(1); if (v)

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2008-11-05 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: > marshal now uses base 2**15 for reading and writing Yes, it uses base 2**15 but it's not the correct conversion to base 2**15. You convert each PyLong digit to base 2**15 but not the whole number. As a result, the format is different than

[issue4247] Docs: Provide some examples of "pass" use in the tutorial.

2008-11-05 Thread Sean Reifschneider
Sean Reifschneider <[EMAIL PROTECTED]> added the comment: I'm attaching a new version here, which addresses the object call type comments. Added file: http://bugs.python.org/file11948/pass-examples-2.patch ___ Python tracker <[EMAIL PROTECTED]>

[issue3799] Byte/string inconsistencies between different dbm modules

2008-11-05 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: The patch causes three errors: == ERROR: test_anydbm_access (test.test_dbm.TestCase-dbm.dumb) -- Traceba

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2008-11-05 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Mark: would it be possible to keep the "2 digits" hack in PyLong_FromLong, especially with base 2^15? Eg. "#if PyLong_SHIFT == 15". The base 2^15 slow, so don't make it slower :-) - /* 2 digits */ - if (!(ival >> 2*PyLong_SHIFT)

[issue4260] ctypes.xFUNCTYPE are decorators.

2008-11-05 Thread Kevin Watters
Kevin Watters <[EMAIL PROTECTED]> added the comment: As far as I know, the above code will fail randomly in release mode if you have multiple threads running Python, because when ctypes calls out to CFUNCTYPE functions, it releases the GIL. For decorating a python function to give to qsort, ma

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2008-11-05 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11936/30bit_longdigit2.patch ___ Python tracker <[EMAIL PROTECTED]> ___

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2008-11-05 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Following Victor's suggestion, here's an updated patch; same as before, except that marshal now uses base 2**15 for reading and writing, independently of whether PyLong_SHIFT is 15 or 30. Added file: http://bugs.python.org/file11947/30bit_l

[issue4211] frozen packages set an improper __path__ value

2008-11-05 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Fixed in r67112. -- nosy: +benjamin.peterson resolution: accepted -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> __

[issue4211] frozen packages set an improper __path__ value

2008-11-05 Thread Guido van Rossum
Guido van Rossum <[EMAIL PROTECTED]> added the comment: I approve of the API change. It's 3.0, dammit! -- nosy: +gvanrossum resolution: -> accepted ___ Python tracker <[EMAIL PROTECTED]>

[issue4262] import and compile() do not treat trailing whitespace the same

2008-11-05 Thread Brett Cannon
Changes by Brett Cannon <[EMAIL PROTECTED]>: -- nosy: +brett.cannon ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mail

[issue4211] frozen packages set an improper __path__ value

2008-11-05 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: FWIW, I agree with the idea of fixing it for 3.0 and leaving it in for 2.x. -- nosy: +ncoghlan ___ Python tracker <[EMAIL PROTECTED]> __

[issue4265] shutil.copyfile() leaks file descriptors when disk fills

2008-11-05 Thread Ammon Riley
New submission from Ammon Riley <[EMAIL PROTECTED]>: If the disk fills up during the copy operation, shutil.copyfile() leaks file descriptors. The problem is the order of the close() statements in the finally block. In the event the copy operation runs out of disk space, the fdst.close() call t

[issue3727] poplib module broken by str to unicode conversion

2008-11-05 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Patch applied in r67109 -- nosy: +christian.heimes resolution: accepted -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> _

[issue3714] nntplib module broken by str to unicode conversion

2008-11-05 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Applied in revision r67108 -- nosy: +christian.heimes resolution: accepted -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> __

[issue1210] imaplib does not run under Python 3

2008-11-05 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Committed in r67107 -- resolution: accepted -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue4233] open(0, closefd=False) prints 3 warnings

2008-11-05 Thread Christian Heimes
Changes by Christian Heimes <[EMAIL PROTECTED]>: -- priority: release blocker -> high versions: +Python 2.6, Python 2.7 -Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue4233] open(0, closefd=False) prints 3 warnings

2008-11-05 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Applied in r67106 (py3k) The patch must be backported to 2.6 and 2.7. -- assignee: -> christian.heimes resolution: accepted -> fixed type: -> behavior ___ Python tracker <[EMAIL PROTECTED]>

[issue4264] Patch: optimize code to use LIST_APPEND instead of calling list.append

2008-11-05 Thread David Turner
New submission from David Turner <[EMAIL PROTECTED]>: This is a patch to Tom Lee's AST optimization branch. Python bytecode includes at least one operation which is not directly accessible from Python code: LIST_APPEND, which pops a value and a list off the stack and appends the value to the lis

[issue4233] open(0, closefd=False) prints 3 warnings

2008-11-05 Thread Barry A. Warsaw
Barry A. Warsaw <[EMAIL PROTECTED]> added the comment: Small typo, conveyed to Crys_ in irc. -- nosy: +barry resolution: -> accepted ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue4263] BufferedWriter non-blocking overage

2008-11-05 Thread Banesiu Sever
New submission from Banesiu Sever <[EMAIL PROTECTED]>: In some corner cases io.BufferedWriter raises an io.BlockingIOError "lying" about the number of characters written. I've added some tests and a small change to fix this issue. -- components: Library (Lib) files: bw_overage.diff keywo

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2008-11-05 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: > > And why 30 bits and not 31 bits, or 63 bits, or 120 bits? > > Mostly laziness (...) It was an argument for changing the base used by the mashal :-) > 31 bits would involve rewriting the powering algorithm, which assumes that > PyLong_SHI

[issue4262] import and compile() do not treat trailing whitespace the same

2008-11-05 Thread Mark Seaborn
New submission from Mark Seaborn <[EMAIL PROTECTED]>: compile() raises a SyntaxError if the source code it is given contains trailing spaces or a trailing carriage return character, but this does happen if the same source code is imported or executed. import subprocess data = "if True:\n pass\

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2008-11-05 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: [Victor Stinner] > I saw that you choosed to use the base 2^30 for marshal. For a better > portability (be able to use .pyc generated without your patch), you > may keep the base 2^15. I implemented that in my GMP patch (manual > conversion

[issue4261] The pwd module doesn't distinguish between errors and no user

2008-11-05 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: You're right. getpwnam() and getpwuid() have to check errno. A different error should be raised, something like: RuntimeError("getpwnam(%s) failure: %s" % (name, strerror(errno))) The grp should also be affected. -- nosy: +haypo

[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.

2008-11-05 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: > As for marhsalled data and pyc compatibility, yes that is important to > consider. The problem is also that with the 30-bit digit patch, some Python will use 15 bits whereas some other will use 30 bits. The base in marshal should be the s

[issue3588] sysconfig variable LINKFORSHARED has wrong value for MacOS X framework build

2008-11-05 Thread Matteo Bertini
Matteo Bertini <[EMAIL PROTECTED]> added the comment: I can add that providing the option: -mmacosx-version-min=10.4 or setting the anv var MACOSX_DEPLOYMENT_TARGET=10.4 is it possible to build an extension in MacPython.org too (without that option there was a problem with some 10.5 libs) __

[issue4261] The pwd module doesn't distinguish between errors and no user

2008-11-05 Thread Peter Åstrand
New submission from Peter Åstrand <[EMAIL PROTECTED]>: The getpwnam function in the pwd module does not correctly distinguish between the case when the user does not exist and error conditions. getpwnam() returns NULL in both cases, the the calling code needs to check errno to determine if an err