[issue17414] timeit.timeit not in __all__ even though documented

2013-03-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset dda8a6b8a351 by Terry Jan Reedy in branch 'default': Issue #17414: Add timeit, repeat, and default_timer to timeit.__all__. http://hg.python.org/cpython/rev/dda8a6b8a351 -- nosy: +python-dev ___ Python tr

[issue17414] timeit.timeit not in __all__ even though documented

2013-03-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Fred Drake, Eli Bendersky, and in particular, Guido ("I do see that it shouldn't be backported, but I don't see any worries about doing it in 3.4.") said that this is a 3.4-only enhancement. Anuj, ACKS are alphabetical. Åstrand is at the end because that is wh

[issue17414] timeit.timeit not in __all__ even though documented

2013-03-15 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue17415] Clarify docs of os.path.normpath()

2013-03-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: The question is what is the 'this' that may change the patch meaning. It does not seem to me that changing '/' to '\' would do that. So I suspect 'this' refers to 'collapsing'. If so, I suggest the entry be: Normalize a pathname (but not the case -- use no

[issue17047] Fix double double words words

2013-03-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4b28a6a3eda6 by Terry Jan Reedy in branch '3.2': Issue #17047: Add news entry http://hg.python.org/cpython/rev/4b28a6a3eda6 New changeset 937989570b42 by Terry Jan Reedy in branch '3.3': Merge with 3.2: issue #17047 news entry http://hg.python.org/c

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread Ezio Melotti
Ezio Melotti added the comment: PERL uses $& for the whole match rather than $0. That would explain why \0 is not supported. For .group() it probably made sense to access the whole match using 0 rather than passing something else, and that was likely reflected in the \g<...> form, but not in

[issue17047] Fix double double words words

2013-03-15 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: enhancement -> behavior ___ Python tracker ___ ___

[issue17047] Fix double double words words

2013-03-15 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- assignee: docs@python -> terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue17428] replace readdir to readdir_r in function posix_listdir

2013-03-15 Thread Rock Li
New submission from Rock Li: When I'm how glob module is implemented. I found in file posixmodule.c, the function posix_listdir is using readdir to get all the entries under one directory and the context is setted to allow multi threads. But the function readdir is not thread-safe, so I change

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread anatoly techtonik
anatoly techtonik added the comment: The perl syntax supported $0 according to this doc http://turtle.ee.ncku.edu.tw/docs/perl/manual/pod/perlre.html but was removed for unknown reason. Using the fact that support is removed without knowing the true reason is "cargo cult argument", which I hop

[issue13918] locale.atof documentation is missing func argument

2013-03-15 Thread Cédric Krier
Cédric Krier added the comment: Here is a patch for the documentation. -- keywords: +patch resolution: wont fix -> Added file: http://bugs.python.org/file29414/doc_atof.patch ___ Python tracker ___

[issue17053] pydoc should use inspect.signature instead of inspect.getfullargspec

2013-03-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: The attached patch appears to work correctly and includes a test for pydoc (text output). There could be more testing (HTML output, annotations, positional-only arguments). With this patch I can get usable documentation for Cocoa classes with a patched versi

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread Matthew Barnett
Matthew Barnett added the comment: The regex behaves the same as re. The reason it isn't supported is that \0 starts an octal escape sequence. -- ___ Python tracker ___

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread Guido van Rossum
Guido van Rossum added the comment: Anatoly, your argument for consistency with other languages is ridiculous. -- ___ Python tracker ___ _

[issue1291] test_resource fails on recent linux systems

2013-03-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 59292f366b53 by Senthil Kumaran in branch 'default': #1291 http.server's send_error takes an optional explain argument http://hg.python.org/cpython/rev/59292f366b53 -- nosy: +python-dev ___ Python tracker

[issue12921] http.server.BaseHTTPRequestHandler.send_error , ability send a detailed response

2013-03-15 Thread Senthil Kumaran
Senthil Kumaran added the comment: I have added explain argument in 3.4, committed changeset 82669:59292f366b53 I think the short message no trailing line assertion should be taken by next. Either a new issue it if already open or create one just for the purpose. Thanks Karl for the patch. --

[issue12921] http.server.BaseHTTPRequestHandler.send_error , ability send a detailed response

2013-03-15 Thread karl
karl added the comment: Thanks! Yes we should open a separate issue. I will look at the current patch and see what I can propose for the next step. -- ___ Python tracker ___ ___

[issue12921] http.server.BaseHTTPRequestHandler.send_error , ability send a detailed response

2013-03-15 Thread karl
karl added the comment: just a minor issue you made a mistake in the commit message. The issue number is 12921 -- ___ Python tracker ___

[issue17429] platform.platform() can throw Unicode error

2013-03-15 Thread Toshio Kuratomi
New submission from Toshio Kuratomi: Tested on python-3.2 and python-3.3. platform.platform() looks for a file in /etc/ that looks like it will contain the name of the Linux distribution that python3 is running on. Once found, it reads the contents of the file to have a name for the Linux di

[issue17429] platform.platform() can throw Unicode error

2013-03-15 Thread Toshio Kuratomi
Changes by Toshio Kuratomi : -- keywords: +patch Added file: http://bugs.python.org/file29416/00175-platform-unicode.patch ___ Python tracker ___

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread anatoly techtonik
anatoly techtonik added the comment: Matthew, finally the right answer. Thanks! Looking further, there is a bug in processing backslashes in raw literal replacement strings. re.sub ignores raw strings as replacements. This can be even more confusing for people who look for more advanced equiv

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread Guido van Rossum
Guido van Rossum added the comment: Anatoly, your question belongs on python-list or stack overflow, not in the tracker. --Guido van Rossum (sent from Android phone) On Mar 15, 2013 9:28 AM, "anatoly techtonik" wrote: > > anatoly techtonik added the comment: > > Matthew, finally the right answ

[issue17386] Bring Doc/make.bat as close to Doc/Makefile as possible

2013-03-15 Thread Zachary Ware
Zachary Ware added the comment: Applying the minipatch makes the big patch fail to apply, so here's an update. Also changed in this version of the patch: - README.txt is updated. Not all the changes directly relate to this patch, but there were some needed updates in there anyway. If desire

[issue17386] Bring Doc/make.bat as close to Doc/Makefile as possible

2013-03-15 Thread Zachary Ware
Changes by Zachary Ware : Removed file: http://bugs.python.org/file29417/win_doc_make.v2.diff ___ Python tracker ___ ___ Python-bugs-list mail

[issue17386] Bring Doc/make.bat as close to Doc/Makefile as possible

2013-03-15 Thread Zachary Ware
Changes by Zachary Ware : Added file: http://bugs.python.org/file29418/win_doc_make.v2.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread anatoly techtonik
anatoly techtonik added the comment: I thought that trackers are used to track the sources of the bugs. Aren't they? -- ___ Python tracker ___ ___

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread anatoly techtonik
anatoly techtonik added the comment: Users list the effect. Then a research is made to find the source. Then a decision is made to find the right cause for the source of the bug, and then a decision about if the fix is possible. The bug is closed, but that doesn't mean we can not dedicate some

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Anatoly, your last question about re.sub is covered by the documentation: re.sub will process the replacement string, and interpret the sequence \ 0 as the NUL character. So you get the NUL character in the returned string. This is unrelated to raw litera

[issue17429] platform.platform() can throw Unicode error

2013-03-15 Thread Martin v . Löwis
Martin v. Löwis added the comment: What's the most likely encoding? UTF-8? I suggest we assume UTF-8, and use the surrogate-escape error handler to deal with the cases when it isn't. -- nosy: +loewis ___ Python tracker

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread anatoly techtonik
anatoly techtonik added the comment: Amaury, the documentation could make it more clear that it is a double replacement. Of course I payed attention to the repeated instructions about string substitution, but I thought that it is just a reminder, not an extra processing layer on top of standar

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread anatoly techtonik
anatoly techtonik added the comment: FWIW, I reimplemented substitution logic in my wikify [1] engine some time ago. I was kind of disappointed that I have to reinvent the bicycle, but now I see that this was for good. Thanks to people in this report I now understand the whole stuff much bette

[issue17426] \0 in re.sub substitutes to space

2013-03-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: It's not a double replacement: chr(92)+chr(0) is processed only once. And the second paragraph of the re documentation already contains such a warning. -- ___ Python tracker

[issue17423] libffi on 32bit is broken on linux

2013-03-15 Thread Simon Cross
Changes by Simon Cross : -- nosy: +hodgestar ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue17430] missed peephole optimization

2013-03-15 Thread Neal Norwitz
New submission from Neal Norwitz: >>> def fo(): ... if a: ... if b: ... if c: ...print ... >>> dis.dis(fo) 2 0 LOAD_GLOBAL 0 (a) 3 POP_JUMP_IF_FALSE 28 3 6 LOAD_GLOBAL 1 (b) 9 POP_JUMP_IF_FALS

[issue17337] input() and raw_input() do not work correctly with colored prompts

2013-03-15 Thread Michael Enßlin
Michael Enßlin added the comment: Terry, i guess you are right; it is indeed not the job of python to know how its terminal will print characters; there is a whole lot of issues to consider, such as terminal unicode support, control characters, ansi escape sequences, terminal-specific escape s

[issue17431] email.parser module has no attribute BytesFeedParser

2013-03-15 Thread Forest Wilkinson
New submission from Forest Wilkinson: The docs claim that email.parser.BytesFeedParser exists, but it doesn't. Looks like email.feedparser.FeedParser is imported into the email.parser module, but someone forgot to do the same for BytesFeedParser. -- components: email messages: 184247

[issue17431] email.parser module has no attribute BytesFeedParser

2013-03-15 Thread R. David Murray
R. David Murray added the comment: Thanks for the report. -- keywords: +easy stage: -> needs patch versions: +Python 3.4 ___ Python tracker ___ _

[issue17400] ipaddress.is_private needs to take into account of rfc6598

2013-03-15 Thread pmoody
pmoody added the comment: Is the request that is_private should return true for all reserved/non-routable addresses? The docstrings refer to specific rfcs which don't cover most of the addresses listed in the wikipedia page. I haven't done a lot of network programming in the last couple of yea

[issue17428] replace readdir to readdir_r in function posix_listdir

2013-03-15 Thread Ross Lagerwall
Ross Lagerwall added the comment: Hi, There shouldn't be a problem with the existing implementation since, according to posix: """ The pointer returned by readdir() points to data which may be overwritten by another call to readdir() on the same directory stream. This data is not overwritten

[issue13918] locale.atof documentation is missing func argument

2013-03-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: I find the idea of intentionally not documenting a public parameter and the full signature of a function somewhat strange, especially when it is already automatically partially-documented. >>> import locale >>> help(locale.atof) Help on function atof in module

[issue14468] Update cloning guidelines in devguide

2013-03-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7a707540391e by Ezio Melotti in branch 'default': #14468: add FAQs about merge conflicts, null merges, and heads merges. http://hg.python.org/devguide/rev/7a707540391e -- ___ Python tracker

[issue10652] test___all_ + test_tcl fails (Windows installed binary)

2013-03-15 Thread Zachary Ware
Zachary Ware added the comment: I was recently bitten by this issue. I've reviewed Terry's patch on Rietveld, and have tested it myself some. It seems to get the job done without getting in the way. -- nosy: +zach.ware ___ Python tracker

[issue17398] document url argument of RobotFileParser

2013-03-15 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- assignee: docs@python -> terry.reedy nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs-list mai

[issue17398] document url argument of RobotFileParser

2013-03-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 274e68e2a5a6 by Terry Jan Reedy in branch '2.7': Issue #17398: document url argument of RobotFileParser http://hg.python.org/cpython/rev/274e68e2a5a6 New changeset 4be7f8da7adf by Terry Jan Reedy in branch '3.2': Issue #17398: document url argument

[issue10652] test___all_ + test_tcl fails (Windows installed binary)

2013-03-15 Thread Ezio Melotti
Ezio Melotti added the comment: Would using import_fresh_module() in test_tcl (and others) work? -- versions: +Python 3.4 ___ Python tracker ___ _

[issue17398] document url argument of RobotFileParser

2013-03-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Agreed. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker ___

[issue17337] input() and raw_input() do not work correctly with colored prompts

2013-03-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Please suggest the specific change in a specific place that you would like to see. Message is ok, patch even better. -- ___ Python tracker ___

[issue17400] ipaddress.is_private needs to take into account of rfc6598

2013-03-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Peter, 'Assigned To' is a developer who intends to push (or has pushed) a patch. Anyone can write and attach one. And it is nice to give notice that you intend to. -- nosy: +ncoghlan, terry.reedy ___ Python tracker

[issue1159051] Handle corrupted gzip files with unexpected EOF

2013-03-15 Thread Matthias Klose
Matthias Klose added the comment: this change breaks a test case in the bzr testsuite; will try to get to it next week. See https://launchpad.net/bugs/1116079 -- nosy: +doko, larry priority: normal -> release blocker ___ Python tracker

[issue17400] ipaddress.is_private needs to take into account of rfc6598

2013-03-15 Thread Lei Miao
Lei Miao added the comment: is_private should return true for all prefixes that are intended for *private* use, hence it should include rfc1918 and rfc6598. rfc6598 stipulates 100.64.0.0/10 On 16 March 2013 06:34, pmoody wrote: > > pmoody added the comment: > > Is the request that is_private s

[issue17408] second python execution fails when embedding

2013-03-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Can you tell if the relevant 3.2 to 3.3 change is in Py_Initialize, Py_Finalize(), or typeobject.c? -- nosy: +ncoghlan, terry.reedy ___ Python tracker

[issue10652] test___all_ + test_tcl fails (Windows installed binary)

2013-03-15 Thread Zachary Ware
Zachary Ware added the comment: It does, in fact. Here's a patch. -- Added file: http://bugs.python.org/file29419/issue10652.v2.diff ___ Python tracker ___ _

[issue17409] resource.setrlimit doesn't respect -1

2013-03-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Module 'resource' is unix only. What happens on 3.x or linux? Given that the doc invites input of -1, it seems to me that raising an exception is wrong; -1 should be interpreted as a valid value. -- nosy: +terry.reedy

[issue17411] Build failures with non-NDEBUG, non-Py_DEBUG builds.

2013-03-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: The patch changes unicodeobject.c and obmalloc.c Thomas, is the problem new to 3.3 (and the new unicode implementation)? -- nosy: +benjamin.peterson, ezio.melotti, haypo, pitrou, terry.reedy ___ Python tracker

[issue17411] Build failures with non-NDEBUG, non-Py_DEBUG builds.

2013-03-15 Thread Thomas Wouters
Thomas Wouters added the comment: Yes, I already had the same kinds of failures fixed for 3.2, before; this only affects 3.3 and later. -- ___ Python tracker ___ ___

[issue17416] Clarify docs of os.walk()

2013-03-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: The unambiguous title of your first report was better, so I copied it with a new method name. Changing a parameter name will break code, so it is essentially never done. In any case, directory trees are considered to grow 'down' from the root directory, and t

[issue17429] platform.platform() can throw Unicode error

2013-03-15 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I agree. In my experience, utf-8 is the most common encoding. Updated patch that defaults to utf-8 instead of the user's locale is attached. -- Added file: http://bugs.python.org/file29420/00175-platform-unicode.patch ___

[issue17432] PyUnicode_ functions not accessible in Limited API on Windows

2013-03-15 Thread Bill Dirks
New submission from Bill Dirks: This issue was discovered in 3.3.0 on Windows. Haven't looked at other versions. Using the Limited API, the PyUnicode_Xxxx() functions are not accessible. A simple demonstration of the problem: HMODULE p3 = ::LoadLibraryA("C:\\Python33\\DLLs\\python3.dll");

[issue17417] Documentation Modification Suggestion: os.walk, fwalk

2013-03-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Our standard is to start function doc entries with verbs. In any case, it is irrelevant whether os.walk is a generator function or iterator class. Which is to say, it is not part of the language definition that the object returned by os.walk() is specifically

[issue17411] Build failures with non-NDEBUG, non-Py_DEBUG builds.

2013-03-15 Thread STINNER Victor
STINNER Victor added the comment: I added _PyUnicode_CheckConsistency() to Python 3.3 to check the implementation of the PEP 393, this function should not be called in release mode, that's just it is not defined in release mode. -- ___ Python tracke

[issue17411] Build failures with non-NDEBUG, non-Py_DEBUG builds.

2013-03-15 Thread STINNER Victor
STINNER Victor added the comment: > that's just it is not defined in release mode. that's *why* 2013/3/15 STINNER Victor : > > STINNER Victor added the comment: > > I added _PyUnicode_CheckConsistency() to Python 3.3 to check the > implementation of the PEP 393, this function should not be cal

[issue17411] Build failures with non-NDEBUG, non-Py_DEBUG builds.

2013-03-15 Thread Thomas Wouters
Thomas Wouters added the comment: Unfortunately there is no "release mode". There's Py_DEBUG mode, and the absence of Py_DEBUG. And there's NDEBUG, and the absence of NDEBUG, which controls the assert macro. Py_DEBUG unsets NDEBUG, but *not* setting Py_DEBUG doesn't *set* NDEBUG (nor should it

[issue17433] stdlib generator-like iterators don't forward send/throw

2013-03-15 Thread Thomas Wouters
New submission from Thomas Wouters: In response to a question asked at Brett Cannon's Python 3.3 talk at PyCon, it occurs to me the iterators in the itertools module should participate in generator sending, so that you can do this: def report_first_ten(g): s = itertools.islice(g, 10) y

[issue17431] email.parser module has no attribute BytesFeedParser

2013-03-15 Thread Edmond Burnett
Edmond Burnett added the comment: Working on a patch for this. -- nosy: +edmond.burnett ___ Python tracker ___ ___ Python-bugs-list ma

[issue17432] PyUnicode_ functions not accessible in Limited API on Windows

2013-03-15 Thread Martin v . Löwis
Martin v. Löwis added the comment: The Unicode functions were left out of the limited API precisely because of the UCS2/UCS4 issue. If you have an extension module on a narrow Python build using the limited API, it should work without recompilation on a wide build as well. Now, with Python 3.3

[issue17418] Documentation for os.open and io.open

2013-03-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is really two issues: io.open: Your statement about *buffering* not correct is not helpful. Quote the sentence you think is wrong. I am guessing it is "Pass ... an integer > 1 to indicate the size of a fixed-size chunk buffer". Then quote some code from t

[issue17431] email.parser module has no attribute BytesFeedParser

2013-03-15 Thread Edmond Burnett
Changes by Edmond Burnett : -- keywords: +patch Added file: http://bugs.python.org/file29421/issue17431_3.4.patch ___ Python tracker ___ _

[issue17434] str literals, which are not docstrings, should not be allowed between __future__ imports

2013-03-15 Thread Arfrever Frehtes Taifersar Arahesis
New submission from Arfrever Frehtes Taifersar Arahesis: test1.py shows that a str literal before first import from __future__ is a docstring. test2.py shows that a str literal after first import from __future__ is not a docstring. test2.py shows that if docstring is absent, then a single str l

[issue17435] threading.Timer.__init__() should use immutable argument defaults for args and kwargs

2013-03-15 Thread Denver Coneybeare
New submission from Denver Coneybeare: The __init__() method of threading.Timer uses *mutable* default values for the "args" and "kwargs" arguments. Since the default argument objects are created once and re-used for each instance, this means that changing the args list or kwargs dict of a Ti

[issue15806] Add context manager for the "try: ... except: pass" pattern

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

[issue15805] Add stdout redirection tool to contextlib

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

[issue17431] email.parser module has no attribute BytesFeedParser

2013-03-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4e6cf15e55c1 by R David Murray in branch '3.2': #17431: Fix missing import of BytesFeedParser in email.parser. http://hg.python.org/cpython/rev/4e6cf15e55c1 New changeset 45f6925906bf by R David Murray in branch '3.3': Merge: #17431: Fix missing imp

[issue17431] email.parser module has no attribute BytesFeedParser

2013-03-15 Thread R. David Murray
R. David Murray added the comment: Thanks, Edmond. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker

[issue16057] Subclasses of JSONEncoder should not be insturcted to call JSONEncoder.decode

2013-03-15 Thread Éric Araujo
Changes by Éric Araujo : -- keywords: +needs review stage: needs patch -> patch review versions: +Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___ __

[issue11420] Make testsuite pass with -B/DONTWRITEBYTECODE set.

2013-03-15 Thread Éric Araujo
Éric Araujo added the comment: Looks fine. Can this go into 2.7 too? -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-lis

[issue17420] bdist_wininst does not play well with unicode descriptions

2013-03-15 Thread Éric Araujo
Changes by Éric Araujo : -- assignee: -> eric.araujo components: +Distutils nosy: +eric.araujo, tarek ___ Python tracker ___ ___ Pyth

[issue17435] threading.Timer.__init__() should use immutable argument defaults for args and kwargs

2013-03-15 Thread R. David Murray
R. David Murray added the comment: Hmm. This wasn't an issue before 3.3 because previously one couldn't subclass Timer. So yeah, this needs to be fixed, but only in 3.3 and tip. Thanks for the patch. -- nosy: +r.david.murray stage: -> patch review versions: -Python 2.7, Python 3.1,

[issue17428] replace readdir to readdir_r in function posix_listdir

2013-03-15 Thread Rock Li
Rock Li added the comment: Hi Ross, What about if one implementation of posix use the global variable to store something. From `man readdir`, I didn't see the sentence "This data is not overwritten by another call to readdir() on a different directory stream.". And from the link you gived,

[issue10652] test___all_ + test_tcl fails (Windows installed binary)

2013-03-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Once I worked around the example.bat problems so repository _tkinter will run for one python version (3.2), Zach's patch seems to solve the test problem as well as mine, and it is better self-contained. In other words, python -m test -ugui test___all__ test_tcl

[issue17239] XML vulnerabilities in Python

2013-03-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Since this has dragged on for quite a while, I'm probably just going to release 2.7.4 with a pointer to defusedxml in the release notes. (docs, though, perhaps) -- ___ Python tracker

[issue17428] replace readdir to readdir_r in function posix_listdir

2013-03-15 Thread R. David Murray
R. David Murray added the comment: My man page says "The data returned by readdir() may be overwritten by subsequent calls to readdir() for the same directory stream." Ross I believe was quoting from the posix *spec*, so that is a more complete explanation. If an implementation is doing wh

[issue17434] str literals, which are not docstrings, should not be allowed between __future__ imports

2013-03-15 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Jython and PyPy properly raise SyntaxError for test2.py. -- ___ Python tracker ___

[issue16310] zipfile: allow surrogates in filenames

2013-03-15 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: I found some "standards" docs that could bear on this: http://www.pkware.com/documents/casestudies/APPNOTE.TXT Appendix D: "D.1 The ZIP format has historically supported only the original IBM PC character encoding set, commonly referred to as IBM Code Page 43

[issue17239] XML vulnerabilities in Python

2013-03-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Since this has dragged on for quite a while, I'm probably > just going to release 2.7.4 with a pointer to defusedxml > in the release notes. (docs, though, perhaps) +1 -- nosy: +rhettinger ___ Python tracker <

[issue15805] Add stdout redirection tool to contextlib

2013-03-15 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: ncoghlan -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue10652] test___all_ + test_tcl fails (Windows installed binary)

2013-03-15 Thread Ezio Melotti
Ezio Melotti added the comment: LGTM. The changes on os.environ should be unrelated. I've seen a few other tests (e.g. test_distutils) that change it on Windows, and started writing a patch for it, but I never finished it. -- assignee: -> terry.reedy stage: commit review -> patch re

[issue17415] Clarify docs of os.path.normpath()

2013-03-15 Thread Ezio Melotti
Ezio Melotti added the comment: Your suggestion -- assuming it's accurate -- looks good to me, however I would get rid of the exclamation mark and move the link to normcase at the end: """ Normalize a pathname by collapsing redundant separators and up-level references so that A//B, A/B/, A/./B

[issue13918] locale.atof documentation is missing func argument

2013-03-15 Thread Ezio Melotti
Ezio Melotti added the comment: The function was introduced by Guido in f5b55311e79d. I think it would have been better if atof had another name (e.g. _atof) and that atof and atoi were implemented as: def atof(str): return _atof(str, float) def atoi(str): return _atof(str, int) Even

[issue17432] PyUnicode_ functions not accessible in Limited API on Windows

2013-03-15 Thread Bill Dirks
Bill Dirks added the comment: A great number of PyUnicode functions are already added to the Limited API. That is, the declarations are outside of #ifndef Py_LIMITED_API guards in the header files, and the symbols are included in python3.lib and exported from python3.dll. (in 3.3.0) Can't tho

[issue10652] test___all_ + test_tcl fails (Windows installed binary)

2013-03-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: After editing 2.7 files to match Zach's patch, and also after adding the changes in my patch, and also deleting tcltk directory and rerunning external.bat to rebuild tcltk/ for 2.7 with tcl/tk 8.5.2, the tests still do not all work right. -- F:\Pyt

[issue13918] locale.atof documentation is missing func argument

2013-03-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: The refactoring could be done if we were willing to give the normalize function a public name, so people could write Decimal(delocalize()) or if we were willing to add atod and atofr (fraction). However, simply adding a few words to the doc is a lot easier. --

[issue17428] replace readdir to readdir_r in function posix_listdir

2013-03-15 Thread Ross Lagerwall
Ross Lagerwall added the comment: That text was from the POSIX 2008 spec: http://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html The following text from my copy of the readdir manpage gives an indication of how you *should* allocate struct dirent when using readdir_r: """ Since