[issue15546] Iteration breaks with bz2.open(filename,'rt')

2012-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about peek()? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue15544] math.isnan fails with some Decimal NaNs

2012-08-04 Thread Steven D'Aprano
Steven D'Aprano added the comment: On 05/08/12 03:45, Mark Dickinson wrote: > It would make sense to add float.is_infinite and (possibly) float.is_finite > methods at the same time. If you don't add is_finite, you know someone is going to express surprise that it wasn't already done. Just as h

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-04 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: We should not convert \n with -u command line option or PYTHONUNBUFFERED was set. Added a patch to fix error in test_httpservers. -- Added file: http://bugs.python.org/file26695/issue13119_unbuffered.patch ___ Pytho

[issue15531] os.path symlink docs missing

2012-08-04 Thread Larry Hastings
Larry Hastings added the comment: What does the following script print out? import os os.chdir('/tmp') os.symlink('--success--', 'foo') print("this should print --success-- :") print(os.readlink('foo')) os.unlink('foo') -- ___ Python tracker

[issue15531] os.path symlink docs missing

2012-08-04 Thread Dave Abrahams
Dave Abrahams added the comment: MacOS 10.7 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-04 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: Sorry, please ignore the patch 'issue13119_httpserver.patch' I posted above. Behavior of "-u" commandline option in Python3.3 is differ than in Python 2. We should not convert newline characters if "-u" specified? I'll investigate more. --

[issue15548] Mention all new os functions in What's New in Python 3.3

2012-08-04 Thread Larry Hastings
Larry Hastings added the comment: ftruncate isn't new. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue15531] os.path symlink docs missing

2012-08-04 Thread Larry Hastings
Larry Hastings added the comment: I just tried it, and os.readlink('/tmp/broken-symlink') worked fine. What OS are you using? -- ___ Python tracker ___

[issue15546] Iteration breaks with bz2.open(filename,'rt')

2012-08-04 Thread Nadeem Vawda
Nadeem Vawda added the comment: Done. Thanks for the bug report, David. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___

[issue15546] Iteration breaks with bz2.open(filename,'rt')

2012-08-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5284e65e865b by Nadeem Vawda in branch 'default': #15546: Fix {GzipFile,LZMAFile}.read1()'s handling of pathological input data. http://hg.python.org/cpython/rev/5284e65e865b -- ___ Python tracker

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-04 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: Fix for test_httpservers -- Added file: http://bugs.python.org/file26694/issue13119_httpserver.patch ___ Python tracker ___

[issue15500] Python should support naming threads

2012-08-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think this should be done by default as it will break people's expectations and, perhaps worse, compatibility. -- nosy: +pitrou ___ Python tracker

[issue15528] Better support for finalization with weakrefs

2012-08-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: > For point 1: global weakref.WeakKeyDictionary is good store for weak refs > with > callbacks. > > global weakdict > weakdict[kenny] = weakref.ref(kenny, lambda _: print("you killed kenny!")) That depends on kenny being hashable. It also surprises me a bit

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: test_httpservers still fails, it's the CGI tests... -- ___ Python tracker ___ ___ Python-bugs-list m

[issue15541] logging.exception doesn't accept 'extra'

2012-08-04 Thread Vinay Sajip
Changes by Vinay Sajip : -- assignee: -> vinay.sajip resolution: -> fixed status: open -> closed versions: -Python 3.2 ___ Python tracker ___ _

[issue15541] logging.exception doesn't accept 'extra'

2012-08-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 322da186cced by Vinay Sajip in branch '2.7': Issue #15541: Correct anomaly in logging.exception. Thanks to Ned Batchelder for the report. http://hg.python.org/cpython/rev/322da186cced -- nosy: +python-dev __

[issue13837] test_shutil fails with symlinks enabled under Windows

2012-08-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ping? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset f8e435d6a801 by Antoine Pitrou in branch 'default': Fix test_venv to work with universal newlines (issue #13119) http://hg.python.org/cpython/rev/f8e435d6a801 -- ___ Python tracker

[issue15558] webbrowser output to console

2012-08-04 Thread R. David Murray
R. David Murray added the comment: This message does not come from the Python webbrowser module. You should report this upstream to the bug tracker for your browser. -- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4efad7fba42a by Antoine Pitrou in branch '3.2': Fix test_sys under Windows (issue #13119) http://hg.python.org/cpython/rev/4efad7fba42a New changeset e4a87f0253e9 by Antoine Pitrou in branch 'default': Merge universal newlines-related fixes (issue #

[issue15555] Default newlines of io.TextIOWrapper

2012-08-04 Thread R. David Murray
R. David Murray added the comment: And that is the value of os.linesep at Python startup. I'm don't think that we really support the mutability of os.linesep, we just don't bother to make it immutable. I'm not sure how this would be documented, since code that does use "os.linesep" is indeed

[issue15554] correct and clarify str.splitlines() documentation

2012-08-04 Thread R. David Murray
R. David Murray added the comment: Sigh. ;) At this point in my Python programming I intuitively understand what splitlines does, but every time we try to explain it in detail it gets messier and messier. I wasn't really happy with the addition of that sentence about split in the first place

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Windows buildbots now show failures in the test suite. -- status: closed -> open versions: +Python 3.3 ___ Python tracker ___ __

[issue15496] harden directory removal for tests on Windows

2012-08-04 Thread Jeremy Kloth
Jeremy Kloth added the comment: > Not that some change isn't necessary, but what else are you running on your > build slave? I ran a Windows 2008 R2 x64 slave for some time and it never had > issues around file/directory removal. I only had to decommission it because > the physical machine bec

[issue15551] Unit tests that return generators silently fail

2012-08-04 Thread R. David Murray
R. David Murray added the comment: This is not something that is specific to unittest. In Python, if you call a generator function *it returns a generator-iterator*. Unless you *do* something with the the iterator, nothing else happens. This is true in *any* python code. Unittest calls w

[issue15496] harden directory removal for tests on Windows

2012-08-04 Thread Brian Curtin
Brian Curtin added the comment: > Without some change, the Win64 buildbot is relatively irrelevant as it is nearly always in a state of failure due to these errors. Not that some change isn't necessary, but what else are you running on your build slave? I ran a Windows 2008 R2 x64 slave for som

[issue15496] harden directory removal for tests on Windows

2012-08-04 Thread Jeremy Kloth
Jeremy Kloth added the comment: With the latest changes, is there anything left preventing the inclusion of this patch? Without some change, the Win64 buildbot is relatively irrelevant as it is nearly always in a state of failure due to these errors. --

[issue15541] logging.exception doesn't accept 'extra'

2012-08-04 Thread R. David Murray
Changes by R. David Murray : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue15550] Trailing white spaces

2012-08-04 Thread Stefan Krah
Stefan Krah added the comment: I'm not against whitespace cleanup every now and then, but also -0 on a hook for C files. I think that (for C) the annoyance of having a patch rejected because of trailing whitespace outweighs the overall benefit. -- nosy: +skrah __

[issue15558] webbrowser output to console

2012-08-04 Thread Juancarlo Añez
New submission from Juancarlo Añez: Under Ubuntu Linux 11.10 and 12.04, webbroser.open() will output the following message to the console: Created new window in existing browser session. The behavior is both unexpected and troublesome. -- components: Library (Lib) messages: 167443 nos

[issue15539] Fixing Tools/scripts/pindent.py

2012-08-04 Thread R. David Murray
R. David Murray added the comment: There is now a test_tools, so it would be great to have tests to go along with this patch. I haven't looked at the patch in detail, but as long as you are modernizing it please kill those "# end ..." lines. -- nosy: +r.david.murray _

[issue15496] harden directory removal for tests on Windows

2012-08-04 Thread Jeremy Kloth
Jeremy Kloth added the comment: I've updated the comment in the patch to reflect Martin's concern. Martin is partially correct in that the handle opened in the stat() call will not prolong the pending status. It is due to the fact that it does not open the handle with any sharing mode set, th

[issue15536] re.split doesn't respect MULTILINE

2012-08-04 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> MULTILINE confuses re.split ___ Python tracker ___

[issue15550] Trailing white spaces

2012-08-04 Thread Ned Deily
Ned Deily added the comment: -1 for making wholesale whitespace changes. It potentially makes merging harder for little benefit. Imported files from other projects should definitely not be touched. IMO, the only thing potentially worth considering is extending the existing hook to C files. I'

[issue15531] os.path symlink docs missing

2012-08-04 Thread R. David Murray
R. David Murray added the comment: The first of those acts as I would expect: os.path.realpath is operating only on the path, so if the last element is a symbolic link it doesn't have any reason to look for the target of that link. The second one does seem less intuitive. I'm not sure the fir

[issue15550] Trailing white spaces

2012-08-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file26692/other_trailing_whitespaces.diff ___ Python tracker ___ ___ Python-b

[issue15550] Trailing white spaces

2012-08-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file26691/c_trailing_whitespaces.diff ___ Python tracker ___ ___ Python-bugs-

[issue15550] Trailing white spaces

2012-08-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file26690/libmpdec_trailing_whitespaces.diff ___ Python tracker ___ ___ Pytho

[issue15550] Trailing white spaces

2012-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I found a few files where trailing spaces are significant (patches, RTF, test data). Excluding them and three generated file (Unicode data, generating scripts should be smarter), I divided the remaining into several parts: 1) the libffi library; 2) the libmp

[issue15528] Better support for finalization with weakrefs

2012-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > finalize does not "compete" with contextlib.ExitStack, atexit and > weakref.WeakKeyDictionary. It only competes with __del__ and weakref > callbacks. What kind of problems you solve with __del__ and weakref callbacks? For most of them contextlib.ExitStack

[issue15500] Python should support naming threads

2012-08-04 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue14330] don't use host python, use host search paths for host compiler

2012-08-04 Thread Georg Brandl
Georg Brandl added the comment: Matthias: ping. I don't want to hold up beta2 indefinitely. In order to resolve this blocker, we will revert the batch of cross-compiling patches in a few days if there is no progress here. -- ___ Python tracker

[issue15500] Python should support naming threads

2012-08-04 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue1859] textwrap doesn't linebreak on "\n"

2012-08-04 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue15510] textwrap.wrap('') returns empty list

2012-08-04 Thread R. David Murray
R. David Murray added the comment: FTR I agree with Antoine that returning the empty list is the more logical behavior here. Wrap is turning a string into a list of lines...if there is no content, the list of lines *should* be empty, IMO. That is what I would expect, so for me the empty list

[issue15550] Trailing white spaces

2012-08-04 Thread Georg Brandl
Georg Brandl added the comment: Well, I'm -0 on extending the hook to C files. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue15550] Trailing white spaces

2012-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > There already is a hook in place for the main python.org repository that > checks for and rejects changesets that include files with space issues: Now I understand why there is no problem with .py files. But there are a lot of other files (including .c and

[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-08-04 Thread R. David Murray
R. David Murray added the comment: I *want* it to be the default, since I think that is the typical use case, but the existing default behavior means that such a backward incompatible change would not be acceptable for exactly the reason you state. So yes, I want it as a new flag. ("exist_re

[issue15528] Better support for finalization with weakrefs

2012-08-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: > I don't quite understand the purpose of your suggestions. What can you do > with it help, what you can not do with contextlib.ExitStack, atexit, > __del__ method, weakref.WeakKeyDictionary or weakref.ref? I read the > documentation, but the meaning eludes m

[issue15492] textwrap.wrap expand_tabs does not behave as expected

2012-08-04 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue15550] Trailing white spaces

2012-08-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: AFAIR the hook only applies to Python and reST files, not C files. I think Georg wrote it, perhaps he knows the reasons. -- nosy: +georg.brandl ___ Python tracker _

[issue12655] Expose sched.h functions

2012-08-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset fb975cb8fb45 by Victor Stinner in branch 'default': Issue #12655: Mention multiprocessing.cpu_count() in os.sched_getaffinity() doc http://hg.python.org/cpython/rev/fb975cb8fb45 -- ___ Python tracker

[issue15544] math.isnan fails with some Decimal NaNs

2012-08-04 Thread Stefan Krah
Stefan Krah added the comment: Mark Dickinson wrote: > Looks like we've got two separate issues here, that should probably be > split into two separate bug reports. The first issue is that > Decimal.__float__ is brain-dead when it comes to NaNs with payloads; > I consider that a clear bug, and

[issue13052] IDLE: replace ending with '\' causes crash

2012-08-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: While there are no unittests for Roger's patch I have pushed it in after strong manual testing as important enough. Thanks, Roger. -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed ___

[issue13052] IDLE: replace ending with '\' causes crash

2012-08-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0f38948cc6df by Andrew Svetlov in branch '3.2': Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog ended with '\'. http://hg.python.org/cpython/rev/0f38948cc6df New changeset 9dcfba4d0357 by Andrew Svetlov in branch 'defau

[issue15509] webbrowser.open sometimes passes zero-length argument to the browser.

2012-08-04 Thread Anton Barkovsky
Anton Barkovsky added the comment: Added tests in #15557. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue15447] A file is not properly closed by webbrowser._invoke

2012-08-04 Thread Anton Barkovsky
Anton Barkovsky added the comment: Added tests in #15557. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue15557] Tests for webbrowser module

2012-08-04 Thread Anton Barkovsky
New submission from Anton Barkovsky: Attaching a patch with some tests for webbrowser module. The tests fail unless #15509 is fixed. They also print lots of warnings unless #15447 is fixed. -- components: Tests files: test_webbrowser.patch keywords: patch messages: 167423 nosy: anton.ba

[issue15544] math.isnan fails with some Decimal NaNs

2012-08-04 Thread Mark Dickinson
Mark Dickinson added the comment: > Why not add a is_nan() method to float numbers instead? That could work. The duplication of float.is_nan and math.isnan (not to mention the different spellings) would be a bit ugly, but perhaps worth it. It would make sense to add float.is_infinite and (po

[issue15550] Trailing white spaces

2012-08-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: > There already is a hook in place for the main python.org repository that > checks for and rejects changesets that include files with space issues: If there is already a hook, then why do some files have spurious white space (i.e. at the end of a line)? Is t

[issue15556] os.stat fails for file pending delete on Windows

2012-08-04 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +cjerdonek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-08-04 Thread Glenn Linderman
Glenn Linderman added the comment: Thanks for the patch, Oscar, I've not had more time to follow up on this issue, and haven't yet learned how to generate the patches. While you dropped the "return False" line, which surprised me, the implicit "return None" is sufficiently false, that there no

[issue15556] os.stat fails for file pending delete on Windows

2012-08-04 Thread Jeremy Kloth
Jeremy Kloth added the comment: > Why do you think the behavior is broken? It looks right to me - it's not > possible to get file information for a file that is scheduled for deletion. However you can when using MSVCRT's stat() function or even FindFirstFile directly. -- nosy: +jeremy.

[issue15528] Better support for finalization with weakrefs

2012-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't quite understand the purpose of your suggestions. What can you do with it help, what you can not do with contextlib.ExitStack, atexit, __del__ method, weakref.WeakKeyDictionary or weakref.ref? I read the documentation, but the meaning eludes me. ---

[issue15556] os.stat fails for file pending delete on Windows

2012-08-04 Thread Martin v . Löwis
Martin v. Löwis added the comment: Why do you think the behavior is broken? It looks right to me - it's not possible to get file information for a file that is scheduled for deletion. ISTM that rather os.path.exists has non-intuitive behavior; it shouldn't infer from the PermissionError that t

[issue15556] os.stat fails for file pending delete on Windows

2012-08-04 Thread Jeremy Kloth
Jeremy Kloth added the comment: Traceback (most recent call last): File "stat-bug.py", line 12, in print('stat', os.stat(pathname)) PermissionError: [Error 5] Access is denied: '\\Users\\Jeremy\\test.tmp' -- ___ Python tracker

[issue15556] os.stat fails for file pending delete on Windows

2012-08-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: How does it fail? Please paste the precise exception. -- ___ Python tracker ___ ___ Python-bugs-list

[issue15556] os.stat fails for file pending delete on Windows

2012-08-04 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue15556] os.stat fails for file pending delete on Windows

2012-08-04 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- nosy: +brian.curtin, loewis, pitrou, tim.golden -jkloth ___ Python tracker ___ ___ Python-bugs-list maili

[issue15556] os.stat fails for file pending delete on Windows

2012-08-04 Thread Jeremy Kloth
New submission from Jeremy Kloth: os.stat fails when called on a file that is pending delete but is still in the directory listing. This in turn causes os.path.exists to return the wrong result. Attached is a test case demonstrating this broken behavior. -- components: Library (Lib),

[issue15555] Default newlines of io.TextIOWrapper

2012-08-04 Thread Atsuo Ishimoto
New submission from Atsuo Ishimoto: In http://docs.python.org/dev/library/io.html: "if newline is None, any '\n' characters written are translated to the system default line separator, os.linesep. " But os.linesep is not referred at all. On Windows default newline is always '\r\n' on Window

[issue1859] textwrap doesn't linebreak on "\n"

2012-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I believe that the method of work with newlines is too application specific. Someone may prefer empty line separated paragraphs, here is another recipe: def wrap_paragraphs(text, width=70, **kwargs): return [line for para in re.split(r'\n\s*\n', text) for

[issue12655] Expose sched.h functions

2012-08-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I've improved the default ncpus value and committed. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue12655] Expose sched.h functions

2012-08-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset d6745ddbccbd by Antoine Pitrou in branch 'default': Issue #12655: Instead of requiring a custom type, os.sched_getaffinity and http://hg.python.org/cpython/rev/d6745ddbccbd -- ___ Python tracker

[issue1859] textwrap doesn't linebreak on "\n"

2012-08-04 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue12655] Expose sched.h functions

2012-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > You may also use a constant size (CPU_SETSIZE) of the set used by sched_setaffinity() to simplify the code. As Antoine pointed out to me (and I was convinced itself, experimented with an example from man:CPU_SET(3)) the cpu_set functions work with a sets of

[issue15546] Iteration breaks with bz2.open(filename,'rt')

2012-08-04 Thread Nadeem Vawda
Nadeem Vawda added the comment: OK, BZ2File should now be fixed. It looks like LZMAFile and GzipFile may be susceptible to the same problem; I'll push fixes for them shortly. -- ___ Python tracker _

[issue15546] Iteration breaks with bz2.open(filename,'rt')

2012-08-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset cdf27a213bd2 by Nadeem Vawda in branch 'default': #15546: Fix BZ2File.read1()'s handling of pathological input data. http://hg.python.org/cpython/rev/cdf27a213bd2 -- nosy: +python-dev ___ Python tracker

[issue12655] Expose sched.h functions

2012-08-04 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: +1 for Antoine's patch/approach: it's more usable and pythonic. I think documentation should mention and link the existence of: http://docs.python.org/library/multiprocessing.html#multiprocessing.cpu_count -- ___ P

[issue12655] Expose sched.h functions

2012-08-04 Thread STINNER Victor
STINNER Victor added the comment: >> Try with an initial value of ncpus=1. > Well, I've tried and it works: Oh, you're right :-) I only checked ncpus (1), not the final result. It works because CPU_ALLOC_SIZE() rounds the size using sizeof(unsigned long) (64 bits on my CPU). So CPU_ALLOC_SIZE(1)

[issue12655] Expose sched.h functions

2012-08-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Try with an initial value of ncpus=1. Well, I've tried and it works: >>> os.sched_getaffinity(0) {0, 1, 2, 3} > I don't know if CPU_SETSIZE is part of the standard (POSIX?). These are Linux-specific functions. -- __

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-08-04 Thread Oscar Campos
Changes by Oscar Campos : Added file: http://bugs.python.org/file26686/http-server.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue12655] Expose sched.h functions

2012-08-04 Thread STINNER Victor
STINNER Victor added the comment: sched_getaffinity() does not fail if the set is smaller than the number of CPU. Try with an initial value of ncpus=1. So we cannot start the heuristic with ncpus=16, because it would only return 16 even if the computer has more cpus. Instead of this heuristic, w

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-08-04 Thread Oscar Campos
Changes by Oscar Campos : Added file: http://bugs.python.org/file26685/http-server.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue14565] is_cgi doesn't function as documented for cgi_directories

2012-08-04 Thread Oscar Campos
Oscar Campos added the comment: Greetings, I did a diff patch based on the previous work of Glenn Linderman and Pierre Quentel. I did some test and is working well so now the implementation is doing what the docstring says. I already passed the full test suite without problems. I add two pat

[issue12655] Expose sched.h functions

2012-08-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file26683/cpuset.patch ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue12655] Expose sched.h functions

2012-08-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file26682/cpuset.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue12655] Expose sched.h functions

2012-08-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch removing cpu_set and using sets of integers instead. -- Added file: http://bugs.python.org/file26682/cpuset.patch ___ Python tracker ___

[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior

2012-08-04 Thread Hynek Schlawack
Hynek Schlawack added the comment: do you want it by default or a new flag? default sounds like a source for obscure bugs to me. -- ___ Python tracker ___ __

[issue15522] impove 27 percent performance on stringpbject.c( by prefetch and loop optimization)

2012-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please port your code to Python 3.3 and compare with it. Python 3.3 implementation of str.join() already more than twice faster then Python 2.7. Maybe your optimization will have no effect. -- nosy: +storchaka ___

[issue15522] impove 27 percent performance on stringpbject.c( by prefetch and loop optimization)

2012-08-04 Thread abael
abael added the comment: added my implement( with some enhancement, got better performance, at less for my apps. ). test result: with small chunk of str, got double performanc, and 111% for big chunks; it ## Util funcion for text definition: def pf(f,n): a=time() for i in xrange(n):