[issue17327] Add PyDict_GetItemSetDefault() as C-API for dict.setdefault()

2013-03-07 Thread Stefan Behnel
Stefan Behnel added the comment: I'm totally ok with your changes, though. The only real difference is an aditional type check in the slot function path, and that's not going to make any difference right after the costly operation of unpacking python function arguments. -- __

[issue16669] Docstrings for namedtuple

2013-03-07 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue17327] Add PyDict_GetItemSetDefault() as C-API for dict.setdefault()

2013-03-07 Thread Stefan Behnel
Stefan Behnel added the comment: If you decide to refactor a well tested patch, you might want to give it another test run before committing it. Objects/dictobject.c: In function 'dict_setdefault': Objects/dictobject.c:2266:5: warning: passing argument 1 of 'PyDict_SetDefault' from incompatibl

[issue17385] Use deque instead of list the threading.Condition waiter queue

2013-03-07 Thread Raymond Hettinger
New submission from Raymond Hettinger: Condition variables implement a FIFO queue for waiting threads. The current implementation uses a regular Python list but could use a deque instead. A wait() call appends a new waiter. A notify() call removes the oldest waiter; this is an O(n) operatio

[issue17384] test_logging failures on Windows

2013-03-07 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Tests type: enhancement -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue17384] test_logging failures on Windows

2013-03-07 Thread Ezio Melotti
New submission from Ezio Melotti: test_logging is failing on some buildbots: test_logging::AMD64 Windows7 SP1 3.x a0b750 42970c 9aafc0 test_logging::x86 Windows Server 2003 [SB] 3.x 9aafc0 6b69c1 c261b7 test_logging::x86 XP-4 3.x 6b69c1 c261b7 test_logging::x86 XP-5 3.x c261b7

[issue1186900] nntplib shouldn't raise generic EOFError

2013-03-07 Thread Ankur Ankan
Changes by Ankur Ankan : -- nosy: +Ankur.Ankan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue13477] tarfile module should have a command line

2013-03-07 Thread Ankur Ankan
Ankur Ankan added the comment: > +parser.add_argument('--gz', '--gunzip', '--gzip', '--tgz', '-z', > +'--ungzip', action = 'store_true', > +help = 'gz compression') > +parser.add_argument('--bz2', '--bzip2', '--tbz2', '--tbz', '-- tb2', >

[issue13477] tarfile module should have a command line

2013-03-07 Thread Berker Peksag
Changes by Berker Peksag : Added file: http://bugs.python.org/file29347/issue13477_v3.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13477] tarfile module should have a command line

2013-03-07 Thread Berker Peksag
Changes by Berker Peksag : Removed file: http://bugs.python.org/file29346/issue13477_v3.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue13477] tarfile module should have a command line

2013-03-07 Thread Berker Peksag
Changes by Berker Peksag : Removed file: http://bugs.python.org/file29291/issue13477.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13477] tarfile module should have a command line

2013-03-07 Thread Berker Peksag
Berker Peksag added the comment: New patch(issue13477_v3.diff) attached. Changes: * Addressed comments from Serhiy * Added "output" parameter to --extract option (from Ankur's patch) * Updated tests and documentation The current docstring of tarfile module does not give much information(it just

[issue17327] Add PyDict_GetItemSetDefault() as C-API for dict.setdefault()

2013-03-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset a0b750ea3397 by Benjamin Peterson in branch 'default': Add PyDict_SetDefault. (closes #17327) http://hg.python.org/cpython/rev/a0b750ea3397 -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed

[issue13477] tarfile module should have a command line

2013-03-07 Thread STINNER Victor
STINNER Victor added the comment: +parser.add_argument('--gz', '--gunzip', '--gzip', '--tgz', '-z', +'--ungzip', action = 'store_true', +help = 'gz compression') +parser.add_argument('--bz2', '--bzip2', '--tbz2', '--tbz', '--tb2', +

[issue17170] string method lookup is too slow

2013-03-07 Thread STINNER Victor
STINNER Victor added the comment: > More generally though, this would be improved by precompiling some of the > information (like Argument Clinic does, perhaps). The same idea was already proposed to optimize str%args and str.format(args). struct.unpack() does also compile the format into an o

[issue16321] Move eq.h out of stringlib

2013-03-07 Thread STINNER Victor
STINNER Victor added the comment: I don't understand why do we have specialized functions to compare strings. Can't we reuse PyUnicode_Compare(a, b) or PyUnicode_RichCompare( a, b, Py_EQ)? Is unicode_eq() used to inline the code? By the way, unicode_compare_eq() (subfunction of these functions

[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-03-07 Thread STINNER Victor
STINNER Victor added the comment: The test should now pass on Windows. -- status: open -> closed ___ Python tracker ___ ___ Python-bug

[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-03-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1fd165883a65 by Victor Stinner in branch '3.3': Issue #17223: the test is specific to 32-bit wchar_t type http://hg.python.org/cpython/rev/1fd165883a65 New changeset 42970cbfc982 by Victor Stinner in branch 'default': (Merge 3.3) Issue #17223: the t

[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-03-07 Thread STINNER Victor
STINNER Victor added the comment: It looks like PyUnicode_FromUnicode() should accept invalid UTF-16 surrogates because the array module indirectly relies on that: On Windows (16-bit wchar_t/Py_UNICODE), len(array.array('u', '\U0010')) is 2 and array.array('u', '\U0010')[0] is '\udbff'

[issue17383] Error in documentation /2/tutorial/modules.html#more-on-modules

2013-03-07 Thread Ashwini Chaudhary
Changes by Ashwini Chaudhary : -- nosy: +montysinngh ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue17383] Error in documentation /2/tutorial/modules.html#more-on-modules

2013-03-07 Thread Ezio Melotti
Ezio Melotti added the comment: It should probably say that they are placed in the namespace where they get imported, but I'm not sure if the concept of namespace has been covered yet at that point of the tutorial. The sentence probably assume that the modules are getting imported at the begi

[issue17383] Error in documentation /2/tutorial/modules.html#more-on-modules

2013-03-07 Thread Piotr Kuchta
New submission from Piotr Kuchta: In the 2.7 tutorial, chapter on modules: http://docs.python.org/2/tutorial/modules.html#more-on-modules I think the last sentence in this paragraph is incorrect: "Modules can import other modules. It is customary but not required to place all import stateme

[issue17382] debugging with idle: current line not highlighted

2013-03-07 Thread Dirk Zabel
Dirk Zabel added the comment: When debugging with IDLE with checkbox "Source" enabled, the source window highlights the current line only when the source window is activated. If one of the buttons of the IDLE debug window is pressed ("Step", "Over" or "Out"), the source window is no longer act

[issue17327] Add PyDict_GetItemSetDefault() as C-API for dict.setdefault()

2013-03-07 Thread Stefan Behnel
Stefan Behnel added the comment: Ok (shrug), since everyone seems to agree, PyDict_SetDefault() it is. I wouldn't be surprised if the same kind of discussion lead to the original naming of dict.setdefault()... -- Added file: http://bugs.python.org/file29345/pydict_setitemdefault.patch

[issue17381] IGNORECASE breaks unicode literal range matching

2013-03-07 Thread Matthew Barnett
Matthew Barnett added the comment: The way the re handles ranges is to convert the two endpoints to lowercase and then check whether the lowercase form of the character in the text is in that range. For example, [A-Z] is converted to the range [\x41-\x5A], and the lowercase form of 'Q' ('\x51

[issue17382] debugging with idle: current line not highlighted

2013-03-07 Thread Dirk Zabel
New submission from Dirk Zabel: When debugging with IDLE with checkbox "Source" enabled, the source window highlights the current line only when the source window is activated. If one of the buttons of the IDLE debug window is pressed ("Step", "Over" or "Out"), the source window is no longer a

[issue17327] Add PyDict_GetItemSetDefault() as C-API for dict.setdefault()

2013-03-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for PyDict_SetDefault. Any other name is confusing. -- ___ Python tracker ___ ___ Python-bugs

[issue14645] Generator does not translate linesep characters in certain circumstances

2013-03-07 Thread R. David Murray
R. David Murray added the comment: I'm not going to fix this in Python2. While the problem exists there, it hasn't ever been reported as a bug. As noted earlier, this is probably primarily due to the fact that it would be very exceptional to read an email in python2 with anything other than

[issue10224] Build 3.x documentation using python3.x

2013-03-07 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue14645] Generator does not translate linesep characters in certain circumstances

2013-03-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 30c0f0dd0b94 by R David Murray in branch '3.2': #14645: Generator now emits correct linesep for all parts. http://hg.python.org/cpython/rev/30c0f0dd0b94 New changeset 1b9dc00c4d57 by R David Murray in branch '3.3': Merge: #14645: Generator now emits

[issue15605] Explain sphinx documentation building in devguide

2013-03-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: >"Python 2" should be enough. I thought about that. Agreed. "make -C Doc xxx" will not work with make.bat. Perhaps "7.6.1. Using make" should be expanded to "7.6.1 Using make on unix" and "7.6.2 Using make on Windows" added. Then the directory assumption could

[issue10224] Build 3.x documentation using python3.x

2013-03-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Doc/make.bat assumes that this issue has already been resolved: if "%PYTHON%" EQU "" set PYTHON=..\pcbuild\python Even with '_d' appended, as it should be, that does not work for 3.x. I think that line should be @rem'ed out until it does work. Does anyone mind

[issue17381] IGNORECASE breaks unicode literal range matching

2013-03-07 Thread Chris Adams
New submission from Chris Adams: I noticed an interesting failure while using re.match / re.sub to look for non-Cyrillic characters in allegedly Russian text: >>> re.sub(r'[\s\u0400-\u0527]+', ' ', 'Архангельская губерния', >>> flags=re.IGNORECASE) 'Архангельская губерния' >>> re.sub(r'[\s\u04

[issue17369] Message.get_filename produces exception if the RFC2231 encoding is ill-formed

2013-03-07 Thread R. David Murray
Changes by R. David Murray : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue17369] Message.get_filename produces exception if the RFC2231 encoding is ill-formed

2013-03-07 Thread R. David Murray
R. David Murray added the comment: Here's a patch. Note that this fixes a regression relative to Python2, where fallback_charset was used in this case. -- keywords: +patch versions: -Python 2.7 Added file: http://bugs.python.org/file29344/collapse_rfc2231_value.patch

[issue17146] Improve test.support.import_fresh_module()

2013-03-07 Thread Eric Snow
Eric Snow added the comment: I'm closing this as #17037 offers a better solution and it's unlikely this proposal would make it if that one doesn't. -- resolution: -> wont fix status: open -> closed ___ Python tracker

[issue17327] Add PyDict_GetItemSetDefault() as C-API for dict.setdefault()

2013-03-07 Thread Stefan Behnel
Stefan Behnel added the comment: I'm fine with PyDict_GetItemOrSetDefault() as well. -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue17327] Add PyDict_GetItemSetDefault() as C-API for dict.setdefault()

2013-03-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: I find the name PyDict_GetItemSetDefault very confusing. My brain isn't quite sure where to partition the four words of GetItemSetDefault. If you really wanted to be clear, you would have to call it PyDict_GetItemAndSetDefault. There's no reason not to pick

[issue17327] Add PyDict_GetItemSetDefault() as C-API for dict.setdefault()

2013-03-07 Thread Stefan Behnel
Stefan Behnel added the comment: To me, PyDict_SetDefault() sounds like it's supposed to set a default value that PyDict_GetItem() would return instead of NULL on lookup failure. Basically a defaultdict-like extension to normal dicts. -- ___ Python

[issue17327] Add PyDict_GetItemSetDefault() as C-API for dict.setdefault()

2013-03-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: I would simply call it PyDict_SetDefault, too. It's also shorter to type ;) -- nosy: +pitrou ___ Python tracker ___

[issue17327] Add PyDict_GetItemSetDefault() as C-API for dict.setdefault()

2013-03-07 Thread Stefan Behnel
Stefan Behnel added the comment: Well, guess what, I kind-of figured that. So, what's wrong with PyDict_GetItemSetDefault()? That mimics the Python method name, too, while at the same time making it clear what actually happens and how the C-API function behaves. -- __

[issue17327] Add PyDict_GetItemSetDefault() as C-API for dict.setdefault()

2013-03-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: PyDict_SetDefault mimicks the Python API, though. -- ___ Python tracker ___ ___ Python-bugs-list

[issue17327] Add PyDict_GetItemSetDefault() as C-API for dict.setdefault()

2013-03-07 Thread Stefan Behnel
Stefan Behnel added the comment: I had originally considered that name. However, what it really does is PyDict_GetItem(). In a specific special case, it sets a default value and *then* returns that. So it's still PyDict_GetItem(), just with a preceding modification. Also, the interface mimics

[issue17327] Add PyDict_GetItemSetDefault() as C-API for dict.setdefault()

2013-03-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: Please call it PyDict_SetDefault, though. -- nosy: +benjamin.peterson ___ Python tracker ___ ___

[issue15605] Explain sphinx documentation building in devguide

2013-03-07 Thread Ezio Melotti
Ezio Melotti added the comment: > change '2.4 or higher' to '2.4 to 2.7'. "Python 2" should be enough. > Perhaps we should add "These instructions assume that /Doc/ > is the current directory." Then we would not have to repeat in multiple > places. There was a somewhat related discussion abou

[issue17379] Zen amendment

2013-03-07 Thread Brett Cannon
Brett Cannon added the comment: Tim has spoken, so closing the bug as rejected. -- resolution: -> rejected status: open -> closed ___ Python tracker ___

[issue17379] Zen amendment

2013-03-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, INTERCAL mandates a certain amount of politeness (not too little, but not too much either): http://en.wikipedia.org/wiki/INTERCAL -- ___ Python tracker _

[issue17379] Zen amendment

2013-03-07 Thread Tim Peters
Tim Peters added the comment: As I just clarified on the members list, the "Zen" is about the design of Python-the-language. It's hard to imagine that a programming language _could_ be barbaric or rude, Perl notwithstanding ;-) -- ___ Python tracke

[issue17379] Zen amendment

2013-03-07 Thread Brett Cannon
Brett Cannon added the comment: How about "civility beats rudeness". That's clearly delineates it's about your discourse with others and eliminates any superiority issues people were feeling with the term "barbaric". Obviously Tim would still need to sign off on this as well. -- nosy:

[issue17380] initproc return value is unclear

2013-03-07 Thread Zbyszek Jędrzejewski-Szmek
New submission from Zbyszek Jędrzejewski-Szmek: initproc is declared to return an int, but what returned values mean is not documented. Noddy_init in http://docs.python.org/3/extending/newtypes.html?highlight=initproc#adding-data-and-methods-to-the-basic-example can be seen to return 0 on succ

[issue13477] tarfile module should have a command line

2013-03-07 Thread Éric Araujo
Éric Araujo added the comment: Yeah, that’s always the discussion when writing a Python utility that has a unix equivalent: do you want to be familiar to Python users or to the unix tool users? I don’t have a strong opinion. I think unix users would have no reason to use python -m tarfile, a

[issue17323] Disable [X refs, Y blocks] ouput in debug builds

2013-03-07 Thread Ezio Melotti
Ezio Melotti added the comment: Yes -- I was proposing to make it available on non-debug builds too, unless it has a negative impact on the performance or other similar issues. -- ___ Python tracker __

[issue17251] LWPCookieJar load() set domain_specifed wrong

2013-03-07 Thread B. Kyven
B. Kyven added the comment: I now realized LWPCookieJar is a subclass of CookieJar but it behaves differently. I believe there are other quirks I haven't discovered, like expire=None which cause exception in LWPCookieJar, but works fine for CookieJar. Sadly the doc didn't mention them. The of

[issue11732] Skip decorator for tests requiring manual intervention on Windows

2013-03-07 Thread Ezio Melotti
Ezio Melotti added the comment: GetErrorMode wasn't available on XP/2k3, so I changed the patch to use only SetErrorMode. I also backported it to 3.2, since ctypes has the same crashing test of 3.3/default. If I got everything right there shouldn't be anymore crash popups while running the te

[issue13477] tarfile module should have a command line

2013-03-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This can confuse users. Note that even jar (which works with zip-like files) honors tar interface. -- ___ Python tracker ___

[issue11732] Skip decorator for tests requiring manual intervention on Windows

2013-03-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset c0c440dcb8dd by Ezio Melotti in branch '3.2': #11732: add a new suppress_crash_popup() context manager to test.support that disables crash popups on Windows and use it in test_ctypes. http://hg.python.org/cpython/rev/c0c440dcb8dd New changeset 89d6

[issue13477] tarfile module should have a command line

2013-03-07 Thread Éric Araujo
Éric Araujo added the comment: I am more in favor of having something simple and similar to zipfile, like Lars, rather than following tar. -- ___ Python tracker ___

[issue13564] ftplib and sendfile()

2013-03-07 Thread Charles-François Natali
Changes by Charles-François Natali : -- nosy: -neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue13564] ftplib and sendfile()

2013-03-07 Thread Charles-François Natali
Charles-François Natali added the comment: > Then why 'offset' and 'count' parameters have a different data type? Because offsets can be negative (e.g. for lseek), while a size can't. That's why 'count' is size_t, not ssize_t. >> Furthermore, since sendfile actually supports only regular file a

[issue8402] Add a function to escape metacharacters in glob/fnmatch

2013-03-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it should be a separate issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue11732] Skip decorator for tests requiring manual intervention on Windows

2013-03-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6ccefddc13fd by Ezio Melotti in branch '3.3': #11732: make suppress_crash_popup() work on Windows XP and Windows Server 2003. http://hg.python.org/cpython/rev/6ccefddc13fd New changeset 831035bda9b7 by Ezio Melotti in branch 'default': #11732: merge

[issue17379] Zen amendment

2013-03-07 Thread R. David Murray
R. David Murray added the comment: Yeah, but in this case I think Antoine is right. This kind of "argument" is the kind of argument that is used to shut down discussion, in form whether or not in substance. Which is too bad, because it is nicely clever. -- nosy: +r.david.murray

[issue8402] Add a function to escape metacharacters in glob/fnmatch

2013-03-07 Thread Matthew Barnett
Matthew Barnett added the comment: I've attached fnmatch_implementation.py, which is a simple pure-Python implementation of the fnmatch function. It's not as susceptible to catastrophic backtracking as the current re-based one. For example: fnmatch('a' * 50, '*a*' * 50) completes quickly. -

[issue13477] tarfile module should have a command line

2013-03-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It will be good if Berker and Ankur will merge their patches. Ankur's patch has some very useful features, but Berker's patch looks more mature. I prefer to emulate a subset of the tar utility interface too. -- __

[issue17379] Zen amendment

2013-03-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Mar 07, 2013, at 03:58 PM, Antoine Pitrou wrote: >Disagreed. This is the kind of sentence that cannot be correctly >understood without the (missing) original context. Plus, we fear change. ;) -- ___ Python track

[issue17379] Zen amendment

2013-03-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Disagreed. This is the kind of sentence that cannot be correctly understood without the (missing) original context. It is also, IMHO, a rather poor wording. The categories of "civilized" and "barbarian", as any kind of binary thinking (us vs. them) are routinely

[issue17379] Zen amendment

2013-03-07 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue13564] ftplib and sendfile()

2013-03-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > 'count' is size_t, like for mmap() and any other function accepting a > length, so nothing wrong can happen. Then why 'offset' and 'count' parameters have a different data type? Linux: sendfile(..., off_t *offset, size_t count); Solaris: sendfile(...,

[issue15873] "datetime" cannot parse ISO 8601 dates and times

2013-03-07 Thread Anders Hovmöller
Anders Hovmöller added the comment: I've written a parser for ISO 8601: https://github.com/boxed/iso8601 Some basic tests are included and it supports most of the standard. Haven't gotten around to the more obscure parts like durations and intervals, but those are trivial to add... --

[issue17379] Zen amendment

2013-03-07 Thread Christian Heimes
New submission from Christian Heimes: Tim came up with a fitting amendment to the Zen of Python. It pretty much sums up our future Code of Conduct in one sentence. But see for yourself! ;) -- files: zen_amendment.patch keywords: patch messages: 183671 nosy: christian.heimes, tim_one pr

[issue13564] ftplib and sendfile()

2013-03-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > As for your "blocksize = filesize" argument I changed my opinion: > despite being less CPU consuming we might incur into problems if > that number is too big. 'count' parameter on Linux, for example, is > expected to be an unsigned int. > Other plarforms will

[issue17378] Document that ctypes automatically applies byref() when argtypes declares POINTER

2013-03-07 Thread Thomas Heller
Thomas Heller added the comment: Patch looks good. Please apply. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue13564] ftplib and sendfile()

2013-03-07 Thread Charles-François Natali
Charles-François Natali added the comment: > It's necessary because sendfile() can fail with EAGAIN. It can fail with EAGAIN if the input FD is non-blocking, exactly like the current implementation which calls fp.read(). Furthermore, since sendfile actually supports only regular file and regular

[issue17376] TimedRotatingFileHandler documentation regarding 'Week day' lacking

2013-03-07 Thread karl
karl added the comment: Is it better like this? See the patch. -- keywords: +patch nosy: +karlcow Added file: http://bugs.python.org/file29341/issue-17376-doc-3.3.patch ___ Python tracker __

[issue13564] ftplib and sendfile()

2013-03-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: It's necessary because sendfile() can fail with EAGAIN. As for your "blocksize = filesize" argument I changed my opinion: despite being less CPU consuming we might incur into problems if that number is too big. 'count' parameter on Linux, for example, is e

[issue16576] ctypes: structure with bitfields as argument

2013-03-07 Thread Eli Bendersky
Eli Bendersky added the comment: The patch addresses issue16575 as well -- nosy: +theller ___ Python tracker ___ ___ Python-bugs-list

[issue17377] JSON module in standard library behaves incorrectly on input like a psutil constant

2013-03-07 Thread R. David Murray
R. David Murray added the comment: Right, the appropriate thing to do there is to write a custom encoder/decoder to handle those objects. json only automatically handles types that work like the fundamental types, and this is a good thing, security-wise :) -- nosy: +r.david.murray res

[issue17378] Document that ctypes automatically applies byref() when argtypes declares POINTER

2013-03-07 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: +amaury.forgeotdarc, theller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17378] Document that ctypes automatically applies byref() when argtypes declares POINTER

2013-03-07 Thread Eli Bendersky
Eli Bendersky added the comment: Doc patch for 3.2 -- keywords: +patch Added file: http://bugs.python.org/file29340/issue17378.1.patch ___ Python tracker ___

[issue17327] Add PyDict_GetItemSetDefault() as C-API for dict.setdefault()

2013-03-07 Thread Stefan Behnel
Stefan Behnel added the comment: The problem with 'default' is that it is a reserved word in C. I changed it to "defaultobj", except for the docs page, where "default" should work. I also removed the "register" declaration from the "mp" argument because it is most likely useless and just takes

[issue17378] Document that ctypes automatically applies byref() when argtypes declares POINTER

2013-03-07 Thread Eli Bendersky
New submission from Eli Bendersky: While playing with ctypes a bit, I noticed a feature that doesn't appear to be documented. Suppose I import the readdir_r function (assuming DIRENT is a correctly declared ctypes.Structure): DIR_p = c_void_p DIRENT_p = POINTER(DIRENT) DIRENT_pp = POINTER(DIRE

[issue15465] Improved documentation for C API version info

2013-03-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset adeafab9a18f by Nick Coghlan in branch '3.3': Close #15465: Document C API version macros http://hg.python.org/cpython/rev/adeafab9a18f New changeset a1373861f62f by Nick Coghlan in branch 'default': Merge fix for #15465 from 3.3 http://hg.python.or

[issue17375] Add docstrings to methods in the threading module

2013-03-07 Thread karl
karl added the comment: Ah bummer! :) it was already done. :) Well it seems already well commented in the review. :) Closing this one as duplicate? -- ___ Python tracker ___ __

[issue17375] Add docstrings to methods in the threading module

2013-03-07 Thread Eli Bendersky
Eli Bendersky added the comment: Duplicate of #12768? karl - feel free to review the patch submitted to that issue and offer your insights. -- nosy: +eli.bendersky ___ Python tracker _

[issue17375] Add docstrings to methods in the threading module

2013-03-07 Thread karl
karl added the comment: Here an attempt at fixing it. See issue-17375-1.patch for Python 3.3 Hope it helps. -- keywords: +patch nosy: +karlcow Added file: http://bugs.python.org/file29338/issue-17375-1.patch ___ Python tracker

[issue13477] tarfile module should have a command line

2013-03-07 Thread Ankur Ankan
Ankur Ankan added the comment: Thanks for your comments Serhiy. I have improved the patch according to your comments. Please have a look. And I am writing tests. -- Added file: http://bugs.python.org/file29337/issue_13477_v2 ___ Python tracker

[issue13564] ftplib and sendfile()

2013-03-07 Thread Charles-François Natali
Charles-François Natali added the comment: > In the meantime I rewrote the original patch and got rid of the > "use_sendfile" explicit argument in order to attempt to use sendfile() by > default and fall back on using send() if bytes sent were 0. """ # block until socket is writable select.sel

[issue13564] ftplib and sendfile()

2013-03-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: It seems you're right, sorry. We need to take that into account then. In the meantime I rewrote the original patch and got rid of the "use_sendfile" explicit argument in order to attempt to use sendfile() by default and fall back on using send() if bytes se

[issue17377] JSON module in standard library behaves incorrectly on input like a psutil constant

2013-03-07 Thread Sven Slootweg
New submission from Sven Slootweg: When faced with a subclass of int like a psutil constant (such as for process status), that actually returns a non-numeric string when used with str(), the JSON module will serialize it as a string without quotes. An example... Code (Python): [...] "key": ps

[issue17376] TimedRotatingFileHandler documentation regarding 'Week day' lacking

2013-03-07 Thread Tshepang Lekhonkhobe
New submission from Tshepang Lekhonkhobe: Usage of 'W' type is not clear from reading the documentation, specifically how to specify what day-of-week: Doc/library/logging.handlers.rst:291. An example http://stackoverflow.com/q/14304954/321731. -- assignee: docs@python components: Docum

[issue17374] Remove restriction against Semaphore having a negative value

2013-03-07 Thread Charles-François Natali
Charles-François Natali added the comment: > As for accepting negative initialization values, it sounds like a reasonable > request. One reason for rejecting would be if it makes writing a fast > implementation harder. Also, multiprocessing.Semaphore should be kept > compatible with threading.

[issue17338] Add length_hint parameter to list, dict, set constructors to allow efficient presizing

2013-03-07 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue9556] Specifying the time a TimedRotatingFileHandler rotates

2013-03-07 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue17323] Disable [X refs, Y blocks] ouput in debug builds

2013-03-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: _Py_GetRefTotal() wouldn't be available in non-debug builds IIRC. -- nosy: +pitrou ___ Python tracker ___ __

[issue17366] os.chdir win32

2013-03-07 Thread Dave Humphries
Dave Humphries added the comment: Thanks for the thoughtful response Tim, I am obviously not being clear with the way I express this. os.chdir uses a common string but these strings represent a special subset of strings. I'm not sure about mac and linux but windows has arrange of characters that

[issue17374] Remove restriction against Semaphore having a negative value

2013-03-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: We already have a Barrier class actually: http://docs.python.org/dev/library/threading.html#barrier-objects As for accepting negative initialization values, it sounds like a reasonable request. One reason for rejecting would be if it makes writing a fast impl

[issue17374] Remove restriction against Semaphore having a negative value

2013-03-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: > 3. When a thread increments the semaphore, if there are other > threads waiting, one of the waiting threads gets unblocked. Is a condition missing here? "if the resulting count is positive" Since the use case is different from a regular Semaphore,

[issue16321] Move eq.h out of stringlib

2013-03-07 Thread moijes12
moijes12 added the comment: Changes made according to the Sehiy's last comment. Include/Python.h has not been modified as it doesn't need one. Also, make files have been changed. -- keywords: +patch nosy: +moijes12 Added file: http://bugs.python.org/file29335/16321.patch __

[issue17375] Add docstrings to methods in the threading module

2013-03-07 Thread Raymond Hettinger
New submission from Raymond Hettinger: It should be an easy task fill-in the missing docstrings using the verbiage in the regular docs. -- assignee: docs@python components: Documentation keywords: easy messages: 183645 nosy: docs@python, rhettinger priority: normal severity: normal stat

[issue17366] os.chdir win32

2013-03-07 Thread Tim Golden
Tim Golden added the comment: Dave, you seem to misunderstand what's happening here: the os.chdir function doesn't have access to the characters which are typed in the script or in the interpreter. It receives a Python string object. The parser etc. which constructs the string object determines w

  1   2   >