[issue7946] Convoy effect with I/O bound threads and New GIL

2010-05-14 Thread Nir Aides
Changes by Nir Aides n...@winpdb.org: Removed file: http://bugs.python.org/file17195/bfs.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7946 ___ ___

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-05-14 Thread Nir Aides
Nir Aides n...@winpdb.org added the comment: Duck, here comes another update to bfs.patch. This one with some cleanups which simplify the code and improve behavior (on Windows XP), shutdown code, comments, and experimental use of TSC for timestamps, which eliminates timestamp reading

[issue8709] mention explicitly Windows support for os.devnull

2010-05-14 Thread akira
New submission from akira 4kir4...@gmail.com: Currently it is not obvious that os.devnull works on Windows. -- assignee: d...@python components: Documentation files: doc-os-devnull-windows-r81160.diff keywords: patch messages: 105688 nosy: akira, d...@python priority: normal severity:

[issue8692] Use divide-and-conquer for faster factorials

2010-05-14 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Speaking of getting side-tracked, I didn't see an answer to a question I asked earlier.  I'd like to get some feedback before I proceed with revising the patch. For

[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2010-05-14 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: Yes, I saw the !--: spam string in headers, but it seems that this string doesn't make problems. The displaying page is correct. But after I apply the changes you mentioned: -return '''!--: spam +return '''\r\n\r\n!--: spam I got

[issue8692] Use divide-and-conquer for faster factorials

2010-05-14 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I am attaching an iterative version in C patch. Thanks for doing this comparison. The performance appears to be identical to Daniel's with no small integer multiplication optimization. Okay, let's stick with the recursive version, then.

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-14 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: This is really a bug, but why it's not fixed during such a long time? Since trentm's python_difflib_no_eol.patch patch failed against the current trunk, I modified it to work again, also a patch against py3k. -- nosy: +ysj.ray Added file:

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-14 Thread Ray.Allen
Changes by Ray.Allen ysj@gmail.com: Added file: http://bugs.python.org/file17333/issue_2142_py3k.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2142 ___

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-14 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I think it's arguable whether this is a bug or not. There's no official specification for the unified diff format that I can find anywhere; the GNU description at

[issue6419] Broken test_kqueue.py on OpenBSD

2010-05-14 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: The same patch was applied to the Python port by OpenBSD developer Damien Miller: http://www.openbsd.org/cgi-bin/cvsweb/ports/lang/python/2.6/patches/patch-Lib_test_test_kqueue_py Mark, would it be ok in this situation to apply the

[issue8705] shutil.rmtree with empty filepath

2010-05-14 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- assignee: - tarek priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8705 ___

[issue8705] shutil.rmtree with empty filepath

2010-05-14 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Dan, Can I have the error you get ? Thanks -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8705 ___

[issue8640] subprocess: add envb argument to Popen constructor (Python3, POSIX only)

2010-05-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Why wouldn't you give byte variables in env too? The problem with the canonicalization to bytes is to choice of the preferred type. Eg. env={'PATH': 'a', b'PATH': b'b'}: should we use 'a', 'b' or raise an error? subprocess does

[issue8424] Test assumptions for test_itimer_virtual and test_itimer_prof

2010-05-14 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Luckily, the OpenBSD failures are caused by issues in libpthread. This means that some skips could be added (as for FreeBSD), but I'll open a separate issue for that. Thanks for the comments on the patch. I add two new patches that

[issue8424] Test assumptions for test_itimer_virtual and test_itimer_prof

2010-05-14 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: Added file: http://bugs.python.org/file17335/issue8424-trunk-skiptest.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8424 ___

[issue8710] test_xpickle: compat tests: workaround for missing test_support

2010-05-14 Thread Stefan Krah
New submission from Stefan Krah stefan-use...@bytereef.org: When the system python does not have the Lib/test directory, the compat tests are failing. == ERROR: test_attribute_name_interning

[issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None

2010-05-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: since the prompt is written to stderr, why is sys.stdout.encoding used instead of sys.stderr.encoding? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8256

[issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None

2010-05-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: amaury since the prompt is written to stderr, why is sys.stdout.encoding amaury used instead of sys.stderr.encoding? input() calls PyOS_Readline() but PyOS_Readline() has multiple implementations: - PyOS_StdioReadline() if

[issue3771] test_httpservers intermittent failure, test_post and EINTR

2010-05-14 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: The EINTR issue should be fixed in trunk (issue1628205). Have you by any chance run the test suite on trunk in the meantime? -- nosy: +skrah ___ Python tracker rep...@bugs.python.org

[issue8709] mention explicitly Windows support for os.devnull

2010-05-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: If there’s no note stating some object is only available on one platform, then it’s available for all. That said, for this case I agree with your patch. -- nosy: +merwok ___ Python tracker

[issue8710] test_xpickle: compat tests: workaround for missing test_support

2010-05-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I don’t understand your installation. Do you have some parts of the test infrastructure but not test_support? Why? -- nosy: +merwok ___ Python tracker rep...@bugs.python.org

[issue1813] Codec lookup failing under turkish locale

2010-05-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1813 ___

[issue8710] test_xpickle: compat tests: workaround for missing test_support

2010-05-14 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: The compat tests check that pickling in the newly compiled Python version is compatible with pickling in installed Python versions. The installed versions may or may not have a test directory. For example, the 2.6 port in OpenBSD does

[issue8711] Document PyUnicode_DecodeFSDefault() and PyUnicode_DecodeFSDefaultAndSize()

2010-05-14 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: Attached patch document PyUnicode_DecodeFSDefault() and PyUnicode_DecodeFSDefaultAndSize() in Doc/c-api/, and fix comment in Include/unicodeobject.c (remove reference to bytearray, and specify that surrogateescape is used). The

[issue6610] Subprocess descriptor debacle

2010-05-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Would the test still be correct if it didn't close stderr? I feel closing stderr is very bad from a debuggability standpoint. -- ___ Python tracker rep...@bugs.python.org

[issue8711] Document PyUnicode_DecodeFSDefault() and PyUnicode_DecodeFSDefaultAndSize()

2010-05-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: The bulk of the patch seems good to me, with some minor remarks: - You haven’t used title case consistently in all section titles. - I’d just say “wchar_t Support” in a title, deleting “for platforms which support it”. - You could mark up “bytes”

[issue8712] Skip libpthread related test failures on OpenBSD

2010-05-14 Thread Stefan Krah
New submission from Stefan Krah stefan-use...@bytereef.org: [Added OpenBSD Python port maintainers to the nosy list.] I've identified a number of tests that all pass when Python is compiled without threads, but fail otherwise. The failures are probably caused by libpthread issues in OpenBSD, as

[issue8424] Test assumptions for test_itimer_virtual and test_itimer_prof

2010-05-14 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The patches look good, so yes, please apply them. As for closing the issue...if the failures are no longer happening on the buildbots, then yes :) -- ___ Python tracker rep...@bugs.python.org

[issue8692] Use divide-and-conquer for faster factorials

2010-05-14 Thread Daniel Stutzbach
Changes by Daniel Stutzbach dan...@stutzbachenterprises.com: Removed file: http://bugs.python.org/file17300/factorial.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8692 ___

[issue8712] Skip libpthread related test failures on OpenBSD

2010-05-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This looks reasonable. Perhaps you should add a reference to the relevant OpenBSD bug number(s) or URL(s), if any. -- nosy: +exarkun, mark.dickinson, pitrou ___ Python tracker rep...@bugs.python.org

[issue8711] Document PyUnicode_DecodeFSDefault() and PyUnicode_DecodeFSDefaultAndSize()

2010-05-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Is it better to say “for encoding x, use y” or “to encode x, use y”? The latter, IMO. Encoding is also a noun. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue6419] Broken test_kqueue.py on OpenBSD

2010-05-14 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Yes, please do apply the patch! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6419 ___ ___

[issue8711] Document PyUnicode_DecodeFSDefault() and PyUnicode_DecodeFSDefaultAndSize()

2010-05-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: In this case, it was a verb (a gerund form). -- title: Document PyUnicode_DecodeFSDefault() and PyUnicode_DecodeFSDefaultAndSize() - Document PyUnicode_DecodeFSDefault() and PyUnicode_DecodeFSDefaultAndSize()

[issue8692] Use divide-and-conquer for faster factorials

2010-05-14 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Attached is an updated patch. In addition to the code cleanup and bug fix suggestions, it includes a new base-case for factorial_partial_product. Instead of: if (n = m) return n if (n + 2 == m) return n*m otherwise

[issue8705] shutil.rmtree with empty filepath

2010-05-14 Thread Dan Koch
Dan Koch koc...@ornl.gov added the comment: Here's the session printout. Desktop files under Vista still get deleted despite the exception. Does not occur on Fedora 12 or Mac OS X. I can code around it by testing for a blank filepath, but it was a surprise. C:\Users\ko5python Python 2.6.4

[issue8711] Document PyUnicode_DecodeFSDefault() and PyUnicode_DecodeFSDefaultAndSize()

2010-05-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Thanks for your remarks: updated patch. -- Added file: http://bugs.python.org/file17339/unicode_doc-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8711

[issue8711] Document PyUnicode_DecodeFSDefault() and PyUnicode_DecodeFSDefaultAndSize()

2010-05-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Commited: r81168 (py3k), r81169 (3.1). I also added the paragraph titles to Python2: r81166 (trunk) and r81167 (2.6). -- resolution: - fixed status: open - closed ___ Python tracker

[issue8713] multiprocessing needs option to eschew fork() under Linux

2010-05-14 Thread Brandon Craig Rhodes
New submission from Brandon Craig Rhodes bran...@rhodesmill.org: The multiprocessing module uses a bare fork() to create child processes under Linux, so the children get a copy of the entire state of the parent process. But under Windows, child processes are freshly spun-up Python

[issue8714] Delayed signals in the REPL on OpenBSD (possibly libpthread related)

2010-05-14 Thread Stefan Krah
New submission from Stefan Krah stefan-use...@bytereef.org: On OpenBSD, SIGINT handling in the REPL is delayed until further input: Python 2.7b2+ (trunk:81162, May 14 2010, 14:47:52) [GCC 3.3.5 (propolice)] on openbsd4 Type help, copyright, credits or license for more information. = here

[issue8715] Create PyUnicode_EncodeFSDefault() function

2010-05-14 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: PyUnicode_EncodeFSDefault() is the opposite of PyUnicode_DecodeFSDefault(AndSize)() and is similar to the new function os.fsencode(). As you can see in the patch, it simplifies many functions. /* Encodes a Unicode object to

[issue8715] Create PyUnicode_EncodeFSDefault() function

2010-05-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Ooops, I attached the wrong version of the patch. Version 3 changes the documentation (Encodes = Encode). -- Added file: http://bugs.python.org/file17341/pyunicode_encodefsdefault-3.patch

[issue8715] Create PyUnicode_EncodeFSDefault() function

2010-05-14 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file17340/pyunicode_encodefsdefault-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8715 ___

[issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX)

2010-05-14 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file17251/pyunicode_encodefsdefault.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8611 ___

[issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX)

2010-05-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I opened a separated issue for the new function PyUnicode_EncodeFSDefault(): #8715. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8611

[issue8713] multiprocessing needs option to eschew fork() under Linux

2010-05-14 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +jnoller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8713 ___ ___ Python-bugs-list

[issue8713] multiprocessing needs option to eschew fork() under Linux

2010-05-14 Thread Jesse Noller
Jesse Noller jnol...@gmail.com added the comment: This is on my wish list; but I have not had time to do it. Patch welcome. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8713 ___

[issue5099] subprocess.Popen.__del__ causes AttributeError (os module == None)

2010-05-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Python3 compilation fails on Windows: File ...\3.x.bolen-windows\build\lib\subprocess.py, line 911, in Popen _WaitForSingleObject=WaitForSingleObject, NameError: name 'WaitForSingleObject' is not defined

[issue8692] Use divide-and-conquer for faster factorials

2010-05-14 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Removed file: http://bugs.python.org/file17310/factorial.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8692 ___

[issue8692] Use divide-and-conquer for faster factorials

2010-05-14 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Removed file: http://bugs.python.org/file17312/factorial3.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8692 ___

[issue8663] Failed compile in a non-ASCII path

2010-05-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: New patch: use sys.stdout.encoding instead of ASCII. (If stdout is not a TTY, sys.stdout.encoding is ASCII.) -- Added file: http://bugs.python.org/file17342/distutils_spawn_log.patch ___

[issue8663] Failed compile in a non-ASCII path

2010-05-14 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file17268/distutils_spawn_toascii.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8663 ___

[issue8712] Skip libpthread related test failures on OpenBSD

2010-05-14 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@twistedmatrix.com added the comment: In addition to skipping the tests, would it also make sense to document these known limitations of Python threading on OpenBSD somewhere that end users might see it? -- ___ Python

[issue6419] Broken test_kqueue.py on OpenBSD

2010-05-14 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Mark, thanks. - The patch is good on OpenBSD-4.5-i386-Celeron, but I get additional failures on OpenBSD-4.7-beta-amd64-QEMU. This could be the result of running a beta under qemu. Henry, could you confirm if the patch works on

[issue8692] Use divide-and-conquer for faster factorials

2010-05-14 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I agree, recursive version of partial_product is much simpler to follow. While allocation of all numbers can be avoided in iterative version, doing so would further complicate code with little benefit. I still believe,

[issue8713] multiprocessing needs option to eschew fork() under Linux

2010-05-14 Thread Brandon Craig Rhodes
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Jesse, it's great to learn it's on your wish list too! Should I design the patch so that (a) there is some global in the module that needs tweaking to choose the child creation technique, or (b) that an argument to the Process()

[issue8692] Use divide-and-conquer for faster factorials

2010-05-14 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I still believe, however that an iterative version can benefit .. s/iterative/recursive/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8692

[issue8649] Py_UNICODE_* functions are undocumented

2010-05-14 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: If, for this and your previous two issues, you could add a suggestion as to precisely where you would make an addition and what minimally adequate text you would add (even unformatted ascii text in a message) that is consistent with

[issue8716] test_tk fails on OS X if run from buildbot slave daemon -- crashes Python

2010-05-14 Thread Bill Janssen
New submission from Bill Janssen bill.jans...@gmail.com: test_tk fails on OS X if test is run from a daemon process without the privilege to access the window server, say a buildbot slave without anyone logged in to the console. The Tk support needs to check whether it has access rights to

[issue8713] multiprocessing needs option to eschew fork() under Linux

2010-05-14 Thread Jesse Noller
Jesse Noller jnol...@gmail.com added the comment: I pretty much agree with (b) an argument - your gut instinct is correct - there's a long standing thread in python-dev which pretty much solidified my thinking about whether or not we need this (we do). Any patch has to be backwards

[issue8716] test_tk fails on OS X if run from buildbot slave daemon -- crashes Python

2010-05-14 Thread Bill Janssen
Bill Janssen bill.jans...@gmail.com added the comment: [More info from Ronald Oussoren] This is a bug in Tk: root = Tkinter.Tk() Thu May 13 20:45:13 Rivendell.local python[84887] Error: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.

[issue8717] Subprocess.py broken in trunk

2010-05-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The regression was introduced by r81154: issue #5099. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8717 ___

[issue8717] Subprocess.py broken in trunk

2010-05-14 Thread Pascal Chambon
New submission from Pascal Chambon chambon.pas...@gmail.com: There seems to have been some broken commit on subprocess.py in trunk - the moduel can't be imported due to unexisting argument defaults. Here is a very quick patch, but more inquiry migh tbe necessary to find out what happened.

[issue5099] subprocess.Popen.__del__ causes AttributeError (os module == None)

2010-05-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: pakal wrote a patch fixing Windows regression: see issue #8717. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5099 ___

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2010-05-14 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Mark just fixed audioop in #8675 -- nosy: +tjreedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8677 ___

[issue8716] test_tk fails on OS X if run from buildbot slave daemon -- crashes Python

2010-05-14 Thread Bill Janssen
Bill Janssen bill.jans...@gmail.com added the comment: It's fairly easy to create a restricted process tree for testing. ssh into a Mac which has no one logged into the console, from another machine, and use that connection to launch an xterm or Xemacs window to the other machine. Then log

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2010-05-14 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: And the curses module was made PY_SSIZE_T_CLEAN in r81085 (a very simple change). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8677

[issue8686] This isn't defined beyond that phrase is not friendly to non-native English speakers.

2010-05-14 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I agree with Tim. Drop the zero-info glosses. For real_quick_ratio(), Return an upper bound on ratio() even more quickly. should be sufficient (assuming that it *is* always quicker. Just curious, The descriptions say ratio() = quick_ratio()

[issue8686] This isn't defined beyond that phrase is not friendly to non-native English speakers.

2010-05-14 Thread Tim Peters
Tim Peters tim.pet...@gmail.com added the comment: Terry asks: is it also guaranteed that quick_ratio() = real_quick_ratio() Nope! The docs don't say that, so it's not guaranteed. It's not the _intent_ of the code that it be true, either. The only point to quick_ratio() and

[issue8689] sqlite3 parameter substitution breaks with multiple parameters

2010-05-14 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: You appear to be saying that the same code gives different results on 2.6.4 and 2.6.5. Correct? If so, did the version of sqlite change? In any case, 3.1.2 on WinXP consistently gives (2,) sqlite3.version '2.4.1' -- nosy: +tjreedy

[issue8689] sqlite3 parameter substitution breaks with multiple parameters

2010-05-14 Thread Simon Jagoe
Simon Jagoe simon.ja...@pragmagility.com added the comment: I will try to test this with the different combinations of python and sqlite versions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8689

[issue8652] Minor improvements to the Handling Exceptions part of the tutorial

2010-05-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: The older exception catching syntax should not be promoted but could be mentioned, I agree. Adding a paragraph explaining why it was changed would do the trick. Regarding the non-obviousness of which Python version the docs apply to, it is

[issue8694] python3 FAQ mentions unicode()

2010-05-14 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Yes, the faq entry has example code like value = unicode(value, utf-8) This whole section now applies when 'value' is a bytes or bytearray object and one calls str(value). For portability, one should in 2.6/7 use unicode strings as much as

[issue8668] add a 'develop' command

2010-05-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I have started to draft a similar proposal¹ but it seems that the wiki is not a communication medium as good as the bug tracker or the mailing lists (probably because of technical issues such as the lack of watchlist and e-mail notifications as

[issue8679] write a distutils to distutils2 converter

2010-05-14 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +merwok versions: +Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8679 ___

[issue8680] Add a sandbox in Distutils2

2010-05-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: What kind of sandbox should that be? Best-effort, meaning it replaces some functions to provide the dry-run feature, or an iron-clad sandbox that blocks malicious code from breaking out? -- nosy: +merwok versions: +Python 2.5, Python

[issue8707] Duplicated document in telnetlib.

2010-05-14 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Which is to say, the entire second paragraph beginning with 'number' should be deleted. The same is true for 2.6, where it is also section 20.14, 3.1 (20.17), and 3.2 (19.17). Good catch. Thanks for reporting. -- keywords: +easy

[issue8689] sqlite3 parameter substitution breaks with multiple parameters

2010-05-14 Thread angri
angri gene...@angri.ru added the comment: This thread contains some observations of versions affected: http://groups.google.com/group/python-sqlite/browse_thread/thread/a53a5e5282e29318 -- ___ Python tracker rep...@bugs.python.org

[issue8692] Use divide-and-conquer for faster factorials

2010-05-14 Thread Daniel Stutzbach
Changes by Daniel Stutzbach dan...@stutzbachenterprises.com: Removed file: http://bugs.python.org/file17338/factorial.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8692 ___

[issue8709] mention explicitly Windows support for os.devnull

2010-05-14 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Given the mention of the posix example, I agree. The issue applies to 2.6 and 3.2 (that I checked) and so I assume to 2.7 and 3.1 also. There is no doc string for devnull, which I presume should be in ntpath. help(os.devnull) no Python

[issue8649] Py_UNICODE_* functions are undocumented

2010-05-14 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8649 ___ ___

[issue8709] mention explicitly Windows support for os.devnull

2010-05-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: os.devnull is a string, so “pydoc os.devnull” will tell you about strings, and “help(os.devnull)” will be evaluated to “help('/dev/null')” which won’t match any topic. Same thing with os.sep and other module data; the doc is in the module’s

[issue8692] Use divide-and-conquer for faster factorials

2010-05-14 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: I made a few minor updates to the patch. It redefines partial_product to product(range(n, m, 2)), which saved me a few operations and is more Pythonic than what I had before. :-) (Not quite what Alexander was after, but it's

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2010-05-14 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Is there any reason why you reported zlibmodule.c separately in #8650 (other than maybe finding that first), and for 4 versions there versus 1 here? Should this supersede that? -- ___ Python

[issue8692] Use divide-and-conquer for faster factorials

2010-05-14 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: The patch looks good. Just one issue: I think the overflow check for num_operands * last_bit is bogus. It's possible for the product to overflow and still end up being less than num_operands. How about: if (num_operands = BITS_IN_LONG

[issue8692] Use divide-and-conquer for faster factorials

2010-05-14 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Daniel, sorry: I spent so long writing that last message that I didn't read your update until now. The new patch looks fine; same caveat about the overflow check as before. Let me know when you want me to apply this. --

[issue8689] sqlite3 parameter substitution breaks with multiple parameters

2010-05-14 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: The next question is whether there is any bug in the Python interface module or whether c.execute(s,t) is properly passing s and t to sqlite3 for processing and converting the return to a Python tuple. If the latter, then this should be

[issue8692] Use divide-and-conquer for faster factorials

2010-05-14 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: One other note: I find the bit numbering in find_last_set_bit peculiar: isn't the least significant bit usually bit 0? (Well, okay some people number the msb 0, but that's just weird. :) I know the ffs and fls functions also start their

[issue8692] Use divide-and-conquer for faster factorials

2010-05-14 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: it's the *size* of the small bitfield *smallest -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8692 ___

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-05-14 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Marking as a feature request: I think this is somewhere on the line between bugfix and new feature, but either way 2.7 is too close to release to start messing with something that isn't really all that broken. For 2.7 (and 2.6, 3.1),

[issue8689] sqlite3 parameter substitution breaks with multiple parameters

2010-05-14 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Given that this is a real, and disconcerting problem, and not a failure to read the doc, no apology needed. At least one solution is recorded here for anyone else hitting the same problem. If anyone thinks there should be a change to the

[issue8663] Failed compile in a non-ASCII path

2010-05-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Conditions to reproduce the bug: - non ASCII directory - don't use make -j N (no MAKEFLAGS environment variable) - write make output into a pipe, eg. make 21|cat My 2 last patches are not enough: there are other functions writing

[issue8663] Failed compile in a non-ASCII path

2010-05-14 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: I'll look at that asap. Although, all these patchs should have some tests demonstrating the bugs -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8663

[issue8663] Failed compile in a non-ASCII path

2010-05-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: setup_stdout_backslashreplace.patch implements point (a). I don't know which solution is better. This issue is not specific to compiling CPython, other programs may fail in non-ASCII paths and so solution (b) is maybe better.

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2010-05-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Is there any reason why you reported zlibmodule.c separately in #8650 (other than maybe finding that first), Because zlibmodule.c has more 64-bitness issues than just PY_SSIZE_T_CLEAN (see bug description). Should this supersede that? No.

[issue8718] subprocess: NameError: name 'WaitForSingleObject' is not def

2010-05-14 Thread Sridhar Ratnakumar
New submission from Sridhar Ratnakumar sridh...@activestate.com: This was a regression due to a commit made less than 2 days ago. make: [build_pywin32] running 'F:\as\apy\build\pyhg_trunk-win64-x64-hgtip27-rrun \python\PCbuild\amd64\python.exe setup.py build' in 'build\pyhg_trunk-win64-x64-

[issue8718] subprocess: NameError: name 'WaitForSingleObject' is not def

2010-05-14 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: +brett http://svn.python.org/view/python/trunk/Lib/subprocess.py?r1=80496r2=81154 -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8718

[issue8692] Use divide-and-conquer for faster factorials

2010-05-14 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: On Fri, May 14, 2010 at 3:25 PM, Mark Dickinson rep...@bugs.python.org wrote: The patch looks good.  Just one issue: I think the overflow check for num_operands * last_bit is bogus.  It's possible for the product to overflow

[issue5099] subprocess.Popen.__del__ causes AttributeError (os module == None)

2010-05-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Fix _internal_poll() on Windows: r81179 (trunk), r81181 (2.6), r81181 (3.x), r81182 (3.1). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue8717] Subprocess.py broken in trunk

2010-05-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Thank you for your patch: I closed #5099 regression. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8717

[issue8718] subprocess: NameError: name 'WaitForSingleObject' is not def

2010-05-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Duplicate of #5099 (and #8717). It should be fixed now. -- nosy: +haypo resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

  1   2   >