[issue13564] ftplib and sendfile()

2013-03-07 Thread Charles-François Natali
Charles-François Natali added the comment: The transfer won't be faster mainly because it's really I/O bound. But it will use less CPU, only because you're making less syscalls. Have you actually measured this? vanilla over Gb/s: real0m9.035s user0m0.523s sys 0m1.412s

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

2013-03-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for the idea. Please change failobj to default to keep the terminology consistent with the pure Python API. For reference, here's the code from collections.MutableMapping: def setdefault(self, key, default=None): try: return

[issue10712] 2to3 fixer for deprecated unittest method names

2013-03-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are reasons why Ezio did not include assert*Regexp*-assert*Regex* in his patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10712 ___

[issue17360] Regular expressions on mmap'd files can overflow

2013-03-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps it was fixed in issue10181. Is it reproduced on Python 2.7 build from current sources? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17360

[issue17360] Regular expressions on mmap'd files can overflow

2013-03-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, this is issue10182. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17360 ___ ___ Python-bugs-list

[issue17374] Remove restriction against Semaphore having a negative value

2013-03-07 Thread Raymond Hettinger
New submission from Raymond Hettinger: I was working through the problem sets in The Little Book of Semaphores (http://www.greenteapress.com/semaphores/downey08semaphores.pdf) and ran into an issue because Python's threading.Semaphore has an unnecessary restriction against having negative

[issue17374] Remove restriction against Semaphore having a negative value

2013-03-07 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17374 ___ ___

[issue17374] Remove restriction against Semaphore having a negative value

2013-03-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: For reference, here is the Java API for a Semaphore ( http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/Semaphore.html ): Semaphore - public Semaphore(int permits) Creates a Semaphore with the given number of permits and nonfair

[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

[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

[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

[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, I

[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

[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

[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 rep...@bugs.python.org http://bugs.python.org/issue17323 ___

[issue9556] Specifying the time a TimedRotatingFileHandler rotates

2013-03-07 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9556 ___ ___ Python-bugs-list

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

2013-03-07 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17338 ___ ___

[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

[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:

[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:

[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

[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.select([],

[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

[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 rep...@bugs.python.org

[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 rep...@bugs.python.org http://bugs.python.org/issue17375

[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 rep...@bugs.python.org http://bugs.python.org/issue17375

[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

[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 =

[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 up

[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 rep...@bugs.python.org http://bugs.python.org/issue17378 ___

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

2013-03-07 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- nosy: +amaury.forgeotdarc, theller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17378 ___ ___

[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

[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 rep...@bugs.python.org http://bugs.python.org/issue16576 ___

[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

[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 rep...@bugs.python.org http://bugs.python.org/issue17376

[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

[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 rep...@bugs.python.org http://bugs.python.org/issue17378 ___ ___ Python-bugs-list

[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 also

[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

[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...

[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(...,

[issue17379] Zen amendment

2013-03-07 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17379 ___ ___ Python-bugs-list mailing

[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
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

[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. --

[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.

[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

[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:

[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 rep...@bugs.python.org http://bugs.python.org/issue8402 ___ ___

[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 and

[issue13564] ftplib and sendfile()

2013-03-07 Thread Charles-François Natali
Changes by Charles-François Natali cf.nat...@gmail.com: -- nosy: -neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13564 ___ ___

[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 rep...@bugs.python.org http://bugs.python.org/issue13477

[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

[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 rep...@bugs.python.org http://bugs.python.org/issue13477

[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

[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

[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 rep...@bugs.python.org

[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,

[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

[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:

[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 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 rep...@bugs.python.org

[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 rep...@bugs.python.org http://bugs.python.org/issue17379 ___

[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 repository/Doc/ is the current directory. Then we would not have to repeat in multiple places. There was a somewhat related discussion

[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 rep...@bugs.python.org http://bugs.python.org/issue17327 ___

[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: PyDict_SetDefault mimicks the Python API, though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17327 ___

[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 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 rep...@bugs.python.org http://bugs.python.org/issue17327 ___

[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 Stefan Behnel
Stefan Behnel added the comment: I'm fine with PyDict_GetItemOrSetDefault() as well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17327 ___

[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 rep...@bugs.python.org

[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

[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 rdmur...@bitdance.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17369 ___ ___

[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) 'Архангельская губерния'

[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 if

[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 be put in

[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

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

2013-03-07 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10224 ___ ___

[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

[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 rep...@bugs.python.org http://bugs.python.org/issue17327 ___

[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 active

[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'

[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

[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 active and

[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

[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

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

2013-03-07 Thread Ashwini Chaudhary
Changes by Ashwini Chaudhary monty.sin...@gmail.com: -- nosy: +montysinngh ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17383 ___ ___

[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

[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

[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 rep...@bugs.python.org http://bugs.python.org/issue17223 ___

[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

[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

[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', +

[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 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

[issue13477] tarfile module should have a command line

2013-03-07 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: Removed file: http://bugs.python.org/file29291/issue13477.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13477 ___

[issue13477] tarfile module should have a command line

2013-03-07 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: Removed file: http://bugs.python.org/file29346/issue13477_v3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13477 ___

[issue13477] tarfile module should have a command line

2013-03-07 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: Added file: http://bugs.python.org/file29347/issue13477_v3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13477 ___

[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', +

  1   2   >